Browse Source

Remove TRACKED_NEW from tools.

Darryl Pogue 13 years ago committed by Adam Johnson
parent
commit
12ac9a79be
  1. 12
      Sources/Tools/MaxComponent/plAGComponents.cpp
  2. 4
      Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp
  3. 20
      Sources/Tools/MaxComponent/plAnimComponent.cpp
  4. 10
      Sources/Tools/MaxComponent/plAnimEventComponent.cpp
  5. 62
      Sources/Tools/MaxComponent/plAudioComponents.cpp
  6. 2
      Sources/Tools/MaxComponent/plAutoComponent.cpp
  7. 48
      Sources/Tools/MaxComponent/plAutoUIBase.cpp
  8. 2
      Sources/Tools/MaxComponent/plAutoUIBlock.cpp
  9. 2
      Sources/Tools/MaxComponent/plAutoUIComp.cpp
  10. 4
      Sources/Tools/MaxComponent/plAutoUIParams.cpp
  11. 52
      Sources/Tools/MaxComponent/plAvatarComponent.cpp
  12. 2
      Sources/Tools/MaxComponent/plBehavioralComponents.cpp
  13. 8
      Sources/Tools/MaxComponent/plBipedKiller.cpp
  14. 2
      Sources/Tools/MaxComponent/plBlowComponent.cpp
  15. 56
      Sources/Tools/MaxComponent/plCameraComponents.cpp
  16. 30
      Sources/Tools/MaxComponent/plClickDragComponent.cpp
  17. 18
      Sources/Tools/MaxComponent/plClickableComponent.cpp
  18. 6
      Sources/Tools/MaxComponent/plClimbComponent.cpp
  19. 4
      Sources/Tools/MaxComponent/plClothingComponent.cpp
  20. 4
      Sources/Tools/MaxComponent/plClusterComponent.cpp
  21. 2
      Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp
  22. 48
      Sources/Tools/MaxComponent/plFootPrintComponent.cpp
  23. 6
      Sources/Tools/MaxComponent/plFootstepComponent.cpp
  24. 84
      Sources/Tools/MaxComponent/plGUIComponents.cpp
  25. 6
      Sources/Tools/MaxComponent/plGrassComponent.cpp
  26. 4
      Sources/Tools/MaxComponent/plIgnoreComponent.cpp
  27. 6
      Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp
  28. 4
      Sources/Tools/MaxComponent/plInventoryObjComponent.cpp
  29. 4
      Sources/Tools/MaxComponent/plLODFadeComponent.cpp
  30. 4
      Sources/Tools/MaxComponent/plLightGrpComponent.cpp
  31. 12
      Sources/Tools/MaxComponent/plLineFollowComp.cpp
  32. 16
      Sources/Tools/MaxComponent/plMaxAnimUtils.cpp
  33. 2
      Sources/Tools/MaxComponent/plMaxWaveUtils.cpp
  34. 22
      Sources/Tools/MaxComponent/plMiscComponents.cpp
  35. 6
      Sources/Tools/MaxComponent/plMorphSeqComp.cpp
  36. 8
      Sources/Tools/MaxComponent/plMultistageBehComponent.cpp
  37. 6
      Sources/Tools/MaxComponent/plMultistageStage.cpp
  38. 4
      Sources/Tools/MaxComponent/plNPCSpawnComp.cpp
  39. 2
      Sources/Tools/MaxComponent/plNavigableComponents.cpp
  40. 2
      Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp
  41. 2
      Sources/Tools/MaxComponent/plOneShotComponent.cpp
  42. 88
      Sources/Tools/MaxComponent/plParticleComponents.cpp
  43. 18
      Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp
  44. 34
      Sources/Tools/MaxComponent/plPhysicalComponents.cpp
  45. 2
      Sources/Tools/MaxComponent/plPickNodeBase.cpp
  46. 6
      Sources/Tools/MaxComponent/plPythonFileComponent.cpp
  47. 8
      Sources/Tools/MaxComponent/plResponderAnim.cpp
  48. 4
      Sources/Tools/MaxComponent/plResponderComponent.cpp
  49. 30
      Sources/Tools/MaxComponent/plResponderLink.cpp
  50. 4
      Sources/Tools/MaxComponent/plResponderMtl.cpp
  51. 4
      Sources/Tools/MaxComponent/plSeekPoint.cpp
  52. 12
      Sources/Tools/MaxComponent/plShadowComponents.cpp
  53. 46
      Sources/Tools/MaxComponent/plSoftVolumeComponent.cpp
  54. 2
      Sources/Tools/MaxComponent/plTemplateComponent.cpp
  55. 8
      Sources/Tools/MaxComponent/plTypesComponents.cpp
  56. 18
      Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp
  57. 16
      Sources/Tools/MaxComponent/plWaterComponent.cpp
  58. 8
      Sources/Tools/MaxConvert/StringTokenizer.cpp
  59. 2
      Sources/Tools/MaxConvert/UserPropMgr.cpp
  60. 32
      Sources/Tools/MaxConvert/hsControlConverter.cpp
  61. 2
      Sources/Tools/MaxConvert/hsConverterUtils.cpp
  62. 86
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp
  63. 6
      Sources/Tools/MaxConvert/hsVertexShader.cpp
  64. 10
      Sources/Tools/MaxConvert/plBitmapCreator.cpp
  65. 14
      Sources/Tools/MaxConvert/plClusterUtil.cpp
  66. 2
      Sources/Tools/MaxConvert/plConvert.cpp
  67. 8
      Sources/Tools/MaxConvert/plDistributor.cpp
  68. 36
      Sources/Tools/MaxConvert/plLayerConverter.cpp
  69. 18
      Sources/Tools/MaxConvert/plLightMapGen.cpp
  70. 26
      Sources/Tools/MaxConvert/plMeshConverter.cpp
  71. 2
      Sources/Tools/MaxExport/SimpleExport.h
  72. 2
      Sources/Tools/MaxMain/GlobalUtility.cpp
  73. 4
      Sources/Tools/MaxMain/main.cpp
  74. 8
      Sources/Tools/MaxMain/plAgeDescInterface.cpp
  75. 2
      Sources/Tools/MaxMain/plCommonObjLib.cpp
  76. 2
      Sources/Tools/MaxMain/plComponentDlg.cpp
  77. 8
      Sources/Tools/MaxMain/plMaxMeshExtractor.cpp
  78. 130
      Sources/Tools/MaxMain/plMaxNode.cpp
  79. 6
      Sources/Tools/MaxMain/plMaxNodeData.h
  80. 18
      Sources/Tools/MaxMain/plPhysXCooking.cpp
  81. 2
      Sources/Tools/MaxMain/plPluginResManager.cpp
  82. 2
      Sources/Tools/MaxMain/plPythonMgr.cpp
  83. 2
      Sources/Tools/MaxMain/plSaveSelected.cpp
  84. 4
      Sources/Tools/MaxMain/plTextureExportLog.cpp
  85. 6
      Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp
  86. 2
      Sources/Tools/MaxPlasmaLights/plRTProjDirLight.h
  87. 2
      Sources/Tools/MaxPlasmaLights/plRTProjDirLightClassDesc.h
  88. 14
      Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp
  89. 2
      Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h
  90. 12
      Sources/Tools/MaxPlasmaLights/plRealTimeLights.cpp
  91. 12
      Sources/Tools/MaxPlasmaLights/plRealTimeLights.h
  92. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plAngleAttenLayer.cpp
  93. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.cpp
  94. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plDynamicTextLayer.cpp
  95. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTex.cpp
  96. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plLayerTexBitmapPB.cpp
  97. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp
  98. 2
      Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp
  99. 4
      Sources/Tools/MaxPlasmaMtls/Layers/plStaticEnvLayer.cpp
  100. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

