Browse Source

Cleanup: Don't pass a writable scratch buffer off to dozens of virtual

functions -- that's just silly!
Michael Hansen 11 years ago
parent
commit
8323758d33
  1. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp
  2. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h
  3. 62
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp
  4. 4
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h
  5. 11
      Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp
  6. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h
  7. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h
  8. 46
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp
  9. 8
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h
  10. 14
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp
  11. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h
  12. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp
  13. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h
  14. 25
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp
  15. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h
  16. 147
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp
  17. 22
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp
  18. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h
  19. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h
  20. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp
  21. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h
  22. 20
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp
  23. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h
  24. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp

2
Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp

@ -716,7 +716,7 @@ int plAnimStage::GetPrevStage(int curStage)
} }
// DUMPDEBUG // DUMPDEBUG
void plAnimStage::DumpDebug(bool active, int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAnimStage::DumpDebug(bool active, int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
plStringStream str; plStringStream str;

2
Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h

@ -231,7 +231,7 @@ public:
plAGAnimInstance *GetAnimInstance() const { return fAnimInstance; }; plAGAnimInstance *GetAnimInstance() const { return fAnimInstance; };
bool GetReverseOnIdle() { return fReverseOnIdle; } bool GetReverseOnIdle() { return fReverseOnIdle; }
void SetReverseOnIdle(bool onOff) { fReverseOnIdle = onOff; } void SetReverseOnIdle(bool onOff) { fReverseOnIdle = onOff; }
void DumpDebug(bool active, int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void DumpDebug(bool active, int &x, int &y, int lineHeight, plDebugText &debugTxt);
// STANDARD PLASMA PROTOCOL // STANDARD PLASMA PROTOCOL
virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr);

62
Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp

@ -2649,7 +2649,6 @@ void plArmatureLODMod::Write(hsStream *stream, hsResMgr *mgr)
int plArmatureMod::RefreshDebugDisplay() int plArmatureMod::RefreshDebugDisplay()
{ {
plDebugText &debugTxt = plDebugText::Instance(); plDebugText &debugTxt = plDebugText::Instance();
char strBuf[ 2048 ];
int lineHeight = debugTxt.GetFontSize() + 4; int lineHeight = debugTxt.GetFontSize() + 4;
uint32_t scrnWidth, scrnHeight; uint32_t scrnWidth, scrnHeight;
@ -2657,14 +2656,13 @@ int plArmatureMod::RefreshDebugDisplay()
int y = 10; int y = 10;
int x = 10; int x = 10;
DumpToDebugDisplay(x, y, lineHeight, strBuf, debugTxt); DumpToDebugDisplay(x, y, lineHeight, debugTxt);
return y; return y;
} }
void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
sprintf(strBuf, "Armature <%s>:", fRootName.c_str()); debugTxt.DrawString(x, y, plString::Format("Armature <%s>:", fRootName.c_str()), 255, 128, 128);
debugTxt.DrawString(x, y, strBuf, 255, 128, 128);
y += lineHeight; y += lineHeight;
plSceneObject * SO = GetTarget(0); plSceneObject * SO = GetTarget(0);
@ -2675,9 +2673,8 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
hsPoint3 worldPos = l2w.GetTranslate(); hsPoint3 worldPos = l2w.GetTranslate();
const char *opaque = IsOpaque() ? "yes" : "no"; const char *opaque = IsOpaque() ? "yes" : "no";
sprintf(strBuf, "position(world): %.2f, %.2f, %.2f Opaque: %3s", debugTxt.DrawString(x, y, plString::Format("position(world): %.2f, %.2f, %.2f Opaque: %3s",
worldPos.fX, worldPos.fY, worldPos.fZ, opaque); worldPos.fX, worldPos.fY, worldPos.fZ, opaque));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
const char* frozen = "n.a."; const char* frozen = "n.a.";
@ -2688,32 +2685,34 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
plKey world = nil; plKey world = nil;
if (fController) if (fController)
world = fController->GetSubworld(); world = fController->GetSubworld();
sprintf(strBuf, "In world: %s Frozen: %s", world ? world->GetName().c_str() : "nil", frozen); debugTxt.DrawString(x, y, plString::Format("In world: %s Frozen: %s",
debugTxt.DrawString(x,y, strBuf); world ? world->GetName().c_str() : "nil", frozen));
y+= lineHeight; y+= lineHeight;
plString details;
if (fController) if (fController)
{ {
hsPoint3 physPos; hsPoint3 physPos;
GetPositionAndRotationSim(&physPos, nil); GetPositionAndRotationSim(&physPos, nil);
const hsVector3& vel = fController->GetLinearVelocity(); const hsVector3& vel = fController->GetLinearVelocity();
sprintf(strBuf, "position(physical): <%.2f, %.2f, %.2f> velocity: <%5.2f, %5.2f, %5.2f>", physPos.fX, physPos.fY, physPos.fZ, vel.fX, vel.fY, vel.fZ); details = plString::Format("position(physical): <%.2f, %.2f, %.2f> velocity: <%5.2f, %5.2f, %5.2f>",
physPos.fX, physPos.fY, physPos.fZ, vel.fX, vel.fY, vel.fZ);
} }
else else
{ {
sprintf(strBuf, "position(physical): no controller"); details = "position(physical): no controller";
} }
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, details);
y += lineHeight; y += lineHeight;
} }
DebugDumpMoveKeys(x, y, lineHeight, strBuf, debugTxt); DebugDumpMoveKeys(x, y, lineHeight, debugTxt);
int i; int i;
for(i = 0; i < fBrains.size(); i++) for(i = 0; i < fBrains.size(); i++)
{ {
plArmatureBrain *brain = fBrains[i]; plArmatureBrain *brain = fBrains[i];
brain->DumpToDebugDisplay(x, y, lineHeight, strBuf, debugTxt); brain->DumpToDebugDisplay(x, y, lineHeight, debugTxt);
} }
if (fClothingOutfit) if (fClothingOutfit)
@ -2722,30 +2721,30 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
debugTxt.DrawString(x, y, "ItemsWorn:"); debugTxt.DrawString(x, y, "ItemsWorn:");
y += lineHeight; y += lineHeight;
strBuf[0] = '\0'; plStringStream outfit;
int itemCount = 0; int itemCount = 0;
for (i = 0; i < fClothingOutfit->fItems.GetCount(); i++) for (i = 0; i < fClothingOutfit->fItems.GetCount(); i++)
{ {
if (itemCount == 0) if (itemCount == 0)
strcat(strBuf, " "); outfit << " ";
strcat(strBuf, fClothingOutfit->fItems[i]->fName); outfit << fClothingOutfit->fItems[i]->fName;
itemCount++; itemCount++;
if (itemCount == 4) if (itemCount == 4)
{ {
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, outfit.GetString());
itemCount = 0; itemCount = 0;
strBuf[0] = '\0'; outfit.Truncate();
y += lineHeight; y += lineHeight;
} }
if (itemCount > 0) if (itemCount > 0)
strcat(strBuf, ", "); outfit << ", ";
} }
if (itemCount > 0) if (itemCount > 0)
{ {
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, outfit.GetString());
y += lineHeight; y += lineHeight;
} }
} }
@ -2756,11 +2755,11 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
debugTxt.DrawString(x, y, "Relevance Regions:"); debugTxt.DrawString(x, y, "Relevance Regions:");
y += lineHeight; y += lineHeight;
sprintf(strBuf, " In: %s", plRelevanceMgr::Instance()->GetRegionNames(fRegionsImIn).c_str()); debugTxt.DrawString(x, y, plString::Format(" In: %s",
debugTxt.DrawString(x, y, strBuf); plRelevanceMgr::Instance()->GetRegionNames(fRegionsImIn).c_str()));
y += lineHeight; y += lineHeight;
sprintf(strBuf, " Care about: %s", plRelevanceMgr::Instance()->GetRegionNames(fRegionsICareAbout).c_str()); debugTxt.DrawString(x, y, plString::Format(" Care about: %s",
debugTxt.DrawString(x, y, strBuf); plRelevanceMgr::Instance()->GetRegionNames(fRegionsICareAbout).c_str()));
y += lineHeight; y += lineHeight;
} }
} }
@ -2799,17 +2798,18 @@ void plAvBoneMap::AddBoneMapping(uint32_t boneID, const plSceneObject *SO)
(fImp->fMap)[boneID] = SO; (fImp->fMap)[boneID] = SO;
} }
void plArmatureMod::DebugDumpMoveKeys(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plArmatureMod::DebugDumpMoveKeys(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
char buff[256]; char buff[256];
sprintf(buff, "Mouse Input Map: %s", plAvatarInputInterface::GetInstance()->GetInputMapName()); snprintf(buff, sizeof(buff), "Mouse Input Map: %s", plAvatarInputInterface::GetInstance()->GetInputMapName());
debugTxt.DrawString(x, y, buff); debugTxt.DrawString(x, y, buff);
y += lineHeight; y += lineHeight;
sprintf(buff, "Turn strength: %.2f (key: %.2f, analog: %.2f)", GetTurnStrength(), GetKeyTurnStrength(), GetAnalogTurnStrength()); snprintf(buff, sizeof(buff), "Turn strength: %.2f (key: %.2f, analog: %.2f)",
GetTurnStrength(), GetKeyTurnStrength(), GetAnalogTurnStrength());
debugTxt.DrawString(x, y, buff); debugTxt.DrawString(x, y, buff);
y += lineHeight; y += lineHeight;
GetMoveKeyString(buff); GetMoveKeyString(buff);
debugTxt.DrawString(x, y, buff); debugTxt.DrawString(x, y, buff);
y += lineHeight; y += lineHeight;

4
Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h

@ -278,7 +278,7 @@ public:
void SetTurnLeftKeyDown(bool status = true); void SetTurnLeftKeyDown(bool status = true);
void SetTurnRightKeyDown(bool status = true); void SetTurnRightKeyDown(bool status = true);
void SetJumpKeyDown(); void SetJumpKeyDown();
void DebugDumpMoveKeys(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void DebugDumpMoveKeys(int &x, int &y, int lineHeight, plDebugText &debugTxt);
void GetMoveKeyString(char *buff); void GetMoveKeyString(char *buff);
void SynchIfLocal(double timeNow, int force); // Just physical state void SynchIfLocal(double timeNow, int force); // Just physical state
@ -310,7 +310,7 @@ public:
void SetRootName(const plString &name); void SetRootName(const plString &name);
int RefreshDebugDisplay(); int RefreshDebugDisplay();
void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt);
void SetDebugState(bool state) { fDebugOn = (state != 0); } void SetDebugState(bool state) { fDebugOn = (state != 0); }
bool GetDebugState() { return fDebugOn; } bool GetDebugState() { return fDebugOn; }

11
Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp

@ -101,7 +101,7 @@ void plArmatureBehavior::Rewind()
fAnim->SetCurrentTime(0.0f, true); fAnim->SetCurrentTime(0.0f, true);
} }
void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
float strength = GetStrength(); float strength = GetStrength();
const char *onOff = strength > 0 ? "on" : "off"; const char *onOff = strength > 0 ? "on" : "off";
@ -109,16 +109,17 @@ void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, char *strBuf,
int bars = (int)min(10 * strength, 10); int bars = (int)min(10 * strength, 10);
blendBar[bars] = '\0'; blendBar[bars] = '\0';
plString details;
if (fAnim) if (fAnim)
{ {
plString animName = fAnim->GetName(); plString animName = fAnim->GetName();
float time = fAnim->GetTimeConvert()->CurrentAnimTime(); float time = fAnim->GetTimeConvert()->CurrentAnimTime();
sprintf(strBuf, "%20s %3s time: %5.2f %s", animName.c_str(), onOff, time, blendBar); details = plString::Format("%20s %3s time: %5.2f %s", animName.c_str(), onOff, time, blendBar);
} }
else else
sprintf(strBuf, " Behavior %2d %3s %s", fIndex, onOff, blendBar); details = plString::Format(" Behavior %2d %3s %s", fIndex, onOff, blendBar);
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, details);
y += lineHeight; y += lineHeight;
} }

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h

