mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Remove TRACKED_NEW from tools.
This commit is contained in:
@ -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();
|
||||
|
@ -754,7 +754,7 @@ void UserPropMgr::OpenQuickTable()
|
||||
{
|
||||
if (!fQuickTable)
|
||||
{
|
||||
fQuickTable = TRACKED_NEW hsHashTable<QuickPair>(kQuickSize);
|
||||
fQuickTable = new hsHashTable<QuickPair>(kQuickSize);
|
||||
}
|
||||
fQuickNode = nil;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ void hsConverterUtils::CreateNodeSearchCache()
|
||||
{
|
||||
if (!fNodeSearchCache)
|
||||
{
|
||||
fNodeSearchCache = TRACKED_NEW hsHashTable<CacheNode>();
|
||||
fNodeSearchCache = new hsHashTable<CacheNode>();
|
||||
}
|
||||
fNodeSearchCache->clear();
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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++ )
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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++ )
|
||||
|
Reference in New Issue
Block a user