Browse Source

Fix some things which got missed from debug builds

Michael Hansen 12 years ago
parent
commit
bb0ed04a52
  1. 2
      Sources/Plasma/CoreLib/plString.cpp
  2. 7
      Sources/Plasma/CoreLib/plString.h
  3. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp
  4. 2
      Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp
  5. 2
      Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp
  6. 4
      Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h
  7. 1
      Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp
  8. 2
      Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp
  9. 2
      Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp
  10. 1
      Sources/Plasma/NucleusLib/pnUUID/pnUUID.h
  11. 6
      Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp
  12. 19
      Sources/Plasma/PubUtilLib/plGImage/plMipmap.h
  13. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp
  14. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp
  15. 8
      Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

2
Sources/Plasma/CoreLib/plString.cpp

@ -543,6 +543,8 @@ int plString::Find(const char *str, CaseSensitivity sense) const
return cp - c_str();
++cp;
}
return -1;
}
}

7
Sources/Plasma/CoreLib/plString.h

@ -307,6 +307,13 @@ public:
return *this;
}
iterator operator++(int)
{
iterator iter_save = *this;
(void) operator++();
return iter_save;
}
iterator &operator+=(size_t delta)
{
while (delta) {

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp

@ -498,7 +498,7 @@ static bool showBounds = false;
if( showBounds )
{
const hsBounds3 &bnds = fMousedCtrl->GetBounds();
plDebugText::Instance().DrawString( (uint16_t)(bnds.GetMins().fX), (uint16_t)(bnds.GetMins().fY), fMousedCtrl->GetKeyName(), (uint32_t)0xffffff00 );
plDebugText::Instance().DrawString( (uint16_t)(bnds.GetMins().fX), (uint16_t)(bnds.GetMins().fY), _TEMP_CONVERT_TO_CONST_CHAR( fMousedCtrl->GetKeyName() ), (uint32_t)0xffffff00 );
}
#endif

2
Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp

@ -332,7 +332,7 @@ void plDispatch::IMsgDispatch()
{
hsLogEntry(plNetObjectDebuggerBase::GetInstance()->LogMsg(
xtl::format("<RCV> object:%s, GameMessage %s st=%.3f rt=%.3f",
ko->GetKeyName(), msg->ClassName(), hsTimer::GetSysSeconds(), hsTimer::GetSeconds()).c_str()));
ko->GetKeyName().c_str(), msg->ClassName(), hsTimer::GetSysSeconds(), hsTimer::GetSeconds()).c_str()));
}
}
}

2
Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp

@ -145,7 +145,7 @@ void hsKeyedObject::UnRegisterAsManual(plUoid& inUoid)
#if !HS_BUILD_FOR_UNIX // disable for unix servers
hsAssert(false,
plString::Format("Request to Unregister wrong FixedKey, keyName=%s, inUoid=%s, myUoid=%s",
fpKey->GetName() ? fpKey->GetName() : "?", inUoid.StringIze().c_str(), myUoid.StringIze().c_str()).c_str());
fpKey->GetName().s_str("?"), inUoid.StringIze().c_str(), myUoid.StringIze().c_str()).c_str());
#endif
}
((plKeyImp*)fpKey)->UnRegister();