@ -65,7 +65,7 @@ public:
virtual void SetStrength(float val, float rate = 0.f); // default instant change virtual void SetStrength(float val, float rate = 0.f); // default instant change
virtual float GetStrength(); virtual float GetStrength();
virtual void Rewind(); virtual void Rewind();
void DumpDebug(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void DumpDebug(int &x, int &y, int lineHeight, plDebugText &debugTxt);
enum enum
{ {

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h

@ -81,7 +81,7 @@ public:
virtual bool LeaveAge(); virtual bool LeaveAge();
virtual bool IsRunningTask() const; virtual bool IsRunningTask() const;
virtual void QueueTask(plAvTask *task); virtual void QueueTask(plAvTask *task);
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) {} virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt) {}
virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr);

46
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp

@ -884,7 +884,7 @@ void plAvBrainClimb::LoadFromSDL(const plStateDataRecord *sdl)
// DumpToDebugDisplay -------------------------------------------------------------------------------------- // DumpToDebugDisplay --------------------------------------------------------------------------------------
// ------------------ // ------------------
void plAvBrainClimb::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainClimb::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
debugTxt.DrawString(x, y, "Brain type: Climb"); debugTxt.DrawString(x, y, "Brain type: Climb");
y += lineHeight; y += lineHeight;
@ -896,31 +896,31 @@ void plAvBrainClimb::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *st
debugTxt.DrawString(x,y, buffy); debugTxt.DrawString(x,y, buffy);
y += lineHeight; y += lineHeight;
IDumpClimbDirections(x, y, lineHeight, strBuf, debugTxt); IDumpClimbDirections(x, y, lineHeight, debugTxt);
IDumpDismountDirections(x, y, lineHeight, strBuf, debugTxt); IDumpDismountDirections(x, y, lineHeight, debugTxt);
IDumpBlockedDirections(x, y, lineHeight, strBuf, debugTxt); IDumpBlockedDirections(x, y, lineHeight, debugTxt);
fUp->DumpDebug(fUp == fCurStage, x, y, lineHeight, strBuf, debugTxt); fUp->DumpDebug(fUp == fCurStage, x, y, lineHeight, debugTxt);
fDown->DumpDebug(fDown == fCurStage, x, y, lineHeight, strBuf, debugTxt); fDown->DumpDebug(fDown == fCurStage, x, y, lineHeight, debugTxt);
fLeft->DumpDebug(fLeft == fCurStage, x, y, lineHeight, strBuf, debugTxt); fLeft->DumpDebug(fLeft == fCurStage, x, y, lineHeight, debugTxt);
fRight->DumpDebug(fRight == fCurStage, x, y, lineHeight, strBuf, debugTxt); fRight->DumpDebug(fRight == fCurStage, x, y, lineHeight, debugTxt);
fMountUp->DumpDebug(fMountUp == fCurStage, x, y, lineHeight, strBuf, debugTxt); fMountUp->DumpDebug(fMountUp == fCurStage, x, y, lineHeight, debugTxt);
fMountDown->DumpDebug(fMountDown == fCurStage, x, y, lineHeight, strBuf, debugTxt); fMountDown->DumpDebug(fMountDown == fCurStage, x, y, lineHeight, debugTxt);
fMountLeft->DumpDebug(fMountLeft == fCurStage, x, y, lineHeight, strBuf, debugTxt); fMountLeft->DumpDebug(fMountLeft == fCurStage, x, y, lineHeight, debugTxt);
fMountRight->DumpDebug(fMountRight == fCurStage, x, y, lineHeight, strBuf, debugTxt); fMountRight->DumpDebug(fMountRight == fCurStage, x, y, lineHeight, debugTxt);
fDismountUp->DumpDebug(fDismountUp == fCurStage, x, y, lineHeight, strBuf, debugTxt); fDismountUp->DumpDebug(fDismountUp == fCurStage, x, y, lineHeight, debugTxt);
fDismountDown->DumpDebug(fDismountDown == fCurStage, x, y, lineHeight, strBuf, debugTxt); fDismountDown->DumpDebug(fDismountDown == fCurStage, x, y, lineHeight, debugTxt);
fDismountLeft->DumpDebug(fDismountLeft == fCurStage, x, y, lineHeight, strBuf, debugTxt); fDismountLeft->DumpDebug(fDismountLeft == fCurStage, x, y, lineHeight, debugTxt);
fDismountRight->DumpDebug(fDismountRight == fCurStage, x, y, lineHeight, strBuf, debugTxt); fDismountRight->DumpDebug(fDismountRight == fCurStage, x, y, lineHeight, debugTxt);
fIdle->DumpDebug(fIdle == fCurStage, x, y, lineHeight, strBuf, debugTxt); fIdle->DumpDebug(fIdle == fCurStage, x, y, lineHeight, debugTxt);
fRelease->DumpDebug(fRelease == fCurStage, x, y, lineHeight, strBuf, debugTxt); fRelease->DumpDebug(fRelease == fCurStage, x, y, lineHeight, debugTxt);
fFallOff->DumpDebug(fFallOff == fCurStage, x, y, lineHeight, strBuf, debugTxt); fFallOff->DumpDebug(fFallOff == fCurStage, x, y, lineHeight, debugTxt);
} }
// IDumpClimbDirections -------------------------------------------------------------------------------------- // IDumpClimbDirections --------------------------------------------------------------------------------------
// -------------------- // --------------------
void plAvBrainClimb::IDumpClimbDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainClimb::IDumpClimbDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
const char * prolog = "Allowed directions: "; const char * prolog = "Allowed directions: ";
std::string str; std::string str;
@ -944,7 +944,7 @@ void plAvBrainClimb::IDumpClimbDirections(int &x, int &y, int lineHeight, char *
// IDumpDismountDirections -------------------------------------------------------------------------------------- // IDumpDismountDirections --------------------------------------------------------------------------------------
// ----------------------- // -----------------------
void plAvBrainClimb::IDumpDismountDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainClimb::IDumpDismountDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
const char * prolog = "Enabled dismounts: "; const char * prolog = "Enabled dismounts: ";
std::string str; std::string str;
@ -966,7 +966,7 @@ void plAvBrainClimb::IDumpDismountDirections(int &x, int &y, int lineHeight, cha
y += lineHeight; y += lineHeight;
} }
void plAvBrainClimb::IDumpBlockedDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainClimb::IDumpBlockedDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
const char * prolog = "Physically blocked: "; const char * prolog = "Physically blocked: ";
std::string str; std::string str;