12
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);
}

4
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;

20
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))

10
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<plKey> 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);

62
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<plMaxNode*, int>::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<plBaseSoundEmitterComponent *> 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<uint16_t> 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 );
}
}

2
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);

48
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);
}

2
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;
}

2
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;
}

4
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;

52
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);

2
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;

8
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);

2
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;

56
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;

30
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)

18
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)

6
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;

4
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);
}
}

4
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];
}

2
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;

48
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;
}

6
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;

84
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;

6
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<hsGMaterial*> 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;
}

4
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();

6
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:

4
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;

4
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);

4
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);
}
}

12
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));

16
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();

2
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++)
{

22
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 );
}
}

6
Sources/Tools/MaxComponent/plMorphSeqComp.cpp

@ -304,7 +304,7 @@ hsBool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg)
plMorphSequence* morphSeq = const_cast<plMorphSequence *>(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;

8
Sources/Tools/MaxComponent/plMultistageBehComponent.cpp

@ -189,7 +189,7 @@ void plMultistageBehComponent::IGetReceivers(plMaxNode* node, std::vector<plKey>
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;
}

6
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;

4
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<plKey> receivers;
IGetReceivers(node, receivers);
notify->SetSender(mod->GetKey());

2
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);

2
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)));

2
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;
}

88
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<hsPoint3> 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)

