mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Fix additional issues from review
This commit is contained in:
@ -78,8 +78,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef TRACK_AG_ALLOCS
|
||||
extern const char *gGlobalAnimName = nil;
|
||||
extern const char *gGlobalChannelName = nil;
|
||||
plString gGlobalAnimName;
|
||||
plString gGlobalChannelName;
|
||||
#endif // TRACK_AG_ALLOCS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -172,7 +172,7 @@ plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master,
|
||||
fFadeBlend = fFadeAmp = false;
|
||||
|
||||
#ifdef TRACK_AG_ALLOCS
|
||||
gGlobalAnimName = nil;
|
||||
gGlobalAnimName = "";
|
||||
#endif // TRACK_AG_ALLOCS
|
||||
}
|
||||
|
||||
|
@ -261,8 +261,8 @@ protected:
|
||||
//#endif
|
||||
#ifdef TRACK_AG_ALLOCS
|
||||
|
||||
extern const char *gGlobalAnimName;
|
||||
extern const char *gGlobalChannelName;
|
||||
extern plString gGlobalAnimName;
|
||||
extern plString gGlobalChannelName;
|
||||
|
||||
void RegisterAGAlloc(plAGChannel *object, const char *chanName, const char *animName, uint16_t classIndex);
|
||||
void UnRegisterAGAlloc(plAGChannel *object);
|
||||
|
@ -61,7 +61,7 @@ plAGChannel::plAGChannel()
|
||||
{
|
||||
#ifdef TRACK_AG_ALLOCS
|
||||
fName = gGlobalAnimName;
|
||||
RegisterAGAlloc(this, gGlobalChannelName, gGlobalAnimName, this->ClassIndex());
|
||||
RegisterAGAlloc(this, gGlobalChannelName.c_str(), gGlobalAnimName.c_str(), this->ClassIndex());
|
||||
#endif // TRACK_AG_ALLOCS
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
|
||||
#ifdef DEBUG_MULTISTAGE
|
||||
char sbuf[256];
|
||||
sprintf(sbuf,"plMultistageModMsg - starting multistage from %s",sender->GetName());
|
||||
sprintf(sbuf,"plMultistageModMsg - starting multistage from %s",sender->GetName().c_str());
|
||||
plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf);
|
||||
#endif
|
||||
plAvSeekMsg *seeker = new plAvSeekMsg(nil, avModKey, seekKey, 1.0f, fSmartSeek);
|
||||
|
@ -197,7 +197,7 @@ void plDrawableSpans::Write( hsStream* s, hsResMgr* mgr )
|
||||
hsUNIXStream log;
|
||||
log.Open("log\\GBuf.log", "ab");
|
||||
char buf[256];
|
||||
sprintf(buf, "Drawable Span: %s, GroupNum: %u\r\n", GetKeyName(), i);
|
||||
sprintf(buf, "Drawable Span: %s, GroupNum: %u\r\n", GetKeyName().c_str(), i);
|
||||
log.WriteString(buf);
|
||||
log.Close();
|
||||
#endif
|
||||
@ -387,7 +387,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
|
||||
|
||||
statusLog->AddLineF("From obj <%s> mat <%s> size %d bytes grp=%d (%d offset)",
|
||||
geo->fMaxOwner.c_str("<unknown>"),
|
||||
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
|
||||
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
|
||||
geo->GetVertexSize(geo->fFormat) * geo->fNumVerts + sizeof(uint16_t) * geo->fNumIndices,
|
||||
span->fGroupIdx,
|
||||
ptr
|
||||
@ -405,7 +405,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
|
||||
{
|
||||
statusLog->AddLineF("Instanced obj <%s> mat <%s> grp=%d (%d/%d/%d/%d/%d/%d/%d/%d)",
|
||||
geo->fMaxOwner.c_str("<unknown>"),
|
||||
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
|
||||
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
|
||||
span->fGroupIdx,
|
||||
span->fVBufferIdx,
|
||||
span->fCellIdx,
|
||||
@ -424,7 +424,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
|
||||
{
|
||||
statusLog->AddLineF("From obj <%s> mat <%s> size %d bytes grp=%d (%d/%d/%d/%d/%d)",
|
||||
geo->fMaxOwner.c_str("<unknown>"),
|
||||
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
|
||||
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
|
||||
geo->GetVertexSize(geo->fFormat) * geo->fNumVerts + sizeof(uint16_t) * geo->fNumIndices,
|
||||
span->fGroupIdx,
|
||||
span->fVBufferIdx,
|
||||
@ -438,7 +438,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
|
||||
{
|
||||
statusLog->AddLineF("Instanced obj <%s> mat <%s> grp=%d (%d/%d/%d/%d/%d)",
|
||||
geo->fMaxOwner.c_str("<unknown>"),
|
||||
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
|
||||
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
|
||||
span->fGroupIdx,
|
||||
span->fVBufferIdx,
|
||||
span->fCellIdx,
|
||||
|
@ -114,7 +114,7 @@ void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat
|
||||
#ifdef MF_NOSHADOW_ACC
|
||||
// TESTHACKERY FOLLOWS - GlassesNoShadow
|
||||
uint32_t noShadHack = 0;
|
||||
if( mesh->GetKey() && (strstr(mesh->GetKey()->GetName(), "lasses") || strstr(mesh->GetKey()->GetName(), "oggles")) )
|
||||
if( mesh->GetKey() && (mesh->GetKey()->GetName().Find("lasses") >= 0 || mesh->GetKey()->GetName().Find("oggles") >= 0) )
|
||||
noShadHack = plGeometrySpan::kPropNoShadowCast;
|
||||
#endif // MF_NOSHADOW_ACC
|
||||
|
||||
|
@ -158,8 +158,8 @@ hsGMaterial* plProxyGen::IMakeProxyMaterial() const
|
||||
hsGMaterial* retVal = new hsGMaterial();
|
||||
|
||||
plString buff;
|
||||
if( !GetKey()->GetName().IsNull() )
|
||||
buff = plString::Format("%s_Material", GetKey()->GetName().c_str());
|
||||
if( !GetKeyName().IsNull() )
|
||||
buff = plString::Format("%s_Material", GetKeyName().c_str());
|
||||
else
|
||||
buff = "ProxyMaterial";
|
||||
hsgResMgr::ResMgr()->NewKey( buff, retVal, GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
|
||||
@ -233,8 +233,8 @@ void plProxyGen::IGenerateProxy()
|
||||
if( fProxyDrawables[idx] && !fProxyDrawables[idx]->GetKey() )
|
||||
{
|
||||
plString buff;
|
||||
if( !GetKey()->GetName().IsNull() )
|
||||
buff = plString::Format("%s_ProxyDrawable", GetKey()->GetName().c_str());
|
||||
if( !GetKeyName().IsNull() )
|
||||
buff = plString::Format("%s_ProxyDrawable", GetKeyName().c_str());
|
||||
else
|
||||
buff = "ProxyDrawable";
|
||||
|
||||
|
@ -292,12 +292,12 @@ void plMouseDevice::IUpdateCursorSize()
|
||||
}
|
||||
}
|
||||
|
||||
void plMouseDevice::AddNameToCursor(const char* name)
|
||||
void plMouseDevice::AddNameToCursor(const plString& name)
|
||||
{
|
||||
if (fInstance && name)
|
||||
if (fInstance && !name.IsNull())
|
||||
{
|
||||
plDebugText &txt = plDebugText::Instance();
|
||||
txt.DrawString(fInstance->fWXPos + 12 ,fInstance->fWYPos - 7,name);
|
||||
txt.DrawString(fInstance->fWXPos + 12 ,fInstance->fWYPos - 7,name.c_str());
|
||||
}
|
||||
}
|
||||
void plMouseDevice::AddCCRToCursor()
|
||||
|
@ -188,8 +188,7 @@ public:
|
||||
static void SetCursorOpacity( float opacity = 1.f );
|
||||
static bool GetInverted() { return plMouseDevice::bInverted; }
|
||||
static void SetInverted(bool inverted) { plMouseDevice::bInverted = inverted; }
|
||||
static void AddNameToCursor(const char* name);
|
||||
static void AddNameToCursor(const plString& name) { AddNameToCursor(name); }
|
||||
static void AddNameToCursor(const plString& name);
|
||||
static void AddIDNumToCursor(uint32_t idNum);
|
||||
static void AddCCRToCursor();
|
||||
|
||||
|
@ -1457,8 +1457,8 @@ bool plNetClientMgr::IFindModifier(plSynchedObject* obj, int16_t classIdx)
|
||||
cnt++;
|
||||
}
|
||||
|
||||
hsAssert(cnt<2, xtl::format("Object %s has multiple SDL modifiers of the same kind (%s)?",
|
||||
obj->GetKeyName(), plFactory::GetNameOfClass(classIdx)).c_str());
|
||||
hsAssert(cnt<2, plString::Format("Object %s has multiple SDL modifiers of the same kind (%s)?",
|
||||
obj->GetKeyName().c_str(), plFactory::GetNameOfClass(classIdx)).c_str());
|
||||
return cnt==0 ? false : true;
|
||||
}
|
||||
|
||||
|
@ -396,9 +396,9 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
|
||||
{
|
||||
#if 0
|
||||
hsLogEntry(plNetObjectDebugger::GetInstance()->LogMsg(
|
||||
xtl::format("<SND> object:%s, rcvr %s %s",
|
||||
msg->GetSender(),
|
||||
msg->GetNumReceivers() ? msg->GetReceiver(0)->GetName() : "?",
|
||||
plString::Format("<SND> object:%s, rcvr %s %s",
|
||||
msg->GetSender().GetKeyName().c_str(),
|
||||
msg->GetNumReceivers() ? msg->GetReceiver(0)->GetName().c_str() : "?",
|
||||
netMsgWrap->AsStdString().c_str()).c_str()));
|
||||
#endif
|
||||
}
|
||||
|
@ -133,8 +133,8 @@ plLayer* hsGMaterial::MakeBaseLayer()
|
||||
hsAssert(GetKey(), "All materials need a key (or temp key)");
|
||||
|
||||
plString buff;
|
||||
if( !GetKey()->GetName().IsNull() )
|
||||
buff = plString::Format("%s_Layer", GetKey()->GetName().c_str());
|
||||
if( !GetKeyName().IsNull() )
|
||||
buff = plString::Format("%s_Layer", GetKeyName().c_str());
|
||||
else
|
||||
buff = "Layer";
|
||||
hsgResMgr::ResMgr()->NewKey( buff, newLay, GetKey() != nil ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
|
||||
|
@ -40,6 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
#include <float.h>
|
||||
#include <cmath>
|
||||
#include "plUnifiedTime.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
||||
|
Reference in New Issue
Block a user