mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Get rid of NEW(), TRACKED_NEW, and ZERO().
This commit is contained in:
@ -351,22 +351,22 @@ void hsG3DDeviceRecord::Read(hsStream* s)
|
||||
int len;
|
||||
|
||||
len = s->ReadLE32();
|
||||
fG3DDriverDesc = TRACKED_NEW char[len + 1];
|
||||
fG3DDriverDesc = new char[len + 1];
|
||||
s->Read(len, fG3DDriverDesc);
|
||||
fG3DDriverDesc[len] = 0;
|
||||
|
||||
len = s->ReadLE32();
|
||||
fG3DDriverName = TRACKED_NEW char[len + 1];
|
||||
fG3DDriverName = new char[len + 1];
|
||||
s->Read(len, fG3DDriverName);
|
||||
fG3DDriverName[len] = 0;
|
||||
|
||||
len = s->ReadLE32();
|
||||
fG3DDriverVersion = TRACKED_NEW char[len + 1];
|
||||
fG3DDriverVersion = new char[len + 1];
|
||||
s->Read(len, fG3DDriverVersion);
|
||||
fG3DDriverVersion[len] = 0;
|
||||
|
||||
len = s->ReadLE32();
|
||||
fG3DDeviceDesc = TRACKED_NEW char[len + 1];
|
||||
fG3DDeviceDesc = new char[len + 1];
|
||||
s->Read(len, fG3DDeviceDesc);
|
||||
fG3DDeviceDesc[len] = 0;
|
||||
|
||||
|
@ -135,7 +135,7 @@ hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t heigh
|
||||
const uint8_t bitDepth(32);
|
||||
const uint8_t zDepth(-1);
|
||||
const uint8_t stencilDepth(-1);
|
||||
plRenderTarget* rt = TRACKED_NEW plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
|
||||
plRenderTarget* rt = new plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
|
||||
|
||||
static int idx=0;
|
||||
char buff[32];
|
||||
@ -144,7 +144,7 @@ hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t heigh
|
||||
|
||||
|
||||
// Create a render request and render request message
|
||||
plCaptureRenderRequest* req = TRACKED_NEW plCaptureRenderRequest;
|
||||
plCaptureRenderRequest* req = new plCaptureRenderRequest;
|
||||
|
||||
const float pri(-100.f);
|
||||
req->SetPriority(pri);
|
||||
@ -161,7 +161,7 @@ hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t heigh
|
||||
req->RequestAck(ack);
|
||||
|
||||
// Submit
|
||||
plRenderRequestMsg* msg = TRACKED_NEW plRenderRequestMsg(ack, req);
|
||||
plRenderRequestMsg* msg = new plRenderRequestMsg(ack, req);
|
||||
hsRefCnt_SafeUnRef(req);
|
||||
msg->Send();
|
||||
|
||||
@ -188,7 +188,7 @@ hsBool plCaptureRender::IProcess(plPipeline* pipe, const plKey& ack, plRenderTar
|
||||
mipMap->Ref();
|
||||
|
||||
// Stash it, and send it off during the update phase.
|
||||
plCaptureRenderMsg* msg = TRACKED_NEW plCaptureRenderMsg(ack, mipMap);
|
||||
plCaptureRenderMsg* msg = new plCaptureRenderMsg(ack, mipMap);
|
||||
fProcessed.Append(msg);
|
||||
|
||||
return true;
|
||||
@ -215,11 +215,11 @@ void plCaptureRender::Update(plPipeline* pipe)
|
||||
|
||||
for( i = 0; i < fCapReqs.GetCount(); i++ )
|
||||
{
|
||||
plMipmap* mipmap = TRACKED_NEW plMipmap(fCapReqs[i].fWidth, fCapReqs[i].fHeight, plMipmap::kARGB32Config, 1);
|
||||
plMipmap* mipmap = new plMipmap(fCapReqs[i].fWidth, fCapReqs[i].fHeight, plMipmap::kARGB32Config, 1);
|
||||
|
||||
pipe->CaptureScreen(mipmap, false, fCapReqs[i].fWidth, fCapReqs[i].fHeight);
|
||||
|
||||
plCaptureRenderMsg* msg = TRACKED_NEW plCaptureRenderMsg(fCapReqs[i].fAck, mipmap);
|
||||
plCaptureRenderMsg* msg = new plCaptureRenderMsg(fCapReqs[i].fAck, mipmap);
|
||||
msg->Send();
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ class plCubicRenderTarget : public plRenderTarget
|
||||
|
||||
for( i = 0; i < 6; i++ )
|
||||
{
|
||||
fFaces[i] = TRACKED_NEW plRenderTarget( flags, width, height, bitDepth, zDepth, sDepth );
|
||||
fFaces[i] = new plRenderTarget( flags, width, height, bitDepth, zDepth, sDepth );
|
||||
fFaces[i]->fParent = this;
|
||||
fWorldToCameras[i].Reset();
|
||||
fCameraToWorlds[i].Reset();
|
||||
|
@ -97,7 +97,7 @@ void plCubicRenderTargetModifier::ICreateRenderRequest( int face )
|
||||
|
||||
|
||||
if( rr == nil )
|
||||
rr = fRequests[ face ] = TRACKED_NEW plRenderRequest;
|
||||
rr = fRequests[ face ] = new plRenderRequest;
|
||||
|
||||
uint32_t renderState
|
||||
= plPipeline::kRenderNormal
|
||||
@ -156,7 +156,7 @@ hsBool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir
|
||||
{
|
||||
fRequests[ i ]->SetCameraTransform(fCubic->GetWorldToCamera(i), fCubic->GetCameraToWorld(i));
|
||||
|
||||
msg = TRACKED_NEW plRenderRequestMsg( nil, fRequests[ i ] );
|
||||
msg = new plRenderRequestMsg( nil, fRequests[ i ] );
|
||||
plgDispatch::MsgSend( msg );
|
||||
}
|
||||
}
|
||||
@ -241,10 +241,10 @@ void plCubicRenderTargetModifier::Read( hsStream *s, hsResMgr *mgr )
|
||||
hsKeyedObject::Read( s, mgr );
|
||||
|
||||
plGenRefMsg* msg;
|
||||
msg = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ); // SceneObject
|
||||
msg = new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ); // SceneObject
|
||||
mgr->ReadKeyNotifyMe( s, msg, plRefFlags::kActiveRef );
|
||||
|
||||
msg = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ); // cubicRT
|
||||
msg = new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ); // cubicRT
|
||||
mgr->ReadKeyNotifyMe( s, msg, plRefFlags::kActiveRef );
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ plDXTextureRef& plDXTextureRef::Set( D3DFORMAT ft, uint32_t ml, uint32_t mw, uin
|
||||
fLevelSizes = lSz;
|
||||
else
|
||||
{
|
||||
fLevelSizes = TRACKED_NEW uint32_t[1];
|
||||
fLevelSizes = new uint32_t[1];
|
||||
fLevelSizes[0] = sz;
|
||||
}
|
||||
fData = pd;
|
||||
|
@ -353,8 +353,8 @@ void hsGDirect3DTnLEnumerate::IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAd
|
||||
const TCHAR* strDeviceDescs[] = { "HAL", "REF" };
|
||||
const D3DDEVTYPE deviceTypes[] = { D3DDEVTYPE_HAL, D3DDEVTYPE_REF };
|
||||
|
||||
BOOL *formatWorks = TRACKED_NEW BOOL[kNumDisplayFormats + 1]; // One for each format
|
||||
DWORD *behavior = TRACKED_NEW DWORD[kNumDisplayFormats + 1];
|
||||
BOOL *formatWorks = new BOOL[kNumDisplayFormats + 1]; // One for each format
|
||||
DWORD *behavior = new DWORD[kNumDisplayFormats + 1];
|
||||
UINT iDevice;
|
||||
for (iDevice = 0; iDevice < numDeviceTypes; iDevice++)
|
||||
{
|
||||
|
@ -1278,7 +1278,7 @@ hsBool plDXPipeline::ICreateDynDeviceObjects()
|
||||
IMakeRenderTargetPools();
|
||||
|
||||
// Create device-specific stuff
|
||||
fDebugTextMgr = TRACKED_NEW plDebugTextManager();
|
||||
fDebugTextMgr = new plDebugTextManager();
|
||||
if( fDebugTextMgr == nil )
|
||||
return true;
|
||||
|
||||
@ -1305,7 +1305,7 @@ hsBool plDXPipeline::ICreateDeviceObjects()
|
||||
// PlateMgr is largely for debugging and performance stats,
|
||||
// but also gets used for some things like the cursor and
|
||||
// linking fade to/from black.
|
||||
fPlateMgr = TRACKED_NEW plDXPlateManager( this, fD3DDevice );
|
||||
fPlateMgr = new plDXPlateManager( this, fD3DDevice );
|
||||
if( fPlateMgr == nil || !fPlateMgr->IsValid() )
|
||||
return true;
|
||||
|
||||
@ -1326,15 +1326,15 @@ hsBool plDXPipeline::ICreateDeviceObjects()
|
||||
return true;
|
||||
|
||||
/// Log renderer
|
||||
fLogDrawer = TRACKED_NEW plStatusLogDrawer( this );
|
||||
fLogDrawer = new plStatusLogDrawer( this );
|
||||
plStatusLogMgr::GetInstance().SetDrawer( fLogDrawer );
|
||||
|
||||
/// Ok, we're done now
|
||||
#if MCN_BOUNDS_SPANS
|
||||
fBoundsSpans = TRACKED_NEW plDrawableSpans();
|
||||
fBoundsSpans = new plDrawableSpans();
|
||||
hsgResMgr::ResMgr()->NewKey( "BoundsSpans", fBoundsSpans, plLocation::kGlobalFixedLoc );
|
||||
fBoundsSpans->SetNativeProperty( plDrawable::kPropVolatile, true );
|
||||
fBoundsMat = TRACKED_NEW hsGMaterial();
|
||||
fBoundsMat = new hsGMaterial();
|
||||
hsgResMgr::ResMgr()->NewKey( "BoundsMaterial", fBoundsMat, plLocation::kGlobalFixedLoc );
|
||||
plLayer *lay = fBoundsMat->MakeBaseLayer();
|
||||
lay->SetMiscFlags( hsGMatState::kMiscWireFrame | hsGMatState::kMiscTwoSided );
|
||||
@ -1357,7 +1357,7 @@ void plDXPipeline::ISetCurrentDriver( D3DEnum_DriverInfo *driv )
|
||||
if( fCurrentDriver != nil )
|
||||
delete fCurrentDriver;
|
||||
|
||||
fCurrentDriver = TRACKED_NEW D3DEnum_DriverInfo;
|
||||
fCurrentDriver = new D3DEnum_DriverInfo;
|
||||
|
||||
fCurrentDriver->fGuid = driv->fGuid;
|
||||
hsStrncpy( fCurrentDriver->fStrDesc, driv->fStrDesc, 40 );
|
||||
@ -1390,7 +1390,7 @@ void plDXPipeline::ISetCurrentDevice( D3DEnum_DeviceInfo *dev )
|
||||
{
|
||||
if( fCurrentDevice != nil )
|
||||
delete fCurrentDevice;
|
||||
fCurrentDevice = TRACKED_NEW D3DEnum_DeviceInfo;
|
||||
fCurrentDevice = new D3DEnum_DeviceInfo;
|
||||
|
||||
hsStrncpy( fCurrentDevice->fStrName, dev->fStrName, 40 );
|
||||
|
||||
@ -1429,7 +1429,7 @@ void plDXPipeline::ISetCurrentMode( D3DEnum_ModeInfo *mode )
|
||||
{
|
||||
if( fCurrentMode != nil )
|
||||
delete fCurrentMode;
|
||||
fCurrentMode = TRACKED_NEW D3DEnum_ModeInfo;
|
||||
fCurrentMode = new D3DEnum_ModeInfo;
|
||||
|
||||
*fCurrentMode = *mode;
|
||||
}
|
||||
@ -2219,7 +2219,7 @@ void plDXPipeline::IResetToDefaults(D3DPRESENT_PARAMETERS *params)
|
||||
|
||||
// fire off a message to the client so we can write defaults to the ini file, and adjust the window size
|
||||
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
|
||||
plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kSetGraphicsDefaults);
|
||||
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kSetGraphicsDefaults);
|
||||
clientMsg->Send(clientKey);
|
||||
|
||||
}
|
||||
@ -2284,7 +2284,7 @@ hsBool plDXPipeline::IResetDevice()
|
||||
|
||||
/// Broadcast a message letting everyone know that we were recreated and that
|
||||
/// all device-specific stuff needs to be recreated
|
||||
plDeviceRecreateMsg* clean = TRACKED_NEW plDeviceRecreateMsg();
|
||||
plDeviceRecreateMsg* clean = new plDeviceRecreateMsg();
|
||||
plgDispatch::MsgSend(clean);
|
||||
|
||||
SetCapture(fSettings.fHWnd);
|
||||
@ -2560,7 +2560,7 @@ void plDXPipeline::Resize( uint32_t width, uint32_t height )
|
||||
|
||||
/// Broadcast a message letting everyone know that we were recreated and that
|
||||
/// all device-specific stuff needs to be recreated
|
||||
plDeviceRecreateMsg* clean = TRACKED_NEW plDeviceRecreateMsg();
|
||||
plDeviceRecreateMsg* clean = new plDeviceRecreateMsg();
|
||||
plgDispatch::MsgSend(clean);
|
||||
}
|
||||
|
||||
@ -2576,7 +2576,7 @@ plTextFont *plDXPipeline::MakeTextFont( char *face, uint16_t size )
|
||||
plTextFont *font;
|
||||
|
||||
|
||||
font = TRACKED_NEW plDXTextFont( this, fD3DDevice );
|
||||
font = new plDXTextFont( this, fD3DDevice );
|
||||
if( font == nil )
|
||||
return nil;
|
||||
font->Create( face, size );
|
||||
@ -3720,7 +3720,7 @@ void plDXPipeline::IAddBoundsSpan( plDrawableSpans *ice, const hsBounds3Ext *
|
||||
if( spanArray.GetCount() == 0 )
|
||||
{
|
||||
spanArray.Reset();
|
||||
spanArray.Append( TRACKED_NEW plGeometrySpan() );
|
||||
spanArray.Append( new plGeometrySpan() );
|
||||
identMatrix.Reset();
|
||||
|
||||
// Make normals
|
||||
@ -3732,7 +3732,7 @@ void plDXPipeline::IAddBoundsSpan( plDrawableSpans *ice, const hsBounds3Ext *
|
||||
}
|
||||
}
|
||||
else
|
||||
spanArray[ 0 ] = TRACKED_NEW plGeometrySpan();
|
||||
spanArray[ 0 ] = new plGeometrySpan();
|
||||
|
||||
newSpan = spanArray[ 0 ];
|
||||
|
||||
@ -3796,11 +3796,11 @@ void plDXPipeline::IAddNormalsSpan( plDrawableSpans *ice, plIcicle *span, plD
|
||||
if( spanArray.GetCount() == 0 )
|
||||
{
|
||||
spanArray.Reset();
|
||||
spanArray.Append( TRACKED_NEW plGeometrySpan() );
|
||||
spanArray.Append( new plGeometrySpan() );
|
||||
identMatrix.Reset();
|
||||
}
|
||||
else
|
||||
spanArray[ 0 ] = TRACKED_NEW plGeometrySpan();
|
||||
spanArray[ 0 ] = new plGeometrySpan();
|
||||
|
||||
newSpan = spanArray[ 0 ];
|
||||
|
||||
@ -3842,7 +3842,7 @@ hsBool plDXPipeline::BeginRender()
|
||||
{
|
||||
/// Broadcast a message letting everyone know that we were recreated and that
|
||||
/// all device-specific stuff needs to be recreated
|
||||
// plDeviceRecreateMsg* clean = TRACKED_NEW plDeviceRecreateMsg();
|
||||
// plDeviceRecreateMsg* clean = new plDeviceRecreateMsg();
|
||||
// plgDispatch::MsgSend(clean);
|
||||
|
||||
fDevWasLost = false;
|
||||
@ -4182,7 +4182,7 @@ plMipmap* plDXPipeline::ExtractMipMap(plRenderTarget* targ)
|
||||
const int width = targ->GetWidth();
|
||||
const int height = targ->GetHeight();
|
||||
|
||||
plMipmap* mipMap = TRACKED_NEW plMipmap(width, height, plMipmap::kARGB32Config, 1);
|
||||
plMipmap* mipMap = new plMipmap(width, height, plMipmap::kARGB32Config, 1);
|
||||
|
||||
uint8_t* ptr = (uint8_t*)(rect.pBits);
|
||||
const int pitch = rect.Pitch;
|
||||
@ -4454,7 +4454,7 @@ hsGDeviceRef *plDXPipeline::MakeRenderTargetRef( plRenderTarget *owner )
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
if( !FAILED( fD3DDevice->CreateCubeTexture( owner->GetWidth(), 1, D3DUSAGE_RENDERTARGET, surfFormat,
|
||||
D3DPOOL_DEFAULT, (IDirect3DCubeTexture9 **)&cTexture, NULL ) ) )
|
||||
@ -4474,7 +4474,7 @@ hsGDeviceRef *plDXPipeline::MakeRenderTargetRef( plRenderTarget *owner )
|
||||
}
|
||||
else
|
||||
{
|
||||
face->SetDeviceRef( TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, face, false ) );
|
||||
face->SetDeviceRef( new plDXRenderTargetRef( surfFormat, 0, face, false ) );
|
||||
( (plDXRenderTargetRef *)face->GetDeviceRef())->Link( &fRenderTargetRefList );
|
||||
// Unref now, since for now ONLY the RT owns the ref, not us (not until we use it, at least)
|
||||
hsRefCnt_SafeUnRef( face->GetDeviceRef() );
|
||||
@ -4500,7 +4500,7 @@ hsGDeviceRef *plDXPipeline::MakeRenderTargetRef( plRenderTarget *owner )
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
if( !FAILED( fD3DDevice->CreateTexture( owner->GetWidth(), owner->GetHeight(), 1, D3DUSAGE_RENDERTARGET, surfFormat,
|
||||
D3DPOOL_DEFAULT, (IDirect3DTexture9 **)&texture, NULL ) ) )
|
||||
@ -4530,7 +4530,7 @@ hsGDeviceRef *plDXPipeline::MakeRenderTargetRef( plRenderTarget *owner )
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
width = owner->GetWidth();
|
||||
height = owner->GetHeight();
|
||||
@ -4652,7 +4652,7 @@ hsGDeviceRef* plDXPipeline::SharedRenderTargetRef(plRenderTarget* share, plRende
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
hsAssert(!fManagedAlloced, "Alloc default with managed alloc'd");
|
||||
if( !FAILED( fD3DDevice->CreateCubeTexture( owner->GetWidth(), 1, D3DUSAGE_RENDERTARGET, surfFormat,
|
||||
@ -4674,7 +4674,7 @@ hsGDeviceRef* plDXPipeline::SharedRenderTargetRef(plRenderTarget* share, plRende
|
||||
}
|
||||
else
|
||||
{
|
||||
face->SetDeviceRef( TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, face, false ) );
|
||||
face->SetDeviceRef( new plDXRenderTargetRef( surfFormat, 0, face, false ) );
|
||||
( (plDXRenderTargetRef *)face->GetDeviceRef())->Link( &fRenderTargetRefList );
|
||||
// Unref now, since for now ONLY the RT owns the ref, not us (not until we use it, at least)
|
||||
hsRefCnt_SafeUnRef( face->GetDeviceRef() );
|
||||
@ -4699,7 +4699,7 @@ hsGDeviceRef* plDXPipeline::SharedRenderTargetRef(plRenderTarget* share, plRende
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
hsAssert(!fManagedAlloced, "Alloc default with managed alloc'd");
|
||||
if( !FAILED( fD3DDevice->CreateTexture( owner->GetWidth(), owner->GetHeight(), 1, D3DUSAGE_RENDERTARGET, surfFormat,
|
||||
@ -4723,7 +4723,7 @@ hsGDeviceRef* plDXPipeline::SharedRenderTargetRef(plRenderTarget* share, plRende
|
||||
if( ref != nil )
|
||||
ref->Set( surfFormat, 0, owner );
|
||||
else
|
||||
ref = TRACKED_NEW plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
ref = new plDXRenderTargetRef( surfFormat, 0, owner );
|
||||
|
||||
width = owner->GetWidth();
|
||||
height = owner->GetHeight();
|
||||
@ -5701,7 +5701,7 @@ hsBool plDXPipeline::StencilGetCaps( plStencilCaps *caps )
|
||||
// as well as attached to the light.
|
||||
hsGDeviceRef *plDXPipeline::IMakeLightRef( plLightInfo *owner )
|
||||
{
|
||||
plDXLightRef *lRef = TRACKED_NEW plDXLightRef();
|
||||
plDXLightRef *lRef = new plDXLightRef();
|
||||
|
||||
|
||||
/// Assign stuff and update
|
||||
@ -8445,7 +8445,7 @@ hsGDeviceRef *plDXPipeline::MakeTextureRef( plLayerInterface* layer, plMipmap
|
||||
plDXTextureRef *ref = (plDXTextureRef *)b->GetDeviceRef();
|
||||
if( !ref )
|
||||
{
|
||||
ref = TRACKED_NEW plDXTextureRef( formatType,
|
||||
ref = new plDXTextureRef( formatType,
|
||||
mmlvs, b->GetWidth(), b->GetHeight(),
|
||||
numPix, totalSize, totalSize, levelSizes,
|
||||
tData, externData );
|
||||
@ -8564,7 +8564,7 @@ hsGDeviceRef *plDXPipeline::IMakeCubicTextureRef( plLayerInterface* layer, pl
|
||||
ref = (plDXCubeTextureRef *)cubic->GetDeviceRef();
|
||||
if( !ref )
|
||||
{
|
||||
ref = TRACKED_NEW plDXCubeTextureRef( formatType,
|
||||
ref = new plDXCubeTextureRef( formatType,
|
||||
numLevels, faces[ 0 ]->GetWidth(), faces[ 0 ]->GetHeight(),
|
||||
numPixels, totalSize, totalSize * 6, levelSizes,
|
||||
textureData[ 0 ], externData );
|
||||
@ -8668,7 +8668,7 @@ hsBool plDXPipeline::IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevel
|
||||
mipmap->SetCurrLevel( 0 );
|
||||
totalSize = 0;
|
||||
numLevels = maxLevel + 1;
|
||||
levelSizes = TRACKED_NEW uint32_t[ numLevels ];
|
||||
levelSizes = new uint32_t[ numLevels ];
|
||||
int i;
|
||||
for( i = 0; i < numLevels; i++ )
|
||||
{
|
||||
@ -8692,7 +8692,7 @@ hsBool plDXPipeline::IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevel
|
||||
numPixels = mipmap->GetTotalSize() * 8 / mipmap->GetPixelSize();
|
||||
numLevels = mipmap->GetNumLevels();
|
||||
|
||||
levelSizes = TRACKED_NEW uint32_t[ numLevels ];
|
||||
levelSizes = new uint32_t[ numLevels ];
|
||||
|
||||
int i;
|
||||
uint32_t w, h;
|
||||
@ -8734,7 +8734,7 @@ void *plDXPipeline::IGetPixelScratch( uint32_t size )
|
||||
delete [] sPtr;
|
||||
|
||||
if( size > 0 )
|
||||
sPtr = TRACKED_NEW char[ sSize = size ];
|
||||
sPtr = new char[ sSize = size ];
|
||||
else
|
||||
sPtr = nil;
|
||||
}
|
||||
@ -9365,7 +9365,7 @@ void plDXPipeline::IMakeOcclusionSnap()
|
||||
hsMatrix44 ident;
|
||||
ident.Reset();
|
||||
|
||||
hsGMaterial* mat = TRACKED_NEW hsGMaterial;
|
||||
hsGMaterial* mat = new hsGMaterial;
|
||||
hsgResMgr::ResMgr()->NewKey( "OcclusionSnapMat", mat, plLocation::kGlobalFixedLoc );
|
||||
plLayer *lay = mat->MakeBaseLayer();
|
||||
lay->SetZFlags(hsGMatState::kZNoZWrite);
|
||||
@ -10043,7 +10043,7 @@ void plDXPipeline::CheckVertexBufferRef(plGBufferGroup* owner, uint32_t idx)
|
||||
if( !vRef )
|
||||
{
|
||||
// Make the blank ref
|
||||
vRef = TRACKED_NEW plDXVertexBufferRef;
|
||||
vRef = new plDXVertexBufferRef;
|
||||
|
||||
ISetupVertexBufferRef(owner, idx, vRef);
|
||||
|
||||
@ -10075,7 +10075,7 @@ void plDXPipeline::CheckVertexBufferRef(plGBufferGroup* owner, uint32_t idx)
|
||||
|
||||
if( !vRef->fData && (vRef->fFormat != owner->GetVertexFormat()) )
|
||||
{
|
||||
vRef->fData = TRACKED_NEW uint8_t[vRef->fCount * vRef->fVertexSize];
|
||||
vRef->fData = new uint8_t[vRef->fCount * vRef->fVertexSize];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10089,7 +10089,7 @@ void plDXPipeline::CheckIndexBufferRef(plGBufferGroup* owner, uint32_t idx)
|
||||
{
|
||||
// Create one from scratch.
|
||||
|
||||
iRef = TRACKED_NEW plDXIndexBufferRef;
|
||||
iRef = new plDXIndexBufferRef;
|
||||
|
||||
ISetupIndexBufferRef(owner, idx, iRef);
|
||||
|
||||
@ -10468,7 +10468,7 @@ void plDXPipeline::LoadResources()
|
||||
IReleaseAvRTPool();
|
||||
|
||||
// Create all RenderTargets
|
||||
plPipeRTMakeMsg* rtMake = TRACKED_NEW plPipeRTMakeMsg(this);
|
||||
plPipeRTMakeMsg* rtMake = new plPipeRTMakeMsg(this);
|
||||
rtMake->Send();
|
||||
|
||||
// Create all our shadow render targets and pipeline specific POOL_DEFAULT vertex buffers.
|
||||
@ -10477,7 +10477,7 @@ void plDXPipeline::LoadResources()
|
||||
ICreateDynamicBuffers();
|
||||
|
||||
// Create all POOL_DEFAULT (sorted) index buffers in the scene.
|
||||
plPipeGeoMakeMsg* defMake = TRACKED_NEW plPipeGeoMakeMsg(this, true);
|
||||
plPipeGeoMakeMsg* defMake = new plPipeGeoMakeMsg(this, true);
|
||||
defMake->Send();
|
||||
|
||||
// This can be a bit of a mem hog and will use more mem if available, so keep it last in the
|
||||
@ -10490,7 +10490,7 @@ void plDXPipeline::LoadResources()
|
||||
// Force a create of all our static D3D vertex buffers.
|
||||
#define MF_PRELOAD_MANAGEDBUFFERS
|
||||
#ifdef MF_PRELOAD_MANAGEDBUFFERS
|
||||
plPipeGeoMakeMsg* manMake = TRACKED_NEW plPipeGeoMakeMsg(this, false);
|
||||
plPipeGeoMakeMsg* manMake = new plPipeGeoMakeMsg(this, false);
|
||||
manMake->Send();
|
||||
#endif // MF_PRELOAD_MANAGEDBUFFERS
|
||||
|
||||
@ -10501,7 +10501,7 @@ void plDXPipeline::LoadResources()
|
||||
#define MF_PRELOAD_TEXTURES
|
||||
#endif // MF_TOSSER
|
||||
#ifdef MF_PRELOAD_TEXTURES
|
||||
plPipeTexMakeMsg* texMake = TRACKED_NEW plPipeTexMakeMsg(this);
|
||||
plPipeTexMakeMsg* texMake = new plPipeTexMakeMsg(this);
|
||||
texMake->Send();
|
||||
#endif // MF_PRELOAD_TEXTURES
|
||||
|
||||
@ -11000,7 +11000,7 @@ HRESULT plDXPipeline::ISetShaders(plShader* vShader, plShader* pShader)
|
||||
plDXVertexShader* vRef = (plDXVertexShader*)vShader->GetDeviceRef();
|
||||
if( !vRef )
|
||||
{
|
||||
vRef = TRACKED_NEW plDXVertexShader(vShader);
|
||||
vRef = new plDXVertexShader(vShader);
|
||||
hsRefCnt_SafeUnRef(vRef);
|
||||
}
|
||||
if( !vRef->IsLinked() )
|
||||
@ -11028,7 +11028,7 @@ HRESULT plDXPipeline::ISetShaders(plShader* vShader, plShader* pShader)
|
||||
plDXPixelShader* pRef = (plDXPixelShader*)pShader->GetDeviceRef();
|
||||
if( !pRef )
|
||||
{
|
||||
pRef = TRACKED_NEW plDXPixelShader(pShader);
|
||||
pRef = new plDXPixelShader(pShader);
|
||||
hsRefCnt_SafeUnRef(pRef);
|
||||
}
|
||||
if( !pRef->IsLinked() )
|
||||
@ -12961,7 +12961,7 @@ plDXTextureRef* plDXPipeline::IGetULutTextureRef()
|
||||
const int height = 1;
|
||||
if( !fULutTextureRef )
|
||||
{
|
||||
uint32_t* tData = TRACKED_NEW uint32_t[width * height];
|
||||
uint32_t* tData = new uint32_t[width * height];
|
||||
|
||||
uint32_t* pData = tData;
|
||||
int j;
|
||||
@ -12978,7 +12978,7 @@ plDXTextureRef* plDXPipeline::IGetULutTextureRef()
|
||||
}
|
||||
}
|
||||
|
||||
plDXTextureRef* ref = TRACKED_NEW plDXTextureRef( D3DFMT_A8R8G8B8,
|
||||
plDXTextureRef* ref = new plDXTextureRef( D3DFMT_A8R8G8B8,
|
||||
1, // Num mip levels
|
||||
width, height, // width by height
|
||||
width * height, // numpix
|
||||
@ -13271,7 +13271,7 @@ plDXLightRef* plDXPipeline::INextShadowLight(plShadowSlave* slave)
|
||||
|
||||
if( !fLights.fShadowLights[fLights.fNextShadowLight] )
|
||||
{
|
||||
plDXLightRef *lRef = TRACKED_NEW plDXLightRef();
|
||||
plDXLightRef *lRef = new plDXLightRef();
|
||||
|
||||
/// Assign stuff and update
|
||||
lRef->fD3DIndex = fLights.ReserveD3DIndex();
|
||||
@ -13382,7 +13382,7 @@ void plDXPipeline::IMakeRenderTargetPools()
|
||||
int width = 1 << i;
|
||||
int height = width;
|
||||
|
||||
plRenderTarget* rt = TRACKED_NEW plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
|
||||
plRenderTarget* rt = new plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
|
||||
|
||||
// If we've failed to create our render target ref, we're probably out of
|
||||
// video memory. We'll return nil, and this guy just doesn't get a shadow
|
||||
@ -14131,7 +14131,7 @@ hsBool plDXPipeline::IFillAvRTPool(uint16_t numRTs, uint16_t width)
|
||||
uint8_t bitDepth = 32;
|
||||
uint8_t zDepth = 0;
|
||||
uint8_t stencilDepth = 0;
|
||||
fAvRTPool[i] = TRACKED_NEW plRenderTarget(flags, width, width, bitDepth, zDepth, stencilDepth);
|
||||
fAvRTPool[i] = new plRenderTarget(flags, width, width, bitDepth, zDepth, stencilDepth);
|
||||
|
||||
// If anyone fails, release everyone we've created.
|
||||
if (!MakeRenderTargetRef(fAvRTPool[i]))
|
||||
@ -14409,7 +14409,7 @@ void plDXPipeline::IDrawClothingQuad(float x, float y, float w, float h,
|
||||
|
||||
plPipeline *plPipelineCreate::ICreateDXPipeline( hsWinRef hWnd, const hsG3DDeviceModeRecord *devMode )
|
||||
{
|
||||
plDXPipeline *pipe = TRACKED_NEW plDXPipeline( hWnd, devMode );
|
||||
plDXPipeline *pipe = new plDXPipeline( hWnd, devMode );
|
||||
|
||||
// Taken out 8.1.2001 mcn - If we have an error, still return so the client can grab the string
|
||||
// if( pipe->GetErrorString() != nil )
|
||||
|
@ -82,7 +82,7 @@ plDynamicEnvMap::plDynamicEnvMap()
|
||||
fColor.Set(0,0,0,1.f);
|
||||
int i;
|
||||
for( i = 0; i < 6; i++ )
|
||||
fReqMsgs[i] = TRACKED_NEW plRenderRequestMsg(nil, &fReqs[i]);;
|
||||
fReqMsgs[i] = new plRenderRequestMsg(nil, &fReqs[i]);;
|
||||
|
||||
SetPosition(fPos);
|
||||
}
|
||||
@ -103,7 +103,7 @@ plDynamicEnvMap::plDynamicEnvMap(uint16_t width, uint16_t height, uint8_t bitDep
|
||||
fColor.Set(0,0,0,1.f);
|
||||
int i;
|
||||
for( i = 0; i < 6; i++ )
|
||||
fReqMsgs[i] = TRACKED_NEW plRenderRequestMsg(nil, &fReqs[i]);;
|
||||
fReqMsgs[i] = new plRenderRequestMsg(nil, &fReqs[i]);;
|
||||
|
||||
SetPosition(fPos);
|
||||
}
|
||||
@ -408,7 +408,7 @@ void plDynamicEnvMap::SetIncludeCharacters(hsBool b)
|
||||
|
||||
void plDynamicEnvMap::AddVisRegion(plVisRegion* reg)
|
||||
{
|
||||
plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefVisSet);
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefVisSet);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(reg->GetKey(), msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -434,7 +434,7 @@ void plDynamicEnvMap::Read(hsStream* s, hsResMgr* mgr)
|
||||
int nVis = s->ReadLE32();
|
||||
int i;
|
||||
for( i = 0; i < nVis; i++ )
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
|
||||
nVis = s->ReadLE32();
|
||||
for( i = 0; i < nVis; i++)
|
||||
@ -443,10 +443,10 @@ void plDynamicEnvMap::Read(hsStream* s, hsResMgr* mgr)
|
||||
plKey key = plKeyFinder::Instance().StupidSearch(nil, nil, plVisRegion::Index(), name);
|
||||
delete[] name;
|
||||
if (key)
|
||||
hsgResMgr::ResMgr()->AddViaNotify(key, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRootNode), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRootNode), plRefFlags::kActiveRef);
|
||||
|
||||
Init();
|
||||
}
|
||||
@ -499,7 +499,7 @@ fIncCharacters(false),
|
||||
fDisableTexture(nil)
|
||||
{
|
||||
fColor.Set(0,0,0,1.f);
|
||||
fReqMsg = TRACKED_NEW plRenderRequestMsg(nil, &fReq);
|
||||
fReqMsg = new plRenderRequestMsg(nil, &fReq);
|
||||
}
|
||||
|
||||
plDynamicCamMap::plDynamicCamMap(uint16_t width, uint16_t height, uint8_t bitDepth, uint8_t zDepth, uint8_t sDepth) :
|
||||
@ -516,7 +516,7 @@ fDisableTexture(nil),
|
||||
plRenderTarget(plRenderTarget::kIsTexture, width, height, bitDepth, zDepth, sDepth)
|
||||
{
|
||||
fColor.Set(0,0,0,1.f);
|
||||
fReqMsg = TRACKED_NEW plRenderRequestMsg(nil, &fReq);
|
||||
fReqMsg = new plRenderRequestMsg(nil, &fReq);
|
||||
}
|
||||
|
||||
plDynamicCamMap::~plDynamicCamMap()
|
||||
@ -735,13 +735,13 @@ void plDynamicCamMap::IPrepTextureLayers()
|
||||
{
|
||||
fMatLayers[i]->SetUVWSrc(plLayerInterface::kUVWPosition);
|
||||
fMatLayers[i]->SetMiscFlags(hsGMatState::kMiscCam2Screen | hsGMatState::kMiscPerspProjection);
|
||||
hsgResMgr::ResMgr()->SendRef(GetKey(), TRACKED_NEW plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->SendRef(GetKey(), new plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
fMatLayers[i]->SetUVWSrc(0);
|
||||
fMatLayers[i]->SetMiscFlags(0);
|
||||
hsgResMgr::ResMgr()->SendRef(fDisableTexture->GetKey(), TRACKED_NEW plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->SendRef(fDisableTexture->GetKey(), new plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -863,7 +863,7 @@ void plDynamicCamMap::SetIncludeCharacters(hsBool b)
|
||||
|
||||
void plDynamicCamMap::AddVisRegion(plVisRegion* reg)
|
||||
{
|
||||
hsgResMgr::ResMgr()->AddViaNotify( reg->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, kRefVisSet ), plRefFlags::kActiveRef );
|
||||
hsgResMgr::ResMgr()->AddViaNotify( reg->GetKey(), new plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, kRefVisSet ), plRefFlags::kActiveRef );
|
||||
}
|
||||
|
||||
void plDynamicCamMap::SetEnabled(hsBool enable)
|
||||
@ -895,17 +895,17 @@ void plDynamicCamMap::Read(hsStream* s, hsResMgr* mgr)
|
||||
fRefreshRate = s->ReadLEScalar();
|
||||
fIncCharacters = s->ReadBool();
|
||||
SetIncludeCharacters(fIncCharacters);
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRootNode), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRootNode), plRefFlags::kActiveRef);
|
||||
|
||||
int numTargs = s->ReadByte();
|
||||
int i;
|
||||
for (i = 0; i < numTargs; i++)
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kRefTargetNode), plRefFlags::kPassiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kRefTargetNode), plRefFlags::kPassiveRef);
|
||||
|
||||
int nVis = s->ReadLE32();
|
||||
for( i = 0; i < nVis; i++ )
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisSet), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisSet), plRefFlags::kActiveRef);
|
||||
|
||||
nVis = s->ReadLE32();
|
||||
for( i = 0; i < nVis; i++)
|
||||
@ -914,15 +914,15 @@ void plDynamicCamMap::Read(hsStream* s, hsResMgr* mgr)
|
||||
plKey key = plKeyFinder::Instance().StupidSearch(nil, nil, plVisRegion::Index(), name);
|
||||
delete[] name;
|
||||
if (key)
|
||||
hsgResMgr::ResMgr()->AddViaNotify(key, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefDisableTexture), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefDisableTexture), plRefFlags::kActiveRef);
|
||||
|
||||
uint8_t numLayers = s->ReadByte();
|
||||
for (i = 0; i < numLayers; i++)
|
||||
{
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatLayer), plRefFlags::kPassiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatLayer), plRefFlags::kPassiveRef);
|
||||
}
|
||||
|
||||
Init();
|
||||
|
@ -395,7 +395,7 @@ void plGBufferGroup::Read( hsStream *s )
|
||||
fVertBuffStarts.Append(0);
|
||||
fVertBuffEnds.Append(-1);
|
||||
|
||||
vData = TRACKED_NEW uint8_t[size];
|
||||
vData = new uint8_t[size];
|
||||
fVertBuffStorage.Append( vData );
|
||||
plProfile_NewMem(MemBufGrpVertex, temp);
|
||||
|
||||
@ -413,7 +413,7 @@ void plGBufferGroup::Read( hsStream *s )
|
||||
fVertBuffStarts.Append(0);
|
||||
fVertBuffEnds.Append(-1);
|
||||
|
||||
vData = TRACKED_NEW uint8_t[ temp ];
|
||||
vData = new uint8_t[ temp ];
|
||||
hsAssert( vData != nil, "Not enough memory to read in vertices" );
|
||||
s->Read( temp, (void *)vData );
|
||||
fVertBuffStorage.Append( vData );
|
||||
@ -424,7 +424,7 @@ void plGBufferGroup::Read( hsStream *s )
|
||||
|
||||
if( temp > 0 )
|
||||
{
|
||||
cData = TRACKED_NEW plGBufferColor[ temp ];
|
||||
cData = new plGBufferColor[ temp ];
|
||||
s->Read( temp * sizeof( plGBufferColor ), (void *)cData );
|
||||
plProfile_NewMem(MemBufGrpVertex, temp * sizeof(plGBufferColor));
|
||||
}
|
||||
@ -443,7 +443,7 @@ void plGBufferGroup::Read( hsStream *s )
|
||||
fIdxBuffStarts.Append(0);
|
||||
fIdxBuffEnds.Append(-1);
|
||||
|
||||
iData = TRACKED_NEW uint16_t[ temp ];
|
||||
iData = new uint16_t[ temp ];
|
||||
hsAssert( iData != nil, "Not enough memory to read in indices" );
|
||||
s->ReadLE16( temp, (uint16_t *)iData );
|
||||
fIdxBuffStorage.Append( iData );
|
||||
@ -455,7 +455,7 @@ void plGBufferGroup::Read( hsStream *s )
|
||||
{
|
||||
temp = s->ReadLE32();
|
||||
|
||||
fCells.Append( TRACKED_NEW hsTArray<plGBufferCell> );
|
||||
fCells.Append( new hsTArray<plGBufferCell> );
|
||||
fCells[ i ]->SetCount( temp );
|
||||
|
||||
for( j = 0; j < temp; j++ )
|
||||
@ -758,7 +758,7 @@ hsBool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex
|
||||
fColorBuffStorage.Append( nil );
|
||||
fColorBuffCounts.Append( 0 );
|
||||
|
||||
fCells.Append( TRACKED_NEW hsTArray<plGBufferCell> );
|
||||
fCells.Append( new hsTArray<plGBufferCell> );
|
||||
}
|
||||
|
||||
*vbIndex = i;
|
||||
@ -770,7 +770,7 @@ hsBool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex
|
||||
{
|
||||
/// Increase the storage size
|
||||
vStartIdx = fVertBuffSizes[ i ];
|
||||
storagePtr = TRACKED_NEW uint8_t[ fVertBuffSizes[ i ] + numVerts * fLiteStride ];
|
||||
storagePtr = new uint8_t[ fVertBuffSizes[ i ] + numVerts * fLiteStride ];
|
||||
if( fVertBuffSizes[ i ] > 0 )
|
||||
memcpy( storagePtr, fVertBuffStorage[ i ], fVertBuffSizes[ i ] );
|
||||
fVertBuffSizes[ i ] += numVerts * fLiteStride;
|
||||
@ -779,7 +779,7 @@ hsBool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex
|
||||
|
||||
/// Color too
|
||||
cStartIdx = fColorBuffCounts[ i ];
|
||||
cStoragePtr = TRACKED_NEW plGBufferColor[ fColorBuffCounts[ i ] + numVerts ];
|
||||
cStoragePtr = new plGBufferColor[ fColorBuffCounts[ i ] + numVerts ];
|
||||
if( fColorBuffCounts[ i ] > 0 )
|
||||
memcpy( cStoragePtr, fColorBuffStorage[ i ], fColorBuffCounts[ i ] * sizeof( plGBufferColor ) );
|
||||
}
|
||||
@ -789,7 +789,7 @@ hsBool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex
|
||||
|
||||
/// Increase the storage size
|
||||
vStartIdx = fVertBuffSizes[ i ];
|
||||
storagePtr = TRACKED_NEW uint8_t[ fVertBuffSizes[ i ] + numVerts * fStride ];
|
||||
storagePtr = new uint8_t[ fVertBuffSizes[ i ] + numVerts * fStride ];
|
||||
if( fVertBuffSizes[ i ] > 0 )
|
||||
memcpy( storagePtr, fVertBuffStorage[ i ], fVertBuffSizes[ i ] );
|
||||
fVertBuffSizes[ i ] += numVerts * fStride;
|
||||
@ -1065,7 +1065,7 @@ hsBool plGBufferGroup::ReserveIndexStorage( uint32_t numIndices, uint32_t *ibIn
|
||||
*ibStart = fIdxBuffCounts[ i ];
|
||||
|
||||
/// Increase the storage size
|
||||
storagePtr = TRACKED_NEW uint16_t[ fIdxBuffCounts[ i ] + numIndices ];
|
||||
storagePtr = new uint16_t[ fIdxBuffCounts[ i ] + numIndices ];
|
||||
if( fIdxBuffCounts[ i ] > 0 )
|
||||
memcpy( storagePtr, fIdxBuffStorage[ i ], fIdxBuffCounts[ i ] * sizeof( uint16_t ) );
|
||||
|
||||
@ -1134,7 +1134,7 @@ plGBufferTriangle *plGBufferGroup::ConvertToTriList( int16_t spanIndex, uint32
|
||||
hsAssert( whichCell < fCells[ whichVtx ]->GetCount(), "Invalid cell to ConvertToTriList()" );
|
||||
|
||||
/// Create the array and fill it
|
||||
array = TRACKED_NEW plGBufferTriangle[ numTriangles ];
|
||||
array = new plGBufferTriangle[ numTriangles ];
|
||||
hsAssert( array != nil, "Not enough memory to create triangle data in ConvertToTriList()" );
|
||||
|
||||
storagePtr = fIdxBuffStorage[ whichIdx ];
|
||||
|
@ -166,7 +166,7 @@ void plPlate::SetTexture(plBitmap *texture)
|
||||
hsGMaterial *material;
|
||||
char keyName[ 128 ];
|
||||
|
||||
material = TRACKED_NEW hsGMaterial();
|
||||
material = new hsGMaterial();
|
||||
sprintf( keyName, "PlateBlank#%d", fMagicUniqueKeyInt++ );
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, material, plLocation::kGlobalFixedLoc );
|
||||
layer = material->MakeBaseLayer();
|
||||
@ -176,7 +176,7 @@ void plPlate::SetTexture(plBitmap *texture)
|
||||
layer->SetOpacity( fOpacity );
|
||||
layer->SetUVWSrc(plLayerInterface::kUVWPassThru);
|
||||
|
||||
hsgResMgr::ResMgr()->AddViaNotify(texture->GetKey(), TRACKED_NEW plGenRefMsg(layer->GetKey(), plRefMsg::kOnCreate, -1, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(texture->GetKey(), new plGenRefMsg(layer->GetKey(), plRefMsg::kOnCreate, -1, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
|
||||
|
||||
SetMaterial(material);
|
||||
}
|
||||
@ -212,7 +212,7 @@ plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, hsBool wi
|
||||
else
|
||||
{
|
||||
/// Create a new bitmap
|
||||
fMipmap = TRACKED_NEW plMipmap( width, height, withAlpha ? plMipmap::kARGB32Config : plMipmap::kRGB32Config, 1 );
|
||||
fMipmap = new plMipmap( width, height, withAlpha ? plMipmap::kARGB32Config : plMipmap::kRGB32Config, 1 );
|
||||
memset( fMipmap->GetImage(), 0xff, height * fMipmap->GetRowBytes() );
|
||||
sprintf( keyName, "PlateBitmap#%d", fMagicUniqueKeyInt++ );
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, fMipmap, plLocation::kGlobalFixedLoc );
|
||||
@ -220,7 +220,7 @@ plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, hsBool wi
|
||||
}
|
||||
|
||||
/// NOW create a layer wrapper and a material for that layer
|
||||
material = TRACKED_NEW hsGMaterial();
|
||||
material = new hsGMaterial();
|
||||
sprintf( keyName, "PlateBlank#%d", fMagicUniqueKeyInt++ );
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, material, plLocation::kGlobalFixedLoc );
|
||||
layer = material->MakeBaseLayer();
|
||||
@ -229,7 +229,7 @@ plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, hsBool wi
|
||||
layer->SetBlendFlags( layer->GetBlendFlags() | hsGMatState::kBlendAlpha );
|
||||
layer->SetOpacity( fOpacity );
|
||||
|
||||
hsgResMgr::ResMgr()->AddViaNotify( fMipmap->GetKey(), TRACKED_NEW plLayRefMsg( layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef );
|
||||
hsgResMgr::ResMgr()->AddViaNotify( fMipmap->GetKey(), new plLayRefMsg( layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef );
|
||||
|
||||
// Set up a ref to these. Since we don't have a key, we use the
|
||||
// generic RefObject() (and matching UnRefObject() when we're done).
|
||||
@ -249,7 +249,7 @@ void plPlate::CreateFromResource(const char *resName)
|
||||
{
|
||||
if (resName)
|
||||
{
|
||||
plMipmap* resTexture = TRACKED_NEW plMipmap;
|
||||
plMipmap* resTexture = new plMipmap;
|
||||
resTexture->CopyFrom(plClientResMgr::Instance().getResource(resName));
|
||||
|
||||
char keyName[128];
|
||||
@ -699,7 +699,7 @@ plPlateManager::~plPlateManager()
|
||||
|
||||
void plPlateManager::CreatePlate( plPlate **handle )
|
||||
{
|
||||
plPlate *plate = TRACKED_NEW plPlate( handle );
|
||||
plPlate *plate = new plPlate( handle );
|
||||
|
||||
|
||||
plate->ILink( &fPlates );
|
||||
@ -721,7 +721,7 @@ void plPlateManager::CreatePlate( plPlate **handle, float x, float y, float w
|
||||
|
||||
void plPlateManager::CreateGraphPlate( plGraphPlate **handle )
|
||||
{
|
||||
plGraphPlate *plate = TRACKED_NEW plGraphPlate( (plPlate **)handle );
|
||||
plGraphPlate *plate = new plGraphPlate( (plPlate **)handle );
|
||||
|
||||
|
||||
plate->ILink( &fPlates );
|
||||
|
@ -161,7 +161,7 @@ uint32_t plCubicRenderTarget::Read( hsStream *s )
|
||||
for( i = 0; i < 6; i++ )
|
||||
{
|
||||
if( fFaces[ i ] == nil )
|
||||
fFaces[ i ] = TRACKED_NEW plRenderTarget();
|
||||
fFaces[ i ] = new plRenderTarget();
|
||||
|
||||
fFaces[ i ]->fParent = this;
|
||||
total += fFaces[ i ]->Read( s );
|
||||
|
@ -166,7 +166,7 @@ uint16_t *plTextFont::IInitFontTexture( void )
|
||||
fCharInfo[ '\t' ].fH = fCharInfo[ 32 ].fH;
|
||||
|
||||
/// Now create the data block
|
||||
uint16_t *data = TRACKED_NEW uint16_t[ fTextureWidth * fTextureHeight ];
|
||||
uint16_t *data = new uint16_t[ fTextureWidth * fTextureHeight ];
|
||||
tBits = data;
|
||||
for( y = 0; y < fTextureHeight; y++ )
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ void plTextGenerator::Attach( plMipmap *host, uint16_t width, uint16_t height
|
||||
}
|
||||
|
||||
/// Send ourselves a passive ref of the mipmap, so we get notified if and when it goes away
|
||||
hsgResMgr::ResMgr()->AddViaNotify( fHost->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kActiveRef );
|
||||
hsgResMgr::ResMgr()->AddViaNotify( fHost->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, 0 ), plRefFlags::kActiveRef );
|
||||
#endif
|
||||
/// All done!
|
||||
}
|
||||
|
Reference in New Issue
Block a user