mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix some things which got missed from debug builds
This commit is contained in:
@ -543,6 +543,8 @@ int plString::Find(const char *str, CaseSensitivity sense) const
|
|||||||
return cp - c_str();
|
return cp - c_str();
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,6 +307,13 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iterator operator++(int)
|
||||||
|
{
|
||||||
|
iterator iter_save = *this;
|
||||||
|
(void) operator++();
|
||||||
|
return iter_save;
|
||||||
|
}
|
||||||
|
|
||||||
iterator &operator+=(size_t delta)
|
iterator &operator+=(size_t delta)
|
||||||
{
|
{
|
||||||
while (delta) {
|
while (delta) {
|
||||||
|
@ -498,7 +498,7 @@ static bool showBounds = false;
|
|||||||
if( showBounds )
|
if( showBounds )
|
||||||
{
|
{
|
||||||
const hsBounds3 &bnds = fMousedCtrl->GetBounds();
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ void plDispatch::IMsgDispatch()
|
|||||||
{
|
{
|
||||||
hsLogEntry(plNetObjectDebuggerBase::GetInstance()->LogMsg(
|
hsLogEntry(plNetObjectDebuggerBase::GetInstance()->LogMsg(
|
||||||
xtl::format("<RCV> object:%s, GameMessage %s st=%.3f rt=%.3f",
|
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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ void hsKeyedObject::UnRegisterAsManual(plUoid& inUoid)
|
|||||||
#if !HS_BUILD_FOR_UNIX // disable for unix servers
|
#if !HS_BUILD_FOR_UNIX // disable for unix servers
|
||||||
hsAssert(false,
|
hsAssert(false,
|
||||||
plString::Format("Request to Unregister wrong FixedKey, keyName=%s, inUoid=%s, myUoid=%s",
|
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
|
#endif
|
||||||
}
|
}
|
||||||
((plKeyImp*)fpKey)->UnRegister();
|
((plKeyImp*)fpKey)->UnRegister();
|
||||||
|
@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
#include "HeadSpin.h"
|
#include "HeadSpin.h"
|
||||||
#include "plRefFlags.h"
|
#include "plRefFlags.h"
|
||||||
|
#include "plString.h"
|
||||||
|
|
||||||
class hsKeyedObject;
|
class hsKeyedObject;
|
||||||
class plRefMsg;
|
class plRefMsg;
|
||||||
@ -55,7 +56,6 @@ class hsBitVector;
|
|||||||
|
|
||||||
class plKeyData;
|
class plKeyData;
|
||||||
class plKeyImp;
|
class plKeyImp;
|
||||||
class plString;
|
|
||||||
|
|
||||||
class plKey
|
class plKey
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@ protected:
|
|||||||
|
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
||||||
// Debugging info fields
|
// Debugging info fields
|
||||||
const char* fIDName;
|
plString fIDName;
|
||||||
const char* fClassType;
|
const char* fClassType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -81,7 +81,6 @@ plKeyImp::plKeyImp() :
|
|||||||
fCloneOwner(nil)
|
fCloneOwner(nil)
|
||||||
{
|
{
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
||||||
fIDName = nil;
|
|
||||||
fClassType = nil;
|
fClassType = nil;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ plUoid::~plUoid()
|
|||||||
|
|
||||||
void plUoid::Read(hsStream* s)
|
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
|
// first read contents flags
|
||||||
uint8_t contents = s->ReadByte();
|
uint8_t contents = s->ReadByte();
|
||||||
|
@ -236,7 +236,7 @@ hsBool plSynchedObject::DirtySynchState(const char* SDLStateName, uint32_t synch
|
|||||||
{
|
{
|
||||||
if (plNetClientApp::GetInstance())
|
if (plNetClientApp::GetInstance())
|
||||||
plNetClientApp::GetInstance()->DebugMsg("Queueing SDL state with 'maybe' ownership, obj %s, sdl %s",
|
plNetClientApp::GetInstance()->DebugMsg("Queueing SDL state with 'maybe' ownership, obj %s, sdl %s",
|
||||||
GetKeyName(), SDLStateName);
|
GetKeyName().c_str(), SDLStateName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class hsStream;
|
class hsStream;
|
||||||
|
class plString;
|
||||||
|
|
||||||
class plUUID
|
class plUUID
|
||||||
{
|
{
|
||||||
|
@ -2121,7 +2121,7 @@ hsBool plMipmap::ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap:
|
|||||||
//// Debug Mipmap Memory Leak Tracker /////////////////////////////////////////
|
//// Debug Mipmap Memory Leak Tracker /////////////////////////////////////////
|
||||||
|
|
||||||
plMipmap::plRecord *plMipmap::fRecords = nil;
|
plMipmap::plRecord *plMipmap::fRecords = nil;
|
||||||
uint32_t plMipmap::fNumMipmaps = 0;
|
uint32_t plMipmap::fNumMipmaps = 0;
|
||||||
|
|
||||||
void plMipmap::IAddToMemRecord( plMipmap *mip, plRecord::Method method )
|
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->fNumLevels = mip->fNumLevels;
|
||||||
newRecord->fRowBytes = mip->fRowBytes;
|
newRecord->fRowBytes = mip->fRowBytes;
|
||||||
if( mip->GetKey() )
|
if( mip->GetKey() )
|
||||||
strcpy( newRecord->fKeyName, mip->GetKeyName() );
|
newRecord->fKeyName = mip->GetKeyName();
|
||||||
else
|
else
|
||||||
strcpy( newRecord->fKeyName, "<noKey>" );
|
newRecord->fKeyName = _TEMP_CONVERT_FROM_LITERAL( "<noKey>" );
|
||||||
if( mip->fCompressionType != kDirectXCompression )
|
if( mip->fCompressionType != kDirectXCompression )
|
||||||
newRecord->fUncompressedInfo.fType = mip->fUncompressedInfo.fType;
|
newRecord->fUncompressedInfo.fType = mip->fUncompressedInfo.fType;
|
||||||
else
|
else
|
||||||
|
@ -55,6 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#define _plMipmap_h
|
#define _plMipmap_h
|
||||||
|
|
||||||
#include "plBitmap.h"
|
#include "plBitmap.h"
|
||||||
|
#include "plString.h"
|
||||||
|
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
||||||
#define ASSERT_PIXELSIZE(bitmap, pixelsize) hsAssert((bitmap)->fPixelSize == (pixelsize), "pixelSize mismatch")
|
#define ASSERT_PIXELSIZE(bitmap, pixelsize) hsAssert((bitmap)->fPixelSize == (pixelsize), "pixelSize mismatch")
|
||||||
@ -291,13 +292,13 @@ class plMipmap : public plBitmap
|
|||||||
//// Protected Members ////
|
//// Protected Members ////
|
||||||
|
|
||||||
void *fImage;
|
void *fImage;
|
||||||
uint32_t fWidth, fHeight, fRowBytes, fTotalSize;
|
uint32_t fWidth, fHeight, fRowBytes, fTotalSize;
|
||||||
uint8_t fNumLevels;
|
uint8_t fNumLevels;
|
||||||
uint32_t *fLevelSizes;
|
uint32_t *fLevelSizes;
|
||||||
|
|
||||||
void *fCurrLevelPtr;
|
void *fCurrLevelPtr;
|
||||||
uint8_t fCurrLevel;
|
uint8_t fCurrLevel;
|
||||||
uint32_t fCurrLevelWidth, fCurrLevelHeight, fCurrLevelRowBytes;
|
uint32_t fCurrLevelWidth, fCurrLevelHeight, fCurrLevelRowBytes;
|
||||||
|
|
||||||
void IReadRawImage( hsStream *stream );
|
void IReadRawImage( hsStream *stream );
|
||||||
void IWriteRawImage( hsStream *stream );
|
void IWriteRawImage( hsStream *stream );
|
||||||
@ -335,11 +336,11 @@ class plMipmap : public plBitmap
|
|||||||
plRecord *fNext;
|
plRecord *fNext;
|
||||||
plRecord **fBackPtr;
|
plRecord **fBackPtr;
|
||||||
|
|
||||||
char fKeyName[ 256 ];
|
plString fKeyName;
|
||||||
void *fImage;
|
void *fImage;
|
||||||
uint32_t fWidth, fHeight, fRowBytes;
|
uint32_t fWidth, fHeight, fRowBytes;
|
||||||
uint8_t fNumLevels;
|
uint8_t fNumLevels;
|
||||||
uint8_t fCompressionType;
|
uint8_t fCompressionType;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
DirectXInfo fDirectXInfo;
|
DirectXInfo fDirectXInfo;
|
||||||
|
@ -1390,7 +1390,7 @@ bool plNetClientMgr::IHandlePlayerPageMsg(plPlayerPageMsg *playerMsg)
|
|||||||
if( idx != -1 )
|
if( idx != -1 )
|
||||||
{
|
{
|
||||||
hsAssert(playerKey, "NIL KEY?");
|
hsAssert(playerKey, "NIL KEY?");
|
||||||
hsAssert(playerKey->GetName(), "UNNAMED KEY");
|
hsAssert(!playerKey->GetName().IsNull(), "UNNAMED KEY");
|
||||||
fTransport.GetMember(idx)->SetAvatarKey(playerKey);
|
fTransport.GetMember(idx)->SetAvatarKey(playerKey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -194,7 +194,7 @@ hsBool plNetClientMgr::IApplyNewListenList(std::vector<DistSqInfo>& newListenLis
|
|||||||
GetListenList()->AddMember(newListenList[i].fMbr);
|
GetListenList()->AddMember(newListenList[i].fMbr);
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
||||||
DebugMsg("\tLL Member %d, name=%s, cNum=%d, dist=%f\n",
|
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);
|
newListenList[i].fMbr->GetPlayerID(), newListenList[i].fDistSq);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
|
|||||||
if (pKey->GetStartPos() == uint32_t(-1) || pKey->GetDataLen() == uint32_t(-1))
|
if (pKey->GetStartPos() == uint32_t(-1) || pKey->GetDataLen() == uint32_t(-1))
|
||||||
return false; // Try to recover from this by just not reading an object
|
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();
|
const plUoid& uoid = pKey->GetUoid();
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
|
|||||||
fCurCloneID = 0;
|
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)
|
if (fLogReadTimes)
|
||||||
{
|
{
|
||||||
@ -449,7 +449,7 @@ hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
|
|||||||
ourTime -= childTime;
|
ourTime -= childTime;
|
||||||
|
|
||||||
plStatusLog::AddLineS("readtimings.log", plStatusLog::kWhite, "%s, %s, %u, %.1f",
|
plStatusLog::AddLineS("readtimings.log", plStatusLog::kWhite, "%s, %s, %u, %.1f",
|
||||||
pKey->GetUoid().GetObjectName(),
|
pKey->GetUoid().GetObjectName().c_str(),
|
||||||
plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()),
|
plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()),
|
||||||
pKey->GetDataLen(),
|
pKey->GetDataLen(),
|
||||||
hsTimer::FullTicksToMs(ourTime));
|
hsTimer::FullTicksToMs(ourTime));
|
||||||
@ -722,7 +722,7 @@ plKey plResManager::ReadKeyNotifyMe(hsStream* stream, plRefMsg* msg, plRefFlags:
|
|||||||
}
|
}
|
||||||
if(key->GetUoid().GetLoadMask().DontLoad())
|
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);
|
hsRefCnt_SafeUnRef(msg);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user