8
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h

@ -103,7 +103,7 @@ public:
virtual void SaveToSDL(plStateDataRecord *sdl); virtual void SaveToSDL(plStateDataRecord *sdl);
virtual void LoadFromSDL(const plStateDataRecord *sdl); virtual void LoadFromSDL(const plStateDataRecord *sdl);
void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt);
const char * WorldDirStr(plClimbMsg::Direction dir); const char * WorldDirStr(plClimbMsg::Direction dir);
const char *ModeStr(Mode mode); const char *ModeStr(Mode mode);
@ -173,9 +173,9 @@ private:
*/ */
bool IProcessExitStage(double time, float elapsed); bool IProcessExitStage(double time, float elapsed);
void IDumpClimbDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void IDumpClimbDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt);
void IDumpDismountDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void IDumpDismountDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt);
void IDumpBlockedDirections(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); void IDumpBlockedDirections(int &x, int &y, int lineHeight, plDebugText &debugTxt);
//////////////////////////// ////////////////////////////
// //

14
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp

@ -435,23 +435,21 @@ void plAvBrainCritter::RemoveReceiver(const plKey key)
return; // not found, do nothing return; // not found, do nothing
} }
void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, char* strBuf, plDebugText& debugTxt) void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, plDebugText& debugTxt)
{ {
sprintf(strBuf, "Brain type: Critter"); debugTxt.DrawString(x, y, "Brain type: Critter", 0, 255, 255);
debugTxt.DrawString(x, y, strBuf, 0, 255, 255);
y += lineHeight; y += lineHeight;
// extract the name from the behavior running // extract the name from the behavior running
plString mode = "Mode: Unknown";
if (fBehaviors[fCurMode]) if (fBehaviors[fCurMode])
sprintf(strBuf, "Mode: %s", ((CritterBehavior*)(fBehaviors[fCurMode]))->Name().c_str()); mode = plString::Format("Mode: %s", ((CritterBehavior*)(fBehaviors[fCurMode]))->Name().c_str());
else
sprintf(strBuf, "Mode: Unknown");
// draw it // draw it
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, mode);
y += lineHeight; y += lineHeight;
for (int i = 0; i < fBehaviors.GetCount(); ++i) for (int i = 0; i < fBehaviors.GetCount(); ++i)
fBehaviors[i]->DumpDebug(x, y, lineHeight, strBuf, debugTxt); fBehaviors[i]->DumpDebug(x, y, lineHeight, debugTxt);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h

@ -133,7 +133,7 @@ public:
void AddReceiver(const plKey key); void AddReceiver(const plKey key);
void RemoveReceiver(const plKey key); void RemoveReceiver(const plKey key);
virtual void DumpToDebugDisplay(int& x, int& y, int lineHeight, char* strBuf, plDebugText& debugTxt); virtual void DumpToDebugDisplay(int& x, int& y, int lineHeight, plDebugText& debugTxt);
// For the console // For the console
static bool fDrawDebug; static bool fDrawDebug;

4
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp

@ -946,7 +946,7 @@ void plAvBrainGeneric::SetBodyUsage(plAGAnim::BodyUsage bodyUsage)
// DumpToDebugDisplay ---------------------------------------------------------------------------------------- // DumpToDebugDisplay ----------------------------------------------------------------------------------------
// ------------------- // -------------------
void plAvBrainGeneric::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainGeneric::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
debugTxt.DrawString(x, y, "Brain type: Generic AKA Multistage"); debugTxt.DrawString(x, y, "Brain type: Generic AKA Multistage");
y += lineHeight; y += lineHeight;
@ -955,7 +955,7 @@ void plAvBrainGeneric::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *
for(int i = 0; i < stageCount; i++) for(int i = 0; i < stageCount; i++)
{ {
plAnimStage *stage = (*fStages)[i]; plAnimStage *stage = (*fStages)[i];
stage->DumpDebug(i == fCurStage, x, y, lineHeight, strBuf, debugTxt); stage->DumpDebug(i == fCurStage, x, y, lineHeight, debugTxt);
} }
} }

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h