18
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 );

34
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;
}

2
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))

6
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

8
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;

4
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++)

30
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<plKey> 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

4
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;

4
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;
}

12
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;
}

46
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);

2
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));

8
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);

18
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);

16
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;
}

8
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();

2
Sources/Tools/MaxConvert/UserPropMgr.cpp

@ -754,7 +754,7 @@ void UserPropMgr::OpenQuickTable()
{
if (!fQuickTable)
{
fQuickTable = TRACKED_NEW hsHashTable<QuickPair>(kQuickSize);
fQuickTable = new hsHashTable<QuickPair>(kQuickSize);
}
fQuickNode = nil;
}

32
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; i<n; i++)
{
Control* sub = (Control*)control->SubAnim(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 <hsG
break;
}
plCameraMsg* pCamMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pCamMsg = new plCameraMsg;
pCamMsg->SetCmd(plCameraMsg::kSetAnimated);
pCamMsg->AddReceiver(pCamMod->GetKey());
plConvert::Instance().AddMessageToQueue(pCamMsg);
@ -2129,7 +2129,7 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray <hsG
for (i=0; i < kfArray->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 <hsG
pFOVMsg->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 <hsG
plConvert::Instance().AddMessageToQueue(pFOVMsg);
plConvert::Instance().AddMessageToQueue(pMsg);
}
}
}

2
Sources/Tools/MaxConvert/hsConverterUtils.cpp

@ -525,7 +525,7 @@ void hsConverterUtils::CreateNodeSearchCache()
{
if (!fNodeSearchCache)
{
fNodeSearchCache = TRACKED_NEW hsHashTable<CacheNode>();
fNodeSearchCache = new hsHashTable<CacheNode>();
}
fNodeSearchCache->clear();

86
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<plMaxNode*> &out
hsTArray<plExportMaterialData> *
hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint32_t multiIndex)
{
hsTArray<plExportMaterialData> *ourMaterials = TRACKED_NEW hsTArray<plExportMaterialData>;
hsTArray<plExportMaterialData> *ourMaterials = new hsTArray<plExportMaterialData>;
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, hsTArray<hsGMateri
plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, const plLocation &loc)
{
char clothKeyName[256];
plClothingItem *cloth = TRACKED_NEW plClothingItem();
plClothingItem *cloth = new plClothingItem();
cloth->SetName(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());

6
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 );

10
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 );

14
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++ )

2
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 );
}

8
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;

36
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;
}

18
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;

