1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 18:59:09 +00:00

Get rid of NEW(), TRACKED_NEW, and ZERO().

This commit is contained in:
Darryl Pogue
2012-01-21 01:09:48 -08:00
committed by Adam Johnson
parent 30430d3024
commit 5013a978eb
423 changed files with 2500 additions and 2503 deletions

View File

@ -73,9 +73,9 @@ plDirectShadowMaster::~plDirectShadowMaster()
plShadowSlave* plDirectShadowMaster::INewSlave(const plShadowCaster* caster)
{
if( caster->GetPerspective() )
return TRACKED_NEW plPerspDirSlave;
return new plPerspDirSlave;
return TRACKED_NEW plDirectShadowSlave;
return new plDirectShadowSlave;
}
plShadowSlave* plDirectShadowMaster::INextSlave(const plShadowCaster* caster)
@ -172,7 +172,7 @@ void plDirectShadowMaster::IComputeISect(const hsBounds3Ext& casterBnd, plShadow
fIsectPool.ExpandAndZero(iIsect+1);
if( !fIsectPool[iIsect] )
{
fIsectPool[iIsect] = TRACKED_NEW plBoundsIsect;
fIsectPool[iIsect] = new plBoundsIsect;
}
plBoundsIsect* isect = fIsectPool[iIsect];

View File

@ -102,7 +102,7 @@ plLightInfo::plLightInfo()
fNextDevPtr = nil;
fPrevDevPtr = nil;
fProxyGen = TRACKED_NEW plLightProxy;
fProxyGen = new plLightProxy;
fProxyGen->Init(this);
fRegisteredForRenderMsg = false;
@ -469,9 +469,9 @@ void plLightInfo::Read(hsStream* s, hsResMgr* mgr)
fLocalToWorld = fLightToWorld * fLocalToLight;
fWorldToLocal = fLightToLocal * fWorldToLight;
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kProjection), plRefFlags::kActiveRef);
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kProjection), plRefFlags::kActiveRef);
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSoftVolume), plRefFlags::kActiveRef);
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSoftVolume), plRefFlags::kActiveRef);
// Let our sceneNode know we're here.
plKey nodeKey = mgr->ReadKey(s);
@ -481,7 +481,7 @@ void plLightInfo::Read(hsStream* s, hsResMgr* mgr)
fVisRegions.SetCountAndZero(n);
int i;
for( i = 0; i < n; i++ )
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kVisRegion), plRefFlags::kActiveRef);
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kVisRegion), plRefFlags::kActiveRef);
SetDirty(true);
}
@ -519,7 +519,7 @@ void plLightInfo::ISetSceneNode(plKey node)
{
if( node )
{
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kLight);
plNodeRefMsg* refMsg = new plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kLight);
hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef);
}
if( fSceneNode )
@ -685,7 +685,7 @@ void plLimitedDirLightInfo::Write(hsStream* s, hsResMgr* mgr)
void plLimitedDirLightInfo::IMakeIsect()
{
if( !fParPlanes )
fParPlanes = TRACKED_NEW plParallelIsect;
fParPlanes = new plParallelIsect;
fParPlanes->SetNumPlanes(3);
@ -752,7 +752,7 @@ plOmniLightInfo::~plOmniLightInfo()
void plOmniLightInfo::IMakeIsect()
{
fSphere = TRACKED_NEW plSphereIsect;
fSphere = new plSphereIsect;
fSphere->SetTransform(fLightToWorld, fWorldToLight);
}
@ -925,7 +925,7 @@ void plSpotLightInfo::GetStrengthAndScale(const hsBounds3Ext& bnd, float& streng
void plSpotLightInfo::IMakeIsect()
{
fCone = TRACKED_NEW plConeIsect;
fCone = new plConeIsect;
fCone->SetTransform(fLightToWorld, fWorldToLight);
}

View File

@ -59,7 +59,7 @@ hsBool plLightSpace::MsgReceive(plMessage* msg)
plKey otherKey = nil;
hsBool enter = true;
uint8_t ctx = enter ? plRefMsg::kOnRequest : plRefMsg::kOnRemove;
plLightRefMsg* liMsg = TRACKED_NEW plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx);
plLightRefMsg* liMsg = new plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx);
plgDispatch::MsgSend(liMsg);
return true;
}
@ -80,7 +80,7 @@ void plLightSpace::Read(hsStream* s, hsResMgr* mgr)
{
plMultiModifier::Read(s, mgr);
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plLightRefMsg(nil, GetKey(), nil, plRefMsg::kOnCreate), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(s, new plLightRefMsg(nil, GetKey(), nil, plRefMsg::kOnCreate), plRefFlags::kPassiveRef);
}
void plLightSpace::Write(hsStream* s, hsResMgr* mgr)

View File

@ -107,7 +107,7 @@ plPointShadowMaster::~plPointShadowMaster()
plShadowSlave* plPointShadowMaster::INewSlave(const plShadowCaster* caster)
{
return TRACKED_NEW plPointShadowSlave;
return new plPointShadowSlave;
}
void plPointShadowMaster::IBeginRender()
@ -175,7 +175,7 @@ void plPointShadowMaster::IComputeISect(const hsBounds3Ext& bnd, plShadowSlave*
fIsectPool.ExpandAndZero(iIsect+1);
if( !fIsectPool[iIsect] )
{
fIsectPool[iIsect] = TRACKED_NEW plBoundsIsect;
fIsectPool[iIsect] = new plBoundsIsect;
}
plBoundsIsect* isect = fIsectPool[iIsect];

View File

@ -198,7 +198,7 @@ hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg)
if( fMaxOpacity > 0 )
{
plShadowCastMsg* cast = TRACKED_NEW plShadowCastMsg(GetKey(), this, msg->Pipeline());
plShadowCastMsg* cast = new plShadowCastMsg(GetKey(), this, msg->Pipeline());
cast->Send();
}

View File

@ -860,7 +860,7 @@ public:
plShadowSlave* slave = fSlavePool[iSlave];
if( !slave )
{
fSlavePool[iSlave] = slave = TRACKED_NEW plShadowSlave;
fSlavePool[iSlave] = slave = new plShadowSlave;
fISectPool[iSlave] = INewISect();
}