@ -252,7 +252,7 @@ public:
MoveMode GetMoveMode() { return fMoveMode; } MoveMode GetMoveMode() { return fMoveMode; }
/** Output the brain's status to the avatar debug screen. */ /** Output the brain's status to the avatar debug screen. */
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt);
// plasma protocol // plasma protocol
bool MsgReceive(plMessage *msg); bool MsgReceive(plMessage *msg);

25
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp

@ -896,28 +896,19 @@ bool plAvBrainHuman::LeaveAge()
return false; return false;
} }
void plAvBrainHuman::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainHuman::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
sprintf(strBuf, "Brain type: Human"); debugTxt.DrawString(x, y, "Brain type: Human");
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
const char *grounded = fWalkingStrategy->IsOnGround() ? "yes" : "no"; const char *grounded = fWalkingStrategy->IsOnGround() ? "yes" : "no";
const char *pushing = (fWalkingStrategy->GetPushingPhysical() ? (fWalkingStrategy->GetFacingPushingPhysical() ? "facing" : "behind") : "none"); const char *pushing = (fWalkingStrategy->GetPushingPhysical() ? (fWalkingStrategy->GetFacingPushingPhysical() ? "facing" : "behind") : "none");
sprintf(strBuf, "Ground: %3s, AirTime: %5.2f (Peak: %5.2f), PushingPhys: %6s", debugTxt.DrawString(x, y, plString::Format("Ground: %3s, AirTime: %5.2f (Peak: %5.2f), PushingPhys: %6s",
grounded, fWalkingStrategy->GetAirTime(), fWalkingStrategy->GetImpactTime(), pushing); grounded, fWalkingStrategy->GetAirTime(), fWalkingStrategy->GetImpactTime(), pushing));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
int i; for (int i = 0; i < fBehaviors.GetCount(); i++)
//strBuf[0] = '\0'; fBehaviors[i]->DumpDebug(x, y, lineHeight, debugTxt);
//for (i = 0; i < 32; i++)
// strcat(strBuf, fPreconditions & (0x1 << i) ? "1" : "0");
//debugTxt.DrawString(x, y, strBuf);
//y += lineHeight;
for (i = 0; i < fBehaviors.GetCount(); i++)
fBehaviors[i]->DumpDebug(x, y, lineHeight, strBuf, debugTxt);
debugTxt.DrawString(x, y, "Tasks:"); debugTxt.DrawString(x, y, "Tasks:");
y += lineHeight; y += lineHeight;
@ -928,7 +919,7 @@ void plAvBrainHuman::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *st
y += lineHeight; y += lineHeight;
int indentedX = x + 4; int indentedX = x + 4;
fCurTask->DumpDebug("-", indentedX, y, lineHeight, strBuf, debugTxt); fCurTask->DumpDebug("-", indentedX, y, lineHeight, debugTxt);
} }
int tasks = fTaskQueue.size(); int tasks = fTaskQueue.size();
if(tasks > 0) if(tasks > 0)
@ -941,7 +932,7 @@ void plAvBrainHuman::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *st
for (int i = 0; i < tasks; i++) for (int i = 0; i < tasks; i++)
{ {
plAvTask *each = fTaskQueue[i]; plAvTask *each = fTaskQueue[i];
each->DumpDebug("-", indentedX, y, lineHeight, strBuf, debugTxt); each->DumpDebug("-", indentedX, y, lineHeight, debugTxt);
} }
} }
} }

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h

