1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +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

@ -67,7 +67,7 @@ void pfMarkerInfo::Init()
plResManager* resMgr = (plResManager*)hsgResMgr::ResMgr();
// Force the client to keep the GlobalMarkers keys loaded, so we don't load them every time we clone
plClientMsg* loadAgeKeysMsg = TRACKED_NEW plClientMsg(plClientMsg::kLoadAgeKeys);
plClientMsg* loadAgeKeysMsg = new plClientMsg(plClientMsg::kLoadAgeKeys);
loadAgeKeysMsg->SetAgeName("GlobalMarkers");
loadAgeKeysMsg->Send(resMgr->FindKey(kClient_KEY));
@ -112,7 +112,7 @@ void pfMarkerInfo::Spawn(MarkerType type)
fType = type;
fLastChange = 0;
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0);
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0);
cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false);
fKey = cloneMsg->GetCloneKey();
@ -133,7 +133,7 @@ void pfMarkerInfo::InitSpawned(plKey markerKey)
hsMatrix44 pos;
pos.Reset();
pos.SetTranslate(&fPosition);
plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos);
plWarpMsg* warpMsg = new plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos);
warpMsg->Send();
// update its state
@ -148,7 +148,7 @@ void pfMarkerInfo::Show(bool show)
fVisible = show;
if (fSpawned) {
plEnableMsg* msg = TRACKED_NEW plEnableMsg;
plEnableMsg* msg = new plEnableMsg;
msg->SetBCastFlag(plMessage::kPropagateToChildren);
msg->SetCmd(plEnableMsg::kDrawable);
msg->SetCmd(plEnableMsg::kPhysical);
@ -183,7 +183,7 @@ void pfMarkerInfo::Remove()
{
if (fKey)
{
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false);
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false);
cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false);
cloneMsg->Send();
@ -210,7 +210,7 @@ void pfMarkerInfo::IPlayBounce(bool play)
if (fMod && fSpawned)
{
// Send anim start/stop msg
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop);
animMsg->SetCmd(plAnimCmdMsg::kSetLooping);
animMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
@ -242,7 +242,7 @@ void pfMarkerInfo::IPlayColor(bool play)
break;
}
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop);
animMsg->SetCmd(plAnimCmdMsg::kSetLooping);
animMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
@ -258,7 +258,7 @@ void pfMarkerInfo::IPlaySound(bool place)
{
const plAudioInterface* ai = fMod->GetTarget()->GetAudioInterface();
plSoundMsg* msg = TRACKED_NEW plSoundMsg;
plSoundMsg* msg = new plSoundMsg;
msg->fIndex = place ? fMod->fPlaceSndIdx : fMod->fHitSndIdx;
msg->SetCmd(plSoundMsg::kPlay);
msg->SetSender(pfMarkerMgr::Instance()->GetKey());

View File

@ -62,7 +62,7 @@ pfMarkerMgr* pfMarkerMgr::Instance()
{
if (!pfMarkerMgr::fInstance)
{
pfMarkerMgr::fInstance = TRACKED_NEW pfMarkerMgr;
pfMarkerMgr::fInstance = new pfMarkerMgr;
pfMarkerMgr::fInstance->IInit();
}
@ -153,7 +153,7 @@ void pfMarkerMgr::IMarkerHit(plKey markerKey, plKey playerKey)
return; // marker frozen, abort
// tell people about it
pfMarkerMsg* msg = TRACKED_NEW pfMarkerMsg;
pfMarkerMsg* msg = new pfMarkerMsg;
msg->fType = pfMarkerMsg::kMarkerCaptured;
msg->fMarkerID = id;
msg->Send();
@ -169,7 +169,7 @@ void pfMarkerMgr::AddMarker(double x, double y, double z, uint32_t id, bool just
}
hsPoint3 pos((float)x, (float)y, (float)z);
fMarkers[id] = TRACKED_NEW pfMarkerInfo(pos, justCreated);
fMarkers[id] = new pfMarkerInfo(pos, justCreated);
fMarkers[id]->Spawn(pfMarkerInfo::kMarkerOpen);
}

View File

@ -107,15 +107,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//{
// if( fTarget && fTarget->IsLocallyOwned()==plSynchedObject::kYes )
// {
// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
// plCameraMsg* pMsg = new plCameraMsg;
// pMsg->SetCmd(plCameraMsg::kSetSubject);
// pMsg->SetSubject(nil);
// pMsg->SetBCastFlag( plMessage::kBCastByExactType );
// plgDispatch::MsgSend(pMsg);
//
// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera);
// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera);
// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera);
// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera);
// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera);
// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera);
// plgDispatch::MsgSend(pAudMsg1);
// plgDispatch::MsgSend(pAudMsg2);
// plgDispatch::MsgSend(pAudMsg3);
@ -152,14 +152,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//
//void plPlayerModifier::IDoLocalSetup(plSceneObject* so)
//{
// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
// plCameraMsg* pMsg = new plCameraMsg;
// pMsg->SetCmd(plCameraMsg::kSetSubject);
// pMsg->SetSubject(so);
// pMsg->SetBCastFlag( plMessage::kBCastByExactType );
// plgDispatch::MsgSend(pMsg);
//
// // this is to solve the problem of physical vs nonphysical players...
//// plCameraMsg* pMsg2 = TRACKED_NEW plCameraMsg;
//// plCameraMsg* pMsg2 = new plCameraMsg;
//// pMsg2->SetBCastFlag(plMessage::kBCastByExactType);
//// pMsg2->SetCmd(plCameraMsg::kSetOffset);
//// pMsg2->SetCmd(plCameraMsg::kEntering);
@ -172,11 +172,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//void plPlayerModifier::IMakeUsListener( plSceneObject *so )
//{
// // set the listener to use us...
// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef);
// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef);
// pAudMsg1->SetSceneObject(so->GetKey());
// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef);
// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef);
// pAudMsg2->SetSceneObject(so->GetKey());
// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef);
// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef);
// pAudMsg3->SetSceneObject(so->GetKey());
// plgDispatch::MsgSend(pAudMsg1);
// plgDispatch::MsgSend(pAudMsg2);
@ -209,7 +209,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// plSpawnModMsg* pSpawn = plSpawnModMsg::ConvertNoRef(msg);
// if (pSpawn && HasFlag(kWantsToSpawn))
// {
// spawnPt* pt = TRACKED_NEW spawnPt;
// spawnPt* pt = new spawnPt;
// pt->pt = pSpawn->fPos;
//
// hsVector3 temp(fTarget->GetCoordinateInterface()->GetLocalToWorld().GetTranslate() - pt->pt);
@ -260,7 +260,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//{
// if (b != bMoving)
// {
// plPlayerMsg* pMsg = TRACKED_NEW plPlayerMsg;
// plPlayerMsg* pMsg = new plPlayerMsg;
//
// if (b)
// pMsg->SetCmd( plPlayerMsg::kMovementStarted );
@ -330,7 +330,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// fSpawnPoints[fSpawnPoints.Count()-1]->pt : fSpawnPoints[netID]->pt;
//#endif
// // Send msg for net synchronization
// plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg;
// plWarpMsg* warpMsg = new plWarpMsg;
// warpMsg->fPos = warpPoint;
// warpMsg->AddReceiver( fTarget->GetKey() );
// warpMsg->SetWarpFlags(warpMsg->GetWarpFlags() | plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity );
@ -350,7 +350,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// }
// else
// {
// plSpawnRequestMsg* pMsg = TRACKED_NEW plSpawnRequestMsg;
// plSpawnRequestMsg* pMsg = new plSpawnRequestMsg;
// pMsg->SetSender(GetKey());
// plgDispatch::MsgSend( pMsg );
// }