mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 02:51:27 +00:00
Get rid of NEW(), TRACKED_NEW, and ZERO().
This commit is contained in:
@ -159,7 +159,7 @@ void plAudioInterface::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plObjInterface::Read(s, mgr);
|
||||
|
||||
plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible);
|
||||
plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible);
|
||||
mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ void plAudioInterface::ISetAudible(plAudible* aud)
|
||||
fAudible->SetSceneObject(fOwner->GetKey());
|
||||
}
|
||||
|
||||
plAudioSysMsg* pMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kPing );
|
||||
plAudioSysMsg* pMsg = new plAudioSysMsg( plAudioSysMsg::kPing );
|
||||
pMsg->SetSender(GetKey());
|
||||
// pMsg->SetBCastFlag(plMessage::kBCastByExactType, false);
|
||||
plgDispatch::MsgSend( pMsg );
|
||||
@ -248,7 +248,7 @@ hsBool plAudioInterface::MsgReceive(plMessage* msg)
|
||||
}
|
||||
if (pSoundMsg->Cmd( plSoundMsg::kGetNumSounds ) )
|
||||
{
|
||||
plSoundMsg* pReply = TRACKED_NEW plSoundMsg;
|
||||
plSoundMsg* pReply = new plSoundMsg;
|
||||
pReply->fIndex = fAudible->GetNumSounds();
|
||||
pReply->AddReceiver(pSoundMsg->GetSender());
|
||||
pReply->SetCmd( plSoundMsg::kGetNumSounds );
|
||||
@ -303,7 +303,7 @@ hsBool plAudioInterface::MsgReceive(plMessage* msg)
|
||||
if( !fAudibleInited )
|
||||
{
|
||||
// Arrgh, can't activate yet, so attempt to re-activate some time in the near future
|
||||
pASMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kActivate );
|
||||
pASMsg = new plAudioSysMsg( plAudioSysMsg::kActivate );
|
||||
pASMsg->SetBCastFlag( plMessage::kBCastByExactType, false );
|
||||
pASMsg->SetBCastFlag( plMessage::kNetPropagate, false );
|
||||
pASMsg->SetTimeStamp( hsTimer::GetSysSeconds() + 1.f );
|
||||
|
@ -561,7 +561,7 @@ void plCoordinateInterface::Read(hsStream* stream, hsResMgr* mgr)
|
||||
int i;
|
||||
for( i = 0; i < n; i++ )
|
||||
{
|
||||
plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject);
|
||||
plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject);
|
||||
mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kPassiveRef);
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void plDrawInterface::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
fDrawableIndices[i] = s->ReadLE32();
|
||||
|
||||
plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, i, plIntRefMsg::kDrawable);
|
||||
plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, i, plIntRefMsg::kDrawable);
|
||||
mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ void plDrawInterface::Read(hsStream* s, hsResMgr* mgr)
|
||||
fRegions.SetCountAndZero(nReg);
|
||||
for( i = 0; i < nReg; i++ )
|
||||
{
|
||||
plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisRegion);
|
||||
plGenRefMsg* refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisRegion);
|
||||
mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ void plDrawInterface::ReleaseData( void )
|
||||
{
|
||||
if( fDrawables[i] && (fDrawableIndices[i] != uint32_t(-1)) )
|
||||
{
|
||||
plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(fDrawables[i]->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[i], 0);
|
||||
plDISpansMsg* diMsg = new plDISpansMsg(fDrawables[i]->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[i], 0);
|
||||
diMsg->SetSender(GetKey());
|
||||
diMsg->Send();
|
||||
}
|
||||
@ -237,7 +237,7 @@ void plDrawInterface::ISetDrawable(uint8_t which, plDrawable* dr)
|
||||
#ifdef HS_DEBUGGING
|
||||
if( fDrawableIndices[which] != (uint32_t)-1 )
|
||||
{
|
||||
plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(dr->GetKey(), plDISpansMsg::kAddingSpan, fDrawableIndices[which], 0);
|
||||
plDISpansMsg* diMsg = new plDISpansMsg(dr->GetKey(), plDISpansMsg::kAddingSpan, fDrawableIndices[which], 0);
|
||||
diMsg->SetSender(GetKey());
|
||||
diMsg->Send();
|
||||
}
|
||||
@ -300,7 +300,7 @@ void plDrawInterface::SetDrawable(uint8_t which, plDrawable *dr)
|
||||
if( dr )
|
||||
{
|
||||
// This is a little convoluted, but it makes GCC happy and doesn't hurt anybody.
|
||||
plIntRefMsg* intRefMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, which, plIntRefMsg::kDrawable);
|
||||
plIntRefMsg* intRefMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, which, plIntRefMsg::kDrawable);
|
||||
plRefMsg* refMsg = intRefMsg;
|
||||
// hsgResMgr::ResMgr()->SendRef(dr->GetKey(), intRefMsg, plRefFlags::kActiveRef); // THIS WON'T COMPILE UNDER GCC
|
||||
hsgResMgr::ResMgr()->SendRef(dr, refMsg, plRefFlags::kActiveRef);
|
||||
@ -366,7 +366,7 @@ void plDrawInterface::SetUpForParticleSystem( uint32_t maxNumEmitters, uint32
|
||||
int i;
|
||||
for( i = 0; i < lights.GetCount(); i++ )
|
||||
{
|
||||
hsgResMgr::ResMgr()->AddViaNotify(lights[i], TRACKED_NEW plGenRefMsg(fDrawables[0]->GetKey(), plRefMsg::kOnCreate, fDrawableIndices[0], plDrawable::kMsgPermaLightDI), plRefFlags::kPassiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(lights[i], new plGenRefMsg(fDrawables[0]->GetKey(), plRefMsg::kOnCreate, fDrawableIndices[0], plDrawable::kMsgPermaLightDI), plRefFlags::kPassiveRef);
|
||||
}
|
||||
|
||||
ISetVisRegions(0);
|
||||
|
@ -72,7 +72,7 @@ void plObjInterface::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plSynchedObject::Read(s, mgr);
|
||||
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kOwner), plRefFlags::kPassiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kOwner), plRefFlags::kPassiveRef);
|
||||
|
||||
fProps.Read(s);
|
||||
}
|
||||
|
@ -111,16 +111,16 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr)
|
||||
|
||||
// Interfaces will attach themselves to us on read.
|
||||
// DI
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
|
||||
// SI
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
|
||||
// CI
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
|
||||
// AI
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
|
||||
int i;
|
||||
|
||||
@ -128,7 +128,7 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr)
|
||||
fGenerics.SetCount(0);
|
||||
for( i = 0; i < nGen; i++ )
|
||||
{
|
||||
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
plObjRefMsg* refMsg;
|
||||
@ -138,7 +138,7 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr)
|
||||
fModifiers.ExpandAndZero(nOldMods+nNewMods); // reserve space for new modifiers+existing modifiers
|
||||
for( i = nOldMods; i < nOldMods+nNewMods; i++ )
|
||||
{
|
||||
refMsg = TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, i, plObjRefMsg::kModifier);
|
||||
refMsg = new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, i, plObjRefMsg::kModifier);
|
||||
mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ void plSceneObject::SetSceneNode(plKey newNode)
|
||||
|
||||
if( newNode )
|
||||
{
|
||||
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject);
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject);
|
||||
plKey key = GetKey(); // for linux build
|
||||
hsgResMgr::ResMgr()->AddViaNotify(key, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
@ -520,7 +520,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg)
|
||||
hsAssert(false, "Trying to attach a child who has no coordinateInterface");
|
||||
return true;
|
||||
}
|
||||
plIntRefMsg* intRefMsg = TRACKED_NEW plIntRefMsg(fCoordinateInterface->GetKey(), att->GetContext(), -1, plIntRefMsg::kChildObject);
|
||||
plIntRefMsg* intRefMsg = new plIntRefMsg(fCoordinateInterface->GetKey(), att->GetContext(), -1, plIntRefMsg::kChildObject);
|
||||
intRefMsg->SetRef(child);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(intRefMsg, plRefFlags::kPassiveRef);
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ void plSimulationInterface::Read(hsStream* s, hsResMgr* mgr)
|
||||
// Also unnecessary
|
||||
int poop = s->ReadLE32();
|
||||
|
||||
plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical, 0);
|
||||
plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical, 0);
|
||||
mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user