@ -97,7 +97,7 @@ public:
virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr);
virtual bool MsgReceive(plMessage *msg); virtual bool MsgReceive(plMessage *msg);
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt);
// Hardwired Identifiers for all the canonical bones. // Hardwired Identifiers for all the canonical bones.
enum HumanBoneID { enum HumanBoneID {

147
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp

@ -1,147 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
//class plAvBrainStaticNPC : public plAvBrain
//{
//
//};
//
///** \class plAvBrain
// Virtual base class for the modular avatar & creature brains.
// A brain is a modular object which can be installed into a plArmatureMod
// to drive it around in the scene. Some brains are for creature ai;
// others intepret user input. The most interesting brain for reference is
// probably plAvBrainHuman, which implements the control system for the
// user's avatar.
// /sa plAvBrainHuman, plArmatureMod
//*/
//class plAvBrainStaticNPC : public plAvBrainStaticNPC
//{
//public:
// /** Default constructor - constructs the brain but does not attach it.
// Brains are always constructed before being Pushed onto the armature
// they seek to control. */
// plAvBrain();
//
// /** Destructor. Automatically called on a brain when it is popped from the armature. */
// virtual ~plAvBrain();
//
// // BRAIN PROTOCOL
// /** This brain has just been freshly pushed onto an armature and is now
// in primary control. Note that brains beneath it on the stack may
// still have effect on the armature; any messages which the top
// brain doesn't handle will propagate down to the next brain in line.
// */
// virtual bool Activate(plArmatureMod *avMod);
//
// /** Has the brain resolved all its load-time dependencies? This is a mechanism
// to allow newly loading creatures to reach a known state before they
// are asked to load secondary state or to interact with the environment.
// */
// virtual bool IsReady();
//
// /** This brain has just been removed from its armature and is about to be destructed. */
// virtual bool Deactivate();
//
// /** This is the top brain and it's time for it to evaluate. Called during eval
// time for the armature modifier. Only the topmost brain gets an apply
// call; others must do any necessary background work during MsgReceive. */
// virtual bool Apply(double timeNow, hsScalar elapsed);
//
// /** Another brain has been pushed atop this brain. Drop into the background.
// We'll still receive any messages that the upper brain doesn't eat. */
// virtual bool Suspend();
//
// /** We were suspended, but now we're on top of the brain stack again. */
// virtual bool Resume();
//
// // \name Spawning \{
// /** Do any necessary custom action upon spawning afresh in a new age.
// For the human brain, this simply consists of noting that we have
// spawned and we can stop trying to do so. */
// virtual void Spawn(double timeNow) {};
//
// /** Custom behavior for entering an age. Binding the camera, audio source, etc. */
// virtual void EnterAge(bool reSpawn) {};
//
// /** Custom behavior for leaving an age. Free any attachments to camera, audio, etc. */
// virtual void LeaveAge() {};
//
// // TASKS
// // tasks are operations that must be done in sequence.
// /** Push a new task onto the end of our FIFO task queue. Will not
// run until all the tasks ahead of it have run.
// \sa plAvTask
// */
// virtual void QueueTask(plAvTask *task);
//
//
// virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
//
//
// // PLASMOTICS
// CLASSNAME_REGISTER( plAvBrain );
// GETINTERFACE_ANY( plAvBrain, plCreatable );
//
// virtual void Write(hsStream *stream, hsResMgr *mgr);
// virtual void Read(hsStream *stream, hsResMgr *mgr);
//
// virtual void SaveAux(hsStream *stream, hsResMgr *mgr);
// virtual void LoadAux(hsStream *stream, hsResMgr *mgr, double time);
//
// virtual bool MsgReceive(plMessage *msg);
//
//
//protected:
// plArmatureMod *fAvMod; // the avatar we're controlling
//
// // TASKS
// // -- variables
// typedef std::deque<plAvTask *> plAvTaskQueue;
// plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on
// plAvTask *fCurTask; // the task we're working on right now
// // -- methods
// virtual bool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message
// void IProcessTasks(double time, hsScalar elapsed); // process current task and start new one if necessary
//
// bool fSuspended;
//};
//

22
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp

@ -594,42 +594,38 @@ bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
} }
void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
{ {
sprintf(strBuf, "Brain type: Swim"); debugTxt.DrawString(x, y, "Brain type: Swim", 0, 255, 255);
debugTxt.DrawString(x, y, strBuf, 0, 255, 255);
y += lineHeight; y += lineHeight;
switch(fMode) { switch(fMode) {
case kWading: case kWading:
sprintf(strBuf, "Mode: Wading"); debugTxt.DrawString(x, y, "Mode: Wading");
break; break;
case kSwimming2D: case kSwimming2D:
sprintf(strBuf, "Mode: Swimming2D"); debugTxt.DrawString(x, y, "Mode: Swimming2D");
break; break;
case kSwimming3D: case kSwimming3D:
sprintf(strBuf, "Mode: Swimming3D"); debugTxt.DrawString(x, y, "Mode: Swimming3D");
break; break;
case kAbort: case kAbort:
sprintf(strBuf, "Mode: Abort (you should never see this)"); debugTxt.DrawString(x, y, "Mode: Abort (you should never see this)");
break; break;
default: default:
break; break;
} }
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
float buoy = fSwimStrategy ? fSwimStrategy->GetBuoyancy() : 0.0f; float buoy = fSwimStrategy ? fSwimStrategy->GetBuoyancy() : 0.0f;
sprintf(strBuf, "Distance to surface: %f Buoyancy: %f", fSurfaceDistance, buoy); debugTxt.DrawString(x, y, plString::Format("Distance to surface: %f Buoyancy: %f", fSurfaceDistance, buoy));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
hsVector3 linV = fAvMod->GetController()->GetAchievedLinearVelocity(); hsVector3 linV = fAvMod->GetController()->GetAchievedLinearVelocity();
sprintf(strBuf, "Linear Velocity: (%5.2f, %5.2f, %5.2f)", linV.fX, linV.fY, linV.fZ); debugTxt.DrawString(x, y, plString::Format("Linear Velocity: (%5.2f, %5.2f, %5.2f)", linV.fX, linV.fY, linV.fZ));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
int i; int i;
for (i = 0; i < fBehaviors.GetCount(); i++) for (i = 0; i < fBehaviors.GetCount(); i++)
fBehaviors[i]->DumpDebug(x, y, lineHeight, strBuf, debugTxt); fBehaviors[i]->DumpDebug(x, y, lineHeight, debugTxt);
} }

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h

