From 12ac9a79bedc8250be8ffc5ac70b55f5c0dc4ad1 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 21 Jan 2012 01:14:51 -0800 Subject: [PATCH] Remove TRACKED_NEW from tools. --- Sources/Tools/MaxComponent/plAGComponents.cpp | 12 +- .../MaxComponent/plActivatorBaseComponent.cpp | 4 +- .../Tools/MaxComponent/plAnimComponent.cpp | 20 +-- .../MaxComponent/plAnimEventComponent.cpp | 10 +- .../Tools/MaxComponent/plAudioComponents.cpp | 62 ++++----- .../Tools/MaxComponent/plAutoComponent.cpp | 2 +- Sources/Tools/MaxComponent/plAutoUIBase.cpp | 48 +++---- Sources/Tools/MaxComponent/plAutoUIBlock.cpp | 2 +- Sources/Tools/MaxComponent/plAutoUIComp.cpp | 2 +- Sources/Tools/MaxComponent/plAutoUIParams.cpp | 4 +- .../Tools/MaxComponent/plAvatarComponent.cpp | 52 +++---- .../MaxComponent/plBehavioralComponents.cpp | 2 +- Sources/Tools/MaxComponent/plBipedKiller.cpp | 8 +- .../Tools/MaxComponent/plBlowComponent.cpp | 2 +- .../Tools/MaxComponent/plCameraComponents.cpp | 56 ++++---- .../MaxComponent/plClickDragComponent.cpp | 30 ++-- .../MaxComponent/plClickableComponent.cpp | 18 +-- .../Tools/MaxComponent/plClimbComponent.cpp | 6 +- .../MaxComponent/plClothingComponent.cpp | 4 +- .../Tools/MaxComponent/plClusterComponent.cpp | 4 +- .../MaxComponent/plExcludeRegionComponent.cpp | 2 +- .../MaxComponent/plFootPrintComponent.cpp | 48 +++---- .../MaxComponent/plFootstepComponent.cpp | 6 +- .../Tools/MaxComponent/plGUIComponents.cpp | 84 +++++------ .../Tools/MaxComponent/plGrassComponent.cpp | 6 +- .../Tools/MaxComponent/plIgnoreComponent.cpp | 4 +- .../MaxComponent/plImpactGadgetComponent.cpp | 6 +- .../MaxComponent/plInventoryObjComponent.cpp | 4 +- .../Tools/MaxComponent/plLODFadeComponent.cpp | 4 +- .../MaxComponent/plLightGrpComponent.cpp | 4 +- .../Tools/MaxComponent/plLineFollowComp.cpp | 12 +- Sources/Tools/MaxComponent/plMaxAnimUtils.cpp | 16 +-- Sources/Tools/MaxComponent/plMaxWaveUtils.cpp | 2 +- .../Tools/MaxComponent/plMiscComponents.cpp | 22 +-- Sources/Tools/MaxComponent/plMorphSeqComp.cpp | 6 +- .../MaxComponent/plMultistageBehComponent.cpp | 8 +- .../Tools/MaxComponent/plMultistageStage.cpp | 6 +- Sources/Tools/MaxComponent/plNPCSpawnComp.cpp | 4 +- .../MaxComponent/plNavigableComponents.cpp | 2 +- .../MaxComponent/plObjectFlockerComponent.cpp | 2 +- .../Tools/MaxComponent/plOneShotComponent.cpp | 2 +- .../MaxComponent/plParticleComponents.cpp | 88 ++++++------ .../plPhysConstraintComponents.cpp | 18 +-- .../MaxComponent/plPhysicalComponents.cpp | 34 ++--- Sources/Tools/MaxComponent/plPickNodeBase.cpp | 2 +- .../MaxComponent/plPythonFileComponent.cpp | 6 +- .../Tools/MaxComponent/plResponderAnim.cpp | 8 +- .../MaxComponent/plResponderComponent.cpp | 4 +- .../Tools/MaxComponent/plResponderLink.cpp | 30 ++-- Sources/Tools/MaxComponent/plResponderMtl.cpp | 4 +- Sources/Tools/MaxComponent/plSeekPoint.cpp | 4 +- .../Tools/MaxComponent/plShadowComponents.cpp | 12 +- .../MaxComponent/plSoftVolumeComponent.cpp | 46 +++---- .../MaxComponent/plTemplateComponent.cpp | 2 +- .../Tools/MaxComponent/plTypesComponents.cpp | 8 +- .../MaxComponent/plVolumeGadgetComponent.cpp | 18 +-- .../Tools/MaxComponent/plWaterComponent.cpp | 16 +-- Sources/Tools/MaxConvert/StringTokenizer.cpp | 8 +- Sources/Tools/MaxConvert/UserPropMgr.cpp | 2 +- .../Tools/MaxConvert/hsControlConverter.cpp | 32 ++--- Sources/Tools/MaxConvert/hsConverterUtils.cpp | 2 +- .../Tools/MaxConvert/hsMaterialConverter.cpp | 86 ++++++------ Sources/Tools/MaxConvert/hsVertexShader.cpp | 6 +- Sources/Tools/MaxConvert/plBitmapCreator.cpp | 10 +- Sources/Tools/MaxConvert/plClusterUtil.cpp | 14 +- Sources/Tools/MaxConvert/plConvert.cpp | 2 +- Sources/Tools/MaxConvert/plDistributor.cpp | 8 +- Sources/Tools/MaxConvert/plLayerConverter.cpp | 36 ++--- Sources/Tools/MaxConvert/plLightMapGen.cpp | 18 +-- Sources/Tools/MaxConvert/plMeshConverter.cpp | 26 ++-- Sources/Tools/MaxExport/SimpleExport.h | 2 +- Sources/Tools/MaxMain/GlobalUtility.cpp | 2 +- Sources/Tools/MaxMain/main.cpp | 4 +- Sources/Tools/MaxMain/plAgeDescInterface.cpp | 8 +- Sources/Tools/MaxMain/plCommonObjLib.cpp | 2 +- Sources/Tools/MaxMain/plComponentDlg.cpp | 2 +- Sources/Tools/MaxMain/plMaxMeshExtractor.cpp | 8 +- Sources/Tools/MaxMain/plMaxNode.cpp | 130 +++++++++--------- Sources/Tools/MaxMain/plMaxNodeData.h | 6 +- Sources/Tools/MaxMain/plPhysXCooking.cpp | 18 +-- Sources/Tools/MaxMain/plPluginResManager.cpp | 2 +- Sources/Tools/MaxMain/plPythonMgr.cpp | 2 +- Sources/Tools/MaxMain/plSaveSelected.cpp | 2 +- Sources/Tools/MaxMain/plTextureExportLog.cpp | 4 +- .../MaxPlasmaLights/plRTProjDirLight.cpp | 6 +- .../Tools/MaxPlasmaLights/plRTProjDirLight.h | 2 +- .../plRTProjDirLightClassDesc.h | 2 +- .../MaxPlasmaLights/plRealTimeLightBase.cpp | 14 +- .../MaxPlasmaLights/plRealTimeLightBase.h | 2 +- .../MaxPlasmaLights/plRealTimeLights.cpp | 12 +- .../Tools/MaxPlasmaLights/plRealTimeLights.h | 12 +- .../Layers/plAngleAttenLayer.cpp | 4 +- .../Layers/plDynamicEnvLayer.cpp | 4 +- .../Layers/plDynamicTextLayer.cpp | 4 +- .../Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp | 4 +- .../Layers/plLayerTexBitmapPB.cpp | 4 +- .../MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp | 4 +- .../MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp | 2 +- .../MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp | 4 +- .../Materials/plAnimStealthNode.cpp | 2 +- .../MaxPlasmaMtls/Materials/plBumpMtl.cpp | 6 +- .../MaxPlasmaMtls/Materials/plClothingMtl.cpp | 48 +++---- .../Materials/plClothingMtlPBDec.h | 6 +- .../Materials/plCompositeMtl.cpp | 10 +- .../MaxPlasmaMtls/Materials/plDecalMtl.cpp | 8 +- .../Materials/plMultipassMtl.cpp | 8 +- .../MaxPlasmaMtls/Materials/plParticleMtl.cpp | 6 +- .../MaxPlasmaMtls/Materials/plPassMtl.cpp | 8 +- .../MaxPlasmaMtls/Materials/plPassMtlBase.cpp | 2 +- Sources/Tools/MaxSceneViewer/SceneSync.cpp | 4 +- Sources/Tools/MaxSceneViewer/SceneViewer.cpp | 2 +- .../Tools/MaxSceneViewer/plMaxFileData.cpp | 4 +- .../Tools/MaxSceneViewer/plPluginClient.cpp | 12 +- Sources/Tools/plResBrowser/plResBrowser.cpp | 2 +- Sources/Tools/plResBrowser/plResTreeView.cpp | 2 +- 115 files changed, 775 insertions(+), 775 deletions(-) diff --git a/Sources/Tools/MaxComponent/plAGComponents.cpp b/Sources/Tools/MaxComponent/plAGComponents.cpp index 51b00a3b..a58b9052 100644 --- a/Sources/Tools/MaxComponent/plAGComponents.cpp +++ b/Sources/Tools/MaxComponent/plAGComponents.cpp @@ -254,7 +254,7 @@ hsBool plAnimAvatarComponent::ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg) // ------------- plATCAnim * plAnimAvatarComponent::NewAnimation(const char *name, double begin, double end) { - return TRACKED_NEW plATCAnim(name, begin, end); + return new plATCAnim(name, begin, end); } @@ -288,15 +288,15 @@ hsBool plAnimAvatarComponent::ConvertNodeSegmentBranch(plMaxNode *node, plAGAnim // around. Just nuke it and replace it with a constant channel. if (tmc->PurgeRedundantSubcontrollers()) { - channel = TRACKED_NEW plMatrixConstant(constSetting); + channel = new plMatrixConstant(constSetting); delete tmc; tmc = nil; } else { - channel = TRACKED_NEW plMatrixControllerChannel(tmc, &parts); + channel = new plMatrixControllerChannel(tmc, &parts); } - plMatrixChannelApplicator *app = TRACKED_NEW plMatrixChannelApplicator(); + plMatrixChannelApplicator *app = new plMatrixChannelApplicator(); app->SetChannelName(node->GetKey()->GetName()); app->SetChannel(channel); mod->AddApplicator(app); @@ -345,7 +345,7 @@ hsBool plAnimAvatarComponent::MakePersistent(plMaxNode *node, plAGAnim *anim, co { plKey animKey = hsgResMgr::ResMgr()->NewKey(animName, anim, nodeLoc); - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(sceneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kGeneric); + plNodeRefMsg* refMsg = new plNodeRefMsg(sceneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kGeneric); hsgResMgr::ResMgr()->AddViaNotify(animKey, refMsg, plRefFlags::kActiveRef); } @@ -457,5 +457,5 @@ hsBool plEmoteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // ------------- plATCAnim * plEmoteComponent::NewAnimation(const char *name, double begin, double end) { - return TRACKED_NEW plEmoteAnim(name, begin, end, fFadeIn, fFadeOut, fBodyUsage); + return new plEmoteAnim(name, begin, end, fFadeIn, fFadeOut, fBodyUsage); } diff --git a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp index 335006d1..6ab16de4 100644 --- a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp +++ b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp @@ -96,9 +96,9 @@ hsBool plActivatorBaseComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg plSceneObject *obj = node->GetSceneObject(); // Create and register the VolumeGadget's logic component - plLogicModifier *logic = TRACKED_NEW plLogicModifier; + plLogicModifier *logic = new plLogicModifier; plKey logicKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), logic, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fLogicModKeys[node] = logicKey; diff --git a/Sources/Tools/MaxComponent/plAnimComponent.cpp b/Sources/Tools/MaxComponent/plAnimComponent.cpp index fdb5a61e..cf5b0c31 100644 --- a/Sources/Tools/MaxComponent/plAnimComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimComponent.cpp @@ -580,10 +580,10 @@ hsBool plAnimGroupedComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) bool needSetMaster = fNeedReset; if (fNeedReset) { - fForward = TRACKED_NEW plMsgForwarder; + fForward = new plMsgForwarder; plKey forwardKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), fForward, node->GetLocation()); - plNodeRefMsg *refMsg = TRACKED_NEW plNodeRefMsg(node->GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); + plNodeRefMsg *refMsg = new plNodeRefMsg(node->GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); hsgResMgr::ResMgr()->AddViaNotify(forwardKey, refMsg, plRefFlags::kActiveRef); } @@ -699,7 +699,7 @@ hsBool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { node->AddModifier(new plAGModifier(node->GetName()), IGetUniqueName(node)); } - mod = TRACKED_NEW plAGMasterMod(); + mod = new plAGMasterMod(); plKey modKey = node->AddModifier(mod, IGetUniqueName(node)); } @@ -723,14 +723,14 @@ hsBool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) if (fCompPB->GetInt(ParamID(kAnimUseGlobal))) { - plAgeGlobalAnim *ageAnim = TRACKED_NEW plAgeGlobalAnim(animName, 0, 0); + plAgeGlobalAnim *ageAnim = new plAgeGlobalAnim(animName, 0, 0); ageAnim->SetGlobalVarName((char*)fCompPB->GetStr(ParamID(kAnimGlobalName))); fAnims[node] = ageAnim; } else { - plATCAnim *ATCAnim = TRACKED_NEW plATCAnim(animName, 0, 0); + plATCAnim *ATCAnim = new plATCAnim(animName, 0, 0); plNotetrackAnim noteAnim(node, pErrMsg); plAnimInfo info = noteAnim.GetAnimInfo(animName); ATCAnim->SetAutoStart(fCompPB->GetInt(kAnimAutoStart)); @@ -787,7 +787,7 @@ hsBool plAnimComponentBase::IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErro // Get the affine parts and the TM Controller plSceneObject *obj = node->GetSceneObject(); - hsAffineParts * parts = TRACKED_NEW hsAffineParts; + hsAffineParts * parts = new hsAffineParts; plController* tmc; if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -797,9 +797,9 @@ hsBool plAnimComponentBase::IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErro if (tmc) { - plMatrixChannelApplicator *app = TRACKED_NEW plMatrixChannelApplicator(); + plMatrixChannelApplicator *app = new plMatrixChannelApplicator(); app->SetChannelName(node->GetName()); - plMatrixControllerChannel *channel = TRACKED_NEW plMatrixControllerChannel(tmc, parts); + plMatrixControllerChannel *channel = new plMatrixControllerChannel(tmc, parts); app->SetChannel(channel); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -888,7 +888,7 @@ hsBool plAnimComponentBase::IMakePersistent(plMaxNode *node, plAGAnim *anim, plE plLocation nodeLoc = node->GetLocation(); plKey animKey = hsgResMgr::ResMgr()->NewKey(buffer, anim, nodeLoc); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, 0, 0); + plGenRefMsg* refMsg = new plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, 0, 0); hsgResMgr::ResMgr()->AddViaNotify(animKey, refMsg, plRefFlags::kActiveRef); return true; @@ -932,7 +932,7 @@ hsBool plAnimComponentBase::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) void plAnimComponentBase::SetupCtl( plAGAnim *anim, plController *ctl, plAGApplicator *app, plMaxNode *node ) { - plScalarControllerChannel *channel = TRACKED_NEW plScalarControllerChannel(ctl); + plScalarControllerChannel *channel = new plScalarControllerChannel(ctl); app->SetChannel(channel); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) diff --git a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp index a214835f..dff4715c 100644 --- a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp @@ -147,7 +147,7 @@ hsBool plAnimEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) if (!fCanExport) return false; - plAnimEventModifier* mod = TRACKED_NEW plAnimEventModifier; + plAnimEventModifier* mod = new plAnimEventModifier; plKey modKey = node->AddModifier(mod, IGetUniqueName(node)); fLogicModKeys[node] = modKey; @@ -157,7 +157,7 @@ hsBool plAnimEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) plEventCallbackMsg* CreateCallbackMsg(plAnimCmdMsg* animMsg, plKey modKey) { - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(modKey); eventMsg->fRepeats = -1; @@ -185,7 +185,7 @@ hsBool plAnimEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plKey animKey = animComp->GetModKey(animNode); const char* animName = animComp->GetAnimName(); - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); animMsg->SetSender(modKey); animMsg->SetAnimName(animName); @@ -459,7 +459,7 @@ hsBool plMtlEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) if (!fCanExport) return false; - plAnimEventModifier* mod = TRACKED_NEW plAnimEventModifier; + plAnimEventModifier* mod = new plAnimEventModifier; plKey modKey = node->AddModifier(mod, IGetUniqueName(node)); fLogicModKeys[node] = modKey; @@ -488,7 +488,7 @@ hsBool plMtlEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) hsTArray animKeys; GetMatAnimModKey(mtl, mtlNode, mtlAnim, animKeys); - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); animMsg->SetSender(modKey); animMsg->SetAnimName(mtlAnim); diff --git a/Sources/Tools/MaxComponent/plAudioComponents.cpp b/Sources/Tools/MaxComponent/plAudioComponents.cpp index e3668d34..4cc106c7 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.cpp +++ b/Sources/Tools/MaxComponent/plAudioComponents.cpp @@ -480,17 +480,17 @@ hsBool plBaseSoundEmitterComponent::PreConvert( plMaxNode *node, plErrorMsg *pEr const plAudioInterface *ai = node->GetSceneObject()->GetAudioInterface(); if (!ai) { - ai = TRACKED_NEW plAudioInterface; + ai = new plAudioInterface; plKey pAiKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), (hsKeyedObject*)ai,node->GetKey()->GetUoid().GetLocation(), node->GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify(pAiKey, TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pAiKey, new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } if (!ai->GetAudible()) { - plAudible *pAudible = TRACKED_NEW plWinAudible; + plAudible *pAudible = new plWinAudible; // Add a key for it plKey key = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pAudible, node->GetKey()->GetUoid().GetLocation(), node->GetLoadMask()); - plIntRefMsg* pMsg = TRACKED_NEW plIntRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); + plIntRefMsg* pMsg = new plIntRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); hsgResMgr::ResMgr()->AddViaNotify(pAudible->GetKey(), pMsg, plRefFlags::kActiveRef ); pAudible->SetSceneNode(node->GetRoomKey()); @@ -557,7 +557,7 @@ void plBaseSoundEmitterComponent::IGrabSoftRegion( plSound *sound, plErrorMsg if( vol != nil ) { vol->SetCheckListener(); - hsgResMgr::ResMgr()->AddViaNotify( softKey, TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, 0, plSound::kSoftRegion ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( softKey, new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, 0, plSound::kSoftRegion ), plRefFlags::kActiveRef ); } } } @@ -673,7 +673,7 @@ plSoundBuffer *plBaseSoundEmitterComponent::IGetSourceBuffer( const char *file return plSoundBuffer::ConvertNoRef( key->GetObjectPtr() ); // Not yet created, so make a new one - plSoundBuffer *buffer = TRACKED_NEW plSoundBuffer( fileName, srcBufferFlags ); + plSoundBuffer *buffer = new plSoundBuffer( fileName, srcBufferFlags ); if( !buffer->IsValid() ) { // Invalid, so delete and return nil @@ -767,7 +767,7 @@ void plBaseSoundEmitterComponent::UpdateSoundFileSelection( void ) } else { - baseBuffer = TRACKED_NEW plSoundBuffer( GetSoundFileName( kBaseSound ) ); + baseBuffer = new plSoundBuffer( GetSoundFileName( kBaseSound ) ); if( baseBuffer != nil && baseBuffer->IsValid() ) { // Update our stereo channel selection if necessary @@ -936,7 +936,7 @@ hsBool plBaseSoundEmitterComponent::AddToAnim( plAGAnim *anim, plMaxNode *node } std::map::iterator i = fIndices.begin(); - plSoundVolumeApplicator *app = TRACKED_NEW plSoundVolumeApplicator( (*i).second ); + plSoundVolumeApplicator *app = new plSoundVolumeApplicator( (*i).second ); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl( anim, ctl, app, node ); result = true; @@ -1699,7 +1699,7 @@ void plBaseSoundEmitterComponent::IGrabEAXParams( plSound *sound, plErrorMsg if( vol != nil ) { vol->SetCheckListener(); - hsgResMgr::ResMgr()->AddViaNotify( softKey, TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, 0, plSound::kRefSoftOcclusionRegion ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( softKey, new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, 0, plSound::kRefSoftOcclusionRegion ), plRefFlags::kActiveRef ); } } } @@ -2191,22 +2191,22 @@ hsBool plSound3DEmitterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plWin32Sound *sound = nil; if (!strcmp(node->GetName(), "LinkSoundSource")) - sound = TRACKED_NEW plWin32LinkSound; + sound = new plWin32LinkSound; else { #if 0 - sound = TRACKED_NEW plWin32StaticSound; + sound = new plWin32StaticSound; #else /// New method, still in testing: any sounds over 4 seconds get made into streaming sounds if( srcBuffer->GetDataLengthInSecs() > 4.f ) - sound = TRACKED_NEW plWin32StreamingSound; + sound = new plWin32StreamingSound; else - sound = TRACKED_NEW plWin32StaticSound; + sound = new plWin32StaticSound; } #endif hsgResMgr::ResMgr()->NewKey(keyName, sound, node->GetLocation(), node->GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); if( pAudible->AddSound( sound, fIndex, true ) ) { @@ -2257,7 +2257,7 @@ hsBool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray // Grab the buffer for this sound directly from the original source const char *fileName = groupArray[ i ]->GetSoundFileName( kBaseSound ); - plSoundBuffer *buffer = TRACKED_NEW plSoundBuffer( fileName ); + plSoundBuffer *buffer = new plSoundBuffer( fileName ); if( !buffer->IsValid() || !buffer->EnsureInternal() ) { // OK, because some *cough* machines are completely stupid and don't load AssetMan scenes with @@ -2281,7 +2281,7 @@ hsBool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray // Got a path to try, so try it! delete buffer; - buffer = TRACKED_NEW plSoundBuffer( newPath ); + buffer = new plSoundBuffer( newPath ); if( buffer->IsValid() && buffer->EnsureInternal() ) worked = true; } @@ -2347,7 +2347,7 @@ hsBool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray plPluginResManager::ResMgr()->NukeKeyAndObject( buffKey ); // Create a new one... - plSoundBuffer *mergedBuffer = TRACKED_NEW plSoundBuffer(); + plSoundBuffer *mergedBuffer = new plSoundBuffer(); mergedBuffer->SetInternalData( mergedHeader, mergedData.GetCount(), mergedData.AcquireArray() ); mergedData.Reset(); // The buffer may be shared across multiple sources. We could or together the LoadMasks of all @@ -2362,12 +2362,12 @@ hsBool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray plWinAudible* pAudible = (plWinAudible*)ai->GetAudible(); sprintf( keyName, "%s", GetINode()->GetName()); - plWin32GroupedSound *sound = TRACKED_NEW plWin32GroupedSound; + plWin32GroupedSound *sound = new plWin32GroupedSound; sound->SetPositionArray( startPoses.GetCount(), startPoses.AcquireArray(), volumes.AcquireArray() ); sound->SetProperty( plSound::kPropLoadOnlyOnCall, true ); hsgResMgr::ResMgr()->NewKey( keyName, sound, baseNode->GetLocation(), baseNode->GetLoadMask() ); - hsgResMgr::ResMgr()->AddViaNotify( mergedBuffer->GetKey(), TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( mergedBuffer->GetKey(), new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); if( pAudible->AddSound( sound, index, true ) ) { @@ -2513,14 +2513,14 @@ hsBool plBackgroundMusicComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plWin32Sound *sound = nil; if( srcBuffer->GetDataLengthInSecs() > 4.f ) - sound = TRACKED_NEW plWin32StreamingSound; + sound = new plWin32StreamingSound; else - sound = TRACKED_NEW plWin32StaticSound; + sound = new plWin32StaticSound; hsgResMgr::ResMgr()->NewKey(keyName, sound, node->GetLocation(), node->GetLoadMask()); srcBuffer->SetFlag( plSoundBuffer::kAlwaysExternal ); - hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); if (pAudible->AddSound( sound, fIndex, false)) { @@ -2670,10 +2670,10 @@ hsBool plGUISoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) char keyName[ 256 ]; sprintf( keyName, "%s_Win32GUISound", GetINode()->GetName() ); - plWin32StaticSound *sound = TRACKED_NEW plWin32StaticSound; + plWin32StaticSound *sound = new plWin32StaticSound; hsgResMgr::ResMgr()->NewKey(keyName, sound, node->GetLocation(), node->GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), TRACKED_NEW plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( srcBuffer->GetKey(), new plGenRefMsg( sound->GetKey(), plRefMsg::kOnCreate, -1, plSound::kRefDataBuffer ), plRefFlags::kActiveRef ); if (pAudible->AddSound( sound, fIndex, false)) { @@ -2959,11 +2959,11 @@ hsBool plEAXListenerComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; // Create a listener mod to handle these things - plEAXListenerMod *listener = TRACKED_NEW plEAXListenerMod(); + plEAXListenerMod *listener = new plEAXListenerMod(); node->AddModifier( listener, IGetUniqueName(node) ); // Add the soft region - hsgResMgr::ResMgr()->AddViaNotify( softKey, TRACKED_NEW plGenRefMsg( listener->GetKey(), plRefMsg::kOnCreate, 0, plEAXListenerMod::kRefSoftRegion ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( softKey, new plGenRefMsg( listener->GetKey(), plRefMsg::kOnCreate, 0, plEAXListenerMod::kRefSoftRegion ), plRefFlags::kActiveRef ); #ifdef EAX_SDK_AVAILABLE // Set up the parameters of the listener mod @@ -3468,7 +3468,7 @@ hsBool plRandomSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pAudible = (plWinAudible*)ai->GetAudible(); hsTArray comps; - plRandomSoundModGroup *groups = TRACKED_NEW plRandomSoundModGroup[kMaxGroups]; + plRandomSoundModGroup *groups = new plRandomSoundModGroup[kMaxGroups]; int i; int numSoFar = 0; for (i = 0; i < kMaxGroups; i++) @@ -3482,7 +3482,7 @@ hsBool plRandomSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) continue; } - groups[i].fIndices = TRACKED_NEW uint16_t[numSounds]; + groups[i].fIndices = new uint16_t[numSounds]; hsTArray indices; int j; @@ -3584,7 +3584,7 @@ hsBool plRandomSoundComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg { if (ICheckForSounds(pNode)) { - plRandomSoundMod* mod = TRACKED_NEW plRandomSoundMod; + plRandomSoundMod* mod = new plRandomSoundMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), mod, pNode->GetLocation()); fSoundMods[pNode] = mod; } @@ -3942,7 +3942,7 @@ hsBool plPhysicsSndGroupComp::Convert( plMaxNode *node, plErrorMsg *pErrMsg ) if (si) { // Create a new sound group - plPhysicalSndGroup *grp = TRACKED_NEW plPhysicalSndGroup( fCompPB->GetInt( (ParamID)kRefGroup ) ); + plPhysicalSndGroup *grp = new plPhysicalSndGroup( fCompPB->GetInt( (ParamID)kRefGroup ) ); hsgResMgr::ResMgr()->NewKey( IGetUniqueName( node ), grp, node->GetLocation(), node->GetLoadMask() ); // Convert each sound into a plWin32StaticSound and store onto the sound group @@ -4006,7 +4006,7 @@ hsBool plPhysicsSndGroupComp::Convert( plMaxNode *node, plErrorMsg *pErrMsg ) } // Attach the sound group to the physical - hsgResMgr::ResMgr()->AddViaNotify( grp->GetKey(), TRACKED_NEW plGenRefMsg( si->GetPhysical()->GetKey(), plRefMsg::kOnCreate, 0, plPXPhysical::kPhysRefSndGroup ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( grp->GetKey(), new plGenRefMsg( si->GetPhysical()->GetKey(), plRefMsg::kOnCreate, 0, plPXPhysical::kPhysRefSndGroup ), plRefFlags::kActiveRef ); } } diff --git a/Sources/Tools/MaxComponent/plAutoComponent.cpp b/Sources/Tools/MaxComponent/plAutoComponent.cpp index 30198459..1768d139 100644 --- a/Sources/Tools/MaxComponent/plAutoComponent.cpp +++ b/Sources/Tools/MaxComponent/plAutoComponent.cpp @@ -66,7 +66,7 @@ plAutoUIComp *gAutoUI; void DummyCode() { - gAutoUI = TRACKED_NEW plAutoUIComp(&gAutoDesc); + gAutoUI = new plAutoUIComp(&gAutoDesc); gAutoUI->AddCheckBox(0, "test", "Test", true); gAutoUI->AddFloatSpinner(1, "t2", "T2", 0.5, 0.f, 100.f); diff --git a/Sources/Tools/MaxComponent/plAutoUIBase.cpp b/Sources/Tools/MaxComponent/plAutoUIBase.cpp index 54844729..56f707db 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBase.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIBase.cpp @@ -132,7 +132,7 @@ void plAutoUIBase::AddCheckBox(int16_t id, const char *scriptName, const char *n fDesc->AddParam(id, scriptNameNew, TYPE_BOOL, 0, 0, p_default, def, end, end); - plAutoUIParam* param = TRACKED_NEW plCheckBoxParam(id, name); + plAutoUIParam* param = new plCheckBoxParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -146,7 +146,7 @@ void plAutoUIBase::AddFloatSpinner(int16_t id, const char *scriptName, const cha p_range, min, max, end, end); - plAutoUIParam* param = TRACKED_NEW plSpinnerParam(id, name, true); + plAutoUIParam* param = new plSpinnerParam(id, name, true); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -160,7 +160,7 @@ void plAutoUIBase::AddIntSpinner(int16_t id, const char *scriptName, const char p_range, min, max, end, end); - plAutoUIParam* param = TRACKED_NEW plSpinnerParam(id, name, false); + plAutoUIParam* param = new plSpinnerParam(id, name, false); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -172,7 +172,7 @@ void plAutoUIBase::AddEditBox(int16_t id, const char *scriptName, const char *na fDesc->AddParam(id, scriptNameNew, TYPE_STRING, 0, 0, p_default, def ? hsStrcpy(def) : nil, end, end); - plAutoUIParam* param = TRACKED_NEW plEditParam(id, name, lines); + plAutoUIParam* param = new plEditParam(id, name, lines); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -184,7 +184,7 @@ void plAutoUIBase::AddPickNodeList(int16_t id, const char *scriptName, const cha fDesc->AddParam(id, scriptNameNew, TYPE_INODE_TAB, 0, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickListParam(id, name, filter); + plAutoUIParam* param = new plPickListParam(id, name, filter); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -196,7 +196,7 @@ void plAutoUIBase::AddPickNodeButton(int16_t id, const char *scriptName, const c fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickButtonParam(id, name, filter, canConvertToType); + plAutoUIParam* param = new plPickButtonParam(id, name, filter, canConvertToType); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -208,7 +208,7 @@ void plAutoUIBase::AddPickComponentButton(int16_t id, const char *scriptName, co fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickComponentButtonParam(id, name, filter, canConvertToType); + plAutoUIParam* param = new plPickComponentButtonParam(id, name, filter, canConvertToType); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -220,7 +220,7 @@ void plAutoUIBase::AddPickComponentList(int16_t id, const char *scriptName, cons fDesc->AddParam(id, scriptNameNew, TYPE_INODE_TAB, 0, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickComponentListParam(id, name, filter); + plAutoUIParam* param = new plPickComponentListParam(id, name, filter); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -232,7 +232,7 @@ void plAutoUIBase::AddPickActivatorButton(int16_t id, const char *scriptName, co fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickActivatorButtonParam(id, name); + plAutoUIParam* param = new plPickActivatorButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -244,7 +244,7 @@ void plAutoUIBase::AddPickActivatorList(int16_t id, const char *scriptName, cons fDesc->AddParam(id, scriptNameNew, TYPE_INODE_TAB, 0, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickActivatorListParam(id, name); + plAutoUIParam* param = new plPickActivatorListParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -256,7 +256,7 @@ void plAutoUIBase::AddPickDynamicTextButton(int16_t id, const char *scriptName, fDesc->AddParam(id, scriptNameNew, TYPE_REFTARG, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickDynamicTextButtonParam(id, name); + plAutoUIParam* param = new plPickDynamicTextButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -268,7 +268,7 @@ void plAutoUIBase::AddPickGUIDialogButton(int16_t id, const char *scriptName, co fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUIDialog,GUI_DIALOG_COMP_CLASS_ID); + plAutoUIParam* param = new plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUIDialog,GUI_DIALOG_COMP_CLASS_ID); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -280,7 +280,7 @@ void plAutoUIBase::AddPickExcludeRegionButton(int16_t id, const char *scriptName fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickExcludeRegionButtonParam(id, name); + plAutoUIParam* param = new plPickExcludeRegionButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -292,7 +292,7 @@ void plAutoUIBase::AddPickWaterComponentButton(int16_t id, const char *scriptNam fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickWaterComponentButtonParam(id, name); + plAutoUIParam* param = new plPickWaterComponentButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -304,7 +304,7 @@ void plAutoUIBase::AddPickSwimCurrentInterfaceButton(int16_t id, const char *scr fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickSwimCurrentInterfaceButtonParam(id, name); + plAutoUIParam* param = new plPickSwimCurrentInterfaceButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -316,7 +316,7 @@ void plAutoUIBase::AddPickClusterComponentButton(int16_t id, const char *scriptN fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickClusterComponentButtonParam(id, name); + plAutoUIParam* param = new plPickClusterComponentButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -328,7 +328,7 @@ void plAutoUIBase::AddPickAnimationButton(int16_t id, const char *scriptName, co fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickAnimationButtonParam(id, name); + plAutoUIParam* param = new plPickAnimationButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -340,7 +340,7 @@ void plAutoUIBase::AddPickBehaviorButton(int16_t id, const char *scriptName, con fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickBehaviorButtonParam(id, name); + plAutoUIParam* param = new plPickBehaviorButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -352,7 +352,7 @@ void plAutoUIBase::AddPickMaterialButton(int16_t id, const char *scriptName, con fDesc->AddParam(id, scriptNameNew, TYPE_REFTARG, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickMaterialButtonParam(id, name); + plAutoUIParam* param = new plPickMaterialButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -364,7 +364,7 @@ void plAutoUIBase::AddPickMaterialAnimationButton(int16_t id, const char *script fDesc->AddParam(id, scriptNameNew, TYPE_REFTARG, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickMaterialAnimationButtonParam(id, name); + plAutoUIParam* param = new plPickMaterialAnimationButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -376,7 +376,7 @@ void plAutoUIBase::AddPickGUIPopUpMenuButton(int16_t id, const char *scriptName, fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUIPopUpMenu,GUI_MENUANCHOR_CLASSID); + plAutoUIParam* param = new plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUIPopUpMenu,GUI_MENUANCHOR_CLASSID); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -388,7 +388,7 @@ void plAutoUIBase::AddPickGUISkinButton(int16_t id, const char *scriptName, cons fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUISkin,GUI_SKIN_CLASSID); + plAutoUIParam* param = new plPickSingleComponentButtonParam(id, name,plAutoUIParam::kTypeGUISkin,GUI_SKIN_CLASSID); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -400,7 +400,7 @@ void plAutoUIBase::AddDropDownList(int16_t id, const char *scriptName, const cha fDesc->AddParam(id, scriptNameNew, TYPE_STRING, 0, 0, p_default, nil, end, end); - plAutoUIParam* param = TRACKED_NEW plDropDownListParam(id, name, options); + plAutoUIParam* param = new plDropDownListParam(id, name, options); param->SetVisInfo(vid, vstates); fParams.push_back(param); } @@ -412,7 +412,7 @@ void plAutoUIBase::AddPickGrassComponentButton(int16_t id, const char *scriptNam fDesc->AddParam(id, scriptNameNew, TYPE_INODE, 0, 0, end, end); - plAutoUIParam* param = TRACKED_NEW plPickGrassComponentButtonParam(id, name); + plAutoUIParam* param = new plPickGrassComponentButtonParam(id, name); param->SetVisInfo(vid, vstates); fParams.push_back(param); } diff --git a/Sources/Tools/MaxComponent/plAutoUIBlock.cpp b/Sources/Tools/MaxComponent/plAutoUIBlock.cpp index ee17e4f4..767704ab 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBlock.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIBlock.cpp @@ -53,7 +53,7 @@ plAutoUIBlock::plAutoUIBlock(plComponentClassDesc *cd, int blockID, const char * { fName = hsStrcpy(name); fVersion = version; - fDesc = TRACKED_NEW ParamBlockDesc2(blockID, "Auto", IDS_COMP_AUTO, cd, 0, end); + fDesc = new ParamBlockDesc2(blockID, "Auto", IDS_COMP_AUTO, cd, 0, end); fIsMultiModifier = false; } diff --git a/Sources/Tools/MaxComponent/plAutoUIComp.cpp b/Sources/Tools/MaxComponent/plAutoUIComp.cpp index fd3a939a..e61415f9 100644 --- a/Sources/Tools/MaxComponent/plAutoUIComp.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIComp.cpp @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plAutoUIComp::plAutoUIComp(plAutoUIClassDesc *cd) { - fDesc = TRACKED_NEW ParamBlockDesc2(plComponentBase::kBlkComp, "Auto", IDS_COMP_AUTO, cd, P_AUTO_CONSTRUCT, plComponentBase::kRefComp, end); + fDesc = new ParamBlockDesc2(plComponentBase::kBlkComp, "Auto", IDS_COMP_AUTO, cd, P_AUTO_CONSTRUCT, plComponentBase::kRefComp, end); cd->autoComp = this; } diff --git a/Sources/Tools/MaxComponent/plAutoUIParams.cpp b/Sources/Tools/MaxComponent/plAutoUIParams.cpp index 129ff769..d586b7f5 100644 --- a/Sources/Tools/MaxComponent/plAutoUIParams.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIParams.cpp @@ -417,7 +417,7 @@ bool plEditParam::IsMyMessage(UINT msg, WPARAM wParam, LPARAM lParam, IParamBloc int len = GetWindowTextLength(fhEdit)+1; if (len > 1) { - char *buf = TRACKED_NEW char[len]; + char *buf = new char[len]; GetWindowText(fhEdit, buf, len); pb->SetValue(fID, 0, buf); delete [] buf; @@ -1724,7 +1724,7 @@ bool plDropDownListParam::IsMyMessage(UINT msg, WPARAM wParam, LPARAM lParam, IP if (idx >=0 && idx < fOptions.size()) { - char* buf = TRACKED_NEW char[fOptions[idx].size() + 1]; + char* buf = new char[fOptions[idx].size() + 1]; strcpy(buf, fOptions[idx].c_str()); pb->SetValue(fID, 0, buf); delete [] buf; diff --git a/Sources/Tools/MaxComponent/plAvatarComponent.cpp b/Sources/Tools/MaxComponent/plAvatarComponent.cpp index 1752188f..09883a82 100644 --- a/Sources/Tools/MaxComponent/plAvatarComponent.cpp +++ b/Sources/Tools/MaxComponent/plAvatarComponent.cpp @@ -124,7 +124,7 @@ class plCritterCommands; plArmatureMod* plArmatureComponent::IGenerateMyArmMod(plHKPhysical* myHKPhys, plMaxNode* node) { - plArmatureMod *avMod = TRACKED_NEW plArmatureMod(); + plArmatureMod *avMod = new plArmatureMod(); avMod->SetRootName(node->GetKey()->GetName()); return avMod; } @@ -216,17 +216,17 @@ void plArmatureComponent::ISetArmatureSORecurse(plMaxNode *node, plSceneObject * hsBool plArmatureComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { // add audio interface and record/playback component - pl2WayWinAudible* pAudible = TRACKED_NEW pl2WayWinAudible; + pl2WayWinAudible* pAudible = new pl2WayWinAudible; // Add a key for it plKey key = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pAudible, node->GetLocation() ); - plAudioInterface* ai = TRACKED_NEW plAudioInterface; + plAudioInterface* ai = new plAudioInterface; plKey pAiKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), (hsKeyedObject*)ai,node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(pAiKey, TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pAiKey, new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); - plIntRefMsg* pMsg = TRACKED_NEW plIntRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); + plIntRefMsg* pMsg = new plIntRefMsg(node->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); hsgResMgr::ResMgr()->AddViaNotify(pAudible->GetKey(), pMsg, plRefFlags::kActiveRef ); ISetArmatureSORecurse(node, node->GetSceneObject()); @@ -248,9 +248,9 @@ hsBool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) ISetupClothes(node, fArmMod, pErrMsg); // ArmatureEffects - plArmatureEffectsMgr *effects = TRACKED_NEW plArmatureEffectsMgr(); + plArmatureEffectsMgr *effects = new plArmatureEffectsMgr(); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effects, node->GetLocation()); - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(fArmMod->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg = new plGenRefMsg(fArmMod->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(effects->GetKey(), msg, plRefFlags::kActiveRef); // Attach effects plSceneObject *obj = node->GetSceneObject(); @@ -264,7 +264,7 @@ hsBool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { // MakeCharacterHierarchy will attach agmodifiers to all the bones in the hierarchy; // have to manually add any for non-bone objects... - agMod = TRACKED_NEW plAGModifier("Handle"); // the player root is known as the handle + agMod = new plAGModifier("Handle"); // the player root is known as the handle node->AddModifier(agMod, IGetUniqueName(node)); } @@ -462,7 +462,7 @@ void plAvatarComponent::IAttachModifiers(plMaxNode *node, plErrorMsg *pErrMsg) plSceneObject * bodySO = node->GetSceneObject(); - plArmatureMod* avMod = TRACKED_NEW plArmatureMod(); + plArmatureMod* avMod = new plArmatureMod(); avMod->SetRootName(name); avMod->AppendMeshKey(meshKey); int skeletonType = fCompPB->GetInt(ParamID(kSkeleton)); @@ -470,9 +470,9 @@ void plAvatarComponent::IAttachModifiers(plMaxNode *node, plErrorMsg *pErrMsg) // only make a human brain if we're a human if (skeletonType == plArmatureMod::kBoneBaseCritter) - avMod->PushBrain(TRACKED_NEW plAvBrainCritter()); + avMod->PushBrain(new plAvBrainCritter()); else - avMod->PushBrain(TRACKED_NEW plAvBrainHuman(skeletonType == plArmatureMod::kBoneBaseActor)); + avMod->PushBrain(new plAvBrainHuman(skeletonType == plArmatureMod::kBoneBaseActor)); avMod->SetBodyAgeName(node->GetAgeName()); avMod->SetBodyFootstepSoundPage(fCompPB->GetStr(ParamID(kBodyFootstepSoundPage))); @@ -481,7 +481,7 @@ void plAvatarComponent::IAttachModifiers(plMaxNode *node, plErrorMsg *pErrMsg) //AddLinkSound(node, node->GetSceneObject()->GetKey(), pErrMsg ); plKey avKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), avMod, node->GetLocation()); - plObjRefMsg *objRefMsg = TRACKED_NEW plObjRefMsg(bodySO->GetKey(), plRefMsg::kOnCreate,-1, plObjRefMsg::kModifier); + plObjRefMsg *objRefMsg = new plObjRefMsg(bodySO->GetKey(), plRefMsg::kOnCreate,-1, plObjRefMsg::kModifier); hsgResMgr::ResMgr()->AddViaNotify(avKey, objRefMsg, plRefFlags::kActiveRef); fArmMod = avMod; @@ -501,7 +501,7 @@ void AddClothingToMod(plMaxNode *node, plArmatureMod *mod, int group, hsGMateria return; } - plClothingBase *base = TRACKED_NEW plClothingBase(); + plClothingBase *base = new plClothingBase(); if (node->GetUserPropString("layout", sdata)) { toker.Reset(sdata, hsConverterUtils::fTagSeps); @@ -511,14 +511,14 @@ void AddClothingToMod(plMaxNode *node, plArmatureMod *mod, int group, hsGMateria base->SetLayoutName("BasicHuman"); sprintf(keyName, "%s_ClothingBase", node->GetName()); hsgResMgr::ResMgr()->NewKey(keyName, base, node->GetLocation()); - plClothingOutfit *outfit = TRACKED_NEW plClothingOutfit(); + plClothingOutfit *outfit = new plClothingOutfit(); outfit->fGroup = group; sprintf(keyName, "%s_outfit", mod->GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(keyName, outfit, node->GetLocation()); - msg = TRACKED_NEW plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); + msg = new plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(base->GetKey(), msg, plRefFlags::kActiveRef); // Add clothing base to outfit - msg = TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, -1, -1); + msg = new plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(outfit->GetKey(), msg, plRefFlags::kActiveRef); // Attach outfit @@ -542,14 +542,14 @@ void AddClothingToMod(plMaxNode *node, plArmatureMod *mod, int group, hsGMateria // The tex is what the outfit and the material hold onto. It's what // gets rendered. The base will hang onto the original baseTex. - msg = TRACKED_NEW plGenRefMsg(base->GetKey(), plRefMsg::kOnCreate, -1, -1); + msg = new plGenRefMsg(base->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->SendRef(baseTex->GetKey(), msg, plRefFlags::kActiveRef); // Set base texture of avatar - plLayRefMsg* layRef = TRACKED_NEW plLayRefMsg(li->GetKey(), plRefMsg::kOnRemove, 0, plLayRefMsg::kTexture); + plLayRefMsg* layRef = new plLayRefMsg(li->GetKey(), plRefMsg::kOnRemove, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(baseTex->GetKey(), layRef, plRefFlags::kActiveRef); // Remove it from the material - msg = TRACKED_NEW plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); + msg = new plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(li->GetKey(), msg, plRefFlags::kActiveRef); // Set outfit's target layer interface - msg = TRACKED_NEW plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); + msg = new plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(mat->GetKey(), msg, plRefFlags::kActiveRef); // Outfit needs the material } else @@ -689,7 +689,7 @@ hsBool plCompoundCtrlComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) // create and register the player modifier - plAGMasterMod *agMaster = TRACKED_NEW plAGMasterMod(); + plAGMasterMod *agMaster = new plAGMasterMod(); node->AddModifier(agMaster, IGetUniqueName(node)); return true; @@ -1055,14 +1055,14 @@ void plLODAvatarComponent::IAttachModifiers( plMaxNode *node, plErrorMsg *pEr const char *avatarName = node->GetKey()->GetName(); plMaxNode *animRoot = (plMaxNode *)fCompPB->GetINode(plLODAvatarComponent::kRootNodeAddBtn); plKey animRootKey = animRoot->GetSceneObject()->GetKey(); - plArmatureLODMod* avMod = TRACKED_NEW plArmatureLODMod(avatarName); + plArmatureLODMod* avMod = new plArmatureLODMod(avatarName); int skeletonType = fCompPB->GetInt(ParamID(kSkeleton)); avMod->SetBodyType( skeletonType ); if (skeletonType == plArmatureLODMod::kBoneBaseCritter) - avMod->PushBrain(TRACKED_NEW plAvBrainCritter()); + avMod->PushBrain(new plAvBrainCritter()); else - avMod->PushBrain(TRACKED_NEW plAvBrainHuman(skeletonType == plArmatureMod::kBoneBaseActor)); + avMod->PushBrain(new plAvBrainHuman(skeletonType == plArmatureMod::kBoneBaseActor)); avMod->SetBodyAgeName(node->GetAgeName()); avMod->SetBodyFootstepSoundPage(fCompPB->GetStr(ParamID(kBodyFootstepSoundPage))); @@ -1136,7 +1136,7 @@ hsBool plLODAvatarComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) for (i = 0; i < kMaxNumLODLevels; i++) { int numBones = fCompPB->GetInt(ParamID(kGroupTotals), 0, i); - plKeyVector *keyVec = TRACKED_NEW plKeyVector; + plKeyVector *keyVec = new plKeyVector; int j; for (j = 0; j < numBones; j++) @@ -1176,7 +1176,7 @@ void plLODAvatarComponent::IAttachShadowCastModifiersRecur(plMaxNode* node, plSh void plLODAvatarComponent::IAttachShadowCastToLODs(plMaxNode* rootNode) { - plShadowCaster* caster = TRACKED_NEW plShadowCaster; + plShadowCaster* caster = new plShadowCaster; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(rootNode), caster, rootNode->GetLocation()); caster->SetSelfShadow(true); diff --git a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp index 67a3b5d2..5c174b21 100644 --- a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp +++ b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp @@ -155,7 +155,7 @@ hsBool plAvBehaviorSittingComponent::PreConvert(plMaxNode* node, plErrorMsg* pEr bool hasRightApproach = fCompPB->GetInt(ParamID(kApproachRight)) ? true : false; // Create our key here and give it to the detector so it will notify us - plSittingModifier *sitMod = TRACKED_NEW plSittingModifier(hasFrontApproach, hasLeftApproach, hasRightApproach); + plSittingModifier *sitMod = new plSittingModifier(hasFrontApproach, hasLeftApproach, hasRightApproach); if (fCompPB->GetInt(ParamID(kDisableForward))) sitMod->fMiscFlags |= plSittingModifier::kDisableForward; diff --git a/Sources/Tools/MaxComponent/plBipedKiller.cpp b/Sources/Tools/MaxComponent/plBipedKiller.cpp index 5bbef4d0..375603a3 100644 --- a/Sources/Tools/MaxComponent/plBipedKiller.cpp +++ b/Sources/Tools/MaxComponent/plBipedKiller.cpp @@ -448,7 +448,7 @@ plSampleVec * SampleNodeMotion(INode* node, INode* parent, int sampleRate, Inter // intended for use in the context of a full tree traversal plSampleVec * SampleNodeMotion(INode * node, INode* parent, int sampleRate, TimeValue start, TimeValue end) { - plSampleVec *result = TRACKED_NEW plSampleVec; + plSampleVec *result = new plSampleVec; bool done = false; @@ -462,7 +462,7 @@ plSampleVec * SampleNodeMotion(INode * node, INode* parent, int sampleRate, Time int frameNum= keyTime / GetTicksPerFrame(); // get localTM - nodeTMInfo * nti = TRACKED_NEW nodeTMInfo; + nodeTMInfo * nti = new nodeTMInfo; nti->fTime = keyTime; Matrix3 localTM = node->GetNodeTM(keyTime); @@ -564,7 +564,7 @@ plSampleVecMap *SampleTreeMotion(INode* node, INode* parent, int sampleRate, Int Interval interval = theInterface->GetAnimRange(); TimeValue start = interval.Start(); // in ticks TimeValue end = interval.End(); - plSampleVecMap *ourMap = TRACKED_NEW plSampleVecMap(); + plSampleVecMap *ourMap = new plSampleVecMap(); sampleRate *= GetTicksPerFrame(); // convert sample rate to ticks @@ -581,7 +581,7 @@ void SampleTreeMotionRecurse(INode * node, INode* parent, int sampleRate, if(!HasBipController(node)) { char *nodeName = node->GetName(); - char *nameCopy = TRACKED_NEW char[strlen(nodeName) + 1]; + char *nameCopy = new char[strlen(nodeName) + 1]; strcpy(nameCopy, nodeName); plSampleVec *branch = SampleNodeMotion(node, parent, sampleRate, start, end); diff --git a/Sources/Tools/MaxComponent/plBlowComponent.cpp b/Sources/Tools/MaxComponent/plBlowComponent.cpp index 994bc8c3..fe5c7b86 100644 --- a/Sources/Tools/MaxComponent/plBlowComponent.cpp +++ b/Sources/Tools/MaxComponent/plBlowComponent.cpp @@ -128,7 +128,7 @@ hsBool plBlowComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) hsBool plBlowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plBlower* pMod = TRACKED_NEW plBlower; + plBlower* pMod = new plBlower; float strength = fCompPB->GetFloat(kStrength) * 0.01f; float speed = fCompPB->GetFloat(kSpeed) * 0.01f; diff --git a/Sources/Tools/MaxComponent/plCameraComponents.cpp b/Sources/Tools/MaxComponent/plCameraComponents.cpp index 86ff2ca1..3cfe1ff1 100644 --- a/Sources/Tools/MaxComponent/plCameraComponents.cpp +++ b/Sources/Tools/MaxComponent/plCameraComponents.cpp @@ -440,9 +440,9 @@ hsBool plTransOverrideComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMs PreTrans* pTrans = nil; if (pCamNode) - pTrans = TRACKED_NEW PreTrans(((plMaxNode*)pCamNode)->GetSceneObject()); + pTrans = new PreTrans(((plMaxNode*)pCamNode)->GetSceneObject()); else - pTrans = TRACKED_NEW PreTrans(nil); + pTrans = new PreTrans(nil); if (fCompPB->GetInt(kIgnoreTrans)) { @@ -794,9 +794,9 @@ hsBool plCameraBaseComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) } CamTrans* camTrans = nil; if (!pCamMod) - camTrans = TRACKED_NEW CamTrans(nil); + camTrans = new CamTrans(nil); else - camTrans = TRACKED_NEW CamTrans(pCamMod->GetKey()); + camTrans = new CamTrans(pCamMod->GetKey()); camTrans->fAccel = trans->fAccel; camTrans->fDecel = trans->fDecel; @@ -837,10 +837,10 @@ plCameraModifier1* plCameraBaseComponent::ICreateCameraModifier(plMaxNode* pNode // create run-time objects - plCameraModifier1* pMod = TRACKED_NEW plCameraModifier1; + plCameraModifier1* pMod = new plCameraModifier1; plKey modifierKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pMod, pNode->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(modifierKey, TRACKED_NEW plObjRefMsg(pNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(modifierKey, new plObjRefMsg(pNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); obj = pNode->EvalWorldState(hsConverterUtils::Instance().GetTime(pNode->GetInterface())).obj; @@ -950,17 +950,17 @@ plCameraModifier1* plCameraBaseComponent::ICreateFocalPointObject(plMaxNode* pNo { plMaxNode* node = ((plMaxNode*)pNode->GetTarget()); - plCameraModifier1* pPOAMod = TRACKED_NEW plCameraModifier1; + plCameraModifier1* pPOAMod = new plCameraModifier1; plKey poaModifierKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pPOAMod, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(poaModifierKey, TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(poaModifierKey, new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); - plCameraBrain1* pPOABrain = TRACKED_NEW plCameraBrain1(pPOAMod); + plCameraBrain1* pPOABrain = new plCameraBrain1(pPOAMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pPOABrain, pNode->GetLocation()); - plGenRefMsg* pGRMsg = TRACKED_NEW plGenRefMsg(pPOAMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pGRMsg = new plGenRefMsg(pPOAMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pGRMsg->SetRef( (hsKeyedObject*)pPOABrain ); plConvert::Instance().AddMessageToQueue(pGRMsg); @@ -1104,11 +1104,11 @@ hsBool plCamera1Component::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) return false; //this is a fixed camera using the built-in target - plCameraBrain1_Fixed* pBrain = TRACKED_NEW plCameraBrain1_Fixed(pMod); + plCameraBrain1_Fixed* pBrain = new plCameraBrain1_Fixed(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); - plGenRefMsg* pMsg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg); @@ -1347,11 +1347,11 @@ hsBool plAutoCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) if (!pMod) return false; - plCameraBrain1_Avatar* pBrain = TRACKED_NEW plCameraBrain1_Avatar(pMod); + plCameraBrain1_Avatar* pBrain = new plCameraBrain1_Avatar(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); - plGenRefMsg* pMsg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg); hsVector3 pt; @@ -1509,11 +1509,11 @@ hsBool plFPCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) if (!pMod) return false; - plCameraBrain1_FirstPerson* pBrain = TRACKED_NEW plCameraBrain1_FirstPerson(pMod); + plCameraBrain1_FirstPerson* pBrain = new plCameraBrain1_FirstPerson(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); - plGenRefMsg* pMsg2 = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg2 = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg2->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg2); @@ -1648,7 +1648,7 @@ plRailCameraComponent::plRailCameraComponent() hsBool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg) { - plRailCameraMod* lineMod = TRACKED_NEW plRailCameraMod; + plRailCameraMod* lineMod = new plRailCameraMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), lineMod, pNode->GetLocation()); lineMod->SetFollowMode(plLineFollowMod::kFollowLocalAvatar); @@ -1686,7 +1686,7 @@ hsBool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg hsAffineParts initParts; AP_SET(initParts, ap); - plAnimPath* animPath = TRACKED_NEW plAnimPath; + plAnimPath* animPath = new plAnimPath; animPath->SetController(tmc); animPath->InitParts(initParts); animPath->SetFarthest(fCompPB->GetInt(kRailFarthest)); @@ -1699,7 +1699,7 @@ hsBool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg plSceneObject* parObj = parNode->GetSceneObject(); if( parObj ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefParent); + plGenRefMsg* refMsg = new plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefParent); hsgResMgr::ResMgr()->AddViaNotify(parObj->GetKey(), refMsg, plRefFlags::kPassiveRef); } } @@ -1756,7 +1756,7 @@ hsBool plRailCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) return false; //this is a fixed camera using the built-in target - plCameraBrain1_Fixed* pBrain = TRACKED_NEW plCameraBrain1_Fixed(pMod); + plCameraBrain1_Fixed* pBrain = new plCameraBrain1_Fixed(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); @@ -1764,7 +1764,7 @@ hsBool plRailCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) pBrain->SetAccel(5.0f); pBrain->SetDecel(5.0f); - plGenRefMsg* pMsg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg); @@ -1910,7 +1910,7 @@ hsBool plCircleCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg return false; //this is a circle camera using the built-in target - plCameraBrain1_Circle* pBrain = TRACKED_NEW plCameraBrain1_Circle(pMod); + plCameraBrain1_Circle* pBrain = new plCameraBrain1_Circle(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); @@ -1924,7 +1924,7 @@ hsBool plCircleCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg if (fCompPB->GetInt(kCircleFarthest)) pBrain->SetFarCircleCam(true); - plGenRefMsg* pMsg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg); @@ -2077,14 +2077,14 @@ hsBool plCameraDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); - plCameraRegionDetector *detector = TRACKED_NEW plCameraRegionDetector; + plCameraRegionDetector *detector = new plCameraRegionDetector; // Register the detector plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByType); // need to get the key for the camera here... @@ -2301,11 +2301,11 @@ hsBool plFollowCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) if (!pMod) return false; - plCameraBrain1_Avatar* pBrain = TRACKED_NEW plCameraBrain1_Avatar(pMod); + plCameraBrain1_Avatar* pBrain = new plCameraBrain1_Avatar(pMod); // Give the brain a key hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), pBrain, pNode->GetLocation()); - plGenRefMsg* pMsg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); + plGenRefMsg* pMsg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, -1, 0); pMsg->SetRef( (hsKeyedObject*)pBrain ); plConvert::Instance().AddMessageToQueue(pMsg); hsVector3 pt; diff --git a/Sources/Tools/MaxComponent/plClickDragComponent.cpp b/Sources/Tools/MaxComponent/plClickDragComponent.cpp index 198732b9..50fa6f32 100644 --- a/Sources/Tools/MaxComponent/plClickDragComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickDragComponent.cpp @@ -363,9 +363,9 @@ hsBool plClickDragComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) plSceneObject *obj = node->GetSceneObject(); // do the same thing for axis animation controllers. - plAxisAnimModifier* pAxis = TRACKED_NEW plAxisAnimModifier; + plAxisAnimModifier* pAxis = new plAxisAnimModifier; plKey axisKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pAxis, loc); - hsgResMgr::ResMgr()->AddViaNotify(axisKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(axisKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); logic->AddNotifyReceiver(axisKey); fAxisKeys[node] = axisKey; @@ -384,11 +384,11 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // Create the detector plDetectorModifier *detector = nil; - detector = TRACKED_NEW plPickingDetector; + detector = new plPickingDetector; // Register the detector plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); // set up the axis anim controller @@ -437,17 +437,17 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pAxis->SetAllOrNothing(fCompPB->GetInt(kClickDragAllOrNothing)); // add callbacks for beginning and end of animation - plEventCallbackMsg* pCall1 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall1 = new plEventCallbackMsg; pCall1->fEvent = kBegin; pCall1->fRepeats = -1; pCall1->AddReceiver(axisKey); - plEventCallbackMsg* pCall2 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall2 = new plEventCallbackMsg; pCall2->fEvent = kEnd; pCall2->fRepeats = -1; pCall2->AddReceiver(axisKey); - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; const char *tempAnimName = pAnim->GetAnimName(); if (tempAnimName == nil) { @@ -504,11 +504,11 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) if(pProxyNode->CanConvert()) { - det2 = TRACKED_NEW plPickingDetector; + det2 = new plPickingDetector; // Register the detector det2Key = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), det2, loc); - hsgResMgr::ResMgr()->AddViaNotify(det2Key, TRACKED_NEW plObjRefMsg(((plMaxNode*)pProxyNode)->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg( det2Key, plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(det2Key, new plObjRefMsg(((plMaxNode*)pProxyNode)->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg( det2Key, plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); det2->SetProxyKey(node->GetSceneObject()->GetKey()); } else @@ -523,7 +523,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // create and register the CONDITIONS for the DETECTOR's Logic Modifier - plActivatorConditionalObject* activatorCond = TRACKED_NEW plActivatorConditionalObject; + plActivatorConditionalObject* activatorCond = new plActivatorConditionalObject; plKey activatorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), activatorCond, loc); // do we have a required region? @@ -553,12 +553,12 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // need a player in box condition here... // first a detector-any for the box - plObjectInVolumeDetector* pCDet = TRACKED_NEW plObjectInVolumeDetector(plCollisionDetector::kTypeAny); + plObjectInVolumeDetector* pCDet = new plObjectInVolumeDetector(plCollisionDetector::kTypeAny); plKey cDetKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pCDet, loc); - hsgResMgr::ResMgr()->AddViaNotify(cDetKey, TRACKED_NEW plObjRefMsg(((plMaxNode*)pProxyRegNode)->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(cDetKey, new plObjRefMsg(((plMaxNode*)pProxyRegNode)->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); pCDet->AddLogicObj(logicKey); // then an object-in-box condition for the logic mod - plObjectInBoxConditionalObject* boxCond = TRACKED_NEW plObjectInBoxConditionalObject; + plObjectInBoxConditionalObject* boxCond = new plObjectInBoxConditionalObject; plKey boxCondKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), boxCond, loc); logic->AddCondition(boxCond); } @@ -578,7 +578,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // How do we feel about player facing - plFacingConditionalObject* facingCond = TRACKED_NEW plFacingConditionalObject; + plFacingConditionalObject* facingCond = new plFacingConditionalObject; facingCond->SetDirectional(fCompPB->GetInt(kClickDragDirectional)); int deg = fCompPB->GetInt(kClickDragDegrees); if (deg > 180) diff --git a/Sources/Tools/MaxComponent/plClickableComponent.cpp b/Sources/Tools/MaxComponent/plClickableComponent.cpp index 14611940..fe56a953 100644 --- a/Sources/Tools/MaxComponent/plClickableComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickableComponent.cpp @@ -264,9 +264,9 @@ hsBool plClickableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) plSceneObject *obj = clickNode->GetSceneObject(); // Create and register the VolumeGadget's logic component - plLogicModifier *logic = TRACKED_NEW plLogicModifier; + plLogicModifier *logic = new plLogicModifier; plKey logicKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), logic, clickNode->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fLogicModKeys[clickNode] = logicKey; @@ -328,14 +328,14 @@ hsBool plClickableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // Create the detector plDetectorModifier *detector = nil; - detector = TRACKED_NEW plPickingDetector; + detector = new plPickingDetector; // Register the detector plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); // create and register the CONDITIONS for the DETECTOR's Logic Modifier - plActivatorConditionalObject* activatorCond = TRACKED_NEW plActivatorConditionalObject; + plActivatorConditionalObject* activatorCond = new plActivatorConditionalObject; plKey activatorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), activatorCond, loc); // @@ -345,14 +345,14 @@ hsBool plClickableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // first a detector-any for the box if (!ignoreProxyRegion) { - plObjectInVolumeDetector* pCDet = TRACKED_NEW plObjectInVolumeDetector(plCollisionDetector::kTypeAny); + plObjectInVolumeDetector* pCDet = new plObjectInVolumeDetector(plCollisionDetector::kTypeAny); plKey pCDetKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pCDet, loc); - hsgResMgr::ResMgr()->AddViaNotify(pCDetKey, TRACKED_NEW plObjRefMsg(detectNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pCDetKey, new plObjRefMsg(detectNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); pCDet->AddLogicObj(logicKey); // then an object-in-box condition for the logic mod - plObjectInBoxConditionalObject* boxCond = TRACKED_NEW plObjectInBoxConditionalObject; + plObjectInBoxConditionalObject* boxCond = new plObjectInBoxConditionalObject; plKey boxCondKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), boxCond, loc); logic->AddCondition(boxCond); } @@ -360,7 +360,7 @@ hsBool plClickableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // // How do we feel about player facing // - plFacingConditionalObject* facingCond = TRACKED_NEW plFacingConditionalObject; + plFacingConditionalObject* facingCond = new plFacingConditionalObject; facingCond->SetDirectional(fCompPB->GetInt(kClickableDirectional)); int deg = fCompPB->GetInt(kClickableDegrees); if (deg > 180) diff --git a/Sources/Tools/MaxComponent/plClimbComponent.cpp b/Sources/Tools/MaxComponent/plClimbComponent.cpp index 246831a9..d3c63a68 100644 --- a/Sources/Tools/MaxComponent/plClimbComponent.cpp +++ b/Sources/Tools/MaxComponent/plClimbComponent.cpp @@ -239,7 +239,7 @@ hsBool plClimbTriggerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plClimbMsg *enterMsg = nil; if(enterCommand != plClimbMsg::kNoCommand) { - enterMsg = TRACKED_NEW plClimbMsg(nilKey, nilKey, enterCommand, direction, enterStatus, target); + enterMsg = new plClimbMsg(nilKey, nilKey, enterCommand, direction, enterStatus, target); enterMsg->SetBCastFlag(plMessage::kPropagateToModifiers); enterMsg->SetBCastFlag(plMessage::kNetPropagate); enterMsg->SetBCastFlag(plMessage::kNetForce); @@ -248,13 +248,13 @@ hsBool plClimbTriggerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plClimbMsg *exitMsg = nil; if(exitCommand != nil) { - exitMsg = TRACKED_NEW plClimbMsg(nilKey, nilKey, exitCommand, direction, exitStatus, target); + exitMsg = new plClimbMsg(nilKey, nilKey, exitCommand, direction, exitStatus, target); exitMsg->SetBCastFlag(plMessage::kPropagateToModifiers); exitMsg->SetBCastFlag(plMessage::kNetPropagate); exitMsg->SetBCastFlag(plMessage::kNetForce); } - plSimpleRegionSensor *sensMod = TRACKED_NEW plSimpleRegionSensor(enterMsg, exitMsg); + plSimpleRegionSensor *sensMod = new plSimpleRegionSensor(enterMsg, exitMsg); node->AddModifier(sensMod, IGetUniqueName(node)); return true; diff --git a/Sources/Tools/MaxComponent/plClothingComponent.cpp b/Sources/Tools/MaxComponent/plClothingComponent.cpp index 957ca4d7..0abb2053 100644 --- a/Sources/Tools/MaxComponent/plClothingComponent.cpp +++ b/Sources/Tools/MaxComponent/plClothingComponent.cpp @@ -198,7 +198,7 @@ hsBool plClothingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) for (i = 0; i < fCompPB->Count(kMeshNodeTab); i++) { spanArray.Reset(); - //plSharedMesh *mesh = TRACKED_NEW plSharedMesh; + //plSharedMesh *mesh = new plSharedMesh; LODNode = (plMaxNode *)fCompPB->GetINode(kMeshNodeTab, 0, i); if (LODNode != nil) { @@ -240,7 +240,7 @@ hsBool plClothingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (keys[j] != nil) { - refMsg = TRACKED_NEW plGenRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, j, -1); + refMsg = new plGenRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, j, -1); hsgResMgr::ResMgr()->AddViaNotify(keys[j], refMsg, plRefFlags::kActiveRef); } } diff --git a/Sources/Tools/MaxComponent/plClusterComponent.cpp b/Sources/Tools/MaxComponent/plClusterComponent.cpp index 0586f039..24326bce 100644 --- a/Sources/Tools/MaxComponent/plClusterComponent.cpp +++ b/Sources/Tools/MaxComponent/plClusterComponent.cpp @@ -967,7 +967,7 @@ void plClusterComponent::IClusterBins(plDistribInstTab& nodes, Box3& box) } int totSize = IGetBinCount(); - fClusterBins = TRACKED_NEW plDistribInstTab*[totSize]; + fClusterBins = new plDistribInstTab*[totSize]; memset(fClusterBins, 0, sizeof(*fClusterBins) * totSize); @@ -1010,7 +1010,7 @@ plDistribInstTab* plClusterComponent::IGetClusterBin(const Box3& box, const Poin } int idx = coord[0] * fSizes[1] * fSizes[2] + coord[1] * fSizes[2] + coord[2]; if( !fClusterBins[idx] ) - fClusterBins[idx] = TRACKED_NEW plDistribInstTab; + fClusterBins[idx] = new plDistribInstTab; return fClusterBins[idx]; } diff --git a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp index 67d1d5e1..982207f1 100644 --- a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp +++ b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp @@ -177,7 +177,7 @@ hsBool plExcludeRegionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg return false; } - plExcludeRegionModifier *mod = TRACKED_NEW plExcludeRegionModifier; + plExcludeRegionModifier *mod = new plExcludeRegionModifier; plKey key = node->AddModifier(mod, IGetUniqueName(node)); fXRegionKeys[node] = key; diff --git a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp index 6801344b..faefe544 100644 --- a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp @@ -318,7 +318,7 @@ hsBool plFootPrintComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // If we haven't already, create our DynaDecalMgr and stash it away. if( !fDecalMgr ) { - ISetupDecalMgr(node, pErrMsg, TRACKED_NEW plDynaFootMgr); + ISetupDecalMgr(node, pErrMsg, new plDynaFootMgr); } return true; @@ -333,7 +333,7 @@ hsBool plFootPrintComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) ISetupNotifies(node, pErrMsg); // Add this node's object to our DynaDecalMgr. - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); return true; } @@ -400,7 +400,7 @@ hsBool plFootPrintComponent::ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg return fValid = false; } - hsgResMgr::ResMgr()->AddViaNotify(mgrKey, TRACKED_NEW plNodeRefMsg(node->GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mgrKey, new plNodeRefMsg(node->GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric), plRefFlags::kActiveRef); ISetupParticles(node, pErrMsg); @@ -473,11 +473,11 @@ hsBool plFootPrintComponent::ICreateDecalMaterials(plMaxNode* node, plErrorMsg* if( !matRTShade ) return fValid = false; - hsgResMgr::ResMgr()->AddViaNotify(matRTShade->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatRTShade), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(matRTShade->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatRTShade), plRefFlags::kActiveRef); hsGMaterial* matPreShade = hsMaterialConverter::Instance().AlphaHackPrint(node, fCompPB->GetTexmap(kLayer), hsGMatState::kBlendAlpha); - hsgResMgr::ResMgr()->AddViaNotify(matPreShade->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatPreShade), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(matPreShade->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatPreShade), plRefFlags::kActiveRef); return true; } @@ -512,7 +512,7 @@ hsBool plFootPrintComponent::ISetupColorDecalMaterials(plMaxNode* node, plErrorM layer->SetBlendFlags(layer->GetBlendFlags() | hsGMatState::kBlendInvertFinalColor); } - hsgResMgr::ResMgr()->AddViaNotify(matRTShade->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatRTShade), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(matRTShade->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefMatRTShade), plRefFlags::kActiveRef); return true; } @@ -691,11 +691,11 @@ hsBool plRippleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) plDynaRippleMgr* ripple = nil; if( node->GetVS() || node->UserPropExists("XXXWaterColor") ) { - ripple = TRACKED_NEW plDynaRippleVSMgr; + ripple = new plDynaRippleVSMgr; } else { - ripple = TRACKED_NEW plDynaRippleMgr; + ripple = new plDynaRippleMgr; } ISetupDecalMgr(node, pErrMsg, ripple); if( fValid ) @@ -717,7 +717,7 @@ hsBool plRippleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) plWaveSetBase* waveSet = plWaterComponent::GetWaveSetFromNode(node); if( waveSet ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaRippleVSMgr::kRefWaveSetBase); + plGenRefMsg* refMsg = new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaRippleVSMgr::kRefWaveSetBase); hsgResMgr::ResMgr()->AddViaNotify(waveSet->GetKey(), refMsg, plRefFlags::kPassiveRef); } @@ -725,7 +725,7 @@ hsBool plRippleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) } // Add this node's object to our DynaDecalMgr. - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); return true; } @@ -863,7 +863,7 @@ hsBool plPuddleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // If we haven't already, create our DynaDecalMgr and stash it away. if( !fDecalMgr ) { - plDynaRippleMgr* puddle = TRACKED_NEW plDynaPuddleMgr; + plDynaRippleMgr* puddle = new plDynaPuddleMgr; ISetupDecalMgr(node, pErrMsg, puddle); if( fValid ) @@ -883,7 +883,7 @@ hsBool plPuddleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) ISetupNotifies(node, pErrMsg); // Add this node's object to our DynaDecalMgr. - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); return true; } @@ -1028,7 +1028,7 @@ hsBool plBulletComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // If we haven't already, create our DynaDecalMgr and stash it away. if( !fDecalMgr ) { - plDynaBulletMgr* bullet = TRACKED_NEW plDynaBulletMgr; + plDynaBulletMgr* bullet = new plDynaBulletMgr; ISetupDecalMgr(node, pErrMsg, bullet); } @@ -1044,7 +1044,7 @@ hsBool plBulletComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) ISetupNotifies(node, pErrMsg); // Add this node's object to our DynaDecalMgr. - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); return true; } @@ -1193,9 +1193,9 @@ hsBool plTorpedoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { plDynaRippleMgr* torpedo; if( node->GetVS() ) - torpedo = TRACKED_NEW plDynaTorpedoVSMgr; + torpedo = new plDynaTorpedoVSMgr; else - torpedo = TRACKED_NEW plDynaTorpedoMgr; + torpedo = new plDynaTorpedoMgr; ISetupDecalMgr(node, pErrMsg, torpedo); if( fValid ) @@ -1351,7 +1351,7 @@ hsBool plWakeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // If we haven't already, create our DynaDecalMgr and stash it away. if( !fDecalMgr ) { - plDynaWakeMgr* wake = TRACKED_NEW plDynaWakeMgr; + plDynaWakeMgr* wake = new plDynaWakeMgr; ISetupDecalMgr(node, pErrMsg, wake); if( fValid ) { @@ -1371,7 +1371,7 @@ hsBool plWakeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) ISetupNotifies(node, pErrMsg); // Add this node's object to our DynaDecalMgr. - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(fDecalMgr->GetKey(), plRefMsg::kOnCreate, 0, plDynaDecalMgr::kRefTarget), plRefFlags::kActiveRef); return true; } @@ -1498,7 +1498,7 @@ hsBool plDirtyComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) } - plDecalEnableMod* enable = TRACKED_NEW plDecalEnableMod; + plDecalEnableMod* enable = new plDecalEnableMod; plKey modKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), enable, node->GetLocation()); int numDecals = fCompPB->Count(kDecals); @@ -1516,7 +1516,7 @@ hsBool plDirtyComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) } } enable->SetWetLength(fCompPB->GetFloat(kDirtyTime)); - hsgResMgr::ResMgr()->AddViaNotify(modKey, TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(modKey, new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); return true; } @@ -1620,14 +1620,14 @@ hsBool plPrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) if( !obj ) return true; - plPrintShape* shape = TRACKED_NEW plPrintShape(); + plPrintShape* shape = new plPrintShape(); plKey shapeKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), shape, node->GetLocation()); shape->SetWidth(fCompPB->GetFloat(kWidth)); shape->SetLength(fCompPB->GetFloat(kLength)); shape->SetHeight(fCompPB->GetFloat(kHeight)); - hsgResMgr::ResMgr()->AddViaNotify(shapeKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(shapeKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } @@ -1770,7 +1770,7 @@ hsBool plActivePrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg if( !obj ) return true; - plActivePrintShape* shape = TRACKED_NEW plActivePrintShape(); + plActivePrintShape* shape = new plActivePrintShape(); plKey shapeKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), shape, node->GetLocation()); shape->SetWidth(fCompPB->GetFloat(kWidth)); @@ -1789,7 +1789,7 @@ hsBool plActivePrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg } - hsgResMgr::ResMgr()->AddViaNotify(shapeKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(shapeKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } diff --git a/Sources/Tools/MaxComponent/plFootstepComponent.cpp b/Sources/Tools/MaxComponent/plFootstepComponent.cpp index b75b6ff7..4c8131b8 100644 --- a/Sources/Tools/MaxComponent/plFootstepComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootstepComponent.cpp @@ -112,7 +112,7 @@ extern const plArmatureMod * FindArmatureMod(const plSceneObject *obj); hsBool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plGenRefMsg *msg; - plArmatureEffectFootSound *effect = TRACKED_NEW plArmatureEffectFootSound(); + plArmatureEffectFootSound *effect = new plArmatureEffectFootSound(); // Note: MUST be a hard-coded keyname, since we search for same name in plArmatureMod.cpp hsgResMgr::ResMgr()->NewKey( "FootstepSounds", effect, node->GetLocation()); @@ -129,7 +129,7 @@ hsBool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plRandomSoundMod *mod = rsComp->fSoundMods[node]; if (mod != nil) { - msg = TRACKED_NEW plGenRefMsg(effect->GetKey(), plRefMsg::kOnCreate, i, -1); + msg = new plGenRefMsg(effect->GetKey(), plRefMsg::kOnCreate, i, -1); hsgResMgr::ResMgr()->AddViaNotify(mod->GetKey(), msg, plRefFlags::kActiveRef); } } @@ -137,7 +137,7 @@ hsBool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) } // Add it to the scene node's generic list, so that all avatars can access it. - plNodeRefMsg* nodeRefMsg = TRACKED_NEW plNodeRefMsg(node->GetRoomKey(), plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kGeneric); + plNodeRefMsg* nodeRefMsg = new plNodeRefMsg(node->GetRoomKey(), plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kGeneric); hsgResMgr::ResMgr()->AddViaNotify(effect->GetKey(), nodeRefMsg, plRefFlags::kActiveRef); return true; diff --git a/Sources/Tools/MaxComponent/plGUIComponents.cpp b/Sources/Tools/MaxComponent/plGUIComponents.cpp index f75b6017..10038a33 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.cpp +++ b/Sources/Tools/MaxComponent/plGUIComponents.cpp @@ -986,7 +986,7 @@ hsBool plGUIColorSchemeComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pfGUIControlMod *ctrl = plGUIControlBase::GrabControlFromObject( node ); if( ctrl != nil ) { - pfGUIColorScheme *cs = TRACKED_NEW pfGUIColorScheme; + pfGUIColorScheme *cs = new pfGUIColorScheme; ConvertScheme( fCompPB, cs, pErrMsg ); ctrl->SetColorScheme( cs ); } @@ -1178,7 +1178,7 @@ plGUIDialogComponent::plGUIDialogComponent( hsBool dontInit ) pfGUIDialogMod *plGUIDialogComponent::IMakeDialog( void ) { - return TRACKED_NEW pfGUIDialogMod(); + return new pfGUIDialogMod(); } // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading @@ -1268,7 +1268,7 @@ hsBool plGUIDialogComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } - plPostEffectMod* mod = TRACKED_NEW plPostEffectMod; + plPostEffectMod* mod = new plPostEffectMod; float hither = cam->GetEnvRange(timeVal, ENV_NEAR_RANGE); if( hither < 0.5f ) @@ -1320,10 +1320,10 @@ hsBool plGUIDialogComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plLocation nodeLoc = sceneNodeKey->GetUoid().GetLocation(); plKey modKey = hsgResMgr::ResMgr()->NewKey( fCompPB->GetStr( kRefDialogName ), mod, nodeLoc ); - hsgResMgr::ResMgr()->AddViaNotify( modKey, TRACKED_NEW plNodeRefMsg( sceneNodeKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( modKey, new plNodeRefMsg( sceneNodeKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); // Also add our dialog mod to the scene node in the same way - hsgResMgr::ResMgr()->AddViaNotify( fDialogMod->GetKey(), TRACKED_NEW plNodeRefMsg( sceneNodeKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( fDialogMod->GetKey(), new plNodeRefMsg( sceneNodeKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); /// Already created our mod, just gotta fill it out fDialogMod->SetRenderMod( mod ); @@ -1645,7 +1645,7 @@ hsBool plGUIControlBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { case 0: // Console command - fControl->SetHandler( TRACKED_NEW pfGUIConsoleCmdProc( fCompPB->GetStr( kRefConsoleCmd ) ) ); + fControl->SetHandler( new pfGUIConsoleCmdProc( fCompPB->GetStr( kRefConsoleCmd ) ) ); break; case 1: @@ -1656,7 +1656,7 @@ hsBool plGUIControlBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) break; case 2: - fControl->SetHandler( TRACKED_NEW pfGUICloseDlgProc() ); + fControl->SetHandler( new pfGUICloseDlgProc() ); break; case 3: @@ -1878,7 +1878,7 @@ class plGUIButtonComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIButtonMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIButtonMod; } virtual bool ICanHaveProxy( void ) { return true; } public: @@ -2220,7 +2220,7 @@ class plGUICheckBoxComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUICheckBoxCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUICheckBoxCtrl; } virtual bool ICanHaveProxy( void ) { return true; } public: @@ -2420,7 +2420,7 @@ class plGUIDraggableComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIDraggableMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIDraggableMod; } virtual bool ICanHaveProxy( void ) { return true; } public: @@ -2529,7 +2529,7 @@ class plGUIKnobCtrlComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIKnobCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIKnobCtrl; } virtual bool ICanHaveProxy( void ) { return true; } hsBool IGrabAnimationRange( plMaxNode *node, plErrorMsg *pErrMsg, hsMatrix44 &startL2W, hsMatrix44 &endL2W ); @@ -2644,12 +2644,12 @@ hsBool plGUIKnobCtrlComponent::IGrabAnimationRange( plMaxNode *node, plErrorMsg // Get the affine parts and the TM Controller plSceneObject *obj = node->GetSceneObject(); - hsAffineParts * parts = TRACKED_NEW hsAffineParts; + hsAffineParts * parts = new hsAffineParts; plController* tmc = hsControlConverter::Instance().ConvertTMAnim(obj, node, parts); if (tmc) { - plMatrixControllerChannel *channel = TRACKED_NEW plMatrixControllerChannel(tmc, parts); + plMatrixControllerChannel *channel = new plMatrixControllerChannel(tmc, parts); float length = tmc->GetLength(); @@ -2778,7 +2778,7 @@ class plGUIListBoxComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIListBoxMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIListBoxMod; } virtual bool INeedsDynamicText( void ) { return true; } public: @@ -2948,7 +2948,7 @@ hsBool plGUIListBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pfGUIValueCtrl *scroll = pfGUIValueCtrl::ConvertNoRef( GrabControlMod( fCompPB->GetINode( kRefScrollCtrl ) ) ); if( scroll != nil ) { - hsgResMgr::ResMgr()->AddViaNotify( scroll->GetKey(), TRACKED_NEW plGenRefMsg( ctrl->GetKey(), + hsgResMgr::ResMgr()->AddViaNotify( scroll->GetKey(), new plGenRefMsg( ctrl->GetKey(), plRefMsg::kOnCreate, -1, pfGUIListBoxMod::kRefScrollCtrl ), plRefFlags::kActiveRef ); } } @@ -2993,7 +2993,7 @@ hsBool plGUIListBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) hsAssert( nodeID == GUI_SKIN_CLASSID, "Bad node param in GUIMenu::Convert()" ); plGUISkinComp *skin = (plGUISkinComp *)comp; - hsgResMgr::ResMgr()->AddViaNotify( skin->GetConvertedSkin()->GetKey(), TRACKED_NEW plGenRefMsg( ctrl->GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefSkin ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( skin->GetConvertedSkin()->GetKey(), new plGenRefMsg( ctrl->GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefSkin ), plRefFlags::kActiveRef ); } } @@ -3013,7 +3013,7 @@ class plGUITextBoxComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUITextBoxMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUITextBoxMod; } virtual bool INeedsDynamicText( void ) { return true; } public: @@ -3110,14 +3110,14 @@ public: int strLen = SendDlgItemMessage( hWnd, IDC_GUI_INITTEXT, WM_GETTEXTLENGTH, 0, 0 ); if( strLen > 0 ) { - char *str = TRACKED_NEW char[ strLen + 1 ]; + char *str = new char[ strLen + 1 ]; GetDlgItemText( hWnd, IDC_GUI_INITTEXT, str, strLen + 1 ); str[ strLen ] = 0; ISetTranslation(fCurLanguage,str); delete [] str; std::string translation = plLocalization::LocalToString(fTranslations); - str = TRACKED_NEW char[ translation.length() + 1 ]; + str = new char[ translation.length() + 1 ]; strcpy(str,translation.c_str()); str[translation.length()] = 0; @@ -3141,7 +3141,7 @@ public: int strLen = SendDlgItemMessage( hWnd, IDC_GUI_LOCALIZATION_PATH, WM_GETTEXTLENGTH, 0, 0 ); if( strLen > 0 ) { - char *str = TRACKED_NEW char[ strLen + 1 ]; + char *str = new char[ strLen + 1 ]; GetDlgItemText( hWnd, IDC_GUI_LOCALIZATION_PATH, str, strLen + 1 ); str[ strLen ] = 0; pmap->GetParamBlock()->SetValue( plGUITextBoxComponent::kRefLocalizationPath, 0, str ); @@ -3310,7 +3310,7 @@ class plGUIEditBoxComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIEditBoxMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIEditBoxMod; } virtual bool INeedsDynamicText( void ) { return true; } public: @@ -3405,7 +3405,7 @@ class plGUIUpDownPairComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIUpDownPairMod; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIUpDownPairMod; } public: plGUIUpDownPairComponent(); @@ -3617,7 +3617,7 @@ class plGUIDragBarComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIDragBarCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIDragBarCtrl; } virtual bool ICanHaveProxy( void ) { return true; } public: @@ -3703,7 +3703,7 @@ class plGUIRadioGroupComponent : public plGUIControlBase protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIRadioGroupCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIRadioGroupCtrl; } public: plGUIRadioGroupComponent(); @@ -3916,7 +3916,7 @@ class plGUIDynDisplayComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIDynDisplayCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIDynDisplayCtrl; } virtual bool IHasProcRollout( void ) { return false; } public: @@ -4092,7 +4092,7 @@ class plGUIMultiLineEditComp : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIMultiLineEditCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIMultiLineEditCtrl; } virtual bool INeedsDynamicText( void ) { return true; } public: @@ -4192,7 +4192,7 @@ hsBool plGUIMultiLineEditComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pfGUIValueCtrl *scroll = pfGUIValueCtrl::ConvertNoRef( GrabControlMod( fCompPB->GetINode( kRefScrollCtrl ) ) ); if( scroll != nil ) { - hsgResMgr::ResMgr()->AddViaNotify( scroll->GetKey(), TRACKED_NEW plGenRefMsg( ctrl->GetKey(), + hsgResMgr::ResMgr()->AddViaNotify( scroll->GetKey(), new plGenRefMsg( ctrl->GetKey(), plRefMsg::kOnCreate, -1, pfGUIMultiLineEditCtrl::kRefScrollCtrl ), plRefFlags::kActiveRef ); } } @@ -4214,7 +4214,7 @@ class plGUIProgressCtrlComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIProgressCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIProgressCtrl; } virtual bool ICanHaveProxy( void ) { return false; } public: @@ -4476,7 +4476,7 @@ class plGUIClickMapComponent : public plGUIControlBase { protected: - virtual pfGUIControlMod *IGetNewControl( void ) { return TRACKED_NEW pfGUIClickMapCtrl; } + virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIClickMapCtrl; } virtual bool ICanHaveProxy( void ) { return false; } public: @@ -4713,7 +4713,7 @@ plLayerTex *plGUISkinComp::GetSkinBitmap( void ) plLayerTex *layer = (plLayerTex *)fCompPB->GetTexmap( kRefBitmap, 0 ); if( layer == nil || layer->ClassID() != LAYER_TEX_CLASS_ID ) { - layer = TRACKED_NEW plLayerTex; + layer = new plLayerTex; fCompPB->SetValue( kRefBitmap, 0, (Texmap *)layer ); } @@ -4758,7 +4758,7 @@ hsBool plGUISkinComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } - fConvertedSkin = TRACKED_NEW pfGUISkin(); + fConvertedSkin = new pfGUISkin(); hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), fConvertedSkin, node->GetLocation() ); return true; @@ -4791,7 +4791,7 @@ hsBool plGUISkinComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plBitmap *bMap = plLayerConverter::Instance().CreateSimpleTexture( texture->bi.Name(), fConvertedSkin->GetKey()->GetUoid().GetLocation(), 0, plMipmap::kForceNonCompressed | plMipmap::kAlphaChannelFlag | plMipmap::kNoMaxSize ); if( bMap != nil && plMipmap::ConvertNoRef( bMap ) != nil ) { - hsgResMgr::ResMgr()->AddViaNotify( bMap->GetKey(), TRACKED_NEW plGenRefMsg( fConvertedSkin->GetKey(), + hsgResMgr::ResMgr()->AddViaNotify( bMap->GetKey(), new plGenRefMsg( fConvertedSkin->GetKey(), plRefMsg::kOnCreate, -1, pfGUISkin::kRefMipmap ), plRefFlags::kActiveRef ); } } @@ -4903,7 +4903,7 @@ plGUIMenuComponent::plGUIMenuComponent() : plGUIDialogComponent( true ) pfGUIDialogMod *plGUIMenuComponent::IMakeDialog( void ) { - return TRACKED_NEW pfGUIPopUpMenu(); + return new pfGUIPopUpMenu(); } plKey plGUIMenuComponent::GetConvertedMenuKey( void ) const @@ -4975,7 +4975,7 @@ hsBool plGUIMenuComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) const plLocation &loc = menu->GetKey()->GetUoid().GetLocation(); // Create the rendermod - plPostEffectMod *renderMod = TRACKED_NEW plPostEffectMod; + plPostEffectMod *renderMod = new plPostEffectMod; hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), renderMod, loc ); renderMod->SetHither( 0.5f ); @@ -4992,25 +4992,25 @@ hsBool plGUIMenuComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) renderMod->SetFovY( fovY * 180.f / M_PI ); - hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), TRACKED_NEW plNodeRefMsg( fConvertedNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( fConvertedNode, TRACKED_NEW plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), new plNodeRefMsg( fConvertedNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( fConvertedNode, new plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); menu->SetRenderMod( renderMod ); menu->SetName( fCompPB->GetStr( kRefDialogName ) ); // Create the dummy scene object to hold the menu - plSceneObject *newObj = TRACKED_NEW plSceneObject; + plSceneObject *newObj = new plSceneObject; hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), newObj, loc ); // *#&$(*@&#$ need a coordIface... - plCoordinateInterface *newCI = TRACKED_NEW plCoordinateInterface; + plCoordinateInterface *newCI = new plCoordinateInterface; hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), newCI, loc ); - hsgResMgr::ResMgr()->AddViaNotify( menu->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( menu->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( newCI->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( newCI->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); newObj->SetSceneNode( fConvertedNode ); menu->SetSceneNodeKey( fConvertedNode ); @@ -5056,7 +5056,7 @@ hsBool plGUIMenuComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return false; } - fConvertedMenu = TRACKED_NEW pfGUIPopUpMenu(); + fConvertedMenu = new pfGUIPopUpMenu(); hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), fConvertedMenu, fConvertedNode->GetUoid().GetLocation() ); return true; diff --git a/Sources/Tools/MaxComponent/plGrassComponent.cpp b/Sources/Tools/MaxComponent/plGrassComponent.cpp index 8572341e..bf398df3 100644 --- a/Sources/Tools/MaxComponent/plGrassComponent.cpp +++ b/Sources/Tools/MaxComponent/plGrassComponent.cpp @@ -236,7 +236,7 @@ plGrassComponent::plGrassComponent() : fShader(nil) hsBool plGrassComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { - fShader = TRACKED_NEW plGrassShaderMod(); + fShader = new plGrassShaderMod(); plLoadMask loadMask; int qual = 1; @@ -263,12 +263,12 @@ hsBool plGrassComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) hsBool plGrassComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plObjRefMsg* refMsg = TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); + plObjRefMsg* refMsg = new plObjRefMsg(node->GetKey(), plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); hsgResMgr::ResMgr()->AddViaNotify(fShader->GetKey(), refMsg, plRefFlags::kActiveRef); hsTArray mats; hsMaterialConverter::Instance().CollectConvertedMaterials(hsMaterialConverter::Instance().GetBaseMtl(node), mats); - hsgResMgr::ResMgr()->SendRef(mats[0]->GetKey(), TRACKED_NEW plGenRefMsg(fShader->GetKey(), plRefMsg::kOnRequest, 0, plGrassShaderMod::kRefMaterial), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(mats[0]->GetKey(), new plGenRefMsg(fShader->GetKey(), plRefMsg::kOnRequest, 0, plGrassShaderMod::kRefMaterial), plRefFlags::kActiveRef); return TRUE; } diff --git a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp index ae51ae6e..c5a539e4 100644 --- a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp +++ b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp @@ -403,14 +403,14 @@ hsBool plNoShowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( fCompPB->GetInt(kAffectDraw) ) { - plEnableMsg* eMsg = TRACKED_NEW plEnableMsg(nil, plEnableMsg::kDisable, plEnableMsg::kDrawable); + plEnableMsg* eMsg = new plEnableMsg(nil, plEnableMsg::kDisable, plEnableMsg::kDrawable); eMsg->AddReceiver(obj->GetKey()); eMsg->Send(); } if( fCompPB->GetInt(kAffectPhys) ) { hsAssert(0, "Who uses this?"); -// plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg; +// plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg; // pMsg->SetFlags(plEventGroupEnableMsg::kCollideOff | plEventGroupEnableMsg::kReportOff); // pMsg->AddReceiver(obj->GetKey()); // pMsg->Send(); diff --git a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp b/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp index 9d13d0e0..e3f8d1d5 100644 --- a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp +++ b/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp @@ -169,15 +169,15 @@ OBSOLETE_CLASS(plImpactGadget, gImpactGadgetDesc, "Collision Sensor", "Collisio // physNode = node; // // // Create remote detector -// plCollisionDetector* det = TRACKED_NEW plCollisionDetector; +// plCollisionDetector* det = new plCollisionDetector; // det->SetType(plCollisionDetector::kTypeBump); // // // Register the detector // plKey detKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), det, loc); -// hsgResMgr::ResMgr()->AddViaNotify(detKey, TRACKED_NEW plObjRefMsg(physNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); +// hsgResMgr::ResMgr()->AddViaNotify(detKey, new plObjRefMsg(physNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); // // // create and register the CONDITIONS for the DETECTOR's Logic Modifier -// plActivatorConditionalObject* activatorCond = TRACKED_NEW plActivatorConditionalObject; +// plActivatorConditionalObject* activatorCond = new plActivatorConditionalObject; // plKey activatorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), activatorCond, loc); // // // link everything up: diff --git a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp index 8eb8ab63..13b03360 100644 --- a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp +++ b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp @@ -186,11 +186,11 @@ hsBool plInventoryObjComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) plSceneObject *obj = node->GetSceneObject(); // Create and register the ClickDrag's logic component - plLogicModifier *logic = TRACKED_NEW plLogicModifier; + plLogicModifier *logic = new plLogicModifier; char tmpName[256]; sprintf(tmpName, "%s_%s_LogicModifier", obj->GetKeyName(), GetINode()->GetName()); plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fLogicModKeys[node] = logicKey; diff --git a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp index d87ecc44..9a4c01d0 100644 --- a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp +++ b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp @@ -630,7 +630,7 @@ hsBool plLOSFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) hsBool plLOSFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { - plFadeOpacityMod* fade = TRACKED_NEW plFadeOpacityMod; + plFadeOpacityMod* fade = new plFadeOpacityMod; if( fCompPB->GetInt(kBoundsCenter) ) fade->SetFlag(plFadeOpacityMod::kBoundsCenter); @@ -724,7 +724,7 @@ hsBool plGZFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) hsBool plGZFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { - plDistOpacityMod* fade = TRACKED_NEW plDistOpacityMod; + plDistOpacityMod* fade = new plDistOpacityMod; float opaq = fCompPB->GetFloat(kOpaque); float transp = fCompPB->GetFloat(kTransp); diff --git a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp index 71847695..35fff7da 100644 --- a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp +++ b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp @@ -171,7 +171,7 @@ hsBool plLightGrpComponent::ISendItOff(plLightInfo* liInfo, plDrawableSpans* dra if( !fCompPB->GetInt(kTest) ) { uint8_t liMsgType = liInfo->GetProjection() ? plDrawable::kMsgPermaProjDI : plDrawable::kMsgPermaLightDI; - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(drawable->GetKey(), plRefMsg::kOnCreate, diIndex, liMsgType); + plGenRefMsg* refMsg = new plGenRefMsg(drawable->GetKey(), plRefMsg::kOnCreate, diIndex, liMsgType); hsgResMgr::ResMgr()->AddViaNotify(liInfo->GetKey(), refMsg, plRefFlags::kPassiveRef); } else @@ -186,7 +186,7 @@ hsBool plLightGrpComponent::ISendItOff(plLightInfo* liInfo, plDrawableSpans* dra { if( litSpans.IsBitSet(spans[i]) ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(drawable->GetKey(), plRefMsg::kOnCreate, spans[i], liMsgType); + plGenRefMsg* refMsg = new plGenRefMsg(drawable->GetKey(), plRefMsg::kOnCreate, spans[i], liMsgType); hsgResMgr::ResMgr()->AddViaNotify(liInfo->GetKey(), refMsg, plRefFlags::kPassiveRef); } } diff --git a/Sources/Tools/MaxComponent/plLineFollowComp.cpp b/Sources/Tools/MaxComponent/plLineFollowComp.cpp index cc27f640..59ec3a56 100644 --- a/Sources/Tools/MaxComponent/plLineFollowComp.cpp +++ b/Sources/Tools/MaxComponent/plLineFollowComp.cpp @@ -276,7 +276,7 @@ hsBool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg { plLineFollowMod::FollowMode mode = plLineFollowMod::FollowMode(fCompPB->GetInt(kFollowModeRadio)); - plLineFollowMod* lineMod = TRACKED_NEW plLineFollowMod; + plLineFollowMod* lineMod = new plLineFollowMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), lineMod, pNode->GetLocation()); if( plLineFollowMod::kFollowObject == mode ) @@ -292,7 +292,7 @@ hsBool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg plSceneObject* targObj = targNode->GetSceneObject(); if( targObj ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefObject); + plGenRefMsg* refMsg = new plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefObject); hsgResMgr::ResMgr()->AddViaNotify(targObj->GetKey(), refMsg, plRefFlags::kPassiveRef); lineMod->SetFollowMode(plLineFollowMod::kFollowObject); @@ -328,7 +328,7 @@ hsBool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg hsAffineParts initParts; AP_SET(initParts, ap); - plAnimPath* animPath = TRACKED_NEW plAnimPath; + plAnimPath* animPath = new plAnimPath; animPath->SetController(tmc); animPath->InitParts(initParts); @@ -340,7 +340,7 @@ hsBool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg plSceneObject* parObj = parNode->GetSceneObject(); if( parObj ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefParent); + plGenRefMsg* refMsg = new plGenRefMsg(lineMod->GetKey(), plRefMsg::kOnCreate, 0, plLineFollowMod::kRefParent); hsgResMgr::ResMgr()->AddViaNotify(parObj->GetKey(), refMsg, plRefFlags::kPassiveRef); } } @@ -583,7 +583,7 @@ hsBool plStereizeComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMs hsBool plStereizeComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { - plStereizer* stereo = TRACKED_NEW plStereizer; + plStereizer* stereo = new plStereizer; stereo->SetAmbientDist(fCompPB->GetFloat(kAmbientDist)); stereo->SetTransition(fCompPB->GetFloat(kTransition)); @@ -805,7 +805,7 @@ hsBool plSwivelComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) hsBool plSwivelComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { - plViewFaceModifier* pMod = TRACKED_NEW plViewFaceModifier; + plViewFaceModifier* pMod = new plViewFaceModifier; pMod->SetOrigTransform(node->GetLocalToParent44(), node->GetParentToLocal44()); node->AddModifier(pMod, IGetUniqueName(node)); diff --git a/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp b/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp index d842f487..e9157a3f 100644 --- a/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp +++ b/Sources/Tools/MaxComponent/plMaxAnimUtils.cpp @@ -304,33 +304,33 @@ void GetSegment(const char *note, float time, SegmentMap *segMap, plErrorMsg *pE } else { - char *nameCopy = TRACKED_NEW char[strlen(segName)+1]; + char *nameCopy = new char[strlen(segName)+1]; strcpy(nameCopy, segName); switch (type) { case kNoteStartAnim: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(time, -1, nameCopy, SegmentSpec::kAnim); + (*segMap)[nameCopy] = new SegmentSpec(time, -1, nameCopy, SegmentSpec::kAnim); break; case kNoteStartLoop: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(time, -1, nameCopy, SegmentSpec::kLoop); + (*segMap)[nameCopy] = new SegmentSpec(time, -1, nameCopy, SegmentSpec::kLoop); break; case kNoteEndLoop: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(-1, time, nameCopy, SegmentSpec::kLoop); + (*segMap)[nameCopy] = new SegmentSpec(-1, time, nameCopy, SegmentSpec::kLoop); break; case kNoteMarker: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(time, -1, nameCopy, SegmentSpec::kMarker); + (*segMap)[nameCopy] = new SegmentSpec(time, -1, nameCopy, SegmentSpec::kMarker); break; case kNoteStopPoint: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(time, -1, nameCopy, SegmentSpec::kStopPoint); + (*segMap)[nameCopy] = new SegmentSpec(time, -1, nameCopy, SegmentSpec::kStopPoint); break; case kNoteSuppress: - (*segMap)[nameCopy] = TRACKED_NEW SegmentSpec(-1, -1, nameCopy, SegmentSpec::kSuppress); + (*segMap)[nameCopy] = new SegmentSpec(-1, -1, nameCopy, SegmentSpec::kSuppress); break; default: @@ -351,7 +351,7 @@ SegmentMap * GetAnimSegmentMap(Animatable *anim, plErrorMsg *pErrMsg) if (!anim->HasNoteTracks()) return nil; - SegmentMap *segMap = TRACKED_NEW SegmentMap(); + SegmentMap *segMap = new SegmentMap(); int numTracks = anim->NumNoteTracks(); diff --git a/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp b/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp index e3c4e733..c72cff0d 100644 --- a/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp +++ b/Sources/Tools/MaxComponent/plMaxWaveUtils.cpp @@ -52,7 +52,7 @@ SegmentMap *GetWaveSegmentMap(const char *file, plErrorMsg *pErrMsg) if (numMarkers == 0) return nil; - SegmentMap *segMap = TRACKED_NEW SegmentMap(); + SegmentMap *segMap = new SegmentMap(); for (int i = 0; i < waveFile.GetNumMarkers(); i++) { diff --git a/Sources/Tools/MaxComponent/plMiscComponents.cpp b/Sources/Tools/MaxComponent/plMiscComponents.cpp index 16b2c30d..47adb01f 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.cpp +++ b/Sources/Tools/MaxComponent/plMiscComponents.cpp @@ -174,7 +174,7 @@ plInterestingComponent::plInterestingComponent() hsBool plInterestingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plInterestingModifier* pMod = TRACKED_NEW plInterestingModifier; + plInterestingModifier* pMod = new plInterestingModifier; float loader = fCompPB->GetFloat(kCamInterestRadius); pMod->SetInterestRadius(loader); @@ -806,7 +806,7 @@ plAgeDescription *plPageInfoUtils::GetAgeDesc( const char *ageName ) return nil; // Create and read the age desc - plAgeDescription *aged = TRACKED_NEW plAgeDescription; + plAgeDescription *aged = new plAgeDescription; aged->Read( &s ); s.Close(); @@ -1109,7 +1109,7 @@ static hsBool FindMaxBounds(plMaxNode* node, hsBounds3Ext& bnd) hsBool plViewFacingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plViewFaceModifier* pMod = TRACKED_NEW plViewFaceModifier; + plViewFaceModifier* pMod = new plViewFaceModifier; hsBounds3Ext maxBnd; if( FindMaxBounds(node, maxBnd) ) @@ -1201,7 +1201,7 @@ plSpriteComponent::plSpriteComponent() hsBool plSpriteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plViewFaceModifier* pMod = TRACKED_NEW plViewFaceModifier; + plViewFaceModifier* pMod = new plViewFaceModifier; hsBounds3Ext maxBnd; if( FindMaxBounds(node, maxBnd) ) @@ -1385,7 +1385,7 @@ hsBool plCamViewComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return false; } - plPostEffectMod* mod = TRACKED_NEW plPostEffectMod; + plPostEffectMod* mod = new plPostEffectMod; float hither = cam->GetEnvRange(timeVal, ENV_NEAR_RANGE); if( hither < 0.5f ) @@ -1635,7 +1635,7 @@ plFollowMod* plFollowComponent::IMakeFollowMod(plMaxNode* pNode, plErrorMsg* pEr { plFollowMod::FollowLeaderType lType = plFollowMod::FollowLeaderType(fCompPB->GetInt(kLeaderTypeRadio)); - plFollowMod* follow = TRACKED_NEW plFollowMod; + plFollowMod* follow = new plFollowMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), follow, pNode->GetLocation()); @@ -1650,7 +1650,7 @@ plFollowMod* plFollowComponent::IMakeFollowMod(plMaxNode* pNode, plErrorMsg* pEr plSceneObject* targObj = targNode->GetSceneObject(); if( targObj ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(follow->GetKey(), plRefMsg::kOnCreate, 0, plFollowMod::kRefLeader); + plGenRefMsg* refMsg = new plGenRefMsg(follow->GetKey(), plRefMsg::kOnCreate, 0, plFollowMod::kRefLeader); hsgResMgr::ResMgr()->AddViaNotify(targObj->GetKey(), refMsg, plRefFlags::kPassiveRef); follow->SetType(plFollowMod::kObject); @@ -2398,7 +2398,7 @@ public: case WM_COMMAND: if( LOWORD( wParam ) == IDC_IMAGE_ADD ) { - plLayerTex *newLayer = TRACKED_NEW plLayerTex; + plLayerTex *newLayer = new plLayerTex; if( newLayer->HandleBitmapSelection() ) { @@ -2497,7 +2497,7 @@ plLayerTex *pfImageLibComponent::GetBitmap( int idx ) plLayerTex *layer = (plLayerTex *)fCompPB->GetTexmap( (ParamID)kRefImageList, 0, idx ); if( layer == nil || layer->ClassID() != LAYER_TEX_CLASS_ID ) { - layer = TRACKED_NEW plLayerTex; + layer = new plLayerTex; fCompPB->SetValue( (ParamID)kRefImageList, 0, (Texmap *)layer, idx ); } @@ -2539,7 +2539,7 @@ hsBool pfImageLibComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrM hsBool pfImageLibComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plImageLibMod *lib = TRACKED_NEW plImageLibMod; + plImageLibMod *lib = new plImageLibMod; node->AddModifier( lib, IGetUniqueName(node) ); int i; @@ -2563,7 +2563,7 @@ hsBool pfImageLibComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) bMap = plLayerConverter::Instance().CreateSimpleTexture( texture->bi.Name(), lib->GetKey()->GetUoid().GetLocation(), 0, flags, true ); if( bMap != nil ) { - hsgResMgr::ResMgr()->AddViaNotify( bMap->GetKey(), TRACKED_NEW plGenRefMsg( lib->GetKey(), + hsgResMgr::ResMgr()->AddViaNotify( bMap->GetKey(), new plGenRefMsg( lib->GetKey(), plRefMsg::kOnCreate, lib->GetNumImages(), plImageLibMod::kRefImage ), plRefFlags::kActiveRef ); } } diff --git a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp index 62d68c69..db817441 100644 --- a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp +++ b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp @@ -304,7 +304,7 @@ hsBool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) plMorphSequence* morphSeq = const_cast(plMorphSequence::ConvertNoRef(node->GetSceneObject()->GetModifierByType(plMorphSequence::Index()))); if (!morphSeq) { - morphSeq = TRACKED_NEW plMorphSequence; + morphSeq = new plMorphSequence; node->AddModifier(morphSeq, IGetUniqueName(node)); } @@ -316,9 +316,9 @@ hsBool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) // Error check we have some base geometry. - plMorphDataSet *set = TRACKED_NEW plMorphDataSet; + plMorphDataSet *set = new plMorphDataSet; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), set, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(set->GetKey(), TRACKED_NEW plGenRefMsg(mesh->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(set->GetKey(), new plGenRefMsg(mesh->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); const int num = fCompPB->Count(kLayers); int i; diff --git a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp index 8284d1a3..21f6761a 100644 --- a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp +++ b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp @@ -189,7 +189,7 @@ void plMultistageBehComponent::IGetReceivers(plMaxNode* node, std::vector hsBool plMultistageBehComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { //create the modifier here so that other components can find it - plMultistageBehMod *mod = TRACKED_NEW plMultistageBehMod; + plMultistageBehMod *mod = new plMultistageBehMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), mod, node->GetLocation()); fMods[node] = mod; @@ -199,7 +199,7 @@ hsBool plMultistageBehComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg hsBool plMultistageBehComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // Create the stage vector - plAnimStageVec* animStages = TRACKED_NEW plAnimStageVec; + plAnimStageVec* animStages = new plAnimStageVec; int numStages = fStages.size(); animStages->reserve(numStages); @@ -349,7 +349,7 @@ BOOL plMultistageBehComponent::IDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR if (LOWORD(wParam) == IDC_ADD) { // Create the new stage and give it a default name. - plBaseStage* stage = TRACKED_NEW plStandardStage; + plBaseStage* stage = new plStandardStage; int count = fStages.size(); fStages.push_back(stage); char buf[64]; @@ -571,7 +571,7 @@ IOResult plMultistageBehComponent::Load(ILoad* iload) break; case kStandard: - stage = TRACKED_NEW plStandardStage; + stage = new plStandardStage; break; } diff --git a/Sources/Tools/MaxComponent/plMultistageStage.cpp b/Sources/Tools/MaxComponent/plMultistageStage.cpp index 31ef6149..d8cabea1 100644 --- a/Sources/Tools/MaxComponent/plMultistageStage.cpp +++ b/Sources/Tools/MaxComponent/plMultistageStage.cpp @@ -64,7 +64,7 @@ char* MyReadSafeString(hsStream* s) hsAssert(numChars <= s->GetSizeLeft(), "Bad string"); if (numChars > 0) { - name = TRACKED_NEW char[numChars+1]; + name = new char[numChars+1]; s->Read(numChars, name); name[numChars] = '\0'; } @@ -456,7 +456,7 @@ void plStandardStage::IInitDlg() plAnimStage* plStandardStage::CreateStage() { int loopCount = fLoopForever ? -1 : fNumLoops; - plAnimStage* stage = TRACKED_NEW plAnimStage(fAnimName, + plAnimStage* stage = new plAnimStage(fAnimName, fNotify, (plAnimStage::ForwardType)fForward, (plAnimStage::BackType)fBackward, @@ -473,7 +473,7 @@ plAnimStage* plStandardStage::CreateStage() plBaseStage* plStandardStage::Clone() { - plStandardStage* clone = TRACKED_NEW plStandardStage; + plStandardStage* clone = new plStandardStage; clone->fAnimName = hsStrcpy(fAnimName); clone->fNumLoops = fNumLoops; clone->fLoopForever = fLoopForever; diff --git a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp index 1d7090a2..abfc2986 100644 --- a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp +++ b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp @@ -186,7 +186,7 @@ hsBool plNPCSpawnComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) const char *accountName = fCompPB->GetStr(kAccountName); bool autoSpawn = fCompPB->GetInt(kAutoSpawn) ? true : false; - plNPCSpawnMod *mod = TRACKED_NEW plNPCSpawnMod(modelName, accountName, autoSpawn); + plNPCSpawnMod *mod = new plNPCSpawnMod(modelName, accountName, autoSpawn); fMods[node] = mod; // this is used by the python file modifier to figure out which component we're coming from @@ -210,7 +210,7 @@ hsBool plNPCSpawnComp::Convert(plMaxNode* node, plErrorMsg *pErrMsg) // let's make a notification message that we'll use to notify interested parties // when we actually do our spawn. - plNotifyMsg *notify = TRACKED_NEW plNotifyMsg(); + plNotifyMsg *notify = new plNotifyMsg(); hsTArray receivers; IGetReceivers(node, receivers); notify->SetSender(mod->GetKey()); diff --git a/Sources/Tools/MaxComponent/plNavigableComponents.cpp b/Sources/Tools/MaxComponent/plNavigableComponents.cpp index 518654c9..fbd57050 100644 --- a/Sources/Tools/MaxComponent/plNavigableComponents.cpp +++ b/Sources/Tools/MaxComponent/plNavigableComponents.cpp @@ -272,7 +272,7 @@ hsBool plAvLadderComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) int ladderType = fCompPB->GetInt(kTypeCombo); bool enabled = (fCompPB->GetInt(kEnabled) != 0); - plAvLadderMod* ladMod = TRACKED_NEW plAvLadderMod(goingUp, ladderType, loops, enabled, ladderView); + plAvLadderMod* ladMod = new plAvLadderMod(goingUp, ladderType, loops, enabled, ladderView); plKey modKey = node->AddModifier(ladMod, IGetUniqueName(node)); fKeys.Append(modKey); diff --git a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp index 5b7faa69..e69917bc 100644 --- a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp +++ b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp @@ -229,7 +229,7 @@ hsBool plObjectFlockerComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg if (fFlocker) delete fFlocker; - fFlocker = TRACKED_NEW pfObjectFlocker; + fFlocker = new pfObjectFlocker; hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), fFlocker, node->GetLocation(), node->GetLoadMask()); fFlocker->SetGoalWeight(fCompPB->GetFloat(ParamID(kGoalStrength))); diff --git a/Sources/Tools/MaxComponent/plOneShotComponent.cpp b/Sources/Tools/MaxComponent/plOneShotComponent.cpp index 7d5a2118..b6b5d842 100644 --- a/Sources/Tools/MaxComponent/plOneShotComponent.cpp +++ b/Sources/Tools/MaxComponent/plOneShotComponent.cpp @@ -240,7 +240,7 @@ hsBool plOneShotComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if (IsValid()) { - plOneShotMod *mod = TRACKED_NEW plOneShotMod; + plOneShotMod *mod = new plOneShotMod; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), mod, node->GetLocation()); fMods[node] = mod; } diff --git a/Sources/Tools/MaxComponent/plParticleComponents.cpp b/Sources/Tools/MaxComponent/plParticleComponents.cpp index 0ed5cd52..fe19769c 100644 --- a/Sources/Tools/MaxComponent/plParticleComponents.cpp +++ b/Sources/Tools/MaxComponent/plParticleComponents.cpp @@ -152,9 +152,9 @@ hsBool plParticleCoreComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg // Moving this from Convert so the DrawInterface will appear sooner. Other components expect // the interfaces to be fully set up by the Convert pass. plSceneNode *sNode = plSceneNode::ConvertNoRef( pNode->GetRoomKey()->GetObjectPtr() ); - plDrawInterface *di = TRACKED_NEW plDrawInterface; + plDrawInterface *di = new plDrawInterface; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(pNode), di, pNode->GetLocation(), pNode->GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify( di->GetKey(), TRACKED_NEW plObjRefMsg(pNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( di->GetKey(), new plObjRefMsg(pNode->GetSceneObject()->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); pNode->SetDISceneNodeSpans(di, true); return true; @@ -168,7 +168,7 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) const char *objName = node->GetKey()->GetName(); plSceneObject *sObj = node->GetSceneObject(); - plParticleSystem *sys = TRACKED_NEW plParticleSystem(); + plParticleSystem *sys = new plParticleSystem(); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), sys, nodeLoc, node->GetLoadMask()); @@ -231,7 +231,7 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) float avgLife = (partLifeMax + partLifeMin) / 2; uint32_t count = node->NumAttachedComponents(); uint32_t lifeTicks = avgLife / frameDelta; - float *birth = TRACKED_NEW float[lifeTicks]; + float *birth = new float[lifeTicks]; // Find any anim components attached to the same node. for (i = 0; i < count; i++) @@ -358,13 +358,13 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) if (fUserInput.fGenType == kGenPoint) { sources = 1; - pitchArray = TRACKED_NEW float[sources]; - yawArray = TRACKED_NEW float[sources]; - pointArray = TRACKED_NEW hsPoint3[sources]; + pitchArray = new float[sources]; + yawArray = new float[sources]; + pointArray = new hsPoint3[sources]; pitchArray[0] = pitch; yawArray[0] = yaw; pointArray[0].Set(0, 0, 0); - plSimpleParticleGenerator *gen = TRACKED_NEW plSimpleParticleGenerator(); + plSimpleParticleGenerator *gen = new plSimpleParticleGenerator(); gen->Init(genLife, partLifeMin, partLifeMax, pps, sources, pointArray, pitchArray, yawArray, angleRange, velMin, velMax, xSize, ySize, scaleMin, scaleMax, massRange, rotRange); generator = gen; @@ -375,16 +375,16 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) hsTArray pos; plMeshConverter::Instance().StuffPositionsAndNormals(node, &pos, &normals); sources = normals.GetCount(); - pitchArray = TRACKED_NEW float[sources]; - yawArray = TRACKED_NEW float[sources]; - pointArray = TRACKED_NEW hsPoint3[sources]; + pitchArray = new float[sources]; + yawArray = new float[sources]; + pointArray = new hsPoint3[sources]; int i; for (i = 0; i < sources; i++) { plParticleGenerator::ComputePitchYaw(pitchArray[i], yawArray[i], normals.Get(i)); pointArray[i] = pos.Get(i); } - plSimpleParticleGenerator *gen = TRACKED_NEW plSimpleParticleGenerator(); + plSimpleParticleGenerator *gen = new plSimpleParticleGenerator(); gen->Init(genLife, partLifeMin, partLifeMax, pps, sources, pointArray, pitchArray, yawArray, angleRange, velMin, velMax, xSize, ySize, scaleMin, scaleMax, massRange, rotRange); generator = gen; @@ -396,8 +396,8 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plMeshConverter::Instance().StuffPositionsAndNormals(node, &pos, &normals); sources = normals.GetCount(); - pointArray = TRACKED_NEW hsPoint3[sources]; - dirArray = TRACKED_NEW hsVector3[sources]; + pointArray = new hsPoint3[sources]; + dirArray = new hsVector3[sources]; int i; for (i = 0; i < sources; i++) { @@ -405,7 +405,7 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pointArray[i] = pos.Get(i); } - plOneTimeParticleGenerator *gen = TRACKED_NEW plOneTimeParticleGenerator(); + plOneTimeParticleGenerator *gen = new plOneTimeParticleGenerator(); gen->Init(sources, pointArray, dirArray, xSize, ySize, scaleMin, scaleMax, rotRange); generator = gen; maxTotalParticles = sources; @@ -415,8 +415,8 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // Init and attach to the scene object sys->Init(xTiles, yTiles, maxTotalParticles, maxEmitters, ambientCtl, diffuseCtl, opacityCtl, widthCtl, heightCtl); - hsgResMgr::ResMgr()->AddViaNotify( particleMat->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( sys->GetKey(), TRACKED_NEW plObjRefMsg( sObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( particleMat->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( sys->GetKey(), new plObjRefMsg( sObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); // Set up normals and orientation uint32_t miscFlags = 0; @@ -493,9 +493,9 @@ hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) if (fCompPB->GetInt(ParamID(kFollowSystem))) { - plParticleFollowSystemEffect *effect = TRACKED_NEW plParticleFollowSystemEffect; + plParticleFollowSystemEffect *effect = new plParticleFollowSystemEffect; hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effect, node->GetLocation(), node->GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectMisc ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectMisc ), plRefFlags::kActiveRef ); } return true; @@ -533,7 +533,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kLifeMin)), node, start, end); if (ctl != nil) { - plParticleLifeMinApplicator *app = TRACKED_NEW plParticleLifeMinApplicator(); + plParticleLifeMinApplicator *app = new plParticleLifeMinApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -542,7 +542,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kLifeMax)), node, start, end); if (ctl != nil) { - plParticleLifeMaxApplicator *app = TRACKED_NEW plParticleLifeMaxApplicator(); + plParticleLifeMaxApplicator *app = new plParticleLifeMaxApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -551,7 +551,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kPPS)), node, start, end); if (ctl != nil) { - plParticlePPSApplicator *app = TRACKED_NEW plParticlePPSApplicator(); + plParticlePPSApplicator *app = new plParticlePPSApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -560,7 +560,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kConeAngle)), node, start, end); if (ctl != nil) { - plParticleAngleApplicator *app = TRACKED_NEW plParticleAngleApplicator(); + plParticleAngleApplicator *app = new plParticleAngleApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -569,7 +569,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kVelocityMin)), node, start, end); if (ctl != nil) { - plParticleVelMinApplicator *app = TRACKED_NEW plParticleVelMinApplicator(); + plParticleVelMinApplicator *app = new plParticleVelMinApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -578,7 +578,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kVelocityMax)), node, start, end); if (ctl != nil) { - plParticleVelMaxApplicator *app = TRACKED_NEW plParticleVelMaxApplicator(); + plParticleVelMaxApplicator *app = new plParticleVelMaxApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -588,7 +588,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kGravity)), node, start, end); if (ctl != nil) { - plParticleGravityApplicator *app = TRACKED_NEW plParticleGravityApplicator(); + plParticleGravityApplicator *app = new plParticleGravityApplicator(); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; } @@ -596,7 +596,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kDrag)), node, start, end); if (ctl != nil) { - plParticleDragApplicator *app = TRACKED_NEW plParticleDragApplicator(); + plParticleDragApplicator *app = new plParticleDragApplicator(); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; } @@ -606,7 +606,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kScaleMin)), node, start, end); if (ctl != nil) { - plParticleScaleMinApplicator *app = TRACKED_NEW plParticleScaleMinApplicator(); + plParticleScaleMinApplicator *app = new plParticleScaleMinApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -615,7 +615,7 @@ hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) ctl = cc.MakeScalarController(GetParamBlock2Controller(fCompPB, ParamID(kScaleMax)), node, start, end); if (ctl != nil) { - plParticleScaleMaxApplicator *app = TRACKED_NEW plParticleScaleMaxApplicator(); + plParticleScaleMaxApplicator *app = new plParticleScaleMaxApplicator(); app->SetChannelName(node->GetName()); plAnimComponentBase::SetupCtl(anim, ctl, app, node); result = true; @@ -964,7 +964,7 @@ void plParticleFadeComponent::AddToParticleSystem(plParticleSystem *sys, plMaxNo plParticleFadeVolumeEffect *effect = nil; if( !fEffect ) { - effect = TRACKED_NEW plParticleFadeVolumeEffect(); + effect = new plParticleFadeVolumeEffect(); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effect, node->GetLocation(), node->GetLoadMask()); effect->fLength = (float)fCompPB->GetInt(kFadeDistance); if (fCompPB->GetInt(kFadeZ)) @@ -977,7 +977,7 @@ void plParticleFadeComponent::AddToParticleSystem(plParticleSystem *sys, plMaxNo effect = plParticleFadeVolumeEffect::ConvertNoRef(fEffect); } hsAssert(effect, "Our effect pointer was wrong type?"); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectMisc ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectMisc ), plRefFlags::kActiveRef ); } CLASS_DESC(plParticleFadeComponent, gParticleFadeDesc, "Fade Volume Effect", "Fade Volume Effect", COMP_TYPE_PARTICLE, PARTICLE_FADE_COMPONENT_CLASS_ID) @@ -1050,10 +1050,10 @@ void plParticleVolumeComponent::BuildVolume(plMaxNode *node) if (fBound != nil) return; // already converted it - fBound = TRACKED_NEW plBoundInterface; + fBound = new plBoundInterface; hsgResMgr::ResMgr()->NewKey(node->GetName(), fBound, node->GetLocation(), node->GetLoadMask()); fBound->Init(plMeshConverter::Instance().CreateConvexVolume(node)); - hsgResMgr::ResMgr()->AddViaNotify(fBound->GetKey(), TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fBound->GetKey(), new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } @@ -1072,14 +1072,14 @@ void plParticleVolumeComponent::AddToParticleSystem(plParticleSystem *sys, plMax { default: case kImpDefault: - effect = TRACKED_NEW plParticleCollisionEffectBeat(); + effect = new plParticleCollisionEffectBeat(); break; case kImpDie: - effect = TRACKED_NEW plParticleCollisionEffectDie(); + effect = new plParticleCollisionEffectDie(); break; case kImpBounce: { - plParticleCollisionEffectBounce* bnc = TRACKED_NEW plParticleCollisionEffectBounce(); + plParticleCollisionEffectBounce* bnc = new plParticleCollisionEffectBounce(); bnc->SetBounce(fCompPB->GetFloat(kBounceAmt) * 1.e-2f); bnc->SetFriction(fCompPB->GetFloat(kFrictionAmt) * 1.e-2f); effect = bnc; @@ -1089,7 +1089,7 @@ void plParticleVolumeComponent::AddToParticleSystem(plParticleSystem *sys, plMax hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effect, node->GetLocation(), node->GetLoadMask()); plSceneObject *sObj = source->GetSceneObject(); - hsgResMgr::ResMgr()->AddViaNotify( sObj->GetKey(), TRACKED_NEW plGenRefMsg( effect->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( sObj->GetKey(), new plGenRefMsg( effect->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kPassiveRef ); fEffect = effect; } @@ -1098,7 +1098,7 @@ void plParticleVolumeComponent::AddToParticleSystem(plParticleSystem *sys, plMax effect = plParticleCollisionEffect::ConvertNoRef(fEffect); } hsAssert(effect, "Our effect pointer was wrong type?"); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectConstraint ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectConstraint ), plRefFlags::kActiveRef ); } CLASS_DESC(plParticleVolumeComponent, gParticleVolumeDesc, "Collision Volume Effect", "Collision Volume Effect", COMP_TYPE_PARTICLE, PARTICLE_VOLUME_COMPONENT_CLASS_ID) @@ -1190,7 +1190,7 @@ void plParticleWindComponent::AddToParticleSystem(plParticleSystem *sys, plMaxNo plParticleLocalWind* effect = nil; if( !fEffect ) { - effect = TRACKED_NEW plParticleLocalWind(); + effect = new plParticleLocalWind(); effect->SetScale(hsVector3(fCompPB->GetFloat(kScaleX), fCompPB->GetFloat(kScaleY), fCompPB->GetFloat(kScaleZ))); effect->SetSpeed(fCompPB->GetFloat(kSpeed)); @@ -1210,7 +1210,7 @@ void plParticleWindComponent::AddToParticleSystem(plParticleSystem *sys, plMaxNo effect = plParticleLocalWind::ConvertNoRef(fEffect); } hsAssert(effect, "Our effect pointer was wrong type?"); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); } CLASS_DESC(plParticleWindComponent, gParticleWindDesc, "Wind Effect", "WindEffect", COMP_TYPE_PARTICLE, PARTICLE_WIND_COMPONENT_CLASS_ID) @@ -1311,7 +1311,7 @@ void plParticleUniWindComponent::AddToParticleSystem(plParticleSystem *sys, plMa plParticleUniformWind* effect = nil; if( !fEffect ) { - effect = TRACKED_NEW plParticleUniformWind(); + effect = new plParticleUniformWind(); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effect, node->GetLocation(), node->GetLoadMask()); effect->SetStrength(fCompPB->GetFloat(kStrength)); @@ -1331,7 +1331,7 @@ void plParticleUniWindComponent::AddToParticleSystem(plParticleSystem *sys, plMa effect = plParticleUniformWind::ConvertNoRef(fEffect); } hsAssert(effect, "Our effect pointer was wrong type?"); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); } CLASS_DESC(plParticleUniWindComponent, gParticleUniWindDesc, "Uniform Wind", "UniWind", COMP_TYPE_PARTICLE, PARTICLE_UNIWIND_COMPONENT_CLASS_ID) @@ -1482,7 +1482,7 @@ void plParticleFlockComponent::AddToParticleSystem(plParticleSystem *sys, plMaxN plParticleFlockEffect* effect = nil; if( !fEffect ) { - effect = TRACKED_NEW plParticleFlockEffect(); + effect = new plParticleFlockEffect(); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), effect, node->GetLocation(), node->GetLoadMask()); hsPoint3 offset(fCompPB->GetFloat(ParamID(kOffsetX)), @@ -1512,7 +1512,7 @@ void plParticleFlockComponent::AddToParticleSystem(plParticleSystem *sys, plMaxN effect = plParticleFlockEffect::ConvertNoRef(fEffect); } hsAssert(effect, "Our effect pointer was wrong type?"); - hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), TRACKED_NEW plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( effect->GetKey(), new plGenRefMsg( sys->GetKey(), plRefMsg::kOnCreate, 0, plParticleSystem::kEffectForce ), plRefFlags::kActiveRef ); } CLASS_DESC(plParticleFlockComponent, gParticleFlockDesc, "Particle Flock", "Flock", COMP_TYPE_PARTICLE, PARTICLE_FLOCK_COMPONENT_CLASS_ID) diff --git a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp index 1f52f049..09ef493c 100644 --- a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp @@ -405,7 +405,7 @@ extern PlasmaToHavokQuat(Havok::Quaternion &a, hsQuat &b); hsBool plPhysHingeConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plHingeConstraintMod* HMod = TRACKED_NEW plHingeConstraintMod; + plHingeConstraintMod* HMod = new plHingeConstraintMod; plMaxNode* ParentNode = (plMaxNode*)fCompPB->GetINode(kParent); @@ -493,8 +493,8 @@ hsBool plPhysHingeConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErr node->AddModifier(HMod, IGetUniqueName(node)); if(ParentKey) - hsgResMgr::ResMgr()->AddViaNotify( ParentKey, TRACKED_NEW plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0 ), plRefFlags::kPassiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), TRACKED_NEW plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( ParentKey, new plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), new plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0 ), plRefFlags::kPassiveRef ); @@ -696,7 +696,7 @@ hsBool plPhysBridgeComponent::Convert(plMaxNode* node, plErrorMsg* errMsg) if (!parent) return false; - plHingeConstraintMod* mod = TRACKED_NEW plHingeConstraintMod; + plHingeConstraintMod* mod = new plHingeConstraintMod; // mod->SetHCFriction(0, 1.f); mod->SetRR(fCompPB->GetFloat(kStrength));//1.f / sqrt(float(count))); @@ -724,8 +724,8 @@ hsBool plPhysBridgeComponent::Convert(plMaxNode* node, plErrorMsg* errMsg) mod->SetRotationAxis(-1*hingeVector); node->AddModifier(mod, IGetUniqueName(node)); - hsgResMgr::ResMgr()->AddViaNotify(parent->GetKey(), TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0), plRefFlags::kPassiveRef); - hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(parent->GetKey(), new plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(node->GetKey(), new plGenRefMsg(mod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0), plRefFlags::kPassiveRef); return true; } @@ -1042,7 +1042,7 @@ hsBool plStrongSpringConstraintComponent::SetupProperties(plMaxNode *pNode, plEr hsBool plStrongSpringConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plStrongSpringConstraintMod* HMod = TRACKED_NEW plStrongSpringConstraintMod; + plStrongSpringConstraintMod* HMod = new plStrongSpringConstraintMod; HMod->SetDamp(fCompPB->GetFloat(kStrength)); HMod->SetRR(fCompPB->GetFloat(kRebound)); @@ -1081,8 +1081,8 @@ hsBool plStrongSpringConstraintComponent::Convert(plMaxNode *node, plErrorMsg *p node->AddModifier(HMod, IGetUniqueName(node)); - hsgResMgr::ResMgr()->AddViaNotify( ParentKey, TRACKED_NEW plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0 ), plRefFlags::kPassiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), TRACKED_NEW plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( ParentKey, new plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kParentIdx, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), new plGenRefMsg( HMod->GetKey(), plRefMsg::kOnCreate, plHavokConstraintsMod::kChildIdx, 0 ), plRefFlags::kPassiveRef ); diff --git a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp index 2f09e031..7dc18d04 100644 --- a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp @@ -1324,19 +1324,19 @@ hsBool plSwim2DComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { case kCurrentSpiral: { - fSwimRegions[node] = TRACKED_NEW plSwimCircularCurrentRegion(); + fSwimRegions[node] = new plSwimCircularCurrentRegion(); hsgResMgr::ResMgr()->NewKey(node->GetName(), fSwimRegions[node], node->GetLocation(), node->GetLoadMask()); break; } case kCurrentStraight: { - fSwimRegions[node] = TRACKED_NEW plSwimStraightCurrentRegion(); + fSwimRegions[node] = new plSwimStraightCurrentRegion(); hsgResMgr::ResMgr()->NewKey(node->GetName(), fSwimRegions[node], node->GetLocation(), node->GetLoadMask()); break; } default: { - fSwimRegions[node] = TRACKED_NEW plSwimRegionInterface(); + fSwimRegions[node] = new plSwimRegionInterface(); hsgResMgr::ResMgr()->NewKey(node->GetName(), fSwimRegions[node], node->GetLocation(), node->GetLoadMask()); break; } @@ -1354,11 +1354,11 @@ hsBool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) if (!detectorNode->GetSceneObject()->GetModifierByType(plSwimDetector::Index())) { plKey nilKey; - plSwimMsg *enterMsg = TRACKED_NEW plSwimMsg(detectorNode->GetKey(), nilKey, true, nil); - plSwimMsg *exitMsg = TRACKED_NEW plSwimMsg(detectorNode->GetKey(), nilKey, false, nil); + plSwimMsg *enterMsg = new plSwimMsg(detectorNode->GetKey(), nilKey, true, nil); + plSwimMsg *exitMsg = new plSwimMsg(detectorNode->GetKey(), nilKey, false, nil); enterMsg->SetBCastFlag(plMessage::kPropagateToModifiers); exitMsg->SetBCastFlag(plMessage::kPropagateToModifiers); - plSwimDetector *swimMod = TRACKED_NEW plSwimDetector(enterMsg, exitMsg); + plSwimDetector *swimMod = new plSwimDetector(enterMsg, exitMsg); detectorNode->AddModifier(swimMod, IGetUniqueName(node)); // the mod doesn't have a valid key until AddModifier is called, so this comes last. @@ -1384,7 +1384,7 @@ hsBool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plMaxNode *currentNode = (plMaxNode *)fCompPB->GetINode(ParamID(kSwimCurrentNode)); if (currentNode) { - plGenRefMsg *msg= TRACKED_NEW plGenRefMsg(circInt->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg= new plGenRefMsg(circInt->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(currentNode->GetSceneObject()->GetKey(), msg, plRefFlags::kActiveRef); } break; @@ -1400,7 +1400,7 @@ hsBool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) plMaxNode *currentNode = (plMaxNode *)fCompPB->GetINode(ParamID(kSwimCurrentNode)); if (currentNode) { - plGenRefMsg *msg= TRACKED_NEW plGenRefMsg(strInt->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg= new plGenRefMsg(strInt->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(currentNode->GetSceneObject()->GetKey(), msg, plRefFlags::kActiveRef); } break; @@ -1416,7 +1416,7 @@ hsBool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) fSwimRegions[node]->fUpBuoyancy = fCompPB->GetFloat(ParamID(kSwimBuoyancyUp)) + 1; fSwimRegions[node]->fMaxUpwardVel = fCompPB->GetFloat(ParamID(kSwimMaxUpVel)); - hsgResMgr::ResMgr()->AddViaNotify(fSwimRegions[node]->GetKey(), TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fSwimRegions[node]->GetKey(), new plObjRefMsg(node->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } @@ -1765,11 +1765,11 @@ hsBool plSubworldDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); - plSubworldRegionDetector *detector = TRACKED_NEW plSubworldRegionDetector; + plSubworldRegionDetector *detector = new plSubworldRegionDetector; // Register the detector plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); // need to get the key for the camera here... plMaxNode* pSubNode = (plMaxNode*)fCompPB->GetINode(kSubworldTarget); @@ -1881,12 +1881,12 @@ hsBool plPanicLinkDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMs plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); - plPanicLinkRegion *detector = TRACKED_NEW plPanicLinkRegion; + plPanicLinkRegion *detector = new plPanicLinkRegion; detector->fPlayLinkOutAnim = fCompPB->GetInt(ParamID(kPlayAnim)); // Register the detector plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); return true; } @@ -2002,14 +2002,14 @@ hsBool plRideAnimatedPhysicalComponent::Convert(plMaxNode *node, plErrorMsg *pEr { plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); - plRideAnimatedPhysMsg* enter = TRACKED_NEW plRideAnimatedPhysMsg(obj->GetKey(), nil, true, nil); + plRideAnimatedPhysMsg* enter = new plRideAnimatedPhysMsg(obj->GetKey(), nil, true, nil); enter->SetBCastFlag(plMessage::kPropagateToModifiers); - plRideAnimatedPhysMsg* exit = TRACKED_NEW plRideAnimatedPhysMsg(obj->GetKey(), nil, false, nil); + plRideAnimatedPhysMsg* exit = new plRideAnimatedPhysMsg(obj->GetKey(), nil, false, nil); exit->SetBCastFlag(plMessage::kPropagateToModifiers); - plRidingAnimatedPhysicalDetector *detector = TRACKED_NEW plRidingAnimatedPhysicalDetector(enter, exit); + plRidingAnimatedPhysicalDetector *detector = new plRidingAnimatedPhysicalDetector(enter, exit); // Register the detector //node->AddModifier(detector, IGetUniqueName(node)); plKey detectorKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); return true; } diff --git a/Sources/Tools/MaxComponent/plPickNodeBase.cpp b/Sources/Tools/MaxComponent/plPickNodeBase.cpp index 4183faef..181f7c04 100644 --- a/Sources/Tools/MaxComponent/plPickNodeBase.cpp +++ b/Sources/Tools/MaxComponent/plPickNodeBase.cpp @@ -179,7 +179,7 @@ void plPickNodeBase::IGetSelNode(HWND hList) else { int len = ListBox_GetTextLen(hList, sel); - char* buf = TRACKED_NEW char[len+1]; + char* buf = new char[len+1]; ListBox_GetText(hList, sel, buf); /* if (!strcmp(buf, kUserTypeNone)) diff --git a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp index ed95e394..ad04ea10 100644 --- a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp +++ b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp @@ -265,7 +265,7 @@ hsBool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // if this is a multi-modifier python file component then is this the main (or first) maxnode bool mainMultiModierNode = false; - plPythonFileMod *mod = TRACKED_NEW plPythonFileMod; + plPythonFileMod *mod = new plPythonFileMod; // create the modifier key ourselves so that we can get the name of the modifier in the name plSceneObject *obj = node->GetSceneObject(); @@ -316,7 +316,7 @@ hsBool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) } // Create us a new sceneObject to attach to - obj = TRACKED_NEW plSceneObject; + obj = new plSceneObject; const plLocation &globalLoc = plPluginResManager::ResMgr()->GetCommonPage( node->GetLocation(), plAgeDescription::kGlobal ); hsAssert( globalLoc.IsValid(), "Invalid common page location!!!" ); @@ -355,7 +355,7 @@ hsBool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) modKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), mod, node->GetLocation()); } } - hsgResMgr::ResMgr()->AddViaNotify(modKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(modKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fModKeys[node] = modKey; // only let non-multimodifier or multimodifier then only the main node register for notifies diff --git a/Sources/Tools/MaxComponent/plResponderAnim.cpp b/Sources/Tools/MaxComponent/plResponderAnim.cpp index 517b1b54..74305162 100644 --- a/Sources/Tools/MaxComponent/plResponderAnim.cpp +++ b/Sources/Tools/MaxComponent/plResponderAnim.cpp @@ -330,7 +330,7 @@ plMessage *plResponderCmdAnim::ICreateAnimMsg(plMaxNode* node, plErrorMsg *pErrM if (!animKey) throw "Animation component didn't convert"; - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *msg = new plAnimCmdMsg; msg->AddReceiver(animKey); const char *tempAnimName = comp->GetAnimName(); @@ -409,7 +409,7 @@ plMessage* plResponderCmdAnim::ICreateSndMsg(plMaxNode* node, plErrorMsg *pErrMs const plAudioInterface *ai = targNode->GetSceneObject()->GetAudioInterface(); plKey key = ai->GetKey(); - plSoundMsg* msg = TRACKED_NEW plSoundMsg; + plSoundMsg* msg = new plSoundMsg; msg->AddReceiver(key); msg->fIndex = soundIdx; @@ -440,7 +440,7 @@ plMessage* plResponderCmdAnim::ICreateSndMsg(plMaxNode* node, plErrorMsg *pErrMs plKey key = plAudioComp::GetRandomSoundKey(comp, targNode); if (key) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *msg = new plAnimCmdMsg; msg->AddReceiver(key); if (type == kRespondPlayRndSound) @@ -502,7 +502,7 @@ void plResponderCmdAnim::CreateWait(plMaxNode* node, plErrorMsg* pErrMsg, IParam if (soundMsg) soundMsg->SetCmd(plSoundMsg::kAddCallbacks); - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(waitInfo.receiver); eventMsg->fRepeats = 0; eventMsg->fUser = waitInfo.callbackUser; diff --git a/Sources/Tools/MaxComponent/plResponderComponent.cpp b/Sources/Tools/MaxComponent/plResponderComponent.cpp index a7d938f2..8f6fcf18 100644 --- a/Sources/Tools/MaxComponent/plResponderComponent.cpp +++ b/Sources/Tools/MaxComponent/plResponderComponent.cpp @@ -338,9 +338,9 @@ hsBool plResponderComponent::PreConvert(plMaxNode *node,plErrorMsg *pErrMsg) plLocation loc = node->GetLocation(); // Create and register the RESPONDER's logic component - plResponderModifier *responder = TRACKED_NEW plResponderModifier; + plResponderModifier *responder = new plResponderModifier; plKey responderKey = hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), responder, loc); - hsgResMgr::ResMgr()->AddViaNotify(responderKey, TRACKED_NEW plObjRefMsg(rObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(responderKey, new plObjRefMsg(rObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); // Tell all the activators to notify us for (int i = 0; i < fCompPB->Count(kResponderActivators); i++) diff --git a/Sources/Tools/MaxComponent/plResponderLink.cpp b/Sources/Tools/MaxComponent/plResponderLink.cpp index eb2f6e3c..6b0ea760 100644 --- a/Sources/Tools/MaxComponent/plResponderLink.cpp +++ b/Sources/Tools/MaxComponent/plResponderLink.cpp @@ -249,7 +249,7 @@ plMessage *plResponderCmdLink::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, I if ( !ageLinkInAnimName ) ageLinkInAnimName = kDefaultLinkInAnimName; - plLinkToAgeMsg *msg = TRACKED_NEW plLinkToAgeMsg; + plLinkToAgeMsg *msg = new plLinkToAgeMsg; msg->GetAgeLink()->SetLinkingRules( linkingRule ); msg->GetAgeLink()->SetSpawnPoint( plSpawnPointInfo( ageSpawnPtTitle, ageSpawnPtName ) ); msg->GetAgeLink()->GetAgeInfo()->SetAgeFilename( ageFilename ); @@ -490,7 +490,7 @@ plMessage *plResponderCmdEnable::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, BOOL enable = pb->GetInt(kEnable); - plResponderEnableMsg *msg = TRACKED_NEW plResponderEnableMsg; + plResponderEnableMsg *msg = new plResponderEnableMsg; msg->fEnable = (enable != false); plMaxNodeBase *respondNode = (plMaxNodeBase*)pb->GetReferenceTarget(kEnableNode); @@ -559,7 +559,7 @@ plMessage *plResponderCmdPhysEnable::CreateMsg(plMaxNode* node, plErrorMsg *pErr BOOL enable = pb->GetInt(kEnable); - plEnableMsg* enableMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* enableMsg = new plEnableMsg; enableMsg->SetCmd(plEnableMsg::kPhysical); enableMsg->SetCmd(enable ? plEnableMsg::kEnable : plEnableMsg::kDisable); enableMsg->AddReceiver(physNode->GetKey()); @@ -672,7 +672,7 @@ plMessage *plResponderCmdOneShot::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg if (!oneShotKey) throw "One-shot component didn't convert"; - plOneShotMsg *msg = TRACKED_NEW plOneShotMsg; + plOneShotMsg *msg = new plOneShotMsg; msg->AddReceiver(oneShotKey); return msg; } @@ -715,7 +715,7 @@ ParamBlockDesc2 *plResponderCmdNotify::GetDesc() plMessage *plResponderCmdNotify::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) { - plNotifyMsg *msg = TRACKED_NEW plNotifyMsg; + plNotifyMsg *msg = new plNotifyMsg; msg->SetBCastFlag(plMessage::kNetPropagate, 0); msg->SetState(1.0); // set to positive state msg->AddCallbackEvent(1); // create an event record with callback @@ -825,7 +825,7 @@ plMessage *plResponderCmdDetectorEnable::CreateMsg(plMaxNode* node, plErrorMsg * // Just stuffing this in here because I'm lazy if (comp->ClassID() == CAM_REGION_CID) { - plEnableMsg* enableMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* enableMsg = new plEnableMsg; enableMsg->SetCmd(plEnableMsg::kPhysical); enableMsg->SetCmd(enable ? plEnableMsg::kEnable : plEnableMsg::kDisable); @@ -835,7 +835,7 @@ plMessage *plResponderCmdDetectorEnable::CreateMsg(plMaxNode* node, plErrorMsg * return enableMsg; } - plEnableMsg *msg = TRACKED_NEW plEnableMsg; + plEnableMsg *msg = new plEnableMsg; msg->SetCmd(enable ? plEnableMsg::kEnable : plEnableMsg::kDisable); hsTArray keys; @@ -1018,7 +1018,7 @@ plMessage *plResponderCmdXRegion::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg { plExcludeRegionComponent *xComp = (plExcludeRegionComponent*)comp; - plExcludeRegionMsg *msg = TRACKED_NEW plExcludeRegionMsg; + plExcludeRegionMsg *msg = new plExcludeRegionMsg; int type = pb->GetInt(kXRegionType); switch (type) @@ -1115,7 +1115,7 @@ plMessage *plResponderCmdCamTransition::CreateMsg(plMaxNode* node, plErrorMsg *p if (fail) throw "Invalid Camera Specified"; - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByType); if(pCamNode->CanConvert()) @@ -1185,7 +1185,7 @@ const char *plResponderCmdCamForce::GetInstanceName(IParamBlock2 *pb) plMessage *plResponderCmdCamForce::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) { - plCameraMsg* msg = TRACKED_NEW plCameraMsg; + plCameraMsg* msg = new plCameraMsg; msg->SetBCastFlag(plMessage::kBCastByType); msg->SetBCastFlag(plMessage::kNetPropagate, false); @@ -1241,7 +1241,7 @@ plMessage *plResponderCmdDelay::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, { float time = pb->GetFloat(kDelayTime); - plTimerCallbackMsg *msg = TRACKED_NEW plTimerCallbackMsg; + plTimerCallbackMsg *msg = new plTimerCallbackMsg; msg->fTime = time; msg->fID = uint32_t(-1); @@ -1380,7 +1380,7 @@ plMessage *plResponderCmdVisibility::CreateMsg(plMaxNode* node, plErrorMsg *pErr plMaxNode* visNode = (plMaxNode*)pb->GetINode(kVisibilityNode); if (visNode) { - plEnableMsg* msg = TRACKED_NEW plEnableMsg; + plEnableMsg* msg = new plEnableMsg; msg->SetCmd(plEnableMsg::kDrawable); int type = pb->GetInt(kVisibilityType); @@ -1551,7 +1551,7 @@ plMessage *plResponderCmdSubWorld::CreateMsg(plMaxNode* node, plErrorMsg *pErrMs break; } - plSubWorldMsg * swMsg = TRACKED_NEW plSubWorldMsg(nilKey, nilKey2, worldKey); + plSubWorldMsg * swMsg = new plSubWorldMsg(nilKey, nilKey2, worldKey); return swMsg; } @@ -1629,7 +1629,7 @@ const char *plResponderCmdFootSurface::GetInstanceName(IParamBlock2 *pb) plMessage *plResponderCmdFootSurface::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) { - plArmatureEffectStateMsg* msg = TRACKED_NEW plArmatureEffectStateMsg; + plArmatureEffectStateMsg* msg = new plArmatureEffectStateMsg; msg->SetBCastFlag(plMessage::kPropagateToModifiers); msg->SetBCastFlag(plMessage::kNetPropagate); msg->fSurface = pb->GetInt(kSurface); @@ -1729,7 +1729,7 @@ plMessage *plResponderCmdMultistage::CreateMsg(plMaxNode* node, plErrorMsg *pErr plMaxNodeBase *targNode; if (compNode.GetCompAndNode(comp, targNode)) { - plNotifyMsg* msg = TRACKED_NEW plNotifyMsg; + plNotifyMsg* msg = new plNotifyMsg; msg->SetState(1.f); // Will actually be set to the player key at runtime diff --git a/Sources/Tools/MaxComponent/plResponderMtl.cpp b/Sources/Tools/MaxComponent/plResponderMtl.cpp index 58604495..4feff3a5 100644 --- a/Sources/Tools/MaxComponent/plResponderMtl.cpp +++ b/Sources/Tools/MaxComponent/plResponderMtl.cpp @@ -374,7 +374,7 @@ plMessage *plResponderCmdMtl::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IP throw "Material animation key(s) not found"; } - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *msg = new plAnimCmdMsg; msg->AddReceivers(keys); switch (pb->GetInt(kMtlType)) @@ -462,7 +462,7 @@ void plResponderCmdMtl::CreateWait(plMaxNode* node, plErrorMsg* pErrMsg, IParamB if (animMsg) animMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(waitInfo.receiver); eventMsg->fRepeats = 0; eventMsg->fEvent = kStop; diff --git a/Sources/Tools/MaxComponent/plSeekPoint.cpp b/Sources/Tools/MaxComponent/plSeekPoint.cpp index d05a396a..47194a31 100644 --- a/Sources/Tools/MaxComponent/plSeekPoint.cpp +++ b/Sources/Tools/MaxComponent/plSeekPoint.cpp @@ -106,11 +106,11 @@ plSeekPointComponent::plSeekPointComponent() hsBool plSeekPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { const char *objName = node->GetName(); - char *name = TRACKED_NEW char[strlen(objName) + 1]; + char *name = new char[strlen(objName) + 1]; strcpy(name, objName); - plSeekPointMod* pointMod = TRACKED_NEW plSeekPointMod(name); + plSeekPointMod* pointMod = new plSeekPointMod(name); node->AddModifier(pointMod, IGetUniqueName(node)); return true; } diff --git a/Sources/Tools/MaxComponent/plShadowComponents.cpp b/Sources/Tools/MaxComponent/plShadowComponents.cpp index 32e0537b..4f41600f 100644 --- a/Sources/Tools/MaxComponent/plShadowComponents.cpp +++ b/Sources/Tools/MaxComponent/plShadowComponents.cpp @@ -207,7 +207,7 @@ hsBool plShadowCastComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) const float kBoostPercentToAbs = 1.e-2f; if( !fCaster ) { - fCaster = TRACKED_NEW plShadowCaster; + fCaster = new plShadowCaster; plLoadMask lm(QualityBitToMask(fCompPB->GetInt(kQuality)), QualityBitToMask(0)); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), fCaster, node->GetLocation(), lm); fCaster->SetSelfShadow(fCompPB->GetInt(kSelfShadow)); @@ -260,7 +260,7 @@ hsBool plShadowCastComponent::AddShadowCastModifier(plSceneObject* so, plShadowC } // Okay, we're clear, just add via notify. - hsgResMgr::ResMgr()->AddViaNotify(caster->GetKey(), TRACKED_NEW plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(caster->GetKey(), new plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); return true; } @@ -415,7 +415,7 @@ hsBool plShadowLightComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) hsBool plShadowLightComponent::IAddDirectMaster(plMaxNode* node, plSceneObject* so) { - plDirectShadowMaster* directMaster = TRACKED_NEW plDirectShadowMaster; + plDirectShadowMaster* directMaster = new plDirectShadowMaster; plLoadMask lm(QualityBitToMask(fCompPB->GetInt(kQuality)), QualityBitToMask(0)); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), directMaster, node->GetLocation(), lm); @@ -428,13 +428,13 @@ hsBool plShadowLightComponent::IAddDirectMaster(plMaxNode* node, plSceneObject* directMaster->SetProperty(plShadowMaster::kSelfShadow, fCompPB->GetInt(kSelfShadow)); - hsgResMgr::ResMgr()->AddViaNotify(directMaster->GetKey(), TRACKED_NEW plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(directMaster->GetKey(), new plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } hsBool plShadowLightComponent::IAddPointMaster(plMaxNode* node, plSceneObject* so) { - plPointShadowMaster* pointMaster = TRACKED_NEW plPointShadowMaster; + plPointShadowMaster* pointMaster = new plPointShadowMaster; plLoadMask lm(QualityBitToMask(fCompPB->GetInt(kQuality)), QualityBitToMask(0)); hsgResMgr::ResMgr()->NewKey(IGetUniqueName(node), pointMaster, node->GetLocation(), lm); @@ -447,7 +447,7 @@ hsBool plShadowLightComponent::IAddPointMaster(plMaxNode* node, plSceneObject* s pointMaster->SetProperty(plShadowMaster::kSelfShadow, fCompPB->GetInt(kSelfShadow)); - hsgResMgr::ResMgr()->AddViaNotify(pointMaster->GetKey(), TRACKED_NEW plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pointMaster->GetKey(), new plObjRefMsg(so->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } diff --git a/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp b/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp index a8cfcce7..72f5725f 100644 --- a/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp +++ b/Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp @@ -243,7 +243,7 @@ plSoftVolBaseComponent* plSoftVolBaseComponent::GetSoftComponent(plComponentBase void plSoftVolBaseComponent::IAddSubVolume(plKey masterKey, plKey subKey) { if( masterKey && subKey ) - hsgResMgr::ResMgr()->AddViaNotify(subKey, TRACKED_NEW plGenRefMsg(masterKey, plRefMsg::kOnCreate, 0, plSoftVolume::kSubVolume), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(subKey, new plGenRefMsg(masterKey, plRefMsg::kOnCreate, 0, plSoftVolume::kSubVolume), plRefFlags::kActiveRef); } plKey plSoftVolBaseComponent::ISetVolumeKey(plSoftVolume* vol) @@ -265,7 +265,7 @@ plKey plSoftVolBaseComponent::IInvertVolume(plKey subKey) if( !subKey ) return nil; - plSoftVolumeInvert* invert = TRACKED_NEW plSoftVolumeInvert; + plSoftVolumeInvert* invert = new plSoftVolumeInvert; plKey invertKey = ISetVolumeKey(invert); IAddSubVolume(invertKey, subKey); @@ -454,7 +454,7 @@ plKey plSoftVolComponent::ICreateSoftVolume() return fSoftKey = ICreateFromNode(GetTarget(0)); } - plSoftVolumeUnion* compound = TRACKED_NEW plSoftVolumeUnion; + plSoftVolumeUnion* compound = new plSoftVolumeUnion; fSoftKey = ISetVolumeKey(compound); int i; @@ -507,7 +507,7 @@ plKey plSoftVolComponent::ICreateFromDummyObject(plMaxNodeBase* pNode, Object* o DummyObject* dummy = (DummyObject*)obj; Box3 bnd = dummy->GetBox(); - plParallelIsect* isect = TRACKED_NEW plParallelIsect; + plParallelIsect* isect = new plParallelIsect; isect->SetNumPlanes(3); hsMatrix44 v2l = pNode->GetVertToLocal44(); @@ -539,7 +539,7 @@ plKey plSoftVolComponent::ICreateFromTriObject(plMaxNodeBase* pNode, Object* obj hsMatrix44 v2l = pNode->GetVertToLocal44(); hsMatrix44 l2v = pNode->GetLocalToVert44(); - plConvexIsect* isect = TRACKED_NEW plConvexIsect; + plConvexIsect* isect = new plConvexIsect; int i; for( i = 0; i < mesh->getNumFaces(); i++ ) { @@ -574,7 +574,7 @@ plKey plSoftVolComponent::ISetFromIsect(plMaxNodeBase* pNode, plVolumeIsect* ise { isect->SetTransform(pNode->GetLocalToWorld44(), pNode->GetWorldToLocal44()); - plSoftVolumeSimple* simple = TRACKED_NEW plSoftVolumeSimple; + plSoftVolumeSimple* simple = new plSoftVolumeSimple; simple->SetVolume(isect); simple->SetDistance(fCompPB->GetFloat(kSoftDistance)); @@ -588,7 +588,7 @@ plKey plSoftVolComponent::ISetFromIsect(plMaxNodeBase* pNode, plVolumeIsect* ise plKey retVal = ISetVolumeKey(simple); - hsgResMgr::ResMgr()->AddViaNotify(simple->GetKey(), TRACKED_NEW plObjRefMsg(sceneObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(simple->GetKey(), new plObjRefMsg(sceneObj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return retVal; } @@ -732,7 +732,7 @@ plKey plSoftVolUnionComponent::ICreateSoftVolume() if( numSubs < 2 ) return fSoftKey = plSoftVolBaseComponent::GetSoftComponent(fCompPB->GetINode(kSubVolumes, 0, 0))->GetSoftVolume(); - plSoftVolumeUnion* compound = TRACKED_NEW plSoftVolumeUnion; + plSoftVolumeUnion* compound = new plSoftVolumeUnion; fSoftKey = ISetVolumeKey(compound); int i; @@ -893,7 +893,7 @@ plKey plSoftVolIsectComponent::ICreateSoftVolume() if( numSubs < 2 ) return fSoftKey = plSoftVolBaseComponent::GetSoftComponent(fCompPB->GetINode(kSubVolumes, 0, 0))->GetSoftVolume(); - plSoftVolumeIntersect* compound = TRACKED_NEW plSoftVolumeIntersect; + plSoftVolumeIntersect* compound = new plSoftVolumeIntersect; fSoftKey = ISetVolumeKey(compound); int i; @@ -1129,7 +1129,7 @@ hsBool plLightRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) if( !softKey ) return true; - hsgResMgr::ResMgr()->AddViaNotify(softKey, TRACKED_NEW plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kSoftVolume), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(softKey, new plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kSoftVolume), plRefFlags::kActiveRef); return true; } @@ -1298,7 +1298,7 @@ void plVisRegionComponent::ICheckVisRegion(const plLocation& loc) if( !softKey ) return; - fVisReg = TRACKED_NEW plVisRegion; + fVisReg = new plVisRegion; plKey key = hsgResMgr::ResMgr()->NewKey(GetINode()->GetName(), fVisReg, loc); @@ -1309,7 +1309,7 @@ void plVisRegionComponent::ICheckVisRegion(const plLocation& loc) fVisReg->SetProperty(plVisRegion::kReplaceNormal, true); fVisReg->SetProperty(plVisRegion::kDisableNormal, disableNormal); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(fVisReg->GetKey(), plRefMsg::kOnCreate, 0, plVisRegion::kRefRegion); + plGenRefMsg* refMsg = new plGenRefMsg(fVisReg->GetKey(), plRefMsg::kOnCreate, 0, plVisRegion::kRefRegion); hsgResMgr::ResMgr()->SendRef(softKey, refMsg, plRefFlags::kActiveRef); } } @@ -1338,21 +1338,21 @@ hsBool plVisRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; if( di ) - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(di->GetKey(), plRefMsg::kOnCreate, 0, plDrawInterface::kRefVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(di->GetKey(), plRefMsg::kOnCreate, 0, plDrawInterface::kRefVisRegion), plRefFlags::kActiveRef); if( occ ) { - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(occ->GetKey(), plRefMsg::kOnCreate, 0, plOccluder::kRefVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(occ->GetKey(), plRefMsg::kOnCreate, 0, plOccluder::kRefVisRegion), plRefFlags::kActiveRef); } if( li ) { - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kVisRegion), plRefFlags::kActiveRef); } if( !(di || occ || li) ) { - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } return true; @@ -1464,14 +1464,14 @@ hsBool plRelevanceRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) if( !softKey ) return true; - fRegion = TRACKED_NEW plRelevanceRegion; + fRegion = new plRelevanceRegion; plKey key = hsgResMgr::ResMgr()->NewKey(GetINode()->GetName(), fRegion, node->GetLocation()); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(fRegion->GetKey(), plRefMsg::kOnCreate, 0, 0); + plGenRefMsg* refMsg = new plGenRefMsg(fRegion->GetKey(), plRefMsg::kOnCreate, 0, 0); hsgResMgr::ResMgr()->SendRef(softKey, refMsg, plRefFlags::kActiveRef); } - hsgResMgr::ResMgr()->AddViaNotify(fRegion->GetKey(), TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fRegion->GetKey(), new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); return true; } @@ -1532,16 +1532,16 @@ hsBool plEffVisSetComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return false; if( di ) - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(di->GetKey(), plRefMsg::kOnCreate, 0, plDrawInterface::kRefVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(di->GetKey(), plRefMsg::kOnCreate, 0, plDrawInterface::kRefVisRegion), plRefFlags::kActiveRef); if( occ ) { - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(occ->GetKey(), plRefMsg::kOnCreate, 0, plOccluder::kRefVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(occ->GetKey(), plRefMsg::kOnCreate, 0, plOccluder::kRefVisRegion), plRefFlags::kActiveRef); } if( li ) { - hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), TRACKED_NEW plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kVisRegion), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fVisReg->GetKey(), new plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, plLightInfo::kVisRegion), plRefFlags::kActiveRef); } return true; @@ -1560,7 +1560,7 @@ plVisRegion* plEffVisSetComponent::GetVisRegion(plMaxNode* node) { if( !fVisReg ) { - fVisReg = TRACKED_NEW plVisRegion; + fVisReg = new plVisRegion; plKey key = hsgResMgr::ResMgr()->NewKey(GetINode()->GetName(), fVisReg, node->GetLocation()); fVisReg->SetProperty(plVisRegion::kIsNot, false); diff --git a/Sources/Tools/MaxComponent/plTemplateComponent.cpp b/Sources/Tools/MaxComponent/plTemplateComponent.cpp index 88351b35..396d1fba 100644 --- a/Sources/Tools/MaxComponent/plTemplateComponent.cpp +++ b/Sources/Tools/MaxComponent/plTemplateComponent.cpp @@ -224,7 +224,7 @@ hsBool plSpawnComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) if (!templateName) return false; - plCloneSpawnModifier* mod = TRACKED_NEW plCloneSpawnModifier; + plCloneSpawnModifier* mod = new plCloneSpawnModifier; mod->SetExportTime(); mod->SetTemplateName(templateName); node->AddModifier(mod, IGetUniqueName(node)); diff --git a/Sources/Tools/MaxComponent/plTypesComponents.cpp b/Sources/Tools/MaxComponent/plTypesComponents.cpp index 5ca707ed..4d986e23 100644 --- a/Sources/Tools/MaxComponent/plTypesComponents.cpp +++ b/Sources/Tools/MaxComponent/plTypesComponents.cpp @@ -113,7 +113,7 @@ hsBool plStartingPointComponent::SetupProperties(plMaxNode* node, plErrorMsg* pE } hsBool plStartingPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plSpawnModifier* pSpawn = TRACKED_NEW plSpawnModifier; + plSpawnModifier* pSpawn = new plSpawnModifier; node->AddModifier(pSpawn, IGetUniqueName(node)); return true; } @@ -332,7 +332,7 @@ hsBool plVehicleComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) if (!IIsValid()) return false; - fMod = TRACKED_NEW plVehicleModifier; + fMod = new plVehicleModifier; plKey modKey = pNode->AddModifier(fMod, IGetUniqueName(pNode)); plMaxNode* detectorNode = (plMaxNode*)fCompPB->GetINode(kVehicleDriveDet); @@ -459,7 +459,7 @@ hsBool plMaintainersMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg } hsBool plMaintainersMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plMaintainersMarkerModifier* pSpawn = TRACKED_NEW plMaintainersMarkerModifier; + plMaintainersMarkerModifier* pSpawn = new plMaintainersMarkerModifier; pSpawn->SetCalibrated(fCompPB->GetInt(kCalibrated)); node->AddModifier(pSpawn, IGetUniqueName(node)); return true; @@ -735,7 +735,7 @@ plKey plGameMarkerComponent::IGetAnimKey(int nodeID, int compID) hsBool plGameMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { - plGameMarkerModifier* markerMod = TRACKED_NEW plGameMarkerModifier; + plGameMarkerModifier* markerMod = new plGameMarkerModifier; plKey greenKey = IGetMtlAnimKey(kMarkerGreenAnim, node); plKey redKey = IGetMtlAnimKey(kMarkerRedAnim, node); diff --git a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp index 2c866f7b..5f0d0a34 100644 --- a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp +++ b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp @@ -329,11 +329,11 @@ hsBool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // Create and register the VolumeGadget's logic component if(fCompPB->GetInt(kVolumeGadgetEnter) || fCompPB->GetInt(kVolumeTriggerOnFacing)) { - plLogicModifier *logic = TRACKED_NEW plLogicModifier; + plLogicModifier *logic = new plLogicModifier; char tmpName[256]; sprintf(tmpName, "%s_Enter", IGetUniqueName(node)); plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fLogicModKeys[node] = logicKey; if (fCompPB->GetInt(kVolumeOneShot)) @@ -344,11 +344,11 @@ hsBool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) if(fCompPB->GetInt(kVolumeGadgetExit)) { - plLogicModifier *logic = TRACKED_NEW plLogicModifier; + plLogicModifier *logic = new plLogicModifier; char tmpName[256]; sprintf(tmpName, "%s_Exit", IGetUniqueName(node)); plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(logicKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fLogicModOutKeys[node] = logicKey; if (fCompPB->GetInt(kVolumeOneShot)) @@ -385,7 +385,7 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err plDetectorModifier* detector = nil; if (enter && fCompPB->GetInt(kVolumeTriggerOnFacing)) { - plObjectInVolumeAndFacingDetector* newDetector = TRACKED_NEW plObjectInVolumeAndFacingDetector; + plObjectInVolumeAndFacingDetector* newDetector = new plObjectInVolumeAndFacingDetector; int deg = fCompPB->GetInt(kVolumeDegrees); if (deg > 180) @@ -398,7 +398,7 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err detector = newDetector; } else - detector = TRACKED_NEW plObjectInVolumeDetector; + detector = new plObjectInVolumeDetector; const char* prefix = "Exit"; if (enter) @@ -407,15 +407,15 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err // Register the detector sprintf(tmpName, "%s_%s", IGetUniqueName(node), prefix); plKey detectorKey = hsgResMgr::ResMgr()->NewKey(tmpName, detector, loc); - hsgResMgr::ResMgr()->AddViaNotify(detectorKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); plVolumeSensorConditionalObject* boxCond=nil; if((fCompPB->GetInt(kSkipServerArbitration)==0)) {//we want server arbitration - boxCond = TRACKED_NEW plVolumeSensorConditionalObject; + boxCond = new plVolumeSensorConditionalObject; } else { - boxCond = TRACKED_NEW plVolumeSensorConditionalObjectNoArbitration; + boxCond = new plVolumeSensorConditionalObjectNoArbitration; } sprintf(tmpName, "%s_%s", IGetUniqueName(node), prefix); plKey boxKey = hsgResMgr::ResMgr()->NewKey(tmpName, boxCond, loc); diff --git a/Sources/Tools/MaxComponent/plWaterComponent.cpp b/Sources/Tools/MaxComponent/plWaterComponent.cpp index 30fb6ed5..a8138602 100644 --- a/Sources/Tools/MaxComponent/plWaterComponent.cpp +++ b/Sources/Tools/MaxComponent/plWaterComponent.cpp @@ -512,7 +512,7 @@ hsBool plWaterComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) if( !fWaveSet ) return true; - plObjRefMsg* refMsg = TRACKED_NEW plObjRefMsg(node->GetKey(), plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); + plObjRefMsg* refMsg = new plObjRefMsg(node->GetKey(), plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); hsgResMgr::ResMgr()->AddViaNotify(fWaveSet->GetKey(), refMsg, plRefFlags::kActiveRef); return true; @@ -567,7 +567,7 @@ hsBool plWaterComponent::IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, pl } size = uint32_t(1 << i); - env = TRACKED_NEW plDynamicEnvMap(size, size, 32); + env = new plDynamicEnvMap(size, size, 32); hsgResMgr::ResMgr()->NewKey(ref->GetName(), env, node->GetLocation(), node->GetLoadMask()); Point3 pos = ref->GetNodeTM(TimeValue(0)).GetTrans(); @@ -584,7 +584,7 @@ hsBool plWaterComponent::IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, pl fWaveSet->SetEnvSize(env->GetWidth()); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(fWaveSet->GetKey(), plRefMsg::kOnCreate, -1, plWaveSet7::kRefEnvMap); + plGenRefMsg* refMsg = new plGenRefMsg(fWaveSet->GetKey(), plRefMsg::kOnCreate, -1, plWaveSet7::kRefEnvMap); hsgResMgr::ResMgr()->SendRef(env->GetKey(), refMsg, plRefFlags::kActiveRef); ws.fEnvRadius = fCompPB->GetFloat(kEnvRadius); @@ -614,7 +614,7 @@ hsBool plWaterComponent::IMakeWaveSet(plMaxNode* node, plErrorMsg* pErrMsg) { // Go ahead and create the WaveSet modifier. There will be just // one created by this component, everyone has to share. - fWaveSet = TRACKED_NEW plWaveSet7; + fWaveSet = new plWaveSet7; hsgResMgr::ResMgr()->NewKey( IGetUniqueName(node), fWaveSet, node->GetLocation(), node->GetLoadMask()); // Set up the parameters @@ -1285,9 +1285,9 @@ plRenderTarget* plEnvMapComponent::IGetMap() plDynamicCamMap* cam = nil; fMap = nil; if (fCompPB->GetInt((ParamID(kMapType))) == kMapCubic) - fMap = env = TRACKED_NEW plDynamicEnvMap(size, size, 32); + fMap = env = new plDynamicEnvMap(size, size, 32); else if (fCompPB->GetInt((ParamID(kMapType))) == kMapSingle) - fMap = cam = TRACKED_NEW plDynamicCamMap(size, size, 32); + fMap = cam = new plDynamicCamMap(size, size, 32); // Need to assign the key before we call all the setup functions. hsgResMgr::ResMgr()->NewKey(GetINode()->GetName(), fMap, firstTarg->GetLocation(), firstTarg->GetLoadMask()); @@ -1326,7 +1326,7 @@ plRenderTarget* plEnvMapComponent::IGetMap() plVisRegion* effReg = effComp->GetVisRegion(firstTarg); if( effReg ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(fMap->GetKey(), plRefMsg::kOnCreate, -1, plDynamicEnvMap::kRefVisSet); + plGenRefMsg* refMsg = new plGenRefMsg(fMap->GetKey(), plRefMsg::kOnCreate, -1, plDynamicEnvMap::kRefVisSet); hsgResMgr::ResMgr()->SendRef(effReg->GetKey(), refMsg, plRefFlags::kPassiveRef); visGot++; @@ -1353,7 +1353,7 @@ plRenderTarget* plEnvMapComponent::IGetMap() // Right now, the envMap doesn't use this, but I plan to make it do so, so I'm // going ahead and adding the ref regardless of which type of map we made. uint8_t refType = cam ? plDynamicCamMap::kRefRootNode : plDynamicEnvMap::kRefRootNode; - hsgResMgr::ResMgr()->AddViaNotify(firstTarg->GetSceneObject()->GetKey(), TRACKED_NEW plGenRefMsg(fMap->GetKey(), plRefMsg::kOnCreate, -1, refType), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(firstTarg->GetSceneObject()->GetKey(), new plGenRefMsg(fMap->GetKey(), plRefMsg::kOnCreate, -1, refType), plRefFlags::kPassiveRef); } return fMap; } diff --git a/Sources/Tools/MaxConvert/StringTokenizer.cpp b/Sources/Tools/MaxConvert/StringTokenizer.cpp index 5f06ec52..8f1bf977 100644 --- a/Sources/Tools/MaxConvert/StringTokenizer.cpp +++ b/Sources/Tools/MaxConvert/StringTokenizer.cpp @@ -53,10 +53,10 @@ StringTokenizer::StringTokenizer() { StringTokenizer::StringTokenizer(const char *string, const char *seps) { qAsTok = true; inQuote = false; - this->string = TRACKED_NEW char[strlen(string)+1]; + this->string = new char[strlen(string)+1]; strcpy(this->string,string); numSeps = strlen(seps); - this->seps = TRACKED_NEW char[numSeps+1]; + this->seps = new char[numSeps+1]; strcpy(this->seps,seps); this->tok = this->string; if (isSep(*tok)) next(); @@ -93,11 +93,11 @@ hsBool StringTokenizer::isSep(char c) { }; void StringTokenizer::reset(const char *string, const char *seps) { if (this->string) delete this->string; - this->string = TRACKED_NEW char[strlen(string)+1]; + this->string = new char[strlen(string)+1]; strcpy(this->string,string); if (this->seps) delete this->seps; numSeps = strlen(seps); - this->seps = TRACKED_NEW char[numSeps+1]; + this->seps = new char[numSeps+1]; strcpy(this->seps,seps); this->tok = this->string; if (isSep(*tok)) next(); diff --git a/Sources/Tools/MaxConvert/UserPropMgr.cpp b/Sources/Tools/MaxConvert/UserPropMgr.cpp index d0f06ca9..12229a13 100644 --- a/Sources/Tools/MaxConvert/UserPropMgr.cpp +++ b/Sources/Tools/MaxConvert/UserPropMgr.cpp @@ -754,7 +754,7 @@ void UserPropMgr::OpenQuickTable() { if (!fQuickTable) { - fQuickTable = TRACKED_NEW hsHashTable(kQuickSize); + fQuickTable = new hsHashTable(kQuickSize); } fQuickNode = nil; } diff --git a/Sources/Tools/MaxConvert/hsControlConverter.cpp b/Sources/Tools/MaxConvert/hsControlConverter.cpp index 7585b5ee..d9043c28 100644 --- a/Sources/Tools/MaxConvert/hsControlConverter.cpp +++ b/Sources/Tools/MaxConvert/hsControlConverter.cpp @@ -133,8 +133,8 @@ void hsControlConverter::ReduceKeys(Control *control, float threshold) IKeyControl *keyCont = GetKeyControlInterface(control); if (keyCont->GetNumKeys() > 2) { - IKey *key1 = (IKey*)TRACKED_NEW uint8_t[keyCont->GetKeySize()]; - IKey *key2 = (IKey*)TRACKED_NEW uint8_t[keyCont->GetKeySize()]; + IKey *key1 = (IKey*)new uint8_t[keyCont->GetKeySize()]; + IKey *key2 = (IKey*)new uint8_t[keyCont->GetKeySize()]; keyCont->GetKey(0, key1); keyCont->GetKey(keyCont->GetNumKeys() - 1, key2); @@ -258,7 +258,7 @@ plLeafController* hsControlConverter::MakeMatrix44Controller(StdUVGen* uvGen, co return nil; } - plLeafController* ctrl = TRACKED_NEW plLeafController; + plLeafController* ctrl = new plLeafController; ctrl->AllocKeys(kTimes.Count(), hsKeyFrame::kMatrix44KeyFrame); TimeValue resetTime = fConverterUtils.GetTime(fInterface); for( i=0; i < kTimes.Count(); i++) @@ -309,7 +309,7 @@ plLeafController* hsControlConverter::MakeMatrix44Controller(Control* prsControl return nil; } - plLeafController* ctrl = TRACKED_NEW plLeafController; + plLeafController* ctrl = new plLeafController; ctrl->AllocKeys(kTimes.Count(), hsKeyFrame::kMatrix44KeyFrame); TimeValue resetTime = fConverterUtils.GetTime(fInterface);; for( i=0; i < kTimes.Count(); i++) @@ -378,7 +378,7 @@ plController* hsControlConverter::MakePosController(Control* control, plMaxNode* } else { - hsCont = TRACKED_NEW plCompoundController; + hsCont = new plCompoundController; fErrorMsg->Set(control->NumSubs()!=3, node->GetName(), "compound should have 3 subs").Check(); if (control->ClassID() == Class_ID(POSITIONNOISE_CONTROL_CLASS_ID,0) ) @@ -462,7 +462,7 @@ plController *hsControlConverter::MakeRotController(Control *control, plMaxNode if (fErrorMsg->Set(control->NumSubs() != 3, node->GetName(), "Rot compound controller should have 3 subcontrollers").CheckAndAsk()) return nil; - plCompoundController* rc = TRACKED_NEW plCompoundController; + plCompoundController* rc = new plCompoundController; int i; for (i=0; i<3; i++) { @@ -616,7 +616,7 @@ plCompoundController *hsControlConverter::MakeTransformController(Control *contr return NULL; } - plCompoundController *tmc = TRACKED_NEW plCompoundController; + plCompoundController *tmc = new plCompoundController; for (int i=0; iSubAnim(i); @@ -759,7 +759,7 @@ plLeafController* hsControlConverter::ICreateQuatController(plMaxNode* node, Con } IKey* key=(IKey*)(new uint8_t[ikeys->GetKeySize()]); - plLeafController* pc = TRACKED_NEW plLeafController; + plLeafController* pc = new plLeafController; uint8_t compressLevel = node->GetAnimCompress(); uint8_t keyType; @@ -839,7 +839,7 @@ plLeafController* hsControlConverter::ICreateScaleValueController(plMaxNode* nod } IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]); - plLeafController* pc = TRACKED_NEW plLeafController; + plLeafController* pc = new plLeafController; pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control)); for(int i = startIdx; i <= endIdx; i++) { @@ -880,7 +880,7 @@ plLeafController* hsControlConverter::ICreateScalarController(plMaxNode* node, C } IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]); - plLeafController* pc = TRACKED_NEW plLeafController; + plLeafController* pc = new plLeafController; pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control)); for(int i = startIdx; i <= endIdx; i++) { @@ -922,7 +922,7 @@ plLeafController* hsControlConverter::ICreateSimplePosController(plMaxNode* node } IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]); - plLeafController* pc = TRACKED_NEW plLeafController; + plLeafController* pc = new plLeafController; pc->AllocKeys(endIdx - startIdx + 1, GetKeyType(control)); for(int i = startIdx; i <= endIdx; i++) { @@ -2088,7 +2088,7 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray SetCmd(plCameraMsg::kSetAnimated); pCamMsg->AddReceiver(pCamMod->GetKey()); plConvert::Instance().AddMessageToQueue(pCamMsg); @@ -2129,7 +2129,7 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray Count(); i++) { - plCameraMsg* pFOVMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pFOVMsg = new plCameraMsg; plCameraConfig* pCfg = pFOVMsg->GetConfig(); if (i == kfArray->Count() - 1) @@ -2149,12 +2149,12 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray SetCmd(plCameraMsg::kAddFOVKeyframe); pFOVMsg->AddReceiver(pCamMod->GetKey()); - plEventCallbackMsg* pCall = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall = new plEventCallbackMsg; pCall->fEvent = kTime; pCall->fEventTime = kfArray[0][i].fFrame / MAX_FRAMES_PER_SEC; pCall->fIndex = i; pCall->AddReceiver(pCamMod->GetKey()); - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->AddReceiver(pCamMod->GetKey()); pMsg->SetSender(pAnim->GetModKey(node)); pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); @@ -2165,4 +2165,4 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray (); + fNodeSearchCache = new hsHashTable(); } fNodeSearchCache->clear(); diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index 97aff220..efa3f132 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -303,9 +303,9 @@ void AttachLinkMtlAnims(plMaxNode *node, hsGMaterial *mat) char suff[10]; sprintf(suff, "%d", k); - opaCtl = TRACKED_NEW plLeafController; + opaCtl = new plLeafController; opaCtl->QuickScalarController(numKeys, times, values, sizeof(float)); - animLayer = TRACKED_NEW plLayerLinkAnimation; + animLayer = new plLayerLinkAnimation; animLayer->SetLinkKey(node->GetAvatarSO()->GetKey()); //animLayer->fLeavingAge = leaving[x]; TSTR fullAnimName = TSTR(oldLayer->GetKeyName()) + TSTR("_") + TSTR(animName) + TSTR("_") + TSTR(suff); @@ -317,7 +317,7 @@ void AttachLinkMtlAnims(plMaxNode *node, hsGMaterial *mat) animLayer->AttachViaNotify(currLayer); currLayer = animLayer; - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, k, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, k, plMatRefMsg::kLayer); msg->SetOldRef(oldLayer); msg->SetRef(currLayer); hsgResMgr::ResMgr()->AddViaNotify(msg, plRefFlags::kActiveRef); @@ -749,7 +749,7 @@ void hsMaterialConverter::GetNodesByMaterial(Mtl *mtl, hsTArray &out hsTArray * hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint32_t multiIndex) { - hsTArray *ourMaterials = TRACKED_NEW hsTArray; + hsTArray *ourMaterials = new hsTArray; const char* dbgNodeName = node->GetName(); @@ -910,7 +910,7 @@ hsGMaterial* hsMaterialConverter::NonAlphaHackPrint(plMaxNode* node, Texmap* bas // Search done materials for it - hsGMaterial* mat = TRACKED_NEW hsGMaterial; + hsGMaterial* mat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(name, mat, node->GetLocation()); // If plasmaLayer is nil, the artist has some other wierd (unsupported) layer type in the slot. @@ -953,7 +953,7 @@ hsGMaterial* hsMaterialConverter::AlphaHackPrint(plMaxNode* node, Texmap* baseTe // Search done materials for it - hsGMaterial* mat = TRACKED_NEW hsGMaterial; + hsGMaterial* mat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(name, mat, node->GetLocation()); // If plasmaLayer is nil, the artist has some other wierd (unsupported) layer type in the slot. @@ -1153,7 +1153,7 @@ hsGMaterial *hsMaterialConverter::IProcessMaterial(Mtl *mtl, plMaxNode *node, co } else if (IsHsMaxMat(mtl) || IsDecalMat(mtl) || IsBumpMtl( mtl ) ) { - hMat = TRACKED_NEW hsGMaterial; + hMat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(name, hMat,nodeLoc); IProcessPlasmaMaterial(mtl, node, hMat, hMat->GetKey()->GetName()); } @@ -1185,7 +1185,7 @@ hsGMaterial *hsMaterialConverter::IProcessMaterial(Mtl *mtl, plMaxNode *node, co if (fErrorMsg->Set((fWarned & kWarnedNoLayers) == 0, node->GetName(), "Material has no layers. (%s)", mtl->GetName()).CheckAndAsk()) fWarned |= kWarnedNoLayers; - plLayer* hLay = TRACKED_NEW plLayer; + plLayer* hLay = new plLayer; hLay->InitToDefault(); hsgResMgr::ResMgr()->NewKey(TSTR(name) + TSTR("_DefLay"), hLay, nodeLoc); IAddLayerToMaterial(hMat, hLay); @@ -1336,10 +1336,10 @@ hsGMaterial *hsMaterialConverter::IAddDefaultMaterial(plMaxNode *node) plLocation loc = node->GetLocation(); - hsGMaterial *hMat = TRACKED_NEW hsGMaterial; + hsGMaterial *hMat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(TSTR(node->GetName()) + TSTR("_DefMat"), hMat, loc); - plLayer *layer = TRACKED_NEW plLayer; + plLayer *layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(TSTR(hMat->GetKeyName()) + TSTR("_DefLay"), layer, loc); @@ -1413,10 +1413,10 @@ void hsMaterialConverter::IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial mat->SetCompositeFlags(mat->GetCompositeFlags() | hsGMaterial::kCompNeedsBlendChannel); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(TSTR(underLay->GetKeyName()) + TSTR("_AlphaBlend"), layer, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(texture->GetKey(), TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(texture->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); // layer->SetZFlags(hsGMatState::kZNoZWrite | hsGMatState::kZIncLayer); // The inclayer prop probably wouldn't hurt here, because this layer should only get drawn as @@ -1429,7 +1429,7 @@ void hsMaterialConverter::IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial layer->SetMiscFlags(0); // Insert it in the right spot. - hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, layerIdx, plMatRefMsg::kLayer | plMatRefMsg::kInsert), plRefFlags::kActiveRef); } @@ -1574,11 +1574,11 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node { if (!mtl || mtl->ClassID() != COMP_MTL_CLASS_ID) return nil; - uint32_t *layerCounts = TRACKED_NEW uint32_t[mtl->NumSubMtls()]; + uint32_t *layerCounts = new uint32_t[mtl->NumSubMtls()]; IParamBlock2 *pb = mtl->GetParamBlockByID(plCompositeMtl::kBlkPasses); char suff[10]; sprintf(suff, "_%d", subMtlFlags); - hsGMaterial *mat = TRACKED_NEW hsGMaterial; + hsGMaterial *mat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(TSTR(name) + TSTR(suff), mat, node->GetLocation()); int multiIndex = IFindSubIndex(node, mtl); @@ -1678,8 +1678,8 @@ hsGMaterial *hsMaterialConverter::IProcessMultipassMtl(Mtl *mtl, plMaxNode *node if (!mtl || mtl->ClassID() != MULTIMTL_CLASS_ID) return nil; - hsGMaterial *mat = TRACKED_NEW hsGMaterial; - uint32_t *layerCounts = TRACKED_NEW uint32_t[mtl->NumSubMtls()]; + hsGMaterial *mat = new hsGMaterial; + uint32_t *layerCounts = new uint32_t[mtl->NumSubMtls()]; hsgResMgr::ResMgr()->NewKey(name, mat, node->GetLocation()); IParamBlock2 *pb = mtl->GetParamBlockByID(plMultipassMtl::kBlkPasses); @@ -1712,7 +1712,7 @@ hsGMaterial *hsMaterialConverter::IProcessParticleMtl(Mtl *mtl, plMaxNode *node, plLocation nodeLoc = node->GetLocation(); char* dbgNodeName = node->GetName(); - hsGMaterial *mat = TRACKED_NEW hsGMaterial; + hsGMaterial *mat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(name, mat,nodeLoc); @@ -1826,7 +1826,7 @@ plLayerAnimation *IConvertNoteTrackAnims(plLayerAnimation *animLayer, SegmentMap SegmentSpec *spec = it->second; if (spec->fType == SegmentSpec::kAnim) { - plLayerAnimation *noteAnim = TRACKED_NEW plLayerAnimation; + plLayerAnimation *noteAnim = new plLayerAnimation; TSTR animName = TSTR(name) + TSTR("_anim_") + TSTR(spec->fName); hsgResMgr::ResMgr()->NewKey(animName, noteAnim, node->GetLocation()); @@ -2002,12 +2002,12 @@ static plLayerInterface* IProcessLayerMovie(plPassMtlBase* mtl, plLayerTex* layT if (isBink) { - movieLayer = TRACKED_NEW plLayerBink; + movieLayer = new plLayerBink; moviePostfix = "_bink"; } else if (isAvi) { - movieLayer = TRACKED_NEW plLayerAVI; + movieLayer = new plLayerAVI; moviePostfix = "_avi"; } @@ -2054,7 +2054,7 @@ plLayerInterface* IProcessLayerAnimation(plPassMtlBase* mtl, plLayerTex* layTex, if( mtl->GetUseGlobal() ) { - plLayerSDLAnimation *SDLLayer = TRACKED_NEW plLayerSDLAnimation; + plLayerSDLAnimation *SDLLayer = new plLayerSDLAnimation; TSTR animName = TSTR(name) + TSTR("_anim_") + TSTR(mtl->GetGlobalVarName()); hsgResMgr::ResMgr()->NewKey(animName, SDLLayer, node->GetLocation()); @@ -2075,7 +2075,7 @@ plLayerInterface* IProcessLayerAnimation(plPassMtlBase* mtl, plLayerTex* layTex, { plAnimStealthNode *stealth = mtl->GetStealth( i ); - plLayerAnimation *noteAnim = TRACKED_NEW plLayerAnimation; + plLayerAnimation *noteAnim = new plLayerAnimation; node->CheckSynchOptions(noteAnim); const char *segName = stealth->GetSegmentName(); @@ -2154,7 +2154,7 @@ plLayerInterface* IProcessAnimation(plPassMtlBase *mtl, plMaxNode *node, const c //if (!hsMaterialConverter::Instance().CheckValidityOfSDLVarAnim(mtl, mtl->GetGlobalVarName(), node)) // return layerIFace; - plLayerSDLAnimation *SDLLayer = TRACKED_NEW plLayerSDLAnimation; + plLayerSDLAnimation *SDLLayer = new plLayerSDLAnimation; TSTR animName = TSTR(name) + TSTR("_anim_") + TSTR(mtl->GetGlobalVarName()); hsgResMgr::ResMgr()->NewKey(animName, SDLLayer, node->GetLocation()); @@ -2190,7 +2190,7 @@ plLayerInterface* IProcessAnimation(plPassMtlBase *mtl, plMaxNode *node, const c { plAnimStealthNode *stealth = mtl->GetStealth( i ); - plLayerAnimation *noteAnim = TRACKED_NEW plLayerAnimation; + plLayerAnimation *noteAnim = new plLayerAnimation; node->CheckSynchOptions(noteAnim); const char *segName = stealth->GetSegmentName(); @@ -2627,7 +2627,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs void hsMaterialConverter::IAddLayerToMaterial(hsGMaterial *mat, plLayerInterface *layer) { - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer); hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), msg, plRefFlags::kActiveRef); } @@ -2792,9 +2792,9 @@ hsGMaterial *hsMaterialConverter::IWrapTextureInMaterial(Texmap *texMap, plMaxNo return hMat; } - hMat = TRACKED_NEW hsGMaterial; + hMat = new hsGMaterial; - plLayer* hLay = TRACKED_NEW plLayer; + plLayer* hLay = new plLayer; hLay->InitToDefault(); hsgResMgr::ResMgr()->NewKey(txtFileName, hLay,nodeLoc); @@ -3093,10 +3093,10 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG char name[512]; sprintf(name, "%s_funkRamp", prevLay->GetKey()->GetName()); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(name, layer, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); layer->SetPreshadeColor(hsColorRGBA().Set(0, 0, 0, 1.f)); @@ -3127,7 +3127,7 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG break; } - hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer), plRefFlags::kActiveRef); } @@ -3239,13 +3239,13 @@ void hsMaterialConverter::IAppendWetLayer(plMaxNode* node, hsGMaterial* mat) layer = plLayer::ConvertNoRef(key->GetObjectPtr()); if( !layer ) { - layer = TRACKED_NEW plLayer; + layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(name, layer, node->GetLocation()); plBitmap* funkRamp = IGetFunkyRamp(node, kFunkyUp); - hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); } layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); @@ -3262,7 +3262,7 @@ void hsMaterialConverter::IAppendWetLayer(plMaxNode* node, hsGMaterial* mat) layer->SetUVWSrc(plLayerInterface::kUVWNormal); layer->SetMiscFlags(layer->GetMiscFlags() | hsGMatState::kMiscOrthoProjection); - hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layer->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer), plRefFlags::kActiveRef); } @@ -3718,10 +3718,10 @@ plLayer* hsMaterialConverter::IMakeBumpLayer(plMaxNode* node, const char* nameBa plMipmap* bumpLutTexture = IGetBumpLutTexture(node); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(name, layer, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(bumpLutTexture->GetKey(), TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(bumpLutTexture->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); layer->SetPreshadeColor(hsColorRGBA().Set(0, 0, 0, 1.f)); @@ -3797,11 +3797,11 @@ void hsMaterialConverter::IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat, i layerDu->SetBlendFlags((layerDu->GetBlendFlags() & ~hsGMatState::kBlendMask) | hsGMatState::kBlendAdd); // Insert it in the right spot. - hsgResMgr::ResMgr()->AddViaNotify(layerDv->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layerDv->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, bumpLayerIdx, plMatRefMsg::kLayer | plMatRefMsg::kInsert), plRefFlags::kActiveRef); - hsgResMgr::ResMgr()->AddViaNotify(layerDw->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layerDw->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, bumpLayerIdx, plMatRefMsg::kLayer | plMatRefMsg::kInsert), plRefFlags::kActiveRef); - hsgResMgr::ResMgr()->AddViaNotify(layerDu->GetKey(), TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, + hsgResMgr::ResMgr()->AddViaNotify(layerDu->GetKey(), new plMatRefMsg(mat->GetKey(), plRefMsg::kOnCreate, bumpLayerIdx, plMatRefMsg::kLayer | plMatRefMsg::kInsert), plRefFlags::kActiveRef); } @@ -4533,7 +4533,7 @@ void hsMaterialConverter::CollectConvertedMaterials(Mtl *mtl, hsTArraySetName(mtl->GetName()); cloth->fSortOrder = (mtl->GetDefault() ? 0 : 1); @@ -4553,7 +4553,7 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co sprintf(clothKeyName, "CItm_%s", cloth->fName); hsgResMgr::ResMgr()->NewKey(clothKeyName, cloth, loc); - plNodeRefMsg* nodeRefMsg = TRACKED_NEW plNodeRefMsg(plKeyFinder::Instance().FindSceneNodeKey(loc), + plNodeRefMsg* nodeRefMsg = new plNodeRefMsg(plKeyFinder::Instance().FindSceneNodeKey(loc), plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kGeneric); hsgResMgr::ResMgr()->AddViaNotify(cloth->GetKey(), nodeRefMsg, plRefFlags::kActiveRef); @@ -4589,7 +4589,7 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co } continue; } - plElementRefMsg *eMsg = TRACKED_NEW plElementRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, i, -1, elementName, j); + plElementRefMsg *eMsg = new plElementRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, i, -1, elementName, j); hsgResMgr::ResMgr()->AddViaNotify(tex->GetKey(), eMsg, plRefFlags::kActiveRef); } } @@ -4606,7 +4606,7 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co } if (thumbnail != nil) { - plGenRefMsg *msg= TRACKED_NEW plGenRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg= new plGenRefMsg(cloth->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(thumbnail->GetKey(), msg, plRefFlags::kActiveRef); } cloth->fDescription = hsStrcpy(mtl->GetDescription()); diff --git a/Sources/Tools/MaxConvert/hsVertexShader.cpp b/Sources/Tools/MaxConvert/hsVertexShader.cpp index 7916aa90..df3dc9a7 100644 --- a/Sources/Tools/MaxConvert/hsVertexShader.cpp +++ b/Sources/Tools/MaxConvert/hsVertexShader.cpp @@ -184,8 +184,8 @@ void hsVertexShader::IShadeSpan( plGeometrySpan *span, INode* node ) if( span->fNumVerts == 0 ) return; - fShadeColorTable = TRACKED_NEW hsColorRGBA[ span->fNumVerts ]; - fIllumColorTable = TRACKED_NEW hsColorRGBA[ span->fNumVerts ]; + fShadeColorTable = new hsColorRGBA[ span->fNumVerts ]; + fIllumColorTable = new hsColorRGBA[ span->fNumVerts ]; translucent = IsTranslucent( span->fMaterial ); @@ -372,7 +372,7 @@ void hsVertexShader::IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVec /// Allocate temp vertex array - vertices = TRACKED_NEW plTmpVertex3[ span->fNumVerts ]; + vertices = new plTmpVertex3[ span->fNumVerts ]; for( index = 0; index < span->fNumVerts; index++ ) { span->ExtractVertex( index, &position, &normal, &color, &illum ); diff --git a/Sources/Tools/MaxConvert/plBitmapCreator.cpp b/Sources/Tools/MaxConvert/plBitmapCreator.cpp index dd30f81a..4d3afa16 100644 --- a/Sources/Tools/MaxConvert/plBitmapCreator.cpp +++ b/Sources/Tools/MaxConvert/plBitmapCreator.cpp @@ -168,7 +168,7 @@ plMipmap *plBitmapCreator::ICreateBitmap(plBitmapData *bd) // // Create a plMipmap // - plMipmap *hBitmap = TRACKED_NEW plMipmap; + plMipmap *hBitmap = new plMipmap; if( (bm->Width() ^ (bm->Width() & -bm->Width())) ||(bm->Height() ^ (bm->Height() & -bm->Height())) ) { @@ -191,12 +191,12 @@ plMipmap *plBitmapCreator::ICreateBitmap(plBitmapData *bd) plMipmap *hMipmap = nil; if (sigma > 0.f) { - hMipmap = TRACKED_NEW plMipmap(hBitmap, sigma, bd->createFlags, bd->detailDropoffStart, + hMipmap = new plMipmap(hBitmap, sigma, bd->createFlags, bd->detailDropoffStart, bd->detailDropoffStop, bd->detailMax, bd->detailMin); } else { - hMipmap = TRACKED_NEW plMipmap(hBitmap, -1.f, bd->createFlags, bd->detailDropoffStart, + hMipmap = new plMipmap(hBitmap, -1.f, bd->createFlags, bd->detailDropoffStart, bd->detailDropoffStop, bd->detailMax, bd->detailMin); } delete hBitmap; @@ -587,7 +587,7 @@ plBitmap *plBitmapCreator::ICreateTexture( plBitmapData *bd, const plLocation &l // If it hasn't been used before, make a new texture if( bd->isStaticCubicEnvMap ) { - plCubicEnvironmap *cubic = TRACKED_NEW plCubicEnvironmap; + plCubicEnvironmap *cubic = new plCubicEnvironmap; plMipmap *face; @@ -685,7 +685,7 @@ plMipmap *plBitmapCreator::CreateBlankMipmap( uint32_t width, uint32_t height return plMipmap::ConvertNoRef( key->GetObjectPtr() ); // Create - plMipmap *mip = TRACKED_NEW plMipmap( width, height, config, numLevels ); + plMipmap *mip = new plMipmap( width, height, config, numLevels ); // Assign key hsgResMgr::ResMgr()->NewKey( keyName, mip, textureLoc ); diff --git a/Sources/Tools/MaxConvert/plClusterUtil.cpp b/Sources/Tools/MaxConvert/plClusterUtil.cpp index 8124bc52..79fdd347 100644 --- a/Sources/Tools/MaxConvert/plClusterUtil.cpp +++ b/Sources/Tools/MaxConvert/plClusterUtil.cpp @@ -104,7 +104,7 @@ plClusterUtil::~plClusterUtil() plClusterGroup* plClusterUtil::CreateGroup(plMaxNode* templNode, const char* name) { - plClusterGroup* retVal = TRACKED_NEW plClusterGroup; + plClusterGroup* retVal = new plClusterGroup; char buff[256]; sprintf(buff, "%s_%s_%d", name, templNode->GetName(), fIdx++); @@ -113,7 +113,7 @@ plClusterGroup* plClusterUtil::CreateGroup(plMaxNode* templNode, const char* nam plKey sceneNode = templNode->GetRoomKey(); retVal->SetSceneNode(sceneNode); - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(sceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); + plNodeRefMsg* refMsg = new plNodeRefMsg(sceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); hsgResMgr::ResMgr()->AddViaNotify(retVal->GetKey(), refMsg, plRefFlags::kActiveRef); return retVal; @@ -331,7 +331,7 @@ plSpanTemplateB* plClusterUtil::IAddTemplate(plMaxNode* templNode, plGeometrySpa // STUB // Create our blank template - plSpanTemplateB* templ = TRACKED_NEW plSpanTemplateB(templNode); + plSpanTemplateB* templ = new plSpanTemplateB(templNode); templ->fRenderLevel = templNode->GetRenderLevel(!templNode->GetNoDeferDraw()); @@ -508,7 +508,7 @@ void plClusterUtil::IFindClustersRecur(plSpanTemplateB* templ, plL2WTab& src, pl } else { - plL2WTab* tab = TRACKED_NEW plL2WTab(src); + plL2WTab* tab = new plL2WTab(src); dst.Append(1, &tab); } } @@ -692,7 +692,7 @@ void plClusterUtil::IAddInstsToCluster(plCluster* cluster, plSpanTemplateB* temp int i; for( i = 0; i < insts.Count(); i++ ) { - plSpanInstance* span = TRACKED_NEW plSpanInstance; + plSpanInstance* span = new plSpanInstance; span->Alloc(cluster->GetEncoding(), templ->NumVerts()); span->SetLocalToWorld(plMaxNodeBase::Matrix3ToMatrix44(insts[i])); @@ -754,7 +754,7 @@ void plClusterUtil::IDelPosAndColor(plSpanTemplateB* templ, { def->Begin(templ->GetSrcNode(), wBnd); - delPos[i] = TRACKED_NEW plPoint3Tab; + delPos[i] = new plPoint3Tab; delPos[i]->SetCount(templ->NumVerts()); int j; for( j = 0; j < templ->NumVerts(); j++ ) @@ -776,7 +776,7 @@ void plClusterUtil::IDelPosAndColor(plSpanTemplateB* templ, { shade->Begin(templ->GetSrcNode(), wBnd); - colors[i] = TRACKED_NEW plColorTab; + colors[i] = new plColorTab; colors[i]->SetCount(templ->NumVerts()); int j; for( j = 0; j < templ->NumVerts(); j++ ) diff --git a/Sources/Tools/MaxConvert/plConvert.cpp b/Sources/Tools/MaxConvert/plConvert.cpp index 181a8409..8a41bf9e 100644 --- a/Sources/Tools/MaxConvert/plConvert.cpp +++ b/Sources/Tools/MaxConvert/plConvert.cpp @@ -395,7 +395,7 @@ void plConvert::DeInit() // to work without loading in the entire age worth of reffing objects. - 5.30.2002 mcn // plBitmapCreator::Instance().DeInit(); - plNodeCleanupMsg *clean = TRACKED_NEW plNodeCleanupMsg(); + plNodeCleanupMsg *clean = new plNodeCleanupMsg(); plgDispatch::MsgSend( clean ); } diff --git a/Sources/Tools/MaxConvert/plDistributor.cpp b/Sources/Tools/MaxConvert/plDistributor.cpp index df2ee481..47e17aff 100644 --- a/Sources/Tools/MaxConvert/plDistributor.cpp +++ b/Sources/Tools/MaxConvert/plDistributor.cpp @@ -969,7 +969,7 @@ BOOL plDistributor::IReadyRepNodes(plMeshCacheTab& cache) const int iCache = cache.Count(); cache.SetCount(iCache + 1); - cache[iCache].fMesh = TRACKED_NEW Mesh(*mesh); + cache[iCache].fMesh = new Mesh(*mesh); cache[iCache].fFlex = repNode->GetFlexibility(); if( obj ) @@ -1091,7 +1091,7 @@ BOOL plDistributor::IConformAll(Matrix3& l2w, int iRepNode, plMeshCacheTab& cach iCache = cache.Count(); cache.SetCount(iCache + 1); cache[iCache] = cache[iRepNode]; - cache[iCache].fMesh = TRACKED_NEW Mesh(*mesh); + cache[iCache].fMesh = new Mesh(*mesh); mesh = cache[iCache].fMesh; @@ -1150,7 +1150,7 @@ BOOL plDistributor::IConformHeight(Matrix3& l2w, int iRepNode, plMeshCacheTab& c iCache = cache.Count(); cache.SetCount(iCache + 1); cache[iCache] = cache[iRepNode]; - cache[iCache].fMesh = TRACKED_NEW Mesh(*mesh); + cache[iCache].fMesh = new Mesh(*mesh); mesh = cache[iCache].fMesh; @@ -1219,7 +1219,7 @@ BOOL plDistributor::IConformBase(Matrix3& l2w, int iRepNode, plMeshCacheTab& cac iCache = cache.Count(); cache.SetCount(iCache + 1); cache[iCache] = cache[iRepNode]; - cache[iCache].fMesh = TRACKED_NEW Mesh(*mesh); + cache[iCache].fMesh = new Mesh(*mesh); mesh = cache[iCache].fMesh; diff --git a/Sources/Tools/MaxConvert/plLayerConverter.cpp b/Sources/Tools/MaxConvert/plLayerConverter.cpp index 9d770b98..90dffb79 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.cpp +++ b/Sources/Tools/MaxConvert/plLayerConverter.cpp @@ -574,7 +574,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer plBitmap *texture = (plBitmap *)IMakeCubicRenderTarget( texName, maxNode, anchor ); if( texture ) - hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), TRACKED_NEW plLayRefMsg( plasmaLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), new plLayRefMsg( plasmaLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); // Tag this layer as reflective cubic environmentmapping if( bitmapPB->GetInt(plDynamicEnvLayer::kBmpRefract) ) @@ -617,12 +617,12 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay { plasmaLayer->SetUVWSrc(plLayerInterface::kUVWPosition); plasmaLayer->SetMiscFlags(hsGMatState::kMiscCam2Screen | hsGMatState::kMiscPerspProjection); - hsgResMgr::ResMgr()->AddViaNotify(rootNode->GetSceneObject()->GetKey(), TRACKED_NEW plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefRootNode), plRefFlags::kActiveRef); - hsgResMgr::ResMgr()->AddViaNotify(plasmaLayer->GetKey(), TRACKED_NEW plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefMatLayer), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(rootNode->GetSceneObject()->GetKey(), new plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefRootNode), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(plasmaLayer->GetKey(), new plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefMatLayer), plRefFlags::kActiveRef); if (!pb->GetInt(ParamID(plMAXCameraLayer::kForce))) { plBitmap *disableTexture = hsMaterialConverter::Instance().GetStaticColorTexture(pb->GetColor(ParamID(plMAXCameraLayer::kDisableColor)), loc); - hsgResMgr::ResMgr()->AddViaNotify(disableTexture->GetKey(), TRACKED_NEW plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefDisableTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(disableTexture->GetKey(), new plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefDisableTexture), plRefFlags::kActiveRef); } } else @@ -632,7 +632,7 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay { const plCameraModifier1 *mod = plCameraModifier1::ConvertNoRef(camNode->GetSceneObject()->GetModifierByType(plCameraModifier1::Index())); if (mod) - hsgResMgr::ResMgr()->AddViaNotify(mod->GetKey(), TRACKED_NEW plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefCamera), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mod->GetKey(), new plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefCamera), plRefFlags::kActiveRef); } plasmaLayer->SetUVWSrc(pb->GetInt(ParamID(plMAXCameraLayer::kUVSource))); @@ -643,9 +643,9 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay int i; for (i = 0; i < nodeList.GetCount(); i++) { - hsgResMgr::ResMgr()->AddViaNotify(nodeList[i]->GetSceneObject()->GetKey(), TRACKED_NEW plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefTargetNode), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(nodeList[i]->GetSceneObject()->GetKey(), new plGenRefMsg(map->GetKey(), plRefMsg::kOnCreate, -1, plDynamicCamMap::kRefTargetNode), plRefFlags::kActiveRef); } - hsgResMgr::ResMgr()->AddViaNotify(map->GetKey(), TRACKED_NEW plLayRefMsg(plasmaLayer->GetKey(), plRefMsg::kOnCreate, -1, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(map->GetKey(), new plLayRefMsg(plasmaLayer->GetKey(), plRefMsg::kOnCreate, -1, plLayRefMsg::kTexture), plRefFlags::kActiveRef); } @@ -700,7 +700,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicTextLayer( plPlasmaMAXLaye } // Add the texture in - hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), TRACKED_NEW plLayRefMsg( plasmaLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), new plLayRefMsg( plasmaLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); // All done! return (plLayerInterface *)plasmaLayer; @@ -728,7 +728,7 @@ uint32_t *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) c width = bitmapPB->GetInt( (ParamID)plDynamicTextLayer::kBmpExportWidth ); height = bitmapPB->GetInt( (ParamID)plDynamicTextLayer::kBmpExportHeight ); - buffer = TRACKED_NEW uint32_t[ width * height ]; + buffer = new uint32_t[ width * height ]; if( buffer == nil ) return nil; @@ -873,10 +873,10 @@ plLayer* plLayerConverter::ICreateAttenuationLayer(const char* name, plMaxNode * } plBitmap* funkRamp = IGetAttenRamp(node, chanAdd, loClamp, hiClamp); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey(name, layer, node->GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(funkRamp->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); layer->SetPreshadeColor(hsColorRGBA().Set(0, 0, 0, 1.f)); @@ -929,7 +929,7 @@ plLayer *plLayerConverter::ICreateLayer( const char *name, hsBool upperLayer { hsGuardBegin( "plPlasmaMAXLayer::ICreateLayer" ); - plLayer *layer = TRACKED_NEW plLayer; + plLayer *layer = new plLayer; layer->InitToDefault(); hsgResMgr::ResMgr()->NewKey( name, layer, loc ); @@ -1013,7 +1013,7 @@ plDynamicTextMap *plLayerConverter::ICreateDynTextMap( const char *layerName, } // Create - map = TRACKED_NEW plDynamicTextMap(); + map = new plDynamicTextMap(); map->SetNoCreate( width, height, includeAlphaChannel ); /// Add a key for it @@ -1077,7 +1077,7 @@ plLayer *plLayerConverter::IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, } } else - hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), TRACKED_NEW plLayRefMsg( destLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( texture->GetKey(), new plLayRefMsg( destLayer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); return destLayer; } @@ -1115,19 +1115,19 @@ plCubicRenderTarget *plLayerConverter::IMakeCubicRenderTarget( const char *name, return nil; /// Create - cubic = TRACKED_NEW plCubicRenderTarget( plRenderTarget::kIsTexture, 256, 256, 32 ); + cubic = new plCubicRenderTarget( plRenderTarget::kIsTexture, 256, 256, 32 ); hsAssert( cubic != nil, "Cannot create cubic render target!" ); /// Add a key key = hsgResMgr::ResMgr()->NewKey( name, cubic, node->GetLocation() ); /// Now make a modifier - plCubicRenderTargetModifier *mod = TRACKED_NEW plCubicRenderTargetModifier(); + plCubicRenderTargetModifier *mod = new plCubicRenderTargetModifier(); sprintf( modName, "%s_mod", name ); hsgResMgr::ResMgr()->NewKey( modName, mod, node->GetLocation() ); - hsgResMgr::ResMgr()->AddViaNotify( cubic->GetKey(), TRACKED_NEW plGenRefMsg( mod->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kPassiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( mod->GetKey(), TRACKED_NEW plObjRefMsg( sObjKey, plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( cubic->GetKey(), new plGenRefMsg( mod->GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( mod->GetKey(), new plObjRefMsg( sObjKey, plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); return cubic; } diff --git a/Sources/Tools/MaxConvert/plLightMapGen.cpp b/Sources/Tools/MaxConvert/plLightMapGen.cpp index 06788952..1760a9db 100644 --- a/Sources/Tools/MaxConvert/plLightMapGen.cpp +++ b/Sources/Tools/MaxConvert/plLightMapGen.cpp @@ -171,7 +171,7 @@ hsBool plLightMapGen::Open(Interface* ip, TimeValue t, bool forceRegen) fInterface = ip; fTime = t; - fRP = TRACKED_NEW RendParams; + fRP = new RendParams; fRP->SetRenderElementMgr(fInterface->GetRenderElementMgr(RS_Production)); #ifdef MF_NEW_RGC @@ -239,7 +239,7 @@ hsBool plLightMapGen::Open(Interface* ip, TimeValue t, bool forceRegen) #else MF_NEW_RGC - fRGC = TRACKED_NEW plRenderGlobalContext(fInterface, fTime); + fRGC = new plRenderGlobalContext(fInterface, fTime); fRGC->MakeRenderInstances((plMaxNode*)fInterface->GetRootNode(), fTime); #endif // MF_NEW_RGC @@ -380,7 +380,7 @@ hsBool plLightMapGen::ICompressLightMaps() if( orig == fCreatedLayers[j]->GetTexture() ) { fCreatedLayers[j]->GetKey()->Release(orig->GetKey()); - hsgResMgr::ResMgr()->AddViaNotify(compressed->GetKey(), TRACKED_NEW plLayRefMsg(fCreatedLayers[j]->GetKey(), plRefMsg::kOnReplace, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(compressed->GetKey(), new plLayRefMsg(fCreatedLayers[j]->GetKey(), plRefMsg::kOnReplace, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); } } @@ -569,7 +569,7 @@ plMipmap* plLightMapGen::IMakeAccumBitmap(plLayerInterface* lay) const int height = dst->GetHeight(); // Temporary mipmap here, so we don't have to worry about using plBitmapCreator - plMipmap* bitmap = TRACKED_NEW plMipmap( width, height, plMipmap::kRGB32Config, 1 ); + plMipmap* bitmap = new plMipmap( width, height, plMipmap::kRGB32Config, 1 ); HSMemory::Clear(bitmap->GetImage(), bitmap->GetHeight() * bitmap->GetRowBytes() ); return bitmap; @@ -1279,11 +1279,11 @@ plLayerInterface* plLightMapGen::IMakeLightMapLayer(plMaxNode* node, plGeometryS } else { - objMat = TRACKED_NEW hsGMaterial; + objMat = new hsGMaterial; hsgResMgr::ResMgr()->NewKey(newMatName, objMat, nodeLoc); for( i = 0; i < mat->GetNumLayers(); i++ ) - hsgResMgr::ResMgr()->AddViaNotify(mat->GetLayer(i)->GetKey(), TRACKED_NEW plMatRefMsg(objMat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mat->GetLayer(i)->GetKey(), new plMatRefMsg(objMat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kLayer), plRefFlags::kActiveRef); } objMat->SetCompositeFlags(objMat->GetCompositeFlags() | hsGMaterial::kCompIsLightMapped); @@ -1365,10 +1365,10 @@ plLayerInterface* plLightMapGen::IMakeLightMapLayer(plMaxNode* node, plGeometryS } } - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; layer->InitToDefault(); layKey = hsgResMgr::ResMgr()->NewKey(layName, layer, nodeLoc); - hsgResMgr::ResMgr()->AddViaNotify(mipKey, TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mipKey, new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f)); layer->SetZFlags(hsGMatState::kZNoZWrite); layer->SetBlendFlags(hsGMatState::kBlendMult); @@ -1377,7 +1377,7 @@ plLayerInterface* plLightMapGen::IMakeLightMapLayer(plMaxNode* node, plGeometryS layer->SetMiscFlags(hsGMatState::kMiscLightMap); } - hsgResMgr::ResMgr()->AddViaNotify(layKey, TRACKED_NEW plMatRefMsg(objMat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kPiggyBack), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(layKey, new plMatRefMsg(objMat->GetKey(), plRefMsg::kOnCreate, -1, plMatRefMsg::kPiggyBack), plRefFlags::kActiveRef); span.fMaterial = objMat; diff --git a/Sources/Tools/MaxConvert/plMeshConverter.cpp b/Sources/Tools/MaxConvert/plMeshConverter.cpp index e0af39cc..730db4a8 100644 --- a/Sources/Tools/MaxConvert/plMeshConverter.cpp +++ b/Sources/Tools/MaxConvert/plMeshConverter.cpp @@ -188,7 +188,7 @@ class plMAXVertNormal if( fNext ) fNext->AddNormal( n, s ); else - fNext = TRACKED_NEW plMAXVertNormal( ::Normalize(n), s ); + fNext = new plMAXVertNormal( ::Normalize(n), s ); } else { @@ -358,7 +358,7 @@ plConvexVolume *plMeshConverter::CreateConvexVolume(plMaxNode *node) numFaces = mesh->getNumFaces(); numVerts = mesh->getNumVerts(); - plConvexVolume *bounds = TRACKED_NEW plConvexVolume(); + plConvexVolume *bounds = new plConvexVolume(); /// Get transforms l2wMatrix = node->GetLocalToWorld44(); @@ -458,7 +458,7 @@ bool plMeshConverter::IValidateUVs(plMaxNode* node) // Cache the original UV verts int numVerts = mesh->getNumMapVerts(1); int vertBufSize = sizeof(UVVert)*numVerts; - UVVert* origVerts = TRACKED_NEW UVVert[vertBufSize]; + UVVert* origVerts = new UVVert[vertBufSize]; memcpy(origVerts, mesh->mapVerts(1), vertBufSize); IDeleteTempGeometry(); @@ -646,7 +646,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArrayvertCol != nil) { - colorArray = TRACKED_NEW hsColorRGBA[ mesh->numCVerts ]; + colorArray = new hsColorRGBA[ mesh->numCVerts ]; for( i = 0; i < mesh->numCVerts; i++ ) { colorArray[i].Set(mesh->vertCol[ i ].x, mesh->vertCol[ i ].y, mesh->vertCol[ i ].z, 1.f); @@ -666,7 +666,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray *currAccum = TRACKED_NEW hsTArray; + hsTArray *currAccum = new hsTArray; int currNumSubMtls = ourMaterials[i]->GetCount(); currAccum->Reset(); ourAccumulators[i] = currAccum; @@ -873,8 +873,8 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray[numMaterials]; - vertDPosDvCache = TRACKED_NEW hsTArray[numMaterials]; + vertDPosDuCache = new hsTArray[numMaterials]; + vertDPosDvCache = new hsTArray[numMaterials]; hsTArray bumpLayIdx; hsTArray bumpLayChan; @@ -1189,7 +1189,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArrayGetVertexCount() == 0) continue; - plGeometrySpan *span = TRACKED_NEW plGeometrySpan; + plGeometrySpan *span = new plGeometrySpan; span->BeginCreate( subMats->Get(j).fMaterial, l2wMatrix, ourFormat ); span->fLocalToOBB = node->GetLocalToOBB44(); @@ -1429,7 +1429,7 @@ Mesh *plMeshConverter::IGetNodeMesh( plMaxNode *node ) Mesh* plMeshConverter::IDuplicate2Sided(plMaxNode* node, Mesh* mesh) { - mesh = TRACKED_NEW Mesh(*mesh); + mesh = new Mesh(*mesh); Mtl* mtl = node->GetMtl(); @@ -2032,7 +2032,7 @@ plMAXVertexAccumulator::plMAXVertexAccumulator( int numOrigPoints, int numChanne fNumPoints = numOrigPoints; fNumChannels = numChannels; - fPointList = TRACKED_NEW plMAXVertexAccNodePtr[ fNumPoints ]; + fPointList = new plMAXVertexAccNodePtr[ fNumPoints ]; memset( fPointList, 0, sizeof( plMAXVertexAccNode * ) * fNumPoints ); fIndices.Reset(); @@ -2084,7 +2084,7 @@ void plMAXVertexAccumulator::AddVertex( int index, hsPoint3 *point, hsVector3 /// Adding new - node = TRACKED_NEW plMAXVertexAccNode( point, normal, color, illum, fNumChannels, uvs, fNumVertices ); + node = new plMAXVertexAccNode( point, normal, color, illum, fNumChannels, uvs, fNumVertices ); fInverseVertTable.Append( index ); fIndices.Append( fNumVertices++ ); @@ -2106,7 +2106,7 @@ void plMAXVertexAccumulator::StuffMyData( plMaxNode* maxNode, plGeometrySpan TempWeightInfo *weights = nil; /// Precalculate the weights if necessary - weights = TRACKED_NEW TempWeightInfo[ fNumPoints ]; + weights = new TempWeightInfo[ fNumPoints ]; if( skinData != nil ) { for( i = 0; i < fNumPoints; i++ ) diff --git a/Sources/Tools/MaxExport/SimpleExport.h b/Sources/Tools/MaxExport/SimpleExport.h index 1c253b64..71681bcb 100644 --- a/Sources/Tools/MaxExport/SimpleExport.h +++ b/Sources/Tools/MaxExport/SimpleExport.h @@ -91,7 +91,7 @@ class HSClassDesc2 : public ClassDesc { public: int IsPublic() { return 1; } - void * Create(BOOL loading = FALSE) { return TRACKED_NEW HSExport2; } + void * Create(BOOL loading = FALSE) { return new HSExport2; } const TCHAR * ClassName() { return "Plasma 2.0 Scene Exporter"; } SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; } #ifdef HS_DEBUGGING diff --git a/Sources/Tools/MaxMain/GlobalUtility.cpp b/Sources/Tools/MaxMain/GlobalUtility.cpp index c55a5897..d6ab8045 100644 --- a/Sources/Tools/MaxMain/GlobalUtility.cpp +++ b/Sources/Tools/MaxMain/GlobalUtility.cpp @@ -301,7 +301,7 @@ DWORD PlasmaMax::Control(DWORD parameter) } #ifdef MAXASS_AVAILABLE - jvArray* textures = TRACKED_NEW jvArray(texInfo.size()); + jvArray* textures = new jvArray(texInfo.size()); for (int i = 0; i < texInfo.size(); i++) (*textures)[i] = texInfo[i]; return DWORD(textures); diff --git a/Sources/Tools/MaxMain/main.cpp b/Sources/Tools/MaxMain/main.cpp index ddb18273..06a79654 100644 --- a/Sources/Tools/MaxMain/main.cpp +++ b/Sources/Tools/MaxMain/main.cpp @@ -170,7 +170,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) } // Initialize the ResManager - plResManager* pRmgr = TRACKED_NEW plPluginResManager; + plResManager* pRmgr = new plPluginResManager; hsgResMgr::Init(pRmgr); } @@ -238,7 +238,7 @@ class plGeneralAttribClassDesc : public ClassDesc2 { public: int IsPublic() { return 1; } - void* Create(BOOL loading) { return TRACKED_NEW plGeneralAttrib; } + void* Create(BOOL loading) { return new plGeneralAttrib; } const TCHAR* ClassName() { return _T("Plasma Attrib"); } SClass_ID SuperClassID() { return CUST_ATTRIB_CLASS_ID; } Class_ID ClassID() { return PL_GEN_ATTRIB_CLASS_ID; } diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.cpp b/Sources/Tools/MaxMain/plAgeDescInterface.cpp index 152a6a47..df59b1f0 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.cpp +++ b/Sources/Tools/MaxMain/plAgeDescInterface.cpp @@ -187,7 +187,7 @@ BOOL plAgeDescInterface::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar #ifdef MAXASS_AVAILABLE if( fAssetManIface == nil ) - fAssetManIface = TRACKED_NEW MaxAssBranchAccess(); + fAssetManIface = new MaxAssBranchAccess(); #endif // Make our bold font by getting the normal font and bolding @@ -853,7 +853,7 @@ void plAgeDescInterface::IGetAgeFiles(vector& ageFiles) { ageFolder.GetPathAndName(agePath); - plAgeFile* age = TRACKED_NEW plAgeFile(plAgeFile::kLocalFile, agePath); + plAgeFile* age = new plAgeFile(plAgeFile::kLocalFile, agePath); ageFiles.push_back(age); } } @@ -873,7 +873,7 @@ void plAgeDescInterface::IGetAgeFiles(vector& ageFiles) { if (assetMan->GetLatestVersionFile((*assets)[i], agePath, sizeof(agePath))) { - plAgeFile* age = TRACKED_NEW plAgeFile(plAgeFile::kAssetFile, agePath, (*assets)[i]); + plAgeFile* age = new plAgeFile(plAgeFile::kAssetFile, agePath, (*assets)[i]); int existing = IFindAge(age->fAgeName.c_str(), ageFiles); // Remove it from our "local" list if there, since it's a duplicate @@ -1092,7 +1092,7 @@ void plAgeDescInterface::INewPage() int idx = ListBox_AddString(hPages, name); // Choose a new sequence suffix for it - plAgePage *newPage = TRACKED_NEW plAgePage( name, IGetFreePageSeqSuffix( hPages ), 0 ); + plAgePage *newPage = new plAgePage( name, IGetFreePageSeqSuffix( hPages ), 0 ); ListBox_SetItemData( hPages, idx, (LPARAM)newPage ); fDirty = true; diff --git a/Sources/Tools/MaxMain/plCommonObjLib.cpp b/Sources/Tools/MaxMain/plCommonObjLib.cpp index d5ec464d..dd6d0875 100644 --- a/Sources/Tools/MaxMain/plCommonObjLib.cpp +++ b/Sources/Tools/MaxMain/plCommonObjLib.cpp @@ -117,7 +117,7 @@ plCommonObjLib::plCommonObjLib() { // Make sure we have a list to add ourselves to if( fLibList == nil ) - fLibList = TRACKED_NEW plCommonObjLibList(); + fLibList = new plCommonObjLibList(); // Add ourselves to the list of libs fLibList->Add( this ); diff --git a/Sources/Tools/MaxMain/plComponentDlg.cpp b/Sources/Tools/MaxMain/plComponentDlg.cpp index fa90131d..adc229d1 100644 --- a/Sources/Tools/MaxMain/plComponentDlg.cpp +++ b/Sources/Tools/MaxMain/plComponentDlg.cpp @@ -205,7 +205,7 @@ void plComponentDlg::IGetComment() int len = GetWindowTextLength(GetDlgItem(fhDlg, IDC_COMMENTS))+1; if (len != 0) { - char *buf = TRACKED_NEW char[len]; + char *buf = new char[len]; GetDlgItemText(fhDlg, IDC_COMMENTS, buf, len); fCommentNode->SetUserPropBuffer(buf); delete [] buf; diff --git a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp index 18da665f..7e5d3442 100644 --- a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp +++ b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp @@ -97,7 +97,7 @@ static bool MakeNormalMesh(plMaxNode *node, plMaxMeshExtractor::NeutralMesh& mes int parity = fullTM.Parity(); mesh.fNumVerts = pMesh->numVerts; - mesh.fVerts = TRACKED_NEW hsPoint3[mesh.fNumVerts]; + mesh.fVerts = new hsPoint3[mesh.fNumVerts]; for (int i = 0; i < mesh.fNumVerts; i++) { @@ -111,7 +111,7 @@ static bool MakeNormalMesh(plMaxNode *node, plMaxMeshExtractor::NeutralMesh& mes } mesh.fNumFaces = pMesh->numFaces; - mesh.fFaces = TRACKED_NEW uint16_t[mesh.fNumFaces*3]; + mesh.fFaces = new uint16_t[mesh.fNumFaces*3]; for (int i = 0; i < mesh.fNumFaces; i++) { Face* pFace = &pMesh->faces[i]; @@ -135,8 +135,8 @@ static bool MakeNormalMesh(plMaxNode *node, plMaxMeshExtractor::NeutralMesh& mes // MODIFIES *all* the input parameters. static void MakeBoxMesh(plMaxNode* node, plMaxMeshExtractor::NeutralMesh& mesh, hsPoint3& minV, hsPoint3& maxV) { - hsPoint3* newVerts = TRACKED_NEW hsPoint3[8]; - uint16_t* newFaces = TRACKED_NEW uint16_t[12 * 3]; + hsPoint3* newVerts = new hsPoint3[8]; + uint16_t* newFaces = new uint16_t[12 * 3]; newVerts[0].Set(minV.fX, minV.fY, minV.fZ); newVerts[1].Set(maxV.fX, minV.fY, minV.fZ); diff --git a/Sources/Tools/MaxMain/plMaxNode.cpp b/Sources/Tools/MaxMain/plMaxNode.cpp index 0a027500..16e22a1c 100644 --- a/Sources/Tools/MaxMain/plMaxNode.cpp +++ b/Sources/Tools/MaxMain/plMaxNode.cpp @@ -227,7 +227,7 @@ void plMaxBoneMap::SetBaseMatrixIndex(plDrawable *draw, uint32_t idx) // you'll be hosed (duh). void plMaxBoneMap::SortBones() { - plMaxNodeBase **tempBones = TRACKED_NEW plMaxNodeBase*[fNumBones]; + plMaxNodeBase **tempBones = new plMaxNodeBase*[fNumBones]; FillBoneArray(tempBones); // Look ma! An n^2 bubble sort! @@ -263,7 +263,7 @@ plKey plMaxNode::AddModifier(plModifier *pMod, const char* name) plKey modKey = pMod->GetKey(); if (!modKey) modKey = hsgResMgr::ResMgr()->NewKey(name, pMod, GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(modKey, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(modKey, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); return modKey; } @@ -538,7 +538,7 @@ hsBool plMaxNode::MakeSceneObject(plErrorMsg *pErrMsg, plConvertSettings *settin plKey objKey; // Handle this as a SceneObject - pso = TRACKED_NEW plSceneObject; + pso = new plSceneObject; objKey = hsgResMgr::ResMgr()->NewKey(GetName(), pso, nodeLoc, GetLoadMask()); // Remember info in MaxNodeData block for later @@ -824,7 +824,7 @@ hsBool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) // // Create the physical // - plPXPhysical* physical = TRACKED_NEW plPXPhysical; + plPXPhysical* physical = new plPXPhysical; // add the object to the resource manager, keyed to the new name plLocation nodeLoc = GetKey()->GetUoid().GetLocation(); @@ -860,14 +860,14 @@ hsBool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) if(physProps->GetLOSSwimRegion()) physical->AddLOSDB(plSimDefs::kLOSDBSwimRegion); - plSimulationInterface* si = TRACKED_NEW plSimulationInterface; + plSimulationInterface* si = new plSimulationInterface; plKey pSiKey = hsgResMgr::ResMgr()->NewKey(objName, si, nodeLoc, GetLoadMask()); // link the simulation interface to the scene object - hsgResMgr::ResMgr()->AddViaNotify(pSiKey, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pSiKey, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); // add the physical to the simulation interface - hsgResMgr::ResMgr()->AddViaNotify(physKey , TRACKED_NEW plIntRefMsg(pSiKey, plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(physKey , new plIntRefMsg(pSiKey, plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical), plRefFlags::kActiveRef); return true; } @@ -909,9 +909,9 @@ hsBool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings hsMatrix44 loc2Par = GetLocalToParent44(); hsMatrix44 par2Loc = GetParentToLocal44(); if( GetFilterInherit() ) - ci = TRACKED_NEW plFilterCoordInterface; + ci = new plFilterCoordInterface; else - ci = TRACKED_NEW plCoordinateInterface; + ci = new plCoordinateInterface; //------------------------- // Get data from Node, then its key, then its name //------------------------- @@ -927,7 +927,7 @@ hsBool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings ci->SetProperty(plCoordinateInterface::kCanEverDelayTransform, !usesPhysics); ci->SetProperty(plCoordinateInterface::kDelayedTransformEval, !usesPhysics); - hsgResMgr::ResMgr()->AddViaNotify(pCiKey, TRACKED_NEW plObjRefMsg(pNodeKey, plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pCiKey, new plObjRefMsg(pNodeKey, plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } return true; } @@ -950,7 +950,7 @@ hsBool plMaxNode::MakeModifiers(plErrorMsg *pErrMsg, plConvertSettings *settings // mf horse hack testing ViewFace which is already obsolete if ( UserPropExists("ViewFacing") ) { - plViewFaceModifier* pMod = TRACKED_NEW plViewFaceModifier; + plViewFaceModifier* pMod = new plViewFaceModifier; if( UserPropExists("VFPivotFavorY") ) pMod->SetFlag(plViewFaceModifier::kPivotFavorY); else if( UserPropExists("VFPivotY") ) @@ -1011,12 +1011,12 @@ hsBool plMaxNode::MakeParentOrRoomConnection(plErrorMsg *pErrMsg, plConvertSetti hsAssert(ci,"Missing CI"); - plIntRefMsg* msg = TRACKED_NEW plIntRefMsg(parKey, plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject); + plIntRefMsg* msg = new plIntRefMsg(parKey, plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject); msg->SetRef(pso); hsgResMgr::ResMgr()->AddViaNotify(msg, plRefFlags::kPassiveRef); } - hsgResMgr::ResMgr()->AddViaNotify(pso->GetKey(), TRACKED_NEW plNodeRefMsg(GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kObject), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pso->GetKey(), new plNodeRefMsg(GetRoomKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kObject), plRefFlags::kActiveRef); return true; } @@ -1168,10 +1168,10 @@ int IsGeoSpanConvex(plMaxNode* node, const plGeometrySpan* span) if( numFaces <= kSmallNumFaces ) return IsGeoSpanConvexExhaust(span); - hsTArray* vertList = TRACKED_NEW hsTArray [numVerts]; + hsTArray* vertList = new hsTArray [numVerts]; - hsTArray* normList = TRACKED_NEW hsTArray [numVerts]; - hsTArray* distList = TRACKED_NEW hsTArray [numVerts]; + hsTArray* normList = new hsTArray [numVerts]; + hsTArray* distList = new hsTArray [numVerts]; uint16_t* idx = span->fIndexData; @@ -1301,12 +1301,12 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) // This node has no geometry on export, but will have some added at runtime, // so it needs a special drawInterface - plInstanceDrawInterface *newDI = TRACKED_NEW plInstanceDrawInterface; + plInstanceDrawInterface *newDI = new plInstanceDrawInterface; newDI->fTargetID = GetSwappableGeomTarget(); plKey pDiKey = hsgResMgr::ResMgr()->NewKey( GetKey()->GetName(), newDI, nodeLoc, GetLoadMask() ); - hsgResMgr::ResMgr()->AddViaNotify(pDiKey, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pDiKey, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); - plSwapSpansRefMsg *sMsg = TRACKED_NEW plSwapSpansRefMsg(pDiKey, plRefMsg::kOnCreate, -1, -1); + plSwapSpansRefMsg *sMsg = new plSwapSpansRefMsg(pDiKey, plRefMsg::kOnCreate, -1, -1); plDrawableSpans *drawable = IGetSceneNodeSpans(IGetDrawableSceneNode(pErrMsg), true, true); hsgResMgr::ResMgr()->AddViaNotify(drawable->GetKey(), sMsg, plRefFlags::kActiveRef); @@ -1416,7 +1416,7 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) color.Set( 0.5, 0.5, 1, 1 ); // Exp fog - myFog = TRACKED_NEW plFogEnvironment( plFogEnvironment::kExpFog, 700.f, 1.f, color ); + myFog = new plFogEnvironment( plFogEnvironment::kExpFog, 700.f, 1.f, color ); myFogKey = hsgResMgr::ResMgr()->NewKey( "HACK_FOG", myFog, nodeLoc ); hsgResMgr::ResMgr()->AddExportAlias( "HACK_FOG", plFogEnvironment::Index(), myFogKey ); } @@ -1468,9 +1468,9 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) { /// Make a new drawInterface (will assign stuff to it later) - newDI = TRACKED_NEW plDrawInterface; + newDI = new plDrawInterface; plKey pDiKey = hsgResMgr::ResMgr()->NewKey( GetKey()->GetName(), newDI, nodeLoc, GetLoadMask() ); - hsgResMgr::ResMgr()->AddViaNotify(pDiKey, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pDiKey, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); /// Attach the processed spans to the DI (through drawables) IAssignSpansToDrawables( spanArray, newDI, pErrMsg, settings ); @@ -1667,7 +1667,7 @@ void plMaxNode::ISetupBones(plDrawableSpans *drawable, hsTArrayfNumBones : NumBones()) + 1; - plMaxNodeBase **boneArray = TRACKED_NEW plMaxNodeBase*[numBones]; + plMaxNodeBase **boneArray = new plMaxNodeBase*[numBones]; if (boneMap) boneMap->FillBoneArray(boneArray); @@ -1763,9 +1763,9 @@ void plMaxNode::ISetupBones(plDrawableSpans *drawable, hsTArrayGetLocation(); - di = TRACKED_NEW plDrawInterface; + di = new plDrawInterface; plKey diKey = hsgResMgr::ResMgr()->NewKey(GetKey()->GetName(), di, nodeLoc, GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify(diKey, TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(diKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } if( di->GetNumDrawables() <= iDraw ) @@ -1827,7 +1827,7 @@ hsBool plMaxNode::IMakeInstanceSpans( plMaxNode *node, hsTArrayMakeInstanceOf( dr->GetGeometrySpan( disi.fIndices[ i ] ) ); if( setVisDists ) @@ -2243,12 +2243,12 @@ hsBool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, hsBool twoSided, hsBool plMobileOccluder* mob = nil; if( moving ) { - mob = TRACKED_NEW plMobileOccluder; + mob = new plMobileOccluder; occ = mob; } else { - occ = TRACKED_NEW plOccluder; + occ = new plOccluder; } occ->SetPolyList(polys); @@ -2267,7 +2267,7 @@ hsBool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, hsBool twoSided, hsBool } plKey key = hsgResMgr::ResMgr()->NewKey( tmpName, occ, nodeLoc, GetLoadMask() ); - hsgResMgr::ResMgr()->AddViaNotify(occ->GetKey(), TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(occ->GetKey(), new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } return true; @@ -2310,7 +2310,7 @@ hsBool plMaxNode::MakeLight(plErrorMsg *pErrMsg, plConvertSettings *settings) plKey key = hsgResMgr::ResMgr()->NewKey( GetKey()->GetName(), liInfo, nodeLoc, GetLoadMask() ); - hsgResMgr::ResMgr()->AddViaNotify(liInfo->GetKey(), TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(liInfo->GetKey(), new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kInterface), plRefFlags::kActiveRef); // Only support projection for spots and dir lights for now. @@ -2554,7 +2554,7 @@ plLightInfo* plMaxNode::IMakeSpot(plErrorMsg* pErrMsg, plConvertSettings* settin return nil; } - plSpotLightInfo* spot = TRACKED_NEW plSpotLightInfo; + plSpotLightInfo* spot = new plSpotLightInfo; IGetLightColors(spot, light, ls); @@ -2583,7 +2583,7 @@ plLightInfo* plMaxNode::IMakeOmni(plErrorMsg* pErrMsg, plConvertSettings* settin return nil; } - plOmniLightInfo* omni = TRACKED_NEW plOmniLightInfo; + plOmniLightInfo* omni = new plOmniLightInfo; IGetLightAttenuation(omni, light, ls); @@ -2614,7 +2614,7 @@ plLightInfo* plMaxNode::IMakeDirectional(plErrorMsg* pErrMsg, plConvertSettings* plLightInfo* plasLight = nil; if( light->GetProjMap() ) { - plLimitedDirLightInfo* ldl = TRACKED_NEW plLimitedDirLightInfo; + plLimitedDirLightInfo* ldl = new plLimitedDirLightInfo; float sz = light->GetFallsize(timeVal, FOREVER); float depth = 1000.f; @@ -2627,7 +2627,7 @@ plLightInfo* plMaxNode::IMakeDirectional(plErrorMsg* pErrMsg, plConvertSettings* else { - plDirectionalLightInfo* direct = TRACKED_NEW plDirectionalLightInfo; + plDirectionalLightInfo* direct = new plDirectionalLightInfo; plasLight = direct; } @@ -2654,7 +2654,7 @@ plLightInfo* plMaxNode::IMakeRTSpot(plErrorMsg* pErrMsg, plConvertSettings* sett } - plSpotLightInfo* spot = TRACKED_NEW plSpotLightInfo; + plSpotLightInfo* spot = new plSpotLightInfo; if(!ThisObjPB->GetInt(plRTLightBase::kLightOn)) spot->SetProperty(plLightInfo::kDisable, true); @@ -2665,7 +2665,7 @@ plLightInfo* plMaxNode::IMakeRTSpot(plErrorMsg* pErrMsg, plConvertSettings* sett IGetRTCone(spot, ThisObjPB); - //plSpotModifier* liMod = TRACKED_NEW plSpotModifier; + //plSpotModifier* liMod = new plSpotModifier; //GetRTLightColAnim(ThisObjPB, liMod); //GetRTLightAttenAnim(ThisObjPB, liMod); @@ -2689,7 +2689,7 @@ plLightInfo* plMaxNode::IMakeRTOmni(plErrorMsg* pErrMsg, plConvertSettings* sett Object *ThisObj = ((INode*)this)->GetObjectRef(); IParamBlock2* ThisObjPB = ThisObj->GetParamBlockByID(plRTLightBase::kBlkOmniLight); - plOmniLightInfo* omni = TRACKED_NEW plOmniLightInfo; + plOmniLightInfo* omni = new plOmniLightInfo; if(!ThisObjPB->GetInt(plRTLightBase::kLightOn)) omni->SetProperty(plLightInfo::kDisable, true); @@ -2698,7 +2698,7 @@ plLightInfo* plMaxNode::IMakeRTOmni(plErrorMsg* pErrMsg, plConvertSettings* sett IGetRTLightColors(omni, ThisObjPB); - //plOmniModifier* liMod = TRACKED_NEW plOmniModifier; + //plOmniModifier* liMod = new plOmniModifier; //GetRTLightColAnim(ThisObjPB, liMod); //GetRTLightAttenAnim(ThisObjPB, liMod); @@ -2722,14 +2722,14 @@ plLightInfo* plMaxNode::IMakeRTDirectional(plErrorMsg* pErrMsg, plConvertSetting IParamBlock2* ThisObjPB = ThisObj->GetParamBlockByID(plRTLightBase::kBlkTSpotLight); - plDirectionalLightInfo* direct = TRACKED_NEW plDirectionalLightInfo; + plDirectionalLightInfo* direct = new plDirectionalLightInfo; if(!ThisObjPB->GetInt(plRTLightBase::kLightOn)) direct->SetProperty(plLightInfo::kDisable, true); IGetRTLightColors(direct, ThisObjPB); - //plLightModifier* liMod = TRACKED_NEW plLightModifier; + //plLightModifier* liMod = new plLightModifier; //GetRTLightColAnim(ThisObjPB, liMod); @@ -2755,7 +2755,7 @@ plLightInfo *plMaxNode::IMakeRTProjDirectional( plErrorMsg *pErrMsg, plConvertSe IParamBlock2 *mainPB = ThisObj->GetParamBlockByID( plRTLightBase::kBlkMain ); IParamBlock2 *projPB = ThisObj->GetParamBlockByID( plRTProjDirLight::kBlkProj ); - plLimitedDirLightInfo *light = TRACKED_NEW plLimitedDirLightInfo; + plLimitedDirLightInfo *light = new plLimitedDirLightInfo; light->SetWidth( projPB->GetFloat( plRTProjDirLight::kWidth ) ); light->SetHeight( projPB->GetFloat( plRTProjDirLight::kHeight ) ); @@ -2766,7 +2766,7 @@ plLightInfo *plMaxNode::IMakeRTProjDirectional( plErrorMsg *pErrMsg, plConvertSe IGetRTLightColors( light, mainPB ); - //plLightModifier *liMod = TRACKED_NEW plLightModifier; + //plLightModifier *liMod = new plLightModifier; //GetRTLightColAnim( mainPB, liMod ); @@ -2860,7 +2860,7 @@ hsBool plMaxNode::IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg) break; } - hsgResMgr::ResMgr()->AddViaNotify(proj->GetKey(), TRACKED_NEW plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(proj->GetKey(), new plGenRefMsg(li->GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef); li->SetShadowCaster(false); @@ -2997,9 +2997,9 @@ void plMaxNode::GetRTLightAttenAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ProperPB->GetInt(plRTLightBase::kAttenTypeRadio, TimeValue(0)) == 2 ) { // Animation of a cutoff attenuation, which only needs a scalar channel - plOmniCutoffApplicator *app = TRACKED_NEW plOmniCutoffApplicator(); + plOmniCutoffApplicator *app = new plOmniCutoffApplicator(); app->SetChannelName(GetName()); - plScalarControllerChannel *chan = TRACKED_NEW plScalarControllerChannel(subCtl); + plScalarControllerChannel *chan = new plScalarControllerChannel(subCtl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3048,12 +3048,12 @@ void plMaxNode::GetRTLightAttenAnim(IParamBlock2* ProperPB, plAGAnim *anim) } plAGApplicator *app; if (distSq) - app = TRACKED_NEW plOmniSqApplicator; + app = new plOmniSqApplicator; else - app = TRACKED_NEW plOmniApplicator; + app = new plOmniApplicator; app->SetChannelName(GetName()); - plScalarControllerChannel *chan = TRACKED_NEW plScalarControllerChannel(subCtl); + plScalarControllerChannel *chan = new plScalarControllerChannel(subCtl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3132,9 +3132,9 @@ void plMaxNode::GetRTLightColAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ctl ) { - plLightAmbientApplicator *app = TRACKED_NEW plLightAmbientApplicator(); + plLightAmbientApplicator *app = new plLightAmbientApplicator(); app->SetChannelName(GetName()); - chan = TRACKED_NEW plPointControllerChannel(ctl); + chan = new plPointControllerChannel(ctl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3152,9 +3152,9 @@ void plMaxNode::GetRTLightColAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ctl ) { IAdjustRTColorByIntensity(ctl, ProperPB); - plLightDiffuseApplicator *app = TRACKED_NEW plLightDiffuseApplicator(); + plLightDiffuseApplicator *app = new plLightDiffuseApplicator(); app->SetChannelName(GetName()); - chan = TRACKED_NEW plPointControllerChannel(ctl); + chan = new plPointControllerChannel(ctl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3171,9 +3171,9 @@ void plMaxNode::GetRTLightColAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ctl ) { - plLightSpecularApplicator *app = TRACKED_NEW plLightSpecularApplicator(); + plLightSpecularApplicator *app = new plLightSpecularApplicator(); app->SetChannelName(GetName()); - chan = TRACKED_NEW plPointControllerChannel(ctl); + chan = new plPointControllerChannel(ctl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3198,9 +3198,9 @@ void plMaxNode::GetRTConeAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ctl ) { - plSpotInnerApplicator *app = TRACKED_NEW plSpotInnerApplicator(); + plSpotInnerApplicator *app = new plSpotInnerApplicator(); app->SetChannelName(GetName()); - chan = TRACKED_NEW plScalarControllerChannel(ctl); + chan = new plScalarControllerChannel(ctl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3217,9 +3217,9 @@ void plMaxNode::GetRTConeAnim(IParamBlock2* ProperPB, plAGAnim *anim) if( ctl ) { - plSpotOuterApplicator *app = TRACKED_NEW plSpotOuterApplicator(); + plSpotOuterApplicator *app = new plSpotOuterApplicator(); app->SetChannelName(GetName()); - chan = TRACKED_NEW plScalarControllerChannel(ctl); + chan = new plScalarControllerChannel(ctl); app->SetChannel(chan); anim->AddApplicator(app); if (!strcmp(anim->GetName(), ENTIRE_ANIMATION_NAME)) @@ -3339,7 +3339,7 @@ plDrawableSpans *plMaxNode::IGetSceneNodeSpans( plSceneNode *node, hsBool needBl /// Couldn't find--create and return it - spans = TRACKED_NEW plDrawableSpans; + spans = new plDrawableSpans; if( needBlending ) { /// Blending (deferred) spans @@ -3690,12 +3690,12 @@ void plMaxNode::SetupBonesAliasesRecur(const char *rootName) plUoid* uoid = hsgResMgr::ResMgr()->FindAlias(aliasName, plSceneObject::Index()); if( !uoid ) { - plAliasModifier* pAlMod = TRACKED_NEW plAliasModifier; + plAliasModifier* pAlMod = new plAliasModifier; pAlMod->SetAlias(aliasName); AddModifier(pAlMod); } */ - plAGModifier *mod = TRACKED_NEW plAGModifier(nameToUse); + plAGModifier *mod = new plAGModifier(nameToUse); AddModifier(mod, GetName()); } } @@ -3798,7 +3798,7 @@ void plMaxNode::SetupBoneHierarchyPalette(plMaxBoneMap *bones /* = nil */) if (bones == nil) { - bones = TRACKED_NEW plMaxBoneMap(); + bones = new plMaxBoneMap(); bones->fOwner = this; } @@ -3924,7 +3924,7 @@ void plMaxNode::ISetCachedAlphaHackValue( int iSubMtl, int value ) hsTArray *cache = pDat->GetAlphaHackLayersCache(); if( cache == nil ) { - cache = TRACKED_NEW hsTArray; + cache = new hsTArray; pDat->SetAlphaHackLayersCache( cache ); } @@ -4107,10 +4107,10 @@ hsBool plMaxNode::MakeIfaceReferences(plErrorMsg *pErrMsg, plConvertSettings *se // the list in a handy form if (keys.Count()) { - plInterfaceInfoModifier* pMod = TRACKED_NEW plInterfaceInfoModifier; + plInterfaceInfoModifier* pMod = new plInterfaceInfoModifier; plKey modifierKey = hsgResMgr::ResMgr()->NewKey(GetName(), pMod, GetLocation(), GetLoadMask()); - hsgResMgr::ResMgr()->AddViaNotify(modifierKey, TRACKED_NEW plObjRefMsg(GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(modifierKey, new plObjRefMsg(GetSceneObject()->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); for(int i = 0; i < keys.Count(); i++) pMod->AddRefdKey(keys[i]); diff --git a/Sources/Tools/MaxMain/plMaxNodeData.h b/Sources/Tools/MaxMain/plMaxNodeData.h index 1c4c8b21..8bef51d8 100644 --- a/Sources/Tools/MaxMain/plMaxNodeData.h +++ b/Sources/Tools/MaxMain/plMaxNodeData.h @@ -129,7 +129,7 @@ public: DataBF() { - fBitVector = TRACKED_NEW hsBitVector; + fBitVector = new hsBitVector; fBitVector->SetBit(kDrawable); fBitVector->SetBit(kPhysical); } @@ -142,13 +142,13 @@ public: } DataBF(const DataBF& ot) { - fBitVector = TRACKED_NEW hsBitVector; + fBitVector = new hsBitVector; *fBitVector = *ot.fBitVector; } void Init() { - fBitVector = TRACKED_NEW hsBitVector; + fBitVector = new hsBitVector; fBitVector->SetBit(kDrawable); fBitVector->SetBit(kPhysical); } diff --git a/Sources/Tools/MaxMain/plPhysXCooking.cpp b/Sources/Tools/MaxMain/plPhysXCooking.cpp index 69fd6a62..4796d09e 100644 --- a/Sources/Tools/MaxMain/plPhysXCooking.cpp +++ b/Sources/Tools/MaxMain/plPhysXCooking.cpp @@ -119,7 +119,7 @@ hsVectorStream* plPhysXCooking::CookTrimesh(int nVerts, hsPoint3* verts, int nFa triDesc.triangles = faces; triDesc.flags = NX_MF_16_BIT_INDICES; - hsVectorStream* ram = TRACKED_NEW hsVectorStream; + hsVectorStream* ram = new hsVectorStream; plPXStream buf(ram); bool status = NxCookTriangleMesh(triDesc, buf); hsAssert(status, "Trimesh failed to cook"); @@ -158,7 +158,7 @@ bool plPhysXCooking::TestIfConvex(NxConvexMesh* convexMesh, int nVerts, hsPoint3 NxConvexMeshDesc desc; convexMesh->saveToDesc(desc); - hsPlane3* planes = TRACKED_NEW hsPlane3[desc.numTriangles]; + hsPlane3* planes = new hsPlane3[desc.numTriangles]; int i; for ( i = 0; i < desc.numTriangles; i++) @@ -199,7 +199,7 @@ hsVectorStream* plPhysXCooking::CookHull(int nVerts, hsPoint3* verts, bool infla convexDesc.flags|= NX_CF_INFLATE_CONVEX ; } - hsVectorStream* ram = TRACKED_NEW hsVectorStream; + hsVectorStream* ram = new hsVectorStream; plPXStream buf(ram); bool status = NxCookConvexMesh(convexDesc, buf); hsAssert(status, "Convex mesh failed to cook"); @@ -219,11 +219,11 @@ hsVectorStream* plPhysXCooking::CookHull(int nVerts, hsPoint3* verts, bool infla NxTriangleMesh* ReadExplicit(hsStream* stream) { const int nVertices = stream->ReadLE32(); - hsPoint3* pVertices = TRACKED_NEW hsPoint3[nVertices]; + hsPoint3* pVertices = new hsPoint3[nVertices]; stream->ReadLEScalar(nVertices*3, (float*)pVertices); const int nFaces = stream->ReadLE32(); - unsigned short* pTriangles = TRACKED_NEW unsigned short[nFaces * 3]; + unsigned short* pTriangles = new unsigned short[nFaces * 3]; stream->ReadLE16(nFaces * 3, pTriangles); NxTriangleMeshDesc triDesc; @@ -257,7 +257,7 @@ NxTriangleMesh* ReadExplicit(hsStream* stream) NxConvexMesh* ReadConvexHull(hsStream* stream) { const int nVertices = stream->ReadLE32(); - hsPoint3* pVertices = TRACKED_NEW hsPoint3[nVertices]; + hsPoint3* pVertices = new hsPoint3[nVertices]; stream->ReadLEScalar(nVertices*3, (float*)pVertices); NxConvexMeshDesc convexDesc; @@ -287,7 +287,7 @@ NxConvexMesh* ReadConvexHull(hsStream* stream) void ReadBoxFromHull(hsStream* stream, NxBoxShapeDesc& box) { const int nVertices = stream->ReadLE32(); - hsPoint3* pVertices = TRACKED_NEW hsPoint3[nVertices]; + hsPoint3* pVertices = new hsPoint3[nVertices]; stream->ReadLEScalar(nVertices*3, (float*)pVertices); float minX, minY, minZ, maxX, maxY, maxZ; @@ -385,7 +385,7 @@ hsVectorStream* plPhysXCooking::IMakePolytope(const plMaxMeshExtractor::NeutralM hsPoint3 AABBMin(FLT_MAX,FLT_MAX,FLT_MAX); hsPoint3 AABBMax(-FLT_MAX,-FLT_MAX,-FLT_MAX); //prep - NxVec3* vectors = TRACKED_NEW NxVec3[26]; + NxVec3* vectors = new NxVec3[26]; int curvec=0; for(int xcomp= -1;xcomp<2;xcomp++) @@ -503,7 +503,7 @@ hsVectorStream* plPhysXCooking::IMakePolytope(const plMaxMeshExtractor::NeutralM offset=centroid; delete[] vectors; - hsPoint3* pointages=TRACKED_NEW hsPoint3[outCloud.size()]; + hsPoint3* pointages=new hsPoint3[outCloud.size()]; for(int x=0;xGetPageInfo().GetLocation()); // Call init after it gets a key diff --git a/Sources/Tools/MaxMain/plPythonMgr.cpp b/Sources/Tools/MaxMain/plPythonMgr.cpp index c7a1d129..73fbd78f 100644 --- a/Sources/Tools/MaxMain/plPythonMgr.cpp +++ b/Sources/Tools/MaxMain/plPythonMgr.cpp @@ -288,7 +288,7 @@ bool plPythonMgr::IQueryPythonFile(char *fileName) if (PyCallable_Check(getParamFunc)) { - plAutoUIBlock *autoUI = TRACKED_NEW plAutoUIBlock(PythonFile::GetClassDesc(), blockID, className, version); + plAutoUIBlock *autoUI = new plAutoUIBlock(PythonFile::GetClassDesc(), blockID, className, version); // test to see if it is a multi-modifier type class if (isMulti) autoUI->SetMultiModifierFlag(true); diff --git a/Sources/Tools/MaxMain/plSaveSelected.cpp b/Sources/Tools/MaxMain/plSaveSelected.cpp index 4969fc6d..3dcfe93c 100644 --- a/Sources/Tools/MaxMain/plSaveSelected.cpp +++ b/Sources/Tools/MaxMain/plSaveSelected.cpp @@ -317,7 +317,7 @@ void plMerge() size += strlen(nodeNames[i]) + 1; // Put all the component names in a list and show it to the user - char *buf = TRACKED_NEW char[size+25]; + char *buf = new char[size+25]; strcpy(buf, "Components Merged:\n\n"); for (i = 0; i < nodeNames.Count(); i++) diff --git a/Sources/Tools/MaxMain/plTextureExportLog.cpp b/Sources/Tools/MaxMain/plTextureExportLog.cpp index 385a3bda..ba143b61 100644 --- a/Sources/Tools/MaxMain/plTextureExportLog.cpp +++ b/Sources/Tools/MaxMain/plTextureExportLog.cpp @@ -93,7 +93,7 @@ plTextureExportLog::~plTextureExportLog() void plTextureExportLog::IAddBMapNode( uint32_t rank, plBitmap *bMap ) { - plBMapNode *node = TRACKED_NEW plBMapNode, **nodeHdl; + plBMapNode *node = new plBMapNode, **nodeHdl; node->fBitmap = bMap; @@ -121,7 +121,7 @@ void plTextureExportLog::AddTexture( plBitmap *texture ) void plTextureExportLog::Write( void ) { plBMapNode *node; - hsUNIXStream *stream = TRACKED_NEW hsUNIXStream; + hsUNIXStream *stream = new hsUNIXStream; char str[ 128 ]; uint32_t size; diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp index e23aeb88..0b73c90b 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp @@ -178,12 +178,12 @@ plRTProjDirLight::plRTProjDirLight() ObjLightDesc *plRTProjDirLight::CreateLightDesc( INode *n, BOOL forceShadowBuf ) { - return TRACKED_NEW DirLight( n, forceShadowBuf ); + return new DirLight( n, forceShadowBuf ); } RefTargetHandle plRTProjDirLight::Clone( RemapDir &remap ) { - plRTProjDirLight *obj = TRACKED_NEW plRTProjDirLight; + plRTProjDirLight *obj = new plRTProjDirLight; obj->ReplaceReference( kRefDirLight, fLightPB->Clone( remap ) ); BaseClone( this, obj, remap ); @@ -287,7 +287,7 @@ Texmap *plRTProjDirLight::GetProjMap() plLayerTex *layer = (plLayerTex *)fProjPB->GetTexmap( kTexmap, 0 ); if( layer == nil || layer->ClassID() != LAYER_TEX_CLASS_ID ) { - layer = TRACKED_NEW plLayerTex; + layer = new plLayerTex; fProjPB->SetValue( kTexmap, 0, (Texmap *)layer ); IParamBlock2 *bitmapPB = layer->GetParamBlockByID( plLayerTex::kBlkBitmap ); diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h index 01d7c7da..52cbd8f3 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h @@ -122,7 +122,7 @@ class plRTProjDirLight : public plRTLightBase SClass_ID SuperClassID( void ) { return LIGHT_CLASS_ID; } ObjLightDesc *CreateLightDesc( INode *n, BOOL forceShadowBuf = FALSE ); - GenLight *NewLight( int type ) { return TRACKED_NEW plRTProjDirLight(); } + GenLight *NewLight( int type ) { return new plRTProjDirLight(); } RefTargetHandle Clone( RemapDir &remap ); int CanConvertToType( Class_ID obtype ) { return ( obtype == RTPDIR_LIGHT_CLASSID ) ? 1 : 0; } diff --git a/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h b/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h index 2537cece..1aea4a15 100644 --- a/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h +++ b/Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h @@ -62,7 +62,7 @@ class plRTProjDirLightDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plRTProjDirLight; } + void* Create(BOOL loading) { return new plRTProjDirLight; } const TCHAR* ClassName() { return GetString(IDS_DB_PROJDIR); } SClass_ID SuperClassID() { return LIGHT_CLASS_ID; } Class_ID ClassID() { return RTPDIR_LIGHT_CLASSID; } diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp index 1979651c..95fac93f 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp @@ -447,7 +447,7 @@ TSTR plRTLightBase::SubAnimName(int i) #if 0 RefTargetHandle plRTSpotLight::Clone(RemapDir &remap) { - plRTLightBase *obj = TRACKED_NEW plRTSpotLight; + plRTLightBase *obj = new plRTSpotLight; obj->GetParamBlock2->SetValue(kLightOn, t, fLightPB->GetInt(kLightOn, t)); // obj->fLightPB->SetValue(kLightType, t, fLightPB->GetInt(kLightType, t)); @@ -475,7 +475,7 @@ RefTargetHandle plRTSpotLight::Clone(RemapDir &remap) } obj->ReplaceReference(kRefSpotLight,fLightPB->Clone(remap)); /* - GeneralLight* newob = TRACKED_NEW GeneralLight(type); + GeneralLight* newob = new GeneralLight(type); newob->enable = enable; newob->coneDisplay = coneDisplay; newob->useLight = useLight; @@ -841,7 +841,7 @@ void plRTLightBase::GetLocalBoundBox(TimeValue t, INode *node, ViewExp *vpt, Box RefTargetHandle Clone(RemapDir &remap = NoRemap()) { - plRTLightBase* newOb = TRACKED_NEW plRTLightBase; + plRTLightBase* newOb = new plRTLightBase; newOb->fLightPB->SetValue(kLightOn, 0, this->fLightPB->GetInt(kLightOn, 0)); newOb->fLightPB->SetValue(kLightColor, 0, this->fLightPB->GetValue(kLightColor, 0)); newOb->fLightPB->SetValue(kLightExclude, 0, this->fLightPB->GetValue(kLightExclude, 0)); @@ -927,7 +927,7 @@ RefTargetHandle Clone(RemapDir &remap = NoRemap()) kUseProjectorBool, //Inserted in v1 kProjMapTexButton2, //Inserted in v1 kTargetDist //Inserted in v1 - GeneralLight* newob = TRACKED_NEW GeneralLight(type); + GeneralLight* newob = new GeneralLight(type); newob->enable = enable; newob->coneDisplay = coneDisplay; newob->useLight = useLight; @@ -1673,9 +1673,9 @@ BOOL plRTLightBase::GetConeDisplay(void) void plRTLightBase::SetProjMap(BitmapInfo* pmap) { - //plLayerTex* MyMap = TRACKED_NEW plLayerTex; + //plLayerTex* MyMap = new plLayerTex; if(!fTex) - fTex = TRACKED_NEW plLayerTex; + fTex = new plLayerTex; fTex->SetBitmap(pmap); ReplaceReference(kRefProjMap,fTex); @@ -1979,7 +1979,7 @@ int TSpotCreationManager::proc( createInterface->SelectNode( lgtNode ); // Create target object and node - targObject = TRACKED_NEW TargetObject; + targObject = new TargetObject; assert(targObject); targNode = createInterface->CreateObjectNode( targObject); assert(targNode); diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h index 07b7236e..d7161242 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h @@ -345,7 +345,7 @@ public: // plug-in mouse creation callback CreateMouseCallBack* GetCreateMouseCallBack(); - RefTargetHandle Clone(RemapDir &remap = DEFAULTREMAP){ plRTLightBase* thisObj = TRACKED_NEW plRTLightBase(); BaseClone(this, thisObj, remap); return thisObj;} + RefTargetHandle Clone(RemapDir &remap = DEFAULTREMAP){ plRTLightBase* thisObj = new plRTLightBase(); BaseClone(this, thisObj, remap); return thisObj;} virtual void BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev); virtual void EndEditParams(IObjParam *ip, ULONG flags, Animatable *next); diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.cpp b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.cpp index d2002a30..28552297 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.cpp +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.cpp @@ -433,14 +433,14 @@ plRTOmniLight::plRTOmniLight() ObjLightDesc *plRTOmniLight::CreateLightDesc(INode *n, BOOL forceShadowBuf) { - return TRACKED_NEW OmniLight( n, forceShadowBuf ); + return new OmniLight( n, forceShadowBuf ); } RefTargetHandle plRTOmniLight::Clone(RemapDir &remap) { - plRTOmniLight *obj = TRACKED_NEW plRTOmniLight;//(plRTLightBase*) fClassDesc->Create(false); + plRTOmniLight *obj = new plRTOmniLight;//(plRTLightBase*) fClassDesc->Create(false); obj->ReplaceReference(kRefSpotLight, fLightPB->Clone(remap)); BaseClone(this, obj, remap); @@ -607,14 +607,14 @@ plRTSpotLight::plRTSpotLight() ObjLightDesc *plRTSpotLight::CreateLightDesc(INode *n, BOOL forceShadowBuf) { - return TRACKED_NEW SpotLight( n, forceShadowBuf ); + return new SpotLight( n, forceShadowBuf ); } RefTargetHandle plRTSpotLight::Clone(RemapDir &remap) { - plRTSpotLight *obj = TRACKED_NEW plRTSpotLight;//(plRTLightBase*) fClassDesc->Create(false); + plRTSpotLight *obj = new plRTSpotLight;//(plRTLightBase*) fClassDesc->Create(false); obj->ReplaceReference(kRefSpotLight, fLightPB->Clone(remap)); BaseClone(this, obj, remap); return obj; @@ -813,14 +813,14 @@ plRTDirLight::plRTDirLight() ObjLightDesc *plRTDirLight::CreateLightDesc(INode *n, BOOL forceShadowBuf) { - return TRACKED_NEW DirLight( n, forceShadowBuf ); + return new DirLight( n, forceShadowBuf ); } RefTargetHandle plRTDirLight::Clone(RemapDir &remap) { - plRTDirLight *obj = TRACKED_NEW plRTDirLight;//(plRTLightBase*) fClassDesc->Create(false); + plRTDirLight *obj = new plRTDirLight;//(plRTLightBase*) fClassDesc->Create(false); obj->ReplaceReference(kRefDirLight, fLightPB->Clone(remap)); BaseClone(this, obj, remap); return obj; diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h index 40ad916a..ad56eb24 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h @@ -76,7 +76,7 @@ class plRTOmniLight : public plRTLightBase plRTOmniLight(); ObjLightDesc *CreateLightDesc(INode *n, BOOL forceShadowBuf= FALSE); - GenLight* NewLight(int type) {return TRACKED_NEW plRTOmniLight();} + GenLight* NewLight(int type) {return new plRTOmniLight();} RefTargetHandle Clone(RemapDir &remap); virtual void InitNodeName( TSTR &s ) { s = _T( "RTOmniLight" ); } @@ -95,7 +95,7 @@ class plRTOmniLightDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plRTOmniLight; } + void* Create(BOOL loading) { return new plRTOmniLight; } const TCHAR* ClassName() { return GetString(IDS_DB_OMNI); } SClass_ID SuperClassID() { return LIGHT_CLASS_ID; } Class_ID ClassID() { return RTOMNI_LIGHT_CLASSID; } @@ -127,7 +127,7 @@ class plRTSpotLight : public plRTLightBase int CanConvertToType(Class_ID obtype) { return (obtype == RTSPOT_LIGHT_CLASSID ) ? 1 : 0; } ObjLightDesc *CreateLightDesc(INode *n, BOOL forceShadowBuf= FALSE); - GenLight* NewLight(int type) {return TRACKED_NEW plRTSpotLight();} + GenLight* NewLight(int type) {return new plRTSpotLight();} RefTargetHandle Clone(RemapDir &remap); virtual Texmap *GetProjMap(); @@ -150,7 +150,7 @@ class plRTSpotLightDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plRTSpotLight; } + void* Create(BOOL loading = FALSE) { return new plRTSpotLight; } const TCHAR* ClassName() { return GetString(IDS_DB_FREE_SPOT); } SClass_ID SuperClassID() { return LIGHT_CLASS_ID; } Class_ID ClassID() { return RTSPOT_LIGHT_CLASSID; } @@ -179,7 +179,7 @@ class plRTDirLight : public plRTLightBase SClass_ID SuperClassID() { return LIGHT_CLASS_ID; } ObjLightDesc *CreateLightDesc(INode *n, BOOL forceShadowBuf= FALSE); - GenLight* NewLight(int type) {return TRACKED_NEW plRTDirLight();} + GenLight* NewLight(int type) {return new plRTDirLight();} RefTargetHandle Clone(RemapDir &remap); int CanConvertToType(Class_ID obtype) { return (obtype == RTDIR_LIGHT_CLASSID ) ? 1 : 0; } @@ -201,7 +201,7 @@ class plRTDirLightDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plRTDirLight; } + void* Create(BOOL loading) { return new plRTDirLight; } const TCHAR* ClassName() { return GetString(IDS_DB_DIRECTIONAL); } SClass_ID SuperClassID() { return LIGHT_CLASS_ID; } Class_ID ClassID() { return RTDIR_LIGHT_CLASSID; } diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp index 952291ae..45d1b29b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp @@ -53,7 +53,7 @@ class plAngleAttenLayerClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plAngleAttenLayer(); } + void* Create(BOOL loading = FALSE) { return new plAngleAttenLayer(); } const TCHAR* ClassName() { return GetString(IDS_ANGLE_ATTEN_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return ANGLE_ATTEN_LAYER_CLASS_ID; } @@ -239,7 +239,7 @@ IParamBlock2* plAngleAttenLayer::GetParamBlockByID(BlockID id) //From ReferenceTarget RefTargetHandle plAngleAttenLayer::Clone(RemapDir &remap) { - plAngleAttenLayer *mnew = TRACKED_NEW plAngleAttenLayer(); + plAngleAttenLayer *mnew = new plAngleAttenLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefAngles, remap.CloneRef(fParmsPB)); BaseClone(this, mnew, remap); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp index fa4505d7..11527815 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp @@ -72,7 +72,7 @@ class plDynamicEnvLayerClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plDynamicEnvLayer(); } + void* Create(BOOL loading = FALSE) { return new plDynamicEnvLayer(); } const TCHAR* ClassName() { return GetString(IDS_DYNAMIC_ENVMAP_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return DYNAMIC_ENV_LAYER_CLASS_ID; } @@ -226,7 +226,7 @@ IParamBlock2 *plDynamicEnvLayer::GetParamBlockByID( BlockID id ) RefTargetHandle plDynamicEnvLayer::Clone( RemapDir &remap ) { - plDynamicEnvLayer *mnew = TRACKED_NEW plDynamicEnvLayer(); + plDynamicEnvLayer *mnew = new plDynamicEnvLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB)); mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen)); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp index e99d5add..6202c42b 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp @@ -53,7 +53,7 @@ class plDynamicTextLayerClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plDynamicTextLayer(); } + void* Create(BOOL loading = FALSE) { return new plDynamicTextLayer(); } const TCHAR* ClassName() { return GetString(IDS_DYN_TEXT_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return DYN_TEXT_LAYER_CLASS_ID; } @@ -216,7 +216,7 @@ IParamBlock2* plDynamicTextLayer::GetParamBlockByID(BlockID id) //From ReferenceTarget RefTargetHandle plDynamicTextLayer::Clone(RemapDir &remap) { - plDynamicTextLayer *mnew = TRACKED_NEW plDynamicTextLayer(); + plDynamicTextLayer *mnew = new plDynamicTextLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB)); mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen)); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp index 4a2b405e..0bfb47b5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp @@ -55,7 +55,7 @@ class plLayerTexClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plLayerTex(); } + void* Create(BOOL loading = FALSE) { return new plLayerTex(); } const TCHAR* ClassName() { return GetString(IDS_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return LAYER_TEX_CLASS_ID; } @@ -244,7 +244,7 @@ IParamBlock2* plLayerTex::GetParamBlockByID(BlockID id) //From ReferenceTarget RefTargetHandle plLayerTex::Clone(RemapDir &remap) { - plLayerTex *mnew = TRACKED_NEW plLayerTex(); + plLayerTex *mnew = new plLayerTex(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB)); mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen)); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp index a6ed02cc..3209f0e7 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp @@ -135,7 +135,7 @@ public: GetClientRect( basis, &r ); MapWindowPoints( basis, dlg, (POINT *)&r, 2 ); - ctrl = TRACKED_NEW plDetailCurveCtrl( dlg, IDC_DETAIL_CURVE_CTRL, &r ); + ctrl = new plDetailCurveCtrl( dlg, IDC_DETAIL_CURVE_CTRL, &r ); } EnableWindow( GetDlgItem( dlg, IDC_DETAIL_CURVE_CTRL ), (BOOL)pblock->GetInt( kBmpUseDetail, t ) ); @@ -217,7 +217,7 @@ public: if (!pbbm->bm) pbbm->bm = TheManager->Load(&pbbm->bi); - BMCropper *cropper = TRACKED_NEW BMCropper(pblock); + BMCropper *cropper = new BMCropper(pblock); pbbm->bm->Display("Specify Cropping/Placement", BMM_CN, FALSE, TRUE, cropper); } diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp index ed3cb5a2..4ce8390d 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp @@ -54,7 +54,7 @@ class plMAXCameraLayerClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plMAXCameraLayer(); } + void* Create(BOOL loading = FALSE) { return new plMAXCameraLayer(); } const TCHAR* ClassName() { return GetString(IDS_MAX_CAMERA_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return MAX_CAMERA_LAYER_CLASS_ID; } @@ -272,7 +272,7 @@ IParamBlock2* plMAXCameraLayer::GetParamBlockByID(BlockID id) //From ReferenceTarget RefTargetHandle plMAXCameraLayer::Clone(RemapDir &remap) { - plMAXCameraLayer *mnew = TRACKED_NEW plMAXCameraLayer(); + plMAXCameraLayer *mnew = new plMAXCameraLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefMain, remap.CloneRef(fParmsPB)); BaseClone(this, mnew, remap); diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp index 28af7f18..a60b771c 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp @@ -170,7 +170,7 @@ void plPlasmaMAXLayer::IAddConversionTarget( plLayerInterface *target ) if( fConversionTargets == nil ) { // Create us a new container - fConversionTargets = TRACKED_NEW plLayerTargetContainer; + fConversionTargets = new plLayerTargetContainer; fConversionTargets->GetKey()->RefObject(); } diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp index 27dde309..b61ec6a5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp @@ -53,7 +53,7 @@ class plStaticEnvLayerClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading = FALSE) { return TRACKED_NEW plStaticEnvLayer(); } + void* Create(BOOL loading = FALSE) { return new plStaticEnvLayer(); } const TCHAR* ClassName() { return GetString(IDS_STATIC_ENVMAP_LAYER); } SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; } Class_ID ClassID() { return STATIC_ENV_LAYER_CLASS_ID; } @@ -223,7 +223,7 @@ IParamBlock2* plStaticEnvLayer::GetParamBlockByID(BlockID id) //From ReferenceTarget RefTargetHandle plStaticEnvLayer::Clone(RemapDir &remap) { - plStaticEnvLayer *mnew = TRACKED_NEW plStaticEnvLayer(); + plStaticEnvLayer *mnew = new plStaticEnvLayer(); *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(kRefBitmap, remap.CloneRef(fBitmapPB)); mnew->ReplaceReference(kRefUVGen, remap.CloneRef(fUVGen)); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp index cd4e775f..db647932 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp @@ -69,7 +69,7 @@ class plStealthClassDesc : public ClassDesc2 { public: int IsPublic() { return FALSE; } - void* Create(BOOL loading) { return TRACKED_NEW plAnimStealthNode(loading); } + void* Create(BOOL loading) { return new plAnimStealthNode(loading); } const TCHAR* ClassName() { return GetString( IDS_STEALTH_NAME ); } SClass_ID SuperClassID() { return HELPER_CLASS_ID; } Class_ID ClassID() { return ANIMSTEALTH_CLASSID; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp index 5fd01211..3b2b7ebb 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp @@ -60,7 +60,7 @@ class plBumpMtlClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plBumpMtl(loading); } + void* Create(BOOL loading) { return new plBumpMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_BUMP_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return BUMP_MTL_CLASS_ID; } @@ -81,7 +81,7 @@ ParamBlockDesc2 *GetBumpLayersPB(); plBumpMtl::plBumpMtl(BOOL loading) : plPassMtlBase( loading ) { plBumpMtlDesc.MakeAutoParamBlocks( this ); - fBasicPB->SetValue( kBumpBasLayer, 0, TRACKED_NEW plLayerTex ); + fBasicPB->SetValue( kBumpBasLayer, 0, new plLayerTex ); // If we do this later (like, when the dialog loads) something blows up, // somewhere in Max. It didn't in 4, it does in 7. This seems to fix it. @@ -260,7 +260,7 @@ TSTR plBumpMtl::GetSubTexmapTVName(int i) RefTargetHandle plBumpMtl::Clone(RemapDir &remap) { - plBumpMtl *mnew = TRACKED_NEW plBumpMtl(FALSE); + plBumpMtl *mnew = new plBumpMtl(FALSE); plPassMtlBase::ICloneBase( mnew, remap ); return (RefTargetHandle)mnew; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp index 03c593b5..74e98f87 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.cpp @@ -59,7 +59,7 @@ class plClothingMtlClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plClothingMtl(loading); } + void* Create(BOOL loading) { return new plClothingMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_CLOTHING_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return CLOTHING_MTL_CLASS_ID; } @@ -130,10 +130,10 @@ plClothingMtl::plClothingMtl(BOOL loading) : fBasicPB(NULL) int i; for (i = 0; i < plClothingMtl::kMaxTiles; i++) { - plLayerTex *tex = TRACKED_NEW plLayerTex; + plLayerTex *tex = new plLayerTex; fBasicPB->SetValue(ParamID(kTexmap), 0, tex, i); } - fBasicPB->SetValue(ParamID(kThumbnail), 0, TRACKED_NEW plLayerTex); + fBasicPB->SetValue(ParamID(kThumbnail), 0, new plLayerTex); } void plClothingMtl::Reset() @@ -352,7 +352,7 @@ IOResult plClothingMtl::Load(ILoad *iload) RefTargetHandle plClothingMtl::Clone(RemapDir &remap) { - plClothingMtl *mnew = TRACKED_NEW plClothingMtl(FALSE); + plClothingMtl *mnew = new plClothingMtl(FALSE); *((MtlBase*)mnew) = *((MtlBase*)this); mnew->ReplaceReference(kRefBasic, remap.CloneRef(fBasicPB)); @@ -573,68 +573,68 @@ void plClothingMtl::InitTilesets() plClothingElement::GetElements(fElements); /* - plClothingTileset *tileset = TRACKED_NEW plClothingTileset(); + plClothingTileset *tileset = new plClothingTileset(); tileset->SetName("shirt"); tileset->AddElement(FindElementByName("shirt-chest")); tileset->AddElement(FindElementByName("shirt-sleeve")); fTilesets[plClothingLayout::kSetShirt] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("face"); tileset->AddElement(FindElementByName("face")); fTilesets[plClothingLayout::kSetFace] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("eye"); tileset->AddElement(FindElementByName("eyeball")); fTilesets[plClothingLayout::kSetEye] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("shoe"); tileset->AddElement(FindElementByName("shoe-top")); tileset->AddElement(FindElementByName("shoe-bottom")); fTilesets[plClothingLayout::kSetShoe] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("pants"); tileset->AddElement(FindElementByName("pants")); fTilesets[plClothingLayout::kSetPants] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("hand"); tileset->AddElement(FindElementByName("hand-LOD")); tileset->AddElement(FindElementByName("hand-square")); tileset->AddElement(FindElementByName("hand-wide")); fTilesets[plClothingLayout::kSetHand] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("playerbook"); tileset->AddElement(FindElementByName("playerbook")); fTilesets[plClothingLayout::kSetPlayerBook] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("backpack"); tileset->AddElement(FindElementByName("backpack")); fTilesets[plClothingLayout::kSetBackpack] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("glasses"); tileset->AddElement(FindElementByName("glasses-front")); tileset->AddElement(FindElementByName("glasses-side")); fTilesets[plClothingLayout::kSetGlasses] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("KI"); tileset->AddElement(FindElementByName("KI")); fTilesets[plClothingLayout::kSetKI] = tileset; */ - plClothingTileset *tileset = TRACKED_NEW plClothingTileset(); + plClothingTileset *tileset = new plClothingTileset(); tileset->SetName("Torso"); tileset->AddElement(FindElementByName("Chest")); tileset->AddElement(FindElementByName("Arm")); fTilesets[plClothingLayout::kSetShirt] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Head"); tileset->AddElement(FindElementByName("Eye")); tileset->AddElement(FindElementByName("Extra Hair")); @@ -642,43 +642,43 @@ void plClothingMtl::InitTilesets() tileset->AddElement(FindElementByName("Hat")); fTilesets[plClothingLayout::kSetFace] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Foot"); tileset->AddElement(FindElementByName("Foot")); fTilesets[plClothingLayout::kSetShoe] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Legs"); tileset->AddElement(FindElementByName("Legs")); fTilesets[plClothingLayout::kSetPants] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Hand"); tileset->AddElement(FindElementByName("Finger")); tileset->AddElement(FindElementByName("LOD")); tileset->AddElement(FindElementByName("Palm")); fTilesets[plClothingLayout::kSetHand] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Player Book"); tileset->AddElement(FindElementByName("Player Book")); fTilesets[plClothingLayout::kSetPlayerBook] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("Glasses"); tileset->AddElement(FindElementByName("Glasses")); fTilesets[plClothingLayout::kSetGlasses] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("KI"); tileset->AddElement(FindElementByName("KI")); fTilesets[plClothingLayout::kSetKI] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("(unused)"); fTilesets[plClothingLayout::kSetEye] = tileset; - tileset = TRACKED_NEW plClothingTileset(); + tileset = new plClothingTileset(); tileset->SetName("(unused)"); fTilesets[plClothingLayout::kSetBackpack] = tileset; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h index bb412a60..404fbe7a 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h @@ -64,7 +64,7 @@ protected: int len = GetWindowTextLength(hCtrl)+1; if (len > 1) { - char *buf = TRACKED_NEW char[len]; + char *buf = new char[len]; GetWindowText(hCtrl, buf, len); // If the old value is different from the current one, update @@ -176,7 +176,7 @@ public: layer = (plPlasmaMAXLayer *)pb->GetTexmap(ParamID(plClothingMtl::kThumbnail)); if (layer == nil) { - layer = TRACKED_NEW plLayerTex; + layer = new plLayerTex; pb->SetValue(ParamID(plClothingMtl::kThumbnail), 0, layer); } pbbm = layer->GetPBBitmap(); @@ -298,7 +298,7 @@ public: layer = (plPlasmaMAXLayer *)pb->GetTexmap(ParamID(layerIdx), 0, buttonIdx); if (layer == nil) { // First time we've set a layer on this spot - layer = TRACKED_NEW plLayerTex; + layer = new plLayerTex; pb->SetValue(ParamID(layerIdx), 0, layer, buttonIdx); } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp index f1b24770..ec4c2532 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plCompositeMtl.cpp @@ -49,7 +49,7 @@ class plCompositeClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plCompositeMtl(loading); } + void* Create(BOOL loading) { return new plCompositeMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_COMP_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return COMP_MTL_CLASS_ID; } @@ -84,7 +84,7 @@ plCompositeMtl::plCompositeMtl(BOOL loading) : fPassesPB(NULL) int i; for (i = 0; i < NSUBMTLS; i++) { - plPassMtl *newMtl = TRACKED_NEW plPassMtl(false); + plPassMtl *newMtl = new plPassMtl(false); fPassesPB->SetValue(kCompPasses, 0, newMtl, i); GetCOREInterface()->AssignNewName(fPassesPB->GetMtl(kCompPasses, 0, i)); } @@ -97,7 +97,7 @@ void plCompositeMtl::Reset() ParamDlg* plCompositeMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) { - fMtlDlg = TRACKED_NEW plCompositeMtlDlg(hwMtlEdit, imp, this); + fMtlDlg = new plCompositeMtlDlg(hwMtlEdit, imp, this); return fMtlDlg; } @@ -360,7 +360,7 @@ IOResult plCompositeMtl::Load(ILoad *iload) RefTargetHandle plCompositeMtl::Clone(RemapDir &remap) { - plCompositeMtl *mnew = TRACKED_NEW plCompositeMtl(FALSE); + plCompositeMtl *mnew = new plCompositeMtl(FALSE); *((MtlBase*)mnew) = *((MtlBase*)this); mnew->ReplaceReference(kRefPasses, remap.CloneRef(fPassesPB)); @@ -504,7 +504,7 @@ void plCompositeMtl::SetNumSubMtls(int num) for (int i = curNum; i < num; i++) { - plPassMtl *newMtl = TRACKED_NEW plPassMtl(false); + plPassMtl *newMtl = new plPassMtl(false); fPassesPB->SetValue(kMultPasses, t, newMtl, i); fPassesPB->SetValue(kMultOn, t, TRUE, i); GetCOREInterface()->AssignNewName(fPassesPB->GetMtl(kMultPasses, t, i)); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp index 029111cb..49488fa7 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp @@ -63,7 +63,7 @@ class plDecalMtlClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plDecalMtl(loading); } + void* Create(BOOL loading) { return new plDecalMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_DECAL_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return DECAL_MTL_CLASS_ID; } @@ -87,8 +87,8 @@ ParamBlockDesc2 *GetDecalLayersPB(); plDecalMtl::plDecalMtl(BOOL loading) : plPassMtlBase( loading ) { plDecalMtlDesc.MakeAutoParamBlocks( this ); - fLayersPB->SetValue( kDecalLayBase, 0, TRACKED_NEW plLayerTex ); - fLayersPB->SetValue( kDecalLayTop, 0, TRACKED_NEW plLayerTex ); + fLayersPB->SetValue( kDecalLayBase, 0, new plLayerTex ); + fLayersPB->SetValue( kDecalLayTop, 0, new plLayerTex ); // If we do this later (like, when the dialog loads) something blows up, // somewhere in Max. It didn't in 4, it does in 7. This seems to fix it. @@ -306,7 +306,7 @@ int plDecalMtl::SubTexmapOn(int i) RefTargetHandle plDecalMtl::Clone(RemapDir &remap) { - plDecalMtl *mnew = TRACKED_NEW plDecalMtl(FALSE); + plDecalMtl *mnew = new plDecalMtl(FALSE); plPassMtlBase::ICloneBase( mnew, remap ); return (RefTargetHandle)mnew; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp index f12bbb69..3739c6ca 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plMultipassMtl.cpp @@ -49,7 +49,7 @@ class plMultipassClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plMultipassMtl(loading); } + void* Create(BOOL loading) { return new plMultipassMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_MULTI_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return MULTIMTL_CLASS_ID; } @@ -79,7 +79,7 @@ void plMultipassMtl::Reset() ParamDlg* plMultipassMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) { - fMtlDlg = TRACKED_NEW plMultipassMtlDlg(hwMtlEdit, imp, this); + fMtlDlg = new plMultipassMtlDlg(hwMtlEdit, imp, this); return fMtlDlg; } @@ -271,7 +271,7 @@ IOResult plMultipassMtl::Load(ILoad *iload) RefTargetHandle plMultipassMtl::Clone(RemapDir &remap) { - plMultipassMtl *mnew = TRACKED_NEW plMultipassMtl(FALSE); + plMultipassMtl *mnew = new plMultipassMtl(FALSE); *((MtlBase*)mnew) = *((MtlBase*)this); mnew->ReplaceReference(kRefPasses, remap.CloneRef(fPassesPB)); @@ -378,7 +378,7 @@ void plMultipassMtl::SetNumSubMtls(int num) for (int i = curNum; i < num; i++) { - plPassMtl *newMtl = TRACKED_NEW plPassMtl(false); + plPassMtl *newMtl = new plPassMtl(false); fPassesPB->SetValue(kMultPasses, t, newMtl, i); fPassesPB->SetValue(kMultOn, t, TRUE, i); GetCOREInterface()->AssignNewName(fPassesPB->GetMtl(kMultPasses, t, i)); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp index ab59d1ea..0cbe27b9 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plParticleMtl.cpp @@ -60,7 +60,7 @@ class plParticleMtlClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plParticleMtl(loading); } + void* Create(BOOL loading) { return new plParticleMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_PARTICLE_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return PARTICLE_MTL_CLASS_ID; } @@ -102,7 +102,7 @@ plParticleMtl::plParticleMtl(BOOL loading) : fBasicPB(NULL)//, fBM(NULL), fUVGen // if (!loading) { Reset(); - plLayerTex *tex = TRACKED_NEW plLayerTex; + plLayerTex *tex = new plLayerTex; //tex->GetParamBlockByID(kBlkBasic)->SetValue(kBmpUseBitmap, 0, 1); fBasicPB->SetValue(kTexmap, 0, tex); @@ -330,7 +330,7 @@ IOResult plParticleMtl::Load(ILoad *iload) RefTargetHandle plParticleMtl::Clone(RemapDir &remap) { - plParticleMtl *mnew = TRACKED_NEW plParticleMtl(FALSE); + plParticleMtl *mnew = new plParticleMtl(FALSE); *((MtlBase*)mnew) = *((MtlBase*)this); mnew->ReplaceReference(kRefBasic, remap.CloneRef(fBasicPB)); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp index fa357c13..306b5eb6 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp @@ -64,7 +64,7 @@ class plPassMtlClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } - void* Create(BOOL loading) { return TRACKED_NEW plPassMtl(loading); } + void* Create(BOOL loading) { return new plPassMtl(loading); } const TCHAR* ClassName() { return GetString(IDS_PASS_MTL); } SClass_ID SuperClassID() { return MATERIAL_CLASS_ID; } Class_ID ClassID() { return PASS_MTL_CLASS_ID; } @@ -90,8 +90,8 @@ ParamBlockDesc2 *GetPassLayersPB(); plPassMtl::plPassMtl(BOOL loading) : plPassMtlBase( loading ) { plPassMtlDesc.MakeAutoParamBlocks( this ); - fLayersPB->SetValue( kPassLayBase, 0, TRACKED_NEW plLayerTex ); - fLayersPB->SetValue( kPassLayTop, 0, TRACKED_NEW plLayerTex ); + fLayersPB->SetValue( kPassLayBase, 0, new plLayerTex ); + fLayersPB->SetValue( kPassLayTop, 0, new plLayerTex ); // If we do this later (like, when the dialog loads) something blows up, // somewhere in Max. It didn't in 4, it does in 7. This seems to fix it. @@ -312,7 +312,7 @@ int plPassMtl::SubTexmapOn(int i) RefTargetHandle plPassMtl::Clone(RemapDir &remap) { - plPassMtl *mnew = TRACKED_NEW plPassMtl(FALSE); + plPassMtl *mnew = new plPassMtl(FALSE); plPassMtlBase::ICloneBase( mnew, remap ); return (RefTargetHandle)mnew; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp index c4a9b96b..146181d3 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp @@ -126,7 +126,7 @@ bool plPostLoadHandler::fLoading = false; plPassMtlBase::plPassMtlBase( BOOL loading ) : fNTWatcher( nil ), fBasicPB(NULL), fAdvPB(NULL), fLayersPB(NULL), fAnimPB(NULL), fLoading( loading ) { - fNTWatcher = TRACKED_NEW plNoteTrackWatcher( this ); + fNTWatcher = new plNoteTrackWatcher( this ); Reset(); } diff --git a/Sources/Tools/MaxSceneViewer/SceneSync.cpp b/Sources/Tools/MaxSceneViewer/SceneSync.cpp index 4cc4c366..a6894ac6 100644 --- a/Sources/Tools/MaxSceneViewer/SceneSync.cpp +++ b/Sources/Tools/MaxSceneViewer/SceneSync.cpp @@ -233,7 +233,7 @@ bool SceneSync::BeginClientSync(const char *semaphoreName, const char *pipeName) // Update(); - fUpdateSignal = TRACKED_NEW hsSemaphore(0, semaphoreName); + fUpdateSignal = new hsSemaphore(0, semaphoreName); fPipeName = pipeName; @@ -353,7 +353,7 @@ bool SceneSync::IStartWatching(bool forceWatch) // b) there is previously saved data for this scene (we need to keep up to date) if (forceWatch || CanLoadOldResMgr()) { - fSceneWatcher = TRACKED_NEW SceneWatcher; + fSceneWatcher = new SceneWatcher; } return true; diff --git a/Sources/Tools/MaxSceneViewer/SceneViewer.cpp b/Sources/Tools/MaxSceneViewer/SceneViewer.cpp index 843c0bd6..ab655feb 100644 --- a/Sources/Tools/MaxSceneViewer/SceneViewer.cpp +++ b/Sources/Tools/MaxSceneViewer/SceneViewer.cpp @@ -131,7 +131,7 @@ bool SceneViewer::ISetRunning(bool running) strcat(path, "dat\\"); // Start the client - char *options = TRACKED_NEW char[strlen(path)+2+strlen(kSemaphoreName)+strlen(kPipeName)+6]; + char *options = new char[strlen(path)+2+strlen(kSemaphoreName)+strlen(kPipeName)+6]; sprintf(options, "-s %s %s \"%s\"", kSemaphoreName, kPipeName, path); int ret = (int)ShellExecute(NULL, diff --git a/Sources/Tools/MaxSceneViewer/plMaxFileData.cpp b/Sources/Tools/MaxSceneViewer/plMaxFileData.cpp index 5a56385b..32d7dbda 100644 --- a/Sources/Tools/MaxSceneViewer/plMaxFileData.cpp +++ b/Sources/Tools/MaxSceneViewer/plMaxFileData.cpp @@ -81,7 +81,7 @@ public: void GetClassName(TSTR& s) {s = "blah";} // Control methods - RefTargetHandle Clone(RemapDir& remap) { return TRACKED_NEW plMaxFileDataControl(); } + RefTargetHandle Clone(RemapDir& remap) { return new plMaxFileDataControl(); } void Copy(Control *from) {} virtual BOOL IsReplaceable() { return FALSE; } @@ -147,7 +147,7 @@ class MaxFileDataClassDesc : public ClassDesc { public: int IsPublic() { return FALSE; } - void* Create(BOOL loading) { return TRACKED_NEW plMaxFileDataControl; } + void* Create(BOOL loading) { return new plMaxFileDataControl; } const TCHAR* ClassName() { return _T("MaxFileData"); } SClass_ID SuperClassID() { return CTRL_FLOAT_CLASS_ID; } Class_ID ClassID() { return PLASMA_FILE_DATA_CID; } diff --git a/Sources/Tools/MaxSceneViewer/plPluginClient.cpp b/Sources/Tools/MaxSceneViewer/plPluginClient.cpp index 72f3a7b2..bb948cb7 100644 --- a/Sources/Tools/MaxSceneViewer/plPluginClient.cpp +++ b/Sources/Tools/MaxSceneViewer/plPluginClient.cpp @@ -88,7 +88,7 @@ plUpdatableClient::~plUpdatableClient() void plUpdatableClient::InitUpdate(const char *semaphoreName, const char *pipeName, const char *dir) { - fUpdateSignal = TRACKED_NEW hsSemaphore(0, semaphoreName); + fUpdateSignal = new hsSemaphore(0, semaphoreName); fPipeName = pipeName; fDataPath = dir; } @@ -270,29 +270,29 @@ void plUpdatableClient::IEnableProxies(bool enable) // switch back on any drawable proxies if (fPipeline->GetDrawableTypeMask() & plDrawableSpans::kAudibleProxy) { - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAudible | plProxyDrawMsg::kCreate); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kAudible | plProxyDrawMsg::kCreate); plgDispatch::MsgSend(msg); } if (fPipeline->GetDrawableTypeMask() & plDrawableSpans::kOccluderProxy) { - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kOccluder | plProxyDrawMsg::kCreate); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kOccluder | plProxyDrawMsg::kCreate); plgDispatch::MsgSend(msg); } if (fPipeline->GetDrawableTypeMask() & plDrawableSpans::kPhysicalProxy) { - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kPhysical | plProxyDrawMsg::kCreate); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kPhysical | plProxyDrawMsg::kCreate); plgDispatch::MsgSend(msg); } if (fPipeline->GetDrawableTypeMask() & plDrawableSpans::kLightProxy) { - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kLight | plProxyDrawMsg::kCreate); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kLight | plProxyDrawMsg::kCreate); plgDispatch::MsgSend(msg); } } else { // notify any and all drawable proxies to stop drawing... - plProxyDrawMsg* nuke = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAudible + plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAudible | plProxyDrawMsg::kOccluder | plProxyDrawMsg::kPhysical | plProxyDrawMsg::kLight diff --git a/Sources/Tools/plResBrowser/plResBrowser.cpp b/Sources/Tools/plResBrowser/plResBrowser.cpp index c0fa79fd..dc45bf70 100644 --- a/Sources/Tools/plResBrowser/plResBrowser.cpp +++ b/Sources/Tools/plResBrowser/plResBrowser.cpp @@ -71,7 +71,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin plResMgrSettings::Get().SetFilterOlderPageVersions( false ); gCommandLine = (char *)lpCmdLine; - plResManager *rMgr = TRACKED_NEW plResManager; + plResManager *rMgr = new plResManager; hsgResMgr::Init( rMgr ); if( !WinInit( hInstance, nCmdShow ) ) diff --git a/Sources/Tools/plResBrowser/plResTreeView.cpp b/Sources/Tools/plResBrowser/plResTreeView.cpp index 1bb5e1f2..5bc6600d 100644 --- a/Sources/Tools/plResBrowser/plResTreeView.cpp +++ b/Sources/Tools/plResBrowser/plResTreeView.cpp @@ -498,7 +498,7 @@ void plResTreeView::SaveSelectedObject(HWND treeCtrl) return; hsStream *dataStream = stream->GetStream(); - uint8_t *buffer = TRACKED_NEW uint8_t[ keyImp->GetDataLen() ]; + uint8_t *buffer = new uint8_t[ keyImp->GetDataLen() ]; if( buffer != nil ) { dataStream->SetPosition( keyImp->GetStartPos() );