4
Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "plRefFlags.h"
#include "plString.h"
class hsKeyedObject;
class plRefMsg;
@ -55,7 +56,6 @@ class hsBitVector;
class plKeyData;
class plKeyImp;
class plString;
class plKey
{
@ -131,7 +131,7 @@ protected:
#ifdef HS_DEBUGGING
// Debugging info fields
const char* fIDName;
plString fIDName;
const char* fClassType;
#endif

1
Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp

@ -81,7 +81,6 @@ plKeyImp::plKeyImp() :
fCloneOwner(nil)
{
#ifdef HS_DEBUGGING
fIDName = nil;
fClassType = nil;
#endif
}

2
Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp

@ -159,7 +159,7 @@ plUoid::~plUoid()
void plUoid::Read(hsStream* s)
{
hsAssert(fObjectName == nil, "Reading over an old uoid? You're just asking for trouble, aren't you?");
hsAssert(fObjectName.IsNull(), "Reading over an old uoid? You're just asking for trouble, aren't you?");
// first read contents flags
uint8_t contents = s->ReadByte();

2
Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp

@ -236,7 +236,7 @@ hsBool plSynchedObject::DirtySynchState(const char* SDLStateName, uint32_t synch
{
if (plNetClientApp::GetInstance())
plNetClientApp::GetInstance()->DebugMsg("Queueing SDL state with 'maybe' ownership, obj %s, sdl %s",
GetKeyName(), SDLStateName);
GetKeyName().c_str(), SDLStateName);
}
}

1
Sources/Plasma/NucleusLib/pnUUID/pnUUID.h

@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif
class hsStream;
class plString;
class plUUID
{

6
Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp

@ -2121,7 +2121,7 @@ hsBool plMipmap::ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap:
//// Debug Mipmap Memory Leak Tracker /////////////////////////////////////////
plMipmap::plRecord *plMipmap::fRecords = nil;
uint32_t plMipmap::fNumMipmaps = 0;
uint32_t plMipmap::fNumMipmaps = 0;
void plMipmap::IAddToMemRecord( plMipmap *mip, plRecord::Method method )
{
@ -2136,9 +2136,9 @@ void plMipmap::IAddToMemRecord( plMipmap *mip, plRecord::Method method )
newRecord->fNumLevels = mip->fNumLevels;
newRecord->fRowBytes = mip->fRowBytes;
if( mip->GetKey() )
strcpy( newRecord->fKeyName, mip->GetKeyName() );
newRecord->fKeyName = mip->GetKeyName();
else
strcpy( newRecord->fKeyName, "<noKey>" );
newRecord->fKeyName = _TEMP_CONVERT_FROM_LITERAL( "<noKey>" );
if( mip->fCompressionType != kDirectXCompression )
newRecord->fUncompressedInfo.fType = mip->fUncompressedInfo.fType;
else

19
Sources/Plasma/PubUtilLib/plGImage/plMipmap.h

@ -55,6 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define _plMipmap_h
#include "plBitmap.h"
#include "plString.h"
#ifdef HS_DEBUGGING
#define ASSERT_PIXELSIZE(bitmap, pixelsize) hsAssert((bitmap)->fPixelSize == (pixelsize), "pixelSize mismatch")
@ -291,13 +292,13 @@ class plMipmap : public plBitmap
//// Protected Members ////
void *fImage;
uint32_t fWidth, fHeight, fRowBytes, fTotalSize;
uint8_t fNumLevels;
uint32_t *fLevelSizes;
uint32_t fWidth, fHeight, fRowBytes, fTotalSize;
uint8_t fNumLevels;
uint32_t *fLevelSizes;
void *fCurrLevelPtr;
uint8_t fCurrLevel;
uint32_t fCurrLevelWidth, fCurrLevelHeight, fCurrLevelRowBytes;
uint8_t fCurrLevel;
uint32_t fCurrLevelWidth, fCurrLevelHeight, fCurrLevelRowBytes;
void IReadRawImage( hsStream *stream );
void IWriteRawImage( hsStream *stream );
@ -335,11 +336,11 @@ class plMipmap : public plBitmap
plRecord *fNext;
plRecord **fBackPtr;
char fKeyName[ 256 ];
plString fKeyName;
void *fImage;
uint32_t fWidth, fHeight, fRowBytes;
uint8_t fNumLevels;
uint8_t fCompressionType;
uint32_t fWidth, fHeight, fRowBytes;
uint8_t fNumLevels;
uint8_t fCompressionType;
union
{
DirectXInfo fDirectXInfo;

2
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

@ -1390,7 +1390,7 @@ bool plNetClientMgr::IHandlePlayerPageMsg(plPlayerPageMsg *playerMsg)
if( idx != -1 )
{
hsAssert(playerKey, "NIL KEY?");
hsAssert(playerKey->GetName(), "UNNAMED KEY");
hsAssert(!playerKey->GetName().IsNull(), "UNNAMED KEY");
fTransport.GetMember(idx)->SetAvatarKey(playerKey);
}
else

2
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp

@ -194,7 +194,7 @@ hsBool plNetClientMgr::IApplyNewListenList(std::vector<DistSqInfo>& newListenLis
GetListenList()->AddMember(newListenList[i].fMbr);
#ifdef HS_DEBUGGING
DebugMsg("\tLL Member %d, name=%s, cNum=%d, dist=%f\n",
i, newListenList[i].fMbr->AsStdString().c_str(),
i, newListenList[i].fMbr->AsString().c_str(),
newListenList[i].fMbr->GetPlayerID(), newListenList[i].fDistSq);
#endif
}

8
Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

@ -370,7 +370,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
if (pKey->GetStartPos() == uint32_t(-1) || pKey->GetDataLen() == uint32_t(-1))
return false; // Try to recover from this by just not reading an object
kResMgrLog(3, ILog(3, " Reading object %s::%s", plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()), pKey->GetUoid().GetObjectName()));
kResMgrLog(3, ILog(3, " Reading object %s::%s", plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()), pKey->GetUoid().GetObjectName().c_str()));
const plUoid& uoid = pKey->GetUoid();
@ -440,7 +440,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
fCurCloneID = 0;
}
kResMgrLog(4, ILog(4, " ...Read complete for object %s::%s", plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()), pKey->GetUoid().GetObjectName()));
kResMgrLog(4, ILog(4, " ...Read complete for object %s::%s", plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()), pKey->GetUoid().GetObjectName().c_str()));
if (fLogReadTimes)
{
@ -449,7 +449,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
ourTime -= childTime;
plStatusLog::AddLineS("readtimings.log", plStatusLog::kWhite, "%s, %s, %u, %.1f",
pKey->GetUoid().GetObjectName(),
pKey->GetUoid().GetObjectName().c_str(),
plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()),
pKey->GetDataLen(),
hsTimer::FullTicksToMs(ourTime));
@ -722,7 +722,7 @@ plKey plResManager::ReadKeyNotifyMe(hsStream* stream, plRefMsg* msg, plRefFlags:
}
if(key->GetUoid().GetLoadMask().DontLoad())
{
hsStatusMessageF("%s being skipped because of load mask", key->GetName());
hsStatusMessageF("%s being skipped because of load mask", key->GetName().c_str());
hsRefCnt_SafeUnRef(msg);
return nil;
}

Loading…
Cancel
Save