26
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, hsTArray<plGeometrySpan *
{
if (mesh->vertCol != 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<plGeometrySpan *
if (illumMap != nil)
{
// MF_HORSE CARNAGE
illumArray = TRACKED_NEW hsColorRGBA[numIllumVerts];
illumArray = new hsColorRGBA[numIllumVerts];
for( i = 0; i < numIllumVerts; i++ )
{
illumArray[i].Set(illumMap[ i ].x, illumMap[ i ].y, illumMap[ i ].z, 1.f);
@ -783,7 +783,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
continue;
}
hsTArray<plMAXVertexAccumulator *> *currAccum = TRACKED_NEW hsTArray<plMAXVertexAccumulator *>;
hsTArray<plMAXVertexAccumulator *> *currAccum = new hsTArray<plMAXVertexAccumulator *>;
int currNumSubMtls = ourMaterials[i]->GetCount();
currAccum->Reset();
ourAccumulators[i] = currAccum;
@ -873,8 +873,8 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
for( i = 0; i < vertNormalCache.GetCount(); i++ )
vertNormalCache[ i ].Normalize();
vertDPosDuCache = TRACKED_NEW hsTArray<plMAXVertNormal>[numMaterials];
vertDPosDvCache = TRACKED_NEW hsTArray<plMAXVertNormal>[numMaterials];
vertDPosDuCache = new hsTArray<plMAXVertNormal>[numMaterials];
vertDPosDvCache = new hsTArray<plMAXVertNormal>[numMaterials];
hsTArray<int16_t> bumpLayIdx;
hsTArray<int16_t> bumpLayChan;
@ -1189,7 +1189,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray<plGeometrySpan *
if (accum->GetVertexCount() == 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++ )

2
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

2
Sources/Tools/MaxMain/GlobalUtility.cpp

@ -301,7 +301,7 @@ DWORD PlasmaMax::Control(DWORD parameter)
}
#ifdef MAXASS_AVAILABLE
jvArray<TexInfo>* textures = TRACKED_NEW jvArray<TexInfo>(texInfo.size());
jvArray<TexInfo>* textures = new jvArray<TexInfo>(texInfo.size());
for (int i = 0; i < texInfo.size(); i++)
(*textures)[i] = texInfo[i];
return DWORD(textures);

4
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; }

8
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<plAgeFile*>& 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<plAgeFile*>& 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;

2
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 );

2
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;

8
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);

130
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<int>* vertList = TRACKED_NEW hsTArray<int> [numVerts];
hsTArray<int>* vertList = new hsTArray<int> [numVerts];
hsTArray<hsVector3>* normList = TRACKED_NEW hsTArray<hsVector3> [numVerts];
hsTArray<float>* distList = TRACKED_NEW hsTArray<float> [numVerts];
hsTArray<hsVector3>* normList = new hsTArray<hsVector3> [numVerts];
hsTArray<float>* distList = new hsTArray<float> [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, hsTArray<plGeometrySpa
int baseMatrix, i;
uint8_t numBones = (boneMap ? boneMap->fNumBones : 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, hsTArray<plGeometrySpa
else
{
plLocation nodeLoc = bone->GetLocation();
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, hsTArray<plGeometrySpan
spanArray.ExpandAndZero( spanArray.GetCount() + disi.fIndices.GetCount() );
for( i = 0; i < disi.fIndices.GetCount(); i++ )
{
spanArray[ index ] = TRACKED_NEW plGeometrySpan;
spanArray[ index ] = new plGeometrySpan;
spanArray[ index ]->MakeInstanceOf( 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<int> *cache = pDat->GetAlphaHackLayersCache();
if( cache == nil )
{
cache = TRACKED_NEW hsTArray<int>;
cache = new hsTArray<int>;
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]);

6
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);
}

18
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;x<outCloud.size();x++)pointages[x]=outCloud[x];
hsVectorStream* vectorstrm;
vectorstrm= CookHull(outCloud.size(),pointages,true);

2
Sources/Tools/MaxMain/plPluginResManager.cpp

@ -76,7 +76,7 @@ plKey plPluginResManager::NameToLoc(const char* age, const char* page, int32_t s
if (snKey == nil)
{
// Not found, create a new one
plSceneNode *newSceneNode = TRACKED_NEW plSceneNode;
plSceneNode *newSceneNode = new plSceneNode;
snKey = NewKey(keyName, newSceneNode, pageNode->GetPageInfo().GetLocation());
// Call init after it gets a key

2
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);

2
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++)

4
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;

6
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 );

2
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; }

2
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; }

14
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);

2
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);

12
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;

12
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; }

4
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);

4
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));

4
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));

4
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));

4
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);
}

4
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);

2
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();
}

4
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));

2
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; }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save