@ -66,7 +66,7 @@ public:
virtual void Deactivate(); virtual void Deactivate();
virtual void Suspend(); virtual void Suspend();
virtual void Resume(); virtual void Resume();
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt);
bool MsgReceive(plMessage *msg); bool MsgReceive(plMessage *msg);
bool IsWalking(); bool IsWalking();
bool IsWading(); bool IsWading();

2
Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h

@ -94,7 +94,7 @@ public:
virtual void LeaveAge(plArmatureMod *avatar) {} virtual void LeaveAge(plArmatureMod *avatar) {}
/** dump descriptive stuff to the given debug text */ /** dump descriptive stuff to the given debug text */
virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt);
// plasma protocol // plasma protocol
CLASSNAME_REGISTER( plAvTask ); CLASSNAME_REGISTER( plAvTask );

2
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp

@ -94,7 +94,7 @@ void plAvTaskBrain::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double
// DumpDebug ------------------------------------------------------------------------------------------------------ // DumpDebug ------------------------------------------------------------------------------------------------------
// ---------- // ----------
void plAvTaskBrain::DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvTaskBrain::DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt)
{ {
if(fBrain) if(fBrain)
{ {

2
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h

@ -75,7 +75,7 @@ public:
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** dump descriptive stuff to the given debug text */ /** dump descriptive stuff to the given debug text */
virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt);
plArmatureBrain *GetBrain(); plArmatureBrain *GetBrain();

20
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp

@ -556,22 +556,20 @@ bool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
// DumpDebug ----------------------------------------------------------------------------------------------------- // DumpDebug -----------------------------------------------------------------------------------------------------
// ---------- // ----------
void plAvTaskSeek::DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvTaskSeek::DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt)
{ {
sprintf(strBuf, "duration: %.2f pos: (%.3f, %.3f, %.3f) goalPos: (%.3f, %.3f, %.3f) ", debugTxt.DrawString(x, y, plString::Format("duration: %.2f pos: (%.3f, %.3f, %.3f) goalPos: (%.3f, %.3f, %.3f) ",
hsTimer::GetSysSeconds() - fStartTime, hsTimer::GetSysSeconds() - fStartTime,
fPosition.fX, fPosition.fY, fPosition.fZ, fSeekPos.fX, fSeekPos.fY, fSeekPos.fZ); fPosition.fX, fPosition.fY, fPosition.fZ, fSeekPos.fX, fSeekPos.fY, fSeekPos.fZ));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
sprintf(strBuf, "positioning: %d rotating %d goalVec: (%.3f, %.3f, %.3f) dist: %.3f angFwd: %.3f angRt: %.3f", debugTxt.DrawString(x, y, plString::Format("positioning: %d rotating %d goalVec: (%.3f, %.3f, %.3f) dist: %.3f angFwd: %.3f angRt: %.3f",
fStillPositioning, fStillRotating, fGoalVec.fX, fGoalVec.fY, fGoalVec.fZ, fDistance, fAngForward, fAngRight); fStillPositioning, fStillRotating, fGoalVec.fX, fGoalVec.fY, fGoalVec.fZ,
debugTxt.DrawString(x, y, strBuf); fDistance, fAngForward, fAngRight));
y += lineHeight; y += lineHeight;
sprintf(strBuf, " distFwd: %.3f distRt: %.3f shufRange: %.3f sidAngle: %.3f sidRange: %.3f, fMinWalk: %.3f", debugTxt.DrawString(x, y, plString::Format(" distFwd: %.3f distRt: %.3f shufRange: %.3f sidAngle: %.3f sidRange: %.3f, fMinWalk: %.3f",
fDistForward, fDistRight, fShuffleRange, fMaxSidleAngle, fMaxSidleRange, fMinFwdAngle); fDistForward, fDistRight, fShuffleRange, fMaxSidleAngle, fMaxSidleRange, fMinFwdAngle));
debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;
} }

2
Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h

@ -96,7 +96,7 @@ public:
virtual void LeaveAge(plArmatureMod *avatar); virtual void LeaveAge(plArmatureMod *avatar);
/** Spew "useful" information to the game screen. Used when Avatar.Debug is active. */ /** Spew "useful" information to the game screen. Used when Avatar.Debug is active. */
virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt); virtual void DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt);
void DumpToAvatarLog(plArmatureMod *avatar); void DumpToAvatarLog(plArmatureMod *avatar);

2
Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp

@ -107,7 +107,7 @@ void plAvTask::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time
// DUMPDEBUG // DUMPDEBUG
void plAvTask::DumpDebug(const char *name, int &x, int&y, int lineHeight, char *strBuf, plDebugText &debugTxt) void plAvTask::DumpDebug(const char *name, int &x, int&y, int lineHeight, plDebugText &debugTxt)
{ {
debugTxt.DrawString(x, y, "<anonymous task>"); debugTxt.DrawString(x, y, "<anonymous task>");
y += lineHeight; y += lineHeight;

Loading…
Cancel
Save