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

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

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

View File

@ -48,9 +48,9 @@ plATCEaseCurve *plATCEaseCurve::CreateEaseCurve(uint8_t type, float minLength, f
float startSpeed, float goalSpeed)
{
if (type == plAnimEaseTypes::kConstAccel)
return TRACKED_NEW plConstAccelEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed);
return new plConstAccelEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed);
if (type == plAnimEaseTypes::kSpline)
return TRACKED_NEW plSplineEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed);
return new plSplineEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed);
return nil;
}
@ -162,7 +162,7 @@ plConstAccelEaseCurve::plConstAccelEaseCurve(float minLength, float maxLength, f
plATCEaseCurve *plConstAccelEaseCurve::Clone() const
{
plConstAccelEaseCurve *curve = TRACKED_NEW plConstAccelEaseCurve;
plConstAccelEaseCurve *curve = new plConstAccelEaseCurve;
curve->fStartSpeed = fStartSpeed;
curve->fMinLength = fMinLength;
curve->fMaxLength = fMaxLength;
@ -217,7 +217,7 @@ plSplineEaseCurve::plSplineEaseCurve(float minLength, float maxLength, float len
plATCEaseCurve *plSplineEaseCurve::Clone() const
{
plSplineEaseCurve *curve = TRACKED_NEW plSplineEaseCurve;
plSplineEaseCurve *curve = new plSplineEaseCurve;
curve->fStartSpeed = fStartSpeed;
curve->fMinLength = fMinLength;
curve->fMaxLength = fMaxLength;

View File

@ -97,15 +97,15 @@ void plAnimTimeConvert::Init(plATCAnim *anim, plAGAnimInstance *instance, plAGMa
{
// Set up our eval callbacks
plAGInstanceCallbackMsg *instMsg;
instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kStart);
instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kStart);
instMsg->fInstance = instance;
AddCallback(instMsg);
hsRefCnt_SafeUnRef(instMsg);
instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kStop);
instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kStop);
instMsg->fInstance = instance;
AddCallback(instMsg);
hsRefCnt_SafeUnRef(instMsg);
instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kSingleFrameAdjust);
instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kSingleFrameAdjust);
instMsg->fInstance = instance;
AddCallback(instMsg);
hsRefCnt_SafeUnRef(instMsg);
@ -197,7 +197,7 @@ void plAnimTimeConvert::ResizeStates(int cnt)
while (cnt>fStates.size())
{
fStates.push_back(TRACKED_NEW plATCState);
fStates.push_back(new plATCState);
}
hsAssert(fStates.size()==cnt, "state resize mismatch");
@ -358,7 +358,7 @@ plAnimTimeConvert& plAnimTimeConvert::IProcessStateChange(double worldTime, floa
return *this; // Sorry... state saves only work in the forward direction
fLastStateChange = worldTime;
plATCState *state = TRACKED_NEW plATCState;
plATCState *state = new plATCState;
state->fStartWorldTime = fLastStateChange;
state->fStartAnimTime = (animTime < 0 ? WorldToAnimTimeNoUpdate(fLastStateChange) : animTime);

View File

@ -224,7 +224,7 @@ void plLeafController::Interp(float time, hsColorRGBA* result, plControllerCache
plControllerCacheInfo *plLeafController::CreateCache() const
{
plControllerCacheInfo *cache = TRACKED_NEW plControllerCacheInfo;
plControllerCacheInfo *cache = new plControllerCacheInfo;
cache->fNumSubControllers = 0;
return cache;
}
@ -413,51 +413,51 @@ void plLeafController::AllocKeys(uint32_t numKeys, uint8_t type)
switch (fType)
{
case hsKeyFrame::kPoint3KeyFrame:
fKeys = TRACKED_NEW hsPoint3Key[fNumKeys];
fKeys = new hsPoint3Key[fNumKeys];
break;
case hsKeyFrame::kBezPoint3KeyFrame:
fKeys = TRACKED_NEW hsBezPoint3Key[fNumKeys];
fKeys = new hsBezPoint3Key[fNumKeys];
break;
case hsKeyFrame::kScalarKeyFrame:
fKeys = TRACKED_NEW hsScalarKey[fNumKeys];
fKeys = new hsScalarKey[fNumKeys];
break;
case hsKeyFrame::kBezScalarKeyFrame:
fKeys = TRACKED_NEW hsBezScalarKey[fNumKeys];
fKeys = new hsBezScalarKey[fNumKeys];
break;
case hsKeyFrame::kScaleKeyFrame:
fKeys = TRACKED_NEW hsScaleKey[fNumKeys];
fKeys = new hsScaleKey[fNumKeys];
break;
case hsKeyFrame::kBezScaleKeyFrame:
fKeys = TRACKED_NEW hsBezScaleKey[fNumKeys];
fKeys = new hsBezScaleKey[fNumKeys];
break;
case hsKeyFrame::kQuatKeyFrame:
fKeys = TRACKED_NEW hsQuatKey[fNumKeys];
fKeys = new hsQuatKey[fNumKeys];
break;
case hsKeyFrame::kCompressedQuatKeyFrame32:
fKeys = TRACKED_NEW hsCompressedQuatKey32[fNumKeys];
fKeys = new hsCompressedQuatKey32[fNumKeys];
break;
case hsKeyFrame::kCompressedQuatKeyFrame64:
fKeys = TRACKED_NEW hsCompressedQuatKey64[fNumKeys];
fKeys = new hsCompressedQuatKey64[fNumKeys];
break;
case hsKeyFrame::k3dsMaxKeyFrame:
fKeys = TRACKED_NEW hsG3DSMaxKeyFrame[fNumKeys];
fKeys = new hsG3DSMaxKeyFrame[fNumKeys];
break;
case hsKeyFrame::kMatrix33KeyFrame:
fKeys = TRACKED_NEW hsMatrix33Key[fNumKeys];
fKeys = new hsMatrix33Key[fNumKeys];
break;
case hsKeyFrame::kMatrix44KeyFrame:
fKeys = TRACKED_NEW hsMatrix44Key[fNumKeys];
fKeys = new hsMatrix44Key[fNumKeys];
break;
case hsKeyFrame::kUnknownKeyFrame:
@ -879,9 +879,9 @@ hsBool plCompoundController::PurgeRedundantSubcontrollers()
plControllerCacheInfo* plCompoundController::CreateCache() const
{
plControllerCacheInfo* cache = TRACKED_NEW plControllerCacheInfo;
plControllerCacheInfo* cache = new plControllerCacheInfo;
cache->fNumSubControllers = 3;
cache->fSubControllers = TRACKED_NEW plControllerCacheInfo*[cache->fNumSubControllers];
cache->fSubControllers = new plControllerCacheInfo*[cache->fNumSubControllers];
int i;
for (i = 0; i < cache->fNumSubControllers; i++)
cache->fSubControllers[i] = (GetController(i) ? GetController(i)->CreateCache() : nil);