2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04: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

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsBlueSpiralGame, args, "Params: typeID\nRetur
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyBlueSpiralGame::IsBlueSpiralGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsClimbingWallGame, args, "Params: typeID\nRet
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyClimbingWallGame::IsClimbingWallGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns tru
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyHeekGame::IsHeekGame(text);
@ -122,7 +122,7 @@ PYTHON_METHOD_DEFINITION(ptHeekGame, playGame, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->PlayGame(position, points, temp);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsMarkerGame, args, "Params: typeID\nReturns t
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyMarkerGame::IsMarkerGame(text);
@ -117,7 +117,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
if (PyUnicode_Check(gameNameObj))
{
int strLen = PyUnicode_GetSize(gameNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)gameNameObj, text, strLen);
text[strLen] = L'\0';
name = text;
@ -142,7 +142,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
if (PyUnicode_Check(templateIdObj))
{
int strLen = PyUnicode_GetSize(templateIdObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)templateIdObj, text, strLen);
text[strLen] = L'\0';
templateId = text;
@ -181,7 +181,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeGameName, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->ChangeGameName(text);
@ -236,7 +236,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
name = text;
@ -261,7 +261,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
if (PyUnicode_Check(ageObj))
{
int strLen = PyUnicode_GetSize(ageObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)ageObj, text, strLen);
text[strLen] = L'\0';
age = text;
@ -309,7 +309,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeMarkerName, args)
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
self->fThis->ChangeMarkerName(markerId, text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsTTTGame, args, "Params: typeID\nReturns true
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyTTTGame::IsTTTGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsVarSyncGame, args, "Params: typeID\nReturns
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyVarSyncGame::IsVarSyncGame(text);
@ -121,7 +121,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, setStringVar, args)
if (PyUnicode_Check(valueObj))
{
int strLen = PyUnicode_GetSize(valueObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SetStringVar(id, text);
@ -187,7 +187,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
if (PyUnicode_Check(varNameObj))
{
int strLen = PyUnicode_GetSize(varNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
text[strLen] = L'\0';
varName = text;
@ -211,7 +211,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
if (PyUnicode_Check(valueObj))
{
int strLen = PyUnicode_GetSize(valueObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
text[strLen] = L'\0';
val = text;
@ -249,7 +249,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createNumericVar, args)
if (PyUnicode_Check(varNameObj))
{
int strLen = PyUnicode_GetSize(varNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
text[strLen] = L'\0';
varName = text;

View File

@ -87,7 +87,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetGameNameByTypeID, args, "Params: guid\nRetu
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
std::wstring retVal = pyGameCli::GetGameNameByTypeID(text);

View File

@ -93,7 +93,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
if (PyUnicode_Check(playerNameObj))
{
int strLen = PyUnicode_GetSize(playerNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)playerNameObj, text, strLen);
text[strLen] = L'\0';
playerName = text;
@ -116,7 +116,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
if (PyUnicode_Check(avatarShapeObj))
{
int strLen = PyUnicode_GetSize(avatarShapeObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)avatarShapeObj, text, strLen);
text[strLen] = L'\0';
avatarShape = text;
@ -139,7 +139,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePlayerW, args, "Params: playerName, avat
if (PyUnicode_Check(invitationObj))
{
int strLen = PyUnicode_GetSize(invitationObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)invitationObj, text, strLen);
text[strLen] = L'\0';
invitation = text;

View File

@ -131,7 +131,7 @@ void cyAnimation::Play()
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -174,7 +174,7 @@ void cyAnimation::Stop()
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -212,7 +212,7 @@ void cyAnimation::Resume()
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -264,7 +264,7 @@ void cyAnimation::PlayToTime(float time)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -303,7 +303,7 @@ void cyAnimation::PlayToPercentage(float zeroToOne)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -343,7 +343,7 @@ void cyAnimation::SkipToTime(float time)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -382,7 +382,7 @@ void cyAnimation::Looped(hsBool looped)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -423,7 +423,7 @@ void cyAnimation::Backwards(hsBool backwards)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -464,7 +464,7 @@ void cyAnimation::SetLoopStart(float start)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -496,7 +496,7 @@ void cyAnimation::SetLoopEnd(float end)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -538,7 +538,7 @@ void cyAnimation::Speed(float speed)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -571,7 +571,7 @@ void cyAnimation::IRunOneCmd(int cmd)
if ( fRecvr.Count() > 0 )
{
// create message
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{

View File

@ -179,7 +179,7 @@ void cyAvatar::OneShot(pyKey &seekKey, float duration, hsBool usePhysics,
if ( fRecvr.Count() > 0 )
{
// create message
plAvOneShotMsg* pMsg = TRACKED_NEW plAvOneShotMsg(
plAvOneShotMsg* pMsg = new plAvOneShotMsg(
(plKey )fSender,
nil,
seekKey.getKey(), // Mark D told me to do it ...paulg
@ -226,7 +226,7 @@ void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp)
if ( plOneShotMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()) != nil )
{
// create a message OneShotMessage
plOneShotMsg* pMsg = TRACKED_NEW plOneShotMsg;
plOneShotMsg* pMsg = new plOneShotMsg;
// check if this needs to be network forced to all clients
if (netProp)
{
@ -267,7 +267,7 @@ void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp)
{
// its a multistage thingy... need to send it a plNotifyMsg
// create new notify message to do the actual send with
plNotifyMsg* pNMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pNMsg = new plNotifyMsg;
// set whether this should be forced over the network (ignoring net-cascading)
if (netProp)
@ -320,7 +320,7 @@ void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netFor
{
// its a multistage thingy... need to send it a plNotifyMsg
// create new notify message to do the actual send with
plNotifyMsg* pNMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pNMsg = new plNotifyMsg;
// set whether this should be forced over the network (ignoring net-cascading)
if (netProp)
@ -385,7 +385,7 @@ void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float n
if ( avKey )
{
// create the message
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg::kNextStage, 0, setTime, newTime,
setDirection, (bool)isForward, transTime);
@ -424,7 +424,7 @@ void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, flo
if ( avKey )
{
// create the message
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg::kPrevStage, 0, setTime, newTime,
setDirection, (bool)isForward, transTime);
@ -464,7 +464,7 @@ void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool s
if ( avKey )
{
// create the message
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey,
plAvBrainGenericMsg::kGotoStage, stage, setTime, newTime,
setDirection, isForward, transTime);
@ -484,7 +484,7 @@ void cyAvatar::SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsB
// if it is a Multistage guy
if ( plMultistageBehMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()) != nil )
{
plMultistageModMsg* pMsg = TRACKED_NEW plMultistageModMsg((plKey)nil, behKey.getKey());
plMultistageModMsg* pMsg = new plMultistageModMsg((plKey)nil, behKey.getKey());
pMsg->SetCommand(plMultistageModMsg::kSetLoopCount);
pMsg->fStageNum = (uint8_t)stage;
pMsg->fNumLoops = (uint8_t)loopCount;
@ -513,7 +513,7 @@ void cyAvatar::Seek(pyKey &seekKey, float duration, hsBool usePhysics)
if ( fRecvr.Count() > 0 )
{
// create message
plAvSeekMsg* pMsg = TRACKED_NEW plAvSeekMsg(
plAvSeekMsg* pMsg = new plAvSeekMsg(
(plKey)fSender,nil, seekKey.getKey(),duration,usePhysics);
// check if this needs to be network forced to all clients
@ -1546,7 +1546,7 @@ void cyAvatar::EnterSubWorld(pySceneObject& object)
plKey subWorldKey = SOkey;
plKey physKey = avatar->GetKey();
plKey nilKey; // sorry
plSubWorldMsg *swMsg = TRACKED_NEW plSubWorldMsg(nilKey, physKey, subWorldKey);
plSubWorldMsg *swMsg = new plSubWorldMsg(nilKey, physKey, subWorldKey);
swMsg->Send();
}
}
@ -1573,7 +1573,7 @@ void cyAvatar::ExitSubWorld()
plKey subWorldKey; // we're going to the nil subworld
plKey physKey = avatar->GetKey();
plKey nilKey; // sorry
plSubWorldMsg *swMsg = TRACKED_NEW plSubWorldMsg(nilKey, physKey, subWorldKey);
plSubWorldMsg *swMsg = new plSubWorldMsg(nilKey, physKey, subWorldKey);
swMsg->Send();
}
}
@ -1949,7 +1949,7 @@ bool IExitTopmostGenericMode()
{
plArmatureMod *avatar = plAvatarMgr::GetInstance()->GetLocalAvatar();
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg(nil, avatar->GetKey(),
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg(nil, avatar->GetKey(),
plAvBrainGenericMsg::kGotoStage, 2, false, 0.0,
false, false, 0.0);

View File

@ -83,7 +83,7 @@ void cyCamera::SetSender(plKey &sender)
void cyCamera::Push(pyKey& newCamKey)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
@ -113,7 +113,7 @@ void cyCamera::Push(pyKey& newCamKey)
void cyCamera::Pop(pyKey& oldCamKey)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
@ -145,7 +145,7 @@ void cyCamera::ControlKey(int32_t controlKey, hsBool activated)
// make sure that we have a virtual camera to send this to
if ( fTheCam )
{
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
// set sender if there is one
if ( fSender )
pMsg->SetSender(fSender);
@ -173,7 +173,7 @@ void cyCamera::ControlKey(int32_t controlKey, hsBool activated)
void cyCamera::TransitionTo(pyKey& newCamKey, double time, hsBool save)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
// must have a receiver!
@ -200,7 +200,7 @@ void cyCamera::SetEnableFirstPersonOverride(hsBool state)
if ( fTheCam )
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
@ -218,7 +218,7 @@ void cyCamera::SetEnableFirstPersonOverride(hsBool state)
void cyCamera::UndoFirstPerson()
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
// must have a receiver!

View File

@ -78,7 +78,7 @@ void cyDraw::EnableT(hsBool state)
if ( fRecvr.Count() > 0 )
{
// create message
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
plEnableMsg* pMsg = new plEnableMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{

View File

@ -70,8 +70,8 @@ void cyInputInterface::PushTelescopeInterface()
{
if (!fTelescopeInterface)
{
fTelescopeInterface = TRACKED_NEW plTelescopeInputInterface;
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kAddInterface);
fTelescopeInterface = new plTelescopeInputInterface;
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kAddInterface);
pMsg->SetIFace(fTelescopeInterface);
pMsg->Send();
}
@ -88,7 +88,7 @@ void cyInputInterface::PopTelescope()
{
if (fTelescopeInterface)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kRemoveInterface);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kRemoveInterface);
pMsg->SetIFace(fTelescopeInterface);
pMsg->Send();
hsRefCnt_SafeUnRef( fTelescopeInterface );

View File

@ -158,7 +158,7 @@ void cyMisc::Console(const char* command)
if ( command != nil )
{
// create message to send to the console
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetBCastFlag(plMessage::kBCastByType);
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
pMsg->SetControlActivated(true);
@ -172,7 +172,7 @@ void cyMisc::ConsoleNet(const char* command, hsBool netForce)
if ( command != nil )
{
// create message to send to the console
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetBCastFlag(plMessage::kBCastByType);
pMsg->SetBCastFlag(plMessage::kNetPropagate);
if ( netForce )
@ -250,13 +250,13 @@ void cyMisc::PopUpConsole(const char* command)
if ( command != nil )
{
// create message to send to the console
plControlEventMsg* pMsg1 = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg1 = new plControlEventMsg;
pMsg1->SetBCastFlag(plMessage::kBCastByType);
pMsg1->SetControlCode(B_SET_CONSOLE_MODE);
pMsg1->SetControlActivated(true);
plgDispatch::MsgSend( pMsg1 ); // whoosh... off it goes
// create message to send to the console
plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg2 = new plControlEventMsg;
pMsg2->SetBCastFlag(plMessage::kBCastByType);
pMsg2->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
pMsg2->SetControlActivated(true);
@ -275,7 +275,7 @@ void cyMisc::PopUpConsole(const char* command)
void cyMisc::TimerCallback(pyKey& selfkey, float time, uint32_t id)
{
// setup the message to come back to whoever the pyKey is pointing to
plTimerCallbackMsg* pTimerMsg = TRACKED_NEW plTimerCallbackMsg(selfkey.getKey(),id);
plTimerCallbackMsg* pTimerMsg = new plTimerCallbackMsg(selfkey.getKey(),id);
plgTimerCallbackMgr::NewTimer( time, pTimerMsg );
}
@ -308,7 +308,7 @@ void cyMisc::AttachObject(pyKey& ckey, pyKey& pkey)
if ( childKey )
{
// create the attach message to attach the child
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
plgDispatch::MsgSend( pMsg );
}
}
@ -321,7 +321,7 @@ void cyMisc::AttachObjectSO(pySceneObject& cobj, pySceneObject& pobj)
if ( childKey )
{
// create the attach message to attach the child
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRequest);
plgDispatch::MsgSend( pMsg );
}
}
@ -344,7 +344,7 @@ void cyMisc::DetachObject(pyKey& ckey, pyKey& pkey)
if ( childKey )
{
// create the attach message to detach the child
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
plgDispatch::MsgSend( pMsg );
}
}
@ -357,7 +357,7 @@ void cyMisc::DetachObjectSO(pySceneObject& cobj, pySceneObject& pobj)
if ( childKey )
{
// create the attach message to detach the child
plAttachMsg* pMsg = TRACKED_NEW plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
plAttachMsg* pMsg = new plAttachMsg(parentKey, childKey->GetObjectPtr(), plRefMsg::kOnRemove);
plgDispatch::MsgSend( pMsg );
}
}
@ -688,7 +688,7 @@ time_t cyMisc::ConvertGMTtoDni(time_t gtime)
//
void cyMisc::ExcludeRegionSet(pyKey& sender, pyKey& exKey, uint16_t state)
{
plExcludeRegionMsg *msg = TRACKED_NEW plExcludeRegionMsg;
plExcludeRegionMsg *msg = new plExcludeRegionMsg;
switch (state)
{
@ -706,7 +706,7 @@ void cyMisc::ExcludeRegionSet(pyKey& sender, pyKey& exKey, uint16_t state)
void cyMisc::ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, uint16_t state)
{
plExcludeRegionMsg *msg = TRACKED_NEW plExcludeRegionMsg;
plExcludeRegionMsg *msg = new plExcludeRegionMsg;
switch (state)
{
@ -1083,7 +1083,7 @@ float cyMisc::GetMaxListenDistSq()
uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const char* message, uint32_t flags)
{
// create the messge that will contain the chat message
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kHACKChatMsg );
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kHACKChatMsg );
msg->SetString( message );
msg->SetUser( from.GetPlayerName(), from.GetPlayerID() );
msg->SetFlags( flags );
@ -1117,7 +1117,7 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolist, const wchar_t* message, uint32_t flags)
{
// create the messge that will contain the chat message
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kHACKChatMsg );
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kHACKChatMsg );
msg->SetString( message );
msg->SetUser( from.GetPlayerName(), from.GetPlayerID() );
msg->SetFlags( flags );
@ -1160,7 +1160,7 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
void cyMisc::SendKIMessage(uint32_t command, float value)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (uint8_t)command );
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
// check to see if the value makes any sense
if ( command == pfKIMsg::kSetChatFadeDelay )
@ -1188,7 +1188,7 @@ void cyMisc::SendKIMessage(uint32_t command, float value)
void cyMisc::SendKIMessageS(uint32_t command, const wchar_t* value)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (uint8_t)command );
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
msg->SetString( value );
@ -1209,7 +1209,7 @@ void cyMisc::SendKIMessageS(uint32_t command, const wchar_t* value)
void cyMisc::SendKIMessageI(uint32_t command, int32_t value)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( (uint8_t)command );
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
msg->SetIntValue(value);
@ -1230,7 +1230,7 @@ void cyMisc::SendKIMessageI(uint32_t command, int32_t value)
void cyMisc::SendKIGZMarkerMsg(int32_t markerNumber, pyKey& sender)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kGZInRange );
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kGZInRange );
msg->SetIntValue(markerNumber);
msg->SetSender(sender.getKey());
@ -1241,7 +1241,7 @@ void cyMisc::SendKIGZMarkerMsg(int32_t markerNumber, pyKey& sender)
void cyMisc::SendKIRegisterImagerMsg(const char* imagerName, pyKey& sender)
{
pfKIMsg *msg = TRACKED_NEW pfKIMsg(pfKIMsg::kRegisterImager);
pfKIMsg *msg = new pfKIMsg(pfKIMsg::kRegisterImager);
msg->SetString(imagerName);
msg->SetSender(sender.getKey());
@ -1263,7 +1263,7 @@ void cyMisc::SendKIRegisterImagerMsg(const char* imagerName, pyKey& sender)
void cyMisc::YesNoDialog(pyKey& sender, const char* thestring)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kYesNoDialog );
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kYesNoDialog );
msg->SetSender(sender.getKey());
msg->SetString(thestring);
@ -1292,7 +1292,7 @@ void cyMisc::YesNoDialog(pyKey& sender, std::wstring thestring)
void cyMisc::RateIt(const char* chronicleName, const char* thestring, hsBool onceFlag)
{
// create the mesage to send
pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kRateIt );
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kRateIt );
msg->SetUser(chronicleName,0);
msg->SetString(thestring);
@ -1315,7 +1315,7 @@ void cyMisc::SetPrivateChatList(const std::vector<pyPlayer*> & tolist)
{
if (tolist.size() > 0)
{
plNetVoiceListMsg* pMsg = TRACKED_NEW plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode);
plNetVoiceListMsg* pMsg = new plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode);
for (int i=0 ; i<tolist.size() ; i++ )
pMsg->GetClientList()->Append(tolist[i]->GetPlayerID());
@ -1335,7 +1335,7 @@ void cyMisc::SetPrivateChatList(const std::vector<pyPlayer*> & tolist)
//
void cyMisc::ClearPrivateChatList(pyKey& member)
{
plNetVoiceListMsg* pMsg = TRACKED_NEW plNetVoiceListMsg(plNetVoiceListMsg::kDistanceMode);
plNetVoiceListMsg* pMsg = new plNetVoiceListMsg(plNetVoiceListMsg::kDistanceMode);
pMsg->SetRemovedKey( member.getKey() );
pMsg->Send();
}
@ -1371,7 +1371,7 @@ void cyMisc::SendPetitionToCCR(const char* message)
void cyMisc::SendPetitionToCCRI(const char* message, uint8_t reason,const char* title)
{
// create the mesage to send
plCCRPetitionMsg *msg = TRACKED_NEW plCCRPetitionMsg();
plCCRPetitionMsg *msg = new plCCRPetitionMsg();
msg->SetNote(message);
msg->SetType(reason);
if (title)
@ -1391,7 +1391,7 @@ void cyMisc::SendPetitionToCCRI(const char* message, uint8_t reason,const char*
void cyMisc::SendChatToCCR(const char* message,int32_t CCRPlayerID)
{
// create the mesage to send
plCCRCommunicationMsg *msg = TRACKED_NEW plCCRCommunicationMsg();
plCCRCommunicationMsg *msg = new plCCRCommunicationMsg();
msg->SetMessage(message);
msg->SetType(plCCRCommunicationMsg::kReturnChatMsg);
msg->SetBCastFlag(plMessage::kNetAllowInterAge);
@ -1426,7 +1426,7 @@ void cyMisc::PageInNodes(const std::vector<std::string> & nodeNames, const char*
if (hsgResMgr::ResMgr())
{
plSynchEnabler ps(false); // disable dirty tracking while paging in
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoom);
plClientMsg* msg = new plClientMsg(plClientMsg::kLoadRoom);
plKey clientKey = hsgResMgr::ResMgr()->FindKey(kClient_KEY);
msg->AddReceiver(clientKey);
@ -1443,7 +1443,7 @@ void cyMisc::PageOutNode(const char* nodeName)
if ( hsgResMgr::ResMgr() )
{
plSynchEnabler ps(false); // disable dirty tracking while paging out
plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kUnloadRoom);
plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kUnloadRoom);
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
pMsg1->AddReceiver( clientKey );
pMsg1->AddRoomLoc(plKeyFinder::Instance().FindLocation(nil, nodeName));
@ -1526,7 +1526,7 @@ void cyMisc::SetClearColor(float red, float green, float blue)
char command[256];
sprintf(command,"Graphics.Renderer.SetClearColor %f %f %f",red,green,blue);
// create message to send to the console
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetBCastFlag(plMessage::kBCastByType);
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
pMsg->SetControlActivated(true);
@ -1547,7 +1547,7 @@ void cyMisc::EnableAvatarCursorFade()
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
if (nmgr)
{
plIfaceFadeAvatarMsg* iMsg = TRACKED_NEW plIfaceFadeAvatarMsg;
plIfaceFadeAvatarMsg* iMsg = new plIfaceFadeAvatarMsg;
iMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
iMsg->SetBCastFlag(plMessage::kBCastByExactType);
iMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE);
@ -1561,7 +1561,7 @@ void cyMisc::DisableAvatarCursorFade()
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
if (nmgr)
{
plIfaceFadeAvatarMsg* iMsg = TRACKED_NEW plIfaceFadeAvatarMsg;
plIfaceFadeAvatarMsg* iMsg = new plIfaceFadeAvatarMsg;
iMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
iMsg->SetBCastFlag(plMessage::kBCastByExactType);
iMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE);
@ -1575,7 +1575,7 @@ void cyMisc::FadeLocalPlayer(hsBool fade)
plNetClientMgr* nmgr = plNetClientMgr::GetInstance();
if (nmgr)
{
plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg;
plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg;
pMsg->SetFadeOut(fade);
pMsg->SetSubjectKey(nmgr->GetLocalPlayerKey());
pMsg->SetBCastFlag(plMessage::kBCastByExactType);
@ -1595,7 +1595,7 @@ void cyMisc::FadeLocalPlayer(hsBool fade)
void cyMisc::EnableOfferBookMode(pyKey& selfkey, const char* ageFilename, const char* ageInstanceName)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetOfferBookMode);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetOfferBookMode);
pMsg->SetSender(selfkey.getKey());
pMsg->SetAgeFileName(ageFilename);
pMsg->SetAgeName(ageInstanceName);
@ -1604,13 +1604,13 @@ void cyMisc::EnableOfferBookMode(pyKey& selfkey, const char* ageFilename, const
void cyMisc::DisableOfferBookMode()
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kClearOfferBookMode);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kClearOfferBookMode);
pMsg->Send();
}
void cyMisc::NotifyOffererPublicLinkCompleted(uint32_t offerer)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferCompleted, plNetClientMgr::GetInstance()->GetPlayerID());
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferCompleted, plNetClientMgr::GetInstance()->GetPlayerID());
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
{
@ -1625,7 +1625,7 @@ void cyMisc::NotifyOffererPublicLinkCompleted(uint32_t offerer)
void cyMisc::NotifyOffererPublicLinkRejected(uint32_t offerer)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferRejected);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferRejected);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
{
@ -1641,7 +1641,7 @@ void cyMisc::NotifyOffererPublicLinkRejected(uint32_t offerer)
void cyMisc::NotifyOffererPublicLinkAccepted(uint32_t offerer)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferAccepted);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kNotifyOfferAccepted);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
if (offerer != plNetClientMgr::GetInstance()->GetPlayerID())
{
@ -1658,9 +1658,9 @@ void cyMisc::ToggleAvatarClickability(hsBool on)
{
plInputIfaceMgrMsg* pMsg = 0;
if (on)
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIEnableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIEnableAvatarClickable);
else
pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
@ -1670,7 +1670,7 @@ void cyMisc::ToggleAvatarClickability(hsBool on)
void cyMisc::SetShareSpawnPoint(const char* spawnPoint)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareSpawnPoint);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareSpawnPoint);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetSpawnPoint(spawnPoint);
pMsg->Send();
@ -1678,7 +1678,7 @@ void cyMisc::SetShareSpawnPoint(const char* spawnPoint)
void cyMisc::SetShareAgeInstanceGuid(const Uuid& guid)
{
plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareAgeInstanceGuid);
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareAgeInstanceGuid);
pMsg->SetSender(plNetClientMgr::GetInstance()->GetLocalPlayerKey());
pMsg->SetAgeInstanceGuid(guid);
pMsg->Send();
@ -1778,7 +1778,7 @@ void cyMisc::TransferParticlesToKey(pyKey& fromKey, pyKey& toKey, int numParticl
plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar();
plParticleTransferMsg* pMsg = TRACKED_NEW plParticleTransferMsg(nil, avMod->GetKey(), 0, frKey, numParticles);
plParticleTransferMsg* pMsg = new plParticleTransferMsg(nil, avMod->GetKey(), 0, frKey, numParticles);
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
pMsg->Send();
@ -1813,7 +1813,7 @@ void cyMisc::SetParticleDissentPoint(float x, float y, float z, pyKey& particles
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
if (flock)
{
(TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, x, y, z))->Send();
(new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, x, y, z))->Send();
}
}
@ -1847,7 +1847,7 @@ void cyMisc::SetParticleOffset(float x, float y, float z, pyKey& particles)
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
if (flock)
{
(TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, x, y, z))->Send();
(new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, x, y, z))->Send();
}
}
@ -1880,7 +1880,7 @@ void cyMisc::KillParticles(float time, float pct, pyKey& particles)
plParticleEffect *flock = sys->GetEffect(plParticleFlockEffect::Index());
if (flock)
{
plParticleKillMsg* pMsg = TRACKED_NEW plParticleKillMsg(nil, frKey, 0, pct, time, plParticleKillMsg::kParticleKillPercentage | plParticleKillMsg::kParticleKillImmortalOnly);
plParticleKillMsg* pMsg = new plParticleKillMsg(nil, frKey, 0, pct, time, plParticleKillMsg::kParticleKillPercentage | plParticleKillMsg::kParticleKillImmortalOnly);
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
pMsg->SetBCastFlag(plMessage::kPropagateToChildren);
@ -1997,12 +1997,12 @@ void cyMisc::SetLightAnimationOn(pyKey& light, std::string lightName, hsBool sta
}
if (pIface)
{
plEnableMsg* enableMsg = TRACKED_NEW plEnableMsg;
plEnableMsg* enableMsg = new plEnableMsg;
enableMsg->AddReceiver(pIface->GetKey());
enableMsg->SetBCastFlag(plMessage::kNetPropagate);
enableMsg->SetBCastFlag(plMessage::kNetForce);
plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* animMsg = new plAnimCmdMsg;
animMsg->AddReceiver(pIface->GetOwnerKey());
animMsg->SetBCastFlag(plMessage::kPropagateToModifiers);
animMsg->SetBCastFlag(plMessage::kNetPropagate);
@ -2034,7 +2034,7 @@ void cyMisc::SetLightAnimationOn(pyKey& light, std::string lightName, hsBool sta
void cyMisc::RegisterForControlEventMessages(hsBool on, pyKey& k)
{
plCmdIfaceModMsg* pMsg = TRACKED_NEW plCmdIfaceModMsg;
plCmdIfaceModMsg* pMsg = new plCmdIfaceModMsg;
pMsg->SetSender(k.getKey());
if (on)
pMsg->SetCmd(plCmdIfaceModMsg::kAdd);
@ -2074,17 +2074,17 @@ bool cyMisc::RequestLOSScreen(pyKey &selfkey, int32_t ID, float xPos, float yPos
switch (what)
{
case kClickables:
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest );
pMsg->SetCullDB(plSimDefs::kLOSDBUIBlockers);
break;
case kCameraBlockers:
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest );
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest );
break;
case kCustom:
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestClosest );
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestClosest );
break;
case kShootable:
pMsg = TRACKED_NEW plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBShootableItems, plLOSRequestMsg::kTestClosest );
pMsg = new plLOSRequestMsg( selfkey.getKey(), startPos, endPos, plSimDefs::kLOSDBShootableItems, plLOSRequestMsg::kTestClosest );
break;
}
@ -2221,7 +2221,7 @@ void cyMisc::ShootBulletFromScreen(pyKey &selfkey, float xPos, float yPos, float
view.Normalize();
startPos = startPos + (view * 1.5f);
plBulletMsg* bull = TRACKED_NEW plBulletMsg( selfkey.getKey(), nil, nil );
plBulletMsg* bull = new plBulletMsg( selfkey.getKey(), nil, nil );
bull->FireShot(startPos, view, radius, range);
bull->Send();
}
@ -2246,7 +2246,7 @@ void cyMisc::ShootBulletFromObject(pyKey &selfkey, pySceneObject* sobj, float ra
dir.Normalize();
hsPoint3 pos = l2w.GetTranslate();
plBulletMsg* bull = TRACKED_NEW plBulletMsg(selfkey.getKey(), nil, nil);
plBulletMsg* bull = new plBulletMsg(selfkey.getKey(), nil, nil);
bull->FireShot(pos, dir, radius, range);
bull->Send();
@ -2521,7 +2521,7 @@ void cyMisc::PyClearCameraStack()
void cyMisc::RecenterCamera()
{
plCameraMsg* pCam = TRACKED_NEW plCameraMsg;
plCameraMsg* pCam = new plCameraMsg;
pCam->SetBCastFlag(plMessage::kBCastByExactType);
pCam->SetCmd(plCameraMsg::kResetPanning);
pCam->Send();
@ -2531,19 +2531,19 @@ void cyMisc::RecenterCamera()
void cyMisc::FadeIn(float lenTime, bool holdFlag, bool noSound)
{
plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( noSound ? plTransitionMsg::kFadeInNoSound : plTransitionMsg::kFadeIn, lenTime, holdFlag );
plTransitionMsg *msg = new plTransitionMsg( noSound ? plTransitionMsg::kFadeInNoSound : plTransitionMsg::kFadeIn, lenTime, holdFlag );
plgDispatch::MsgSend( msg );
}
void cyMisc::FadeOut(float lenTime, bool holdFlag, bool noSound)
{
plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( noSound ? plTransitionMsg::kFadeOutNoSound : plTransitionMsg::kFadeOut, lenTime, holdFlag );
plTransitionMsg *msg = new plTransitionMsg( noSound ? plTransitionMsg::kFadeOutNoSound : plTransitionMsg::kFadeOut, lenTime, holdFlag );
plgDispatch::MsgSend( msg );
}
void cyMisc::SetClickability(hsBool b)
{
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(b ? plInputIfaceMgrMsg::kEnableClickables : plInputIfaceMgrMsg::kDisableClickables );
plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(b ? plInputIfaceMgrMsg::kEnableClickables : plInputIfaceMgrMsg::kDisableClickables );
plgDispatch::MsgSend(msg);
}
@ -2665,7 +2665,7 @@ void cyMisc::WearDefaultClothingType(pyKey& key, uint32_t type)
void cyMisc::FakeLinkToObject(pyKey& avatar, pyKey& object)
{
plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg;
plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg;
msg->fAvatarKey = avatar.getKey();
msg->fLinkObjKey = object.getKey();
plgDispatch::MsgSend(msg);
@ -2681,7 +2681,7 @@ void cyMisc::FakeLinkToObjectNamed(const char* name)
if (!key)
return;
plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg;
plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg;
msg->fAvatarKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
msg->fLinkObjKey = key;
plgDispatch::MsgSend(msg);
@ -2758,7 +2758,7 @@ void cyMisc::SetGraphicsOptions(int Width, int Height, int ColorDepth, hsBool Wi
// This has to send a message to plClient because python is loaded in the max plugins
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kResetGraphicsDevice);
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kResetGraphicsDevice);
clientMsg->AddReceiver(clientKey);
//clientMsg->SetBCastFlag(plMessage::kBCastByType);
clientMsg->fGraphicsSettings.fWidth = Width;

View File

@ -256,7 +256,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendRTChat, args, "Params: fromPlayer,toPlayer
else if (PyUnicode_Check(message))
{
int size = PyUnicode_GetSize(message);
wchar_t* msg = TRACKED_NEW wchar_t[size + 1]; msg[size] = 0;
wchar_t* msg = new wchar_t[size + 1]; msg[size] = 0;
PyUnicode_AsWideChar((PyUnicodeObject*)message, msg, size);
uint32_t retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
delete msg;
@ -289,7 +289,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendKIMessage, args, "Params: command,value\nS
else if (PyUnicode_Check(val))
{
int len = PyUnicode_GetSize(val);
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
wchar_t* buffer = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)val, buffer, len);
buffer[len] = L'\0';
cyMisc::SendKIMessageS(command, buffer);
@ -352,7 +352,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadAvatarModel, args, "Params: modelName, spa
if (PyUnicode_Check(userStrObj))
{
int len = PyUnicode_GetSize(userStrObj);
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
wchar_t* buffer = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)userStrObj, buffer, len);
buffer[len] = L'\0';
char* temp = hsWStringToString(buffer);
@ -412,7 +412,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetLocalizedString, args, "Params: name, argum
if (PyUnicode_Check(nameObj))
{
int len = PyUnicode_GetSize(nameObj);
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
wchar_t* buffer = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, buffer, len);
buffer[len] = L'\0';
name = buffer;
@ -450,7 +450,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetLocalizedString, args, "Params: name, argum
else if (PyUnicode_Check(item))
{
int strLen = PyUnicode_GetSize(item);
wchar_t* buffer = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* buffer = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)item, buffer, strLen);
buffer[strLen] = L'\0';
arg = buffer;
@ -485,7 +485,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtDumpLogs, args, "Params: folder\nDumps all cur
if (PyUnicode_Check(folderObj))
{
int len = PyUnicode_GetSize(folderObj);
wchar_t* buffer = TRACKED_NEW wchar_t[len + 1];
wchar_t* buffer = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)folderObj, buffer, len);
buffer[len] = L'\0';
bool retVal = cyMisc::DumpLogs(buffer);

View File

@ -73,7 +73,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtYesNoDialog, args, "Params: selfkey,dialogMess
if (PyUnicode_Check(dialogMsgObj))
{
int len = PyUnicode_GetSize(dialogMsgObj);
wchar_t* text = TRACKED_NEW wchar_t[len + 1];
wchar_t* text = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)dialogMsgObj, text, len);
text[len] = L'\0';
cyMisc::YesNoDialog(*key, text);

View File

@ -629,7 +629,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtFileExists, args, "Params: filename\nReturns t
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
bool retVal = cyMisc::FileExists(text);
@ -664,7 +664,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtCreateDir, args, "Params: directory\nCreates t
if (PyUnicode_Check(directoryObj))
{
int strLen = PyUnicode_GetSize(directoryObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)directoryObj, text, strLen);
text[strLen] = L'\0';
bool retVal = cyMisc::CreateDir(text);

View File

@ -145,7 +145,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSetLightValue, args, "Params: key,name,r,g,b,a
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);
@ -188,7 +188,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSetLightAnimStart, args, "Params: key,name,sta
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);

View File

@ -81,7 +81,7 @@ void cyParticleSys::SetNetForce(hsBool state)
//
void cyParticleSys::ISendParticleSysMsg(uint32_t param, float value)
{
plParticleUpdateMsg* pMsg = TRACKED_NEW plParticleUpdateMsg(fSender, nil, nil, param, value);
plParticleUpdateMsg* pMsg = new plParticleUpdateMsg(fSender, nil, nil, param, value);
// check if this needs to be network forced to all clients
if (fNetForce )
{

View File

@ -95,7 +95,7 @@ void cyPhysics::EnableT(hsBool state)
if ( fRecvr.Count() > 0 )
{
// create message
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
plEnableMsg* pMsg = new plEnableMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -150,7 +150,7 @@ void cyPhysics::EnableCollision()
// must have a receiver!
if ( fRecvr.Count() > 0 )
{
plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg;
plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg;
if (fNetForce )
{
// set the network propagate flag to make sure it gets to the other clients
@ -179,7 +179,7 @@ void cyPhysics::DisableCollision()
// must have a receiver!
if ( fRecvr.Count() > 0 )
{
plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg;
plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg;
if (fNetForce )
{
// set the network propagate flag to make sure it gets to the other clients
@ -251,7 +251,7 @@ void cyPhysics::WarpMat(pyMatrix44& mat)
if ( fRecvr.Count() > 0 )
{
// create message
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(mat.fMatrix);
plWarpMsg* pMsg = new plWarpMsg(mat.fMatrix);
pMsg->SetWarpFlags(plWarpMsg::kFlushTransform);
// check if this needs to be network forced to all clients
if (fNetForce )
@ -310,7 +310,7 @@ void cyPhysics::Move(pyVector3& direction, float distance)
if ( si )
{
// create message for each receiver
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(target_matrix);
plWarpMsg* pMsg = new plWarpMsg(target_matrix);
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -380,7 +380,7 @@ void cyPhysics::Rotate(float rad, pyVector3& axis)
if ( si )
{
// create message for each receiver
plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(target_matrix);
plWarpMsg* pMsg = new plWarpMsg(target_matrix);
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -427,7 +427,7 @@ void cyPhysics::Force(pyVector3& force)
/* if ( fRecvr.Count() > 0 )
{
// create message
plForceMsg* pMsg = TRACKED_NEW plForceMsg;
plForceMsg* pMsg = new plForceMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -466,7 +466,7 @@ void cyPhysics::ForceWithOffset(pyVector3& force, pyPoint3& offset)
/* if ( fRecvr.Count() > 0 )
{
// create message
plOffsetForceMsg* pMsg = TRACKED_NEW plOffsetForceMsg;
plOffsetForceMsg* pMsg = new plOffsetForceMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -506,7 +506,7 @@ void cyPhysics::Torque(pyVector3& torque)
/* if ( fRecvr.Count() > 0 )
{
// create message
plTorqueMsg* pMsg = TRACKED_NEW plTorqueMsg;
plTorqueMsg* pMsg = new plTorqueMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -544,7 +544,7 @@ void cyPhysics::Impulse(pyVector3& impulse)
/* if ( fRecvr.Count() > 0 )
{
// create message
plImpulseMsg* pMsg = TRACKED_NEW plImpulseMsg;
plImpulseMsg* pMsg = new plImpulseMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -583,7 +583,7 @@ void cyPhysics::ImpulseWithOffset(pyVector3& impulse, pyPoint3& offset)
/* if ( fRecvr.Count() > 0 )
{
// create message
plOffsetImpulseMsg* pMsg = TRACKED_NEW plOffsetImpulseMsg;
plOffsetImpulseMsg* pMsg = new plOffsetImpulseMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -622,7 +622,7 @@ void cyPhysics::AngularImpulse(pyVector3& impulse)
/* if ( fRecvr.Count() > 0 )
{
// create message
plAngularImpulseMsg* pMsg = TRACKED_NEW plAngularImpulseMsg;
plAngularImpulseMsg* pMsg = new plAngularImpulseMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -662,7 +662,7 @@ void cyPhysics::Damp(float damp)
/* if ( fRecvr.Count() > 0 )
{
// create message
plDampMsg* pMsg = TRACKED_NEW plDampMsg;
plDampMsg* pMsg = new plDampMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -701,7 +701,7 @@ void cyPhysics::ShiftMass(pyVector3& offset)
/* if ( fRecvr.Count() > 0 )
{
// create message
plShiftMassMsg* pMsg = TRACKED_NEW plShiftMassMsg;
plShiftMassMsg* pMsg = new plShiftMassMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -752,7 +752,7 @@ void cyPhysics::SetLinearVelocity(pyVector3& velocity)
if ( fRecvr.Count() > 0 )
{
// create message
plLinearVelocityMsg* pMsg = TRACKED_NEW plLinearVelocityMsg;
plLinearVelocityMsg* pMsg = new plLinearVelocityMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{
@ -779,7 +779,7 @@ void cyPhysics::SetAngularVelocity(pyVector3& angVel)
if ( fRecvr.Count() > 0 )
{
// create message
plAngularVelocityMsg* pMsg = TRACKED_NEW plAngularVelocityMsg;
plAngularVelocityMsg* pMsg = new plAngularVelocityMsg;
// check if this needs to be network forced to all clients
if (fNetForce )
{

View File

@ -661,7 +661,7 @@ PYTHON_METHOD_DEFINITION(ptOutputRedirector, write, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->Write(text);
@ -787,7 +787,7 @@ PYTHON_METHOD_DEFINITION(ptErrorRedirector, write, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->Write(text);
@ -1164,7 +1164,7 @@ void PythonInterface::initPython()
AddPlasmaMethods(methods);
// now copy the data to our real method definition structure
plasmaMethods = TRACKED_NEW PyMethodDef[methods.size() + 1];
plasmaMethods = new PyMethodDef[methods.size() + 1];
for (int curMethod = 0; curMethod < methods.size(); curMethod++)
plasmaMethods[curMethod] = methods[curMethod];
PyMethodDef terminator = {NULL};
@ -1290,7 +1290,7 @@ void PythonInterface::initPython()
AddPlasmaGameMethods(methods);
// now copy the data to our real method definition structure
plasmaGameMethods = TRACKED_NEW PyMethodDef[methods.size() + 1];
plasmaGameMethods = new PyMethodDef[methods.size() + 1];
for (int curMethod = 0; curMethod < methods.size(); curMethod++)
plasmaGameMethods[curMethod] = methods[curMethod];
plasmaGameMethods[methods.size()] = terminator; // add the terminator

View File

@ -558,7 +558,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
if (sceneObj)
{
hsAssert(!fSDLMod, "Python SDL modifier already created");
fSDLMod = TRACKED_NEW plPythonSDLModifier(this);
fSDLMod = new plPythonSDLModifier(this);
sceneObj->AddModifier(fSDLMod);
}
}
@ -634,7 +634,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
NamedComponent comp;
comp.isActivator = (isNamedAttr == 1);
comp.id = parameter.fID;
comp.name = TRACKED_NEW char[strlen(parameter.datarecord.fString) + 1];
comp.name = new char[strlen(parameter.datarecord.fString) + 1];
strcpy(comp.name, parameter.datarecord.fString);
fNamedCompQueue.Append(comp);
@ -779,7 +779,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
{
// create the callback object
// Set the callback for the vault thingy
fVaultCallback = TRACKED_NEW PythonVaultCallback( this, kfunc_VaultEvent );
fVaultCallback = new PythonVaultCallback( this, kfunc_VaultEvent );
VaultRegisterCallback(fVaultCallback);
}
@ -787,7 +787,7 @@ void plPythonFileMod::AddTarget(plSceneObject* sobj)
if ( fPyFunctionInstances[kfunc_OnDefaultKeyCaught] != nil )
{
// Make us a key catcher
fKeyCatcher = TRACKED_NEW pfPythonKeyCatcher( this );
fKeyCatcher = new pfPythonKeyCatcher( this );
// Tell the input interface manager to use our catcher
plInputInterfaceMgr::GetInstance()->SetDefaultKeyCatcher( fKeyCatcher );
@ -1112,7 +1112,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const char *activatorName, int32_t id
{
// setup a ref notify when it does get loaded
hsgResMgr::ResMgr()->AddViaNotify(keylist[i],
TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, kAddNotify, 0),
new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, kAddNotify, 0),
plRefFlags::kPassiveRef);
}
}
@ -2902,7 +2902,7 @@ void plPythonFileMod::EnableControlKeyEvents()
if ( fPyFunctionInstances[kfunc_OnKeyEvent] != nil )
{
// register for key events
plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg;
plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg;
pModMsg->SetBCastFlag(plMessage::kBCastByExactType);
pModMsg->SetSender(GetKey());
pModMsg->SetCmd(plCmdIfaceModMsg::kAdd);
@ -2921,7 +2921,7 @@ void plPythonFileMod::EnableControlKeyEvents()
void plPythonFileMod::DisableControlKeyEvents()
{
// unregister for key events
plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg;
plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg;
pModMsg->SetBCastFlag(plMessage::kBCastByExactType);
pModMsg->SetSender(GetKey());
pModMsg->SetCmd(plCmdIfaceModMsg::kRemove);

View File

@ -212,7 +212,7 @@ PyObject* plPythonPack::OpenPacked(const char* fileName)
int32_t size = fPackStream->ReadLE32();
if (size > 0)
{
char *buf = TRACKED_NEW char[size];
char *buf = new char[size];
uint32_t readSize = fPackStream->Read(size, buf);
hsAssert(readSize <= size, xtl::format("Python PackFile %s: Incorrect amount of data, read %d instead of %d",
fileName, readSize, size).c_str());

View File

@ -380,7 +380,7 @@ public:
count = stream->ReadLE32();
if ( count != 0 )
{
datarecord.fString = TRACKED_NEW char[count+1];
datarecord.fString = new char[count+1];
stream->ReadLE(count,datarecord.fString);
}
else

View File

@ -130,7 +130,7 @@ void pyAlarmMgr::Update( double secs )
void pyAlarmMgr::SetAlarm( float secs, PyObject * cb, uint32_t cbContext )
{
double start = hsTimer::GetSysSeconds();
fAlarms.push_back( TRACKED_NEW pyAlarm( start, secs, cb, cbContext ) );
fAlarms.push_back( new pyAlarm( start, secs, cb, cbContext ) );
}
void pyAlarmMgr::Clear()

View File

@ -173,7 +173,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, addBehavior, args, keywords)
if (PyUnicode_Check(animNameObj))
{
int strLen = PyUnicode_GetSize(animNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)animNameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);
@ -193,7 +193,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, addBehavior, args, keywords)
if (PyUnicode_Check(behNameObj))
{
int strLen = PyUnicode_GetSize(behNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);
@ -228,7 +228,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptCritterBrain, startBehavior, args, keywords)
if (PyUnicode_Check(behNameObj))
{
int strLen = PyUnicode_GetSize(behNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);
@ -260,7 +260,7 @@ PYTHON_METHOD_DEFINITION(ptCritterBrain, runningBehavior, args)
if (PyUnicode_Check(behNameObj))
{
int strLen = PyUnicode_GetSize(behNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)behNameObj, text, strLen);
text[strLen] = L'\0';
char* cText = hsWStringToString(text);

View File

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
pyDniCoordinates::pyDniCoordinates(plDniCoordinateInfo* coord)
{
fCoords = TRACKED_NEW plDniCoordinateInfo;
fCoords = new plDniCoordinateInfo;
if (coord) {
// copy their coords into our copy
fCoords->SetTorans(coord->GetTorans());
@ -60,7 +60,7 @@ pyDniCoordinates::pyDniCoordinates(plDniCoordinateInfo* coord)
pyDniCoordinates::pyDniCoordinates()
{
fCoords = TRACKED_NEW plDniCoordinateInfo;
fCoords = new plDniCoordinateInfo;
fCoords->SetTorans(0);
fCoords->SetHSpans(0);
fCoords->SetVSpans(0);

View File

@ -64,7 +64,7 @@ void pyDrawControl::SetGamma2(float gamma)
char command[256];
sprintf(command,"Graphics.Renderer.Gamma2 %f",gamma);
// create message to send to the console
plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg;
plControlEventMsg* pMsg = new plControlEventMsg;
pMsg->SetBCastFlag(plMessage::kBCastByType);
pMsg->SetControlCode(B_CONTROL_CONSOLE_COMMAND);
pMsg->SetControlActivated(true);
@ -131,7 +131,7 @@ void pyDrawControl::DisableRenderScene()
{
#ifndef BUILDING_PYPLASMA
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kDisableRenderScene);
plClientMsg* msg = new plClientMsg(plClientMsg::kDisableRenderScene);
msg->AddReceiver( clientKey );
msg->Send();
#endif
@ -141,7 +141,7 @@ void pyDrawControl::EnableRenderScene()
{
#ifndef BUILDING_PYPLASMA
plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY );
plClientMsg* msg = TRACKED_NEW plClientMsg(plClientMsg::kEnableRenderScene);
plClientMsg* msg = new plClientMsg(plClientMsg::kEnableRenderScene);
msg->AddReceiver( clientKey );
msg->Send();
#endif

View File

@ -120,7 +120,7 @@ plDynamicTextMsg* pyDynamicText::ICreateDTMsg()
// must have a receiver!
if ( fReceivers.Count() > 0 )
{
plDynamicTextMsg* pMsg = TRACKED_NEW plDynamicTextMsg;
plDynamicTextMsg* pMsg = new plDynamicTextMsg;
if ( fSenderKey )
pMsg->SetSender(fSenderKey);
if ( fNetPropagate )

View File

@ -345,7 +345,7 @@ PYTHON_METHOD_DEFINITION(ptDynamicMap, calcTextExtents, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
wText = text;

View File

@ -76,7 +76,7 @@ static PyObject *EnumValue_new(PyTypeObject *type, PyObject *args, PyObject *)
if (nameTemp) // copy the value if it was passed
{
self->name = TRACKED_NEW char[strlen(nameTemp) + 1];
self->name = new char[strlen(nameTemp) + 1];
strcpy(self->name, nameTemp);
self->name[strlen(nameTemp)] = '\0';
}

View File

@ -118,7 +118,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlEditBox, setStringW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SetTextW(text);

View File

@ -105,7 +105,7 @@ class pfColorListElement : public pfGUIListText
{
if ( string1 )
{
fString1 = TRACKED_NEW wchar_t[wcslen(string1)+1];
fString1 = new wchar_t[wcslen(string1)+1];
wcscpy(fString1,string1);
fText = nil;
}
@ -117,7 +117,7 @@ class pfColorListElement : public pfGUIListText
fTextColor1 = color1;
if (string2)
{
fString2 = TRACKED_NEW wchar_t[wcslen(string2)+1];
fString2 = new wchar_t[wcslen(string2)+1];
wcscpy(fString2,string2);
}
else
@ -158,7 +158,7 @@ class pfColorListElement : public pfGUIListText
if( text != nil )
{
fString1 = TRACKED_NEW wchar_t[wcslen(text)+1];
fString1 = new wchar_t[wcslen(text)+1];
wcscpy(fString1,text);
}
else
@ -249,7 +249,7 @@ class pfColorListElement : public pfGUIListText
if ( fString1 && fString2 )
{
size_t length = wcslen( fString1 ) + wcslen( fString2 ) + 3;
thestring = TRACKED_NEW wchar_t[ length ];
thestring = new wchar_t[ length ];
snwprintf( thestring, length, L"%s %s", fString1, fString2 );
wemade_string = true;
}
@ -617,7 +617,7 @@ int16_t pyGUIControlListBox::AddStringW( std::wstring string )
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfGUIListText *element = TRACKED_NEW pfGUIListText( string.c_str() );
pfGUIListText *element = new pfGUIListText( string.c_str() );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -634,7 +634,7 @@ int16_t pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha )
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfGUIListPicture *element = TRACKED_NEW pfGUIListPicture(image.GetKey(),respectAlpha);
pfGUIListPicture *element = new pfGUIListPicture(image.GetKey(),respectAlpha);
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -680,7 +680,7 @@ int16_t pyGUIControlListBox::AddTextWColorW( std::wstring str, pyColor& textcolo
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfColorListElement *element = TRACKED_NEW pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha );
pfColorListElement *element = new pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -705,7 +705,7 @@ int16_t pyGUIControlListBox::AddTextWColorWSizeW( std::wstring str, pyColor& tex
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfColorListElement *element = TRACKED_NEW pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha, fontsize );
pfColorListElement *element = new pfColorListElement( str.c_str(), textcolor.getColor(),nil,hsColorRGBA(),inheritalpha, fontsize );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -731,7 +731,7 @@ void pyGUIControlListBox::Add2TextWColorW( std::wstring str1, pyColor& textcolor
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfColorListElement *element = TRACKED_NEW pfColorListElement(str1.c_str(),textcolor1.getColor(),str2.c_str(),textcolor2.getColor(),inheritalpha );
pfColorListElement *element = new pfColorListElement(str1.c_str(),textcolor1.getColor(),str2.c_str(),textcolor2.getColor(),inheritalpha );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
plbmod->AddElement( element );
@ -747,7 +747,7 @@ int16_t pyGUIControlListBox::AddStringInBox( const char *string, uint32_t min_wi
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfListTextInBox *element = TRACKED_NEW pfListTextInBox( string, min_width, min_height );
pfListTextInBox *element = new pfListTextInBox( string, min_width, min_height );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -764,7 +764,7 @@ int16_t pyGUIControlListBox::AddStringInBoxW( std::wstring string, uint32_t min_
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfListTextInBox *element = TRACKED_NEW pfListTextInBox( string.c_str(), min_width, min_height );
pfListTextInBox *element = new pfListTextInBox( string.c_str(), min_width, min_height );
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -781,7 +781,7 @@ int16_t pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfListPictureInBox *element = TRACKED_NEW pfListPictureInBox(image.GetKey(),x,y,width,height,respectAlpha);
pfListPictureInBox *element = new pfListPictureInBox(image.GetKey(),x,y,width,height,respectAlpha);
if( fBuildRoots.GetCount() > 0 )
fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
return plbmod->AddElement( element );
@ -799,7 +799,7 @@ int16_t pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, uint32_
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfListPictureInBoxWithSwatches *element = TRACKED_NEW pfListPictureInBoxWithSwatches( image.GetKey(),x,y,
pfListPictureInBoxWithSwatches *element = new pfListPictureInBoxWithSwatches( image.GetKey(),x,y,
width,height,respectAlpha,
primary.getColor(), secondary.getColor() );
if( fBuildRoots.GetCount() > 0 )
@ -944,7 +944,7 @@ void pyGUIControlListBox::AddBranchW( std::wstring name, hsBool initiallyOpen
pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( plbmod )
{
pfGUIListTreeRoot *root = TRACKED_NEW pfGUIListTreeRoot( name.c_str() );
pfGUIListTreeRoot *root = new pfGUIListTreeRoot( name.c_str() );
root->ShowChildren( initiallyOpen );
if( fBuildRoots.GetCount() > 0 )

View File

@ -381,7 +381,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlListBox, addBranchW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* name = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* name = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, name, strLen);
name[strLen] = L'\0';
self->fThis->AddBranchW(name, initiallyOpen != 0);

View File

@ -187,7 +187,7 @@ void pyGUIControlMultiLineEdit::SetEncodedBuffer( PyObject* buffer_object )
if ( daBuffer != nil )
{
// don't alter the user's buffer... but into a copy of our own
uint8_t* altBuffer = TRACKED_NEW uint8_t[length];
uint8_t* altBuffer = new uint8_t[length];
// =====> temp>> change 0xFEs back into '\0's
int i;
for ( i=0 ; i<length ; i++ )
@ -223,7 +223,7 @@ void pyGUIControlMultiLineEdit::SetEncodedBufferW( PyObject* buffer_object )
if ( daBuffer != nil )
{
// don't alter the user's buffer... but into a copy of our own
uint16_t* altBuffer = TRACKED_NEW uint16_t[length];
uint16_t* altBuffer = new uint16_t[length];
// =====> temp>> change 0xFFFEs back into '\0's
int i;
for ( i=0 ; i<length ; i++ )
@ -256,7 +256,7 @@ const char* pyGUIControlMultiLineEdit::GetEncodedBuffer()
uint8_t* daBuffer = pbmod->GetCodedBuffer( length );
if ( daBuffer )
{
uint8_t* altBuffer = TRACKED_NEW uint8_t[length+1];
uint8_t* altBuffer = new uint8_t[length+1];
// =====> temp>> to get rid of '\0's (change into 0xFEs)
int i;
for ( i=0 ; i<length ; i++ )
@ -292,7 +292,7 @@ const wchar_t* pyGUIControlMultiLineEdit::GetEncodedBufferW()
uint16_t* daBuffer = pbmod->GetCodedBufferW( length );
if ( daBuffer )
{
uint16_t* altBuffer = TRACKED_NEW uint16_t[length+1];
uint16_t* altBuffer = new uint16_t[length+1];
// =====> temp>> to get rid of '\0's (change into 0xFFFEs)
int i;
for ( i=0 ; i<length ; i++ )

View File

@ -124,7 +124,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, setStringW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->SetTextW(temp);
@ -230,7 +230,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, insertCharW, args)
PYTHON_RETURN_ERROR;
}
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->InsertCharW(temp[0]);
@ -279,7 +279,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlMultiLineEdit, insertStringW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->InsertStringW(temp);

View File

@ -93,7 +93,7 @@ PYTHON_METHOD_DEFINITION(ptGUIControlTextBox, setStringW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->SetTextW(temp);

View File

@ -369,7 +369,7 @@ void pyGUIPopUpMenu::AddConsoleCmdItem( const char *name, const char *console
void pyGUIPopUpMenu::AddConsoleCmdItemW( std::wstring name, const char *consoleCmd )
{
kGetMenuPtr( ; );
menu->AddItem( name.c_str(), TRACKED_NEW pfGUIConsoleCmdProc( consoleCmd ), nil );
menu->AddItem( name.c_str(), new pfGUIConsoleCmdProc( consoleCmd ), nil );
}
void pyGUIPopUpMenu::AddNotifyItem( const char *name )

View File

@ -112,7 +112,7 @@ PyObject *pythonClassName##_new(PyTypeObject *type, PyObject *, PyObject *) \
self = (pythonClassName*)type->tp_alloc(type, 0); \
if (self != NULL) \
{ \
self->fThis = TRACKED_NEW glueClassName(); \
self->fThis = new glueClassName(); \
if (self->fThis == NULL) \
{ \
Py_DECREF(self); \

View File

@ -152,7 +152,7 @@ PYTHON_METHOD_DEFINITION(ptImage, saveAsJPEG, args)
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SaveAsJPEG(text, quality);
@ -187,7 +187,7 @@ PYTHON_METHOD_DEFINITION(ptImage, saveAsPNG, args)
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SaveAsPNG(text);
@ -288,7 +288,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadJPEGFromDisk, args, "Params: filename,widt
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
PyObject* ret = pyImage::LoadJPEGFromDisk(text, width, height);

View File

@ -72,47 +72,47 @@ pyJournalBook::pyJournalBook()
pyJournalBook::pyJournalBook( const char *esHTMLSource )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource );
fBook = new pfJournalBook( esHTMLSource );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( std::wstring esHTMLSource )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource.c_str() );
fBook = new pfJournalBook( esHTMLSource.c_str() );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( const char *esHTMLSource, pyImage &coverImage, pyKey callbackKey )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource, coverImage.GetKey(), callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource, coverImage.GetKey(), callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( std::wstring esHTMLSource, pyImage &coverImage, pyKey callbackKey )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource.c_str(), coverImage.GetKey(), callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource.c_str(), coverImage.GetKey(), callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( const char *esHTMLSource, pyImage &coverImage, pyKey callbackKey, const char *guiName )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource, coverImage.GetKey(), callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource, coverImage.GetKey(), callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc, guiName );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( std::wstring esHTMLSource, pyImage &coverImage, pyKey callbackKey, const char *guiName )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource.c_str(), coverImage.GetKey(), callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource.c_str(), coverImage.GetKey(), callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc, guiName );
IMakeNewKey();
}
pyJournalBook::pyJournalBook( const char *esHTMLSource, pyKey callbackKey )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource, nil, callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource, nil, callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
IMakeNewKey();
@ -120,7 +120,7 @@ pyJournalBook::pyJournalBook( const char *esHTMLSource, pyKey callbackKey )
pyJournalBook::pyJournalBook( std::wstring esHTMLSource, pyKey callbackKey )
{
fBook = TRACKED_NEW pfJournalBook( esHTMLSource.c_str(), nil, callbackKey.getKey(),
fBook = new pfJournalBook( esHTMLSource.c_str(), nil, callbackKey.getKey(),
callbackKey.getKey() != nil ? callbackKey.getKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
IMakeNewKey();
@ -144,7 +144,7 @@ void pyJournalBook::MakeBook(std::string esHTMLSource, plKey coverImageKey /* =
if (callbackKey != nil)
loc = callbackKey->GetUoid().GetLocation();
fBook = TRACKED_NEW pfJournalBook(esHTMLSource.c_str(), coverImageKey, callbackKey, loc, guiName.c_str());
fBook = new pfJournalBook(esHTMLSource.c_str(), coverImageKey, callbackKey, loc, guiName.c_str());
IMakeNewKey();
}
@ -157,7 +157,7 @@ void pyJournalBook::MakeBook(std::wstring esHTMLSource, plKey coverImageKey /* =
if (callbackKey != nil)
loc = callbackKey->GetUoid().GetLocation();
fBook = TRACKED_NEW pfJournalBook(esHTMLSource.c_str(), coverImageKey, callbackKey, loc, guiName.c_str());
fBook = new pfJournalBook(esHTMLSource.c_str(), coverImageKey, callbackKey, loc, guiName.c_str());
IMakeNewKey();
}

View File

@ -109,7 +109,7 @@ PYTHON_INIT_DEFINITION(ptBook, args, keywords)
if (PyUnicode_Check(sourceObj))
{
int len = PyUnicode_GetSize(sourceObj);
wchar_t* temp = TRACKED_NEW wchar_t[len + 1];
wchar_t* temp = new wchar_t[len + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)sourceObj, temp, len);
temp[len] = L'\0';

View File

@ -134,7 +134,7 @@ PyObject* pyKey::GetPySceneObject()
void pyKey::IEnable(hsBool state)
{
// create message
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
plEnableMsg* pMsg = new plEnableMsg;
if (fNetForce )
{
// set the network propagate flag to make sure it gets to the other clients

View File

@ -57,9 +57,9 @@ pyMoviePlayer::pyMoviePlayer(const char* movieName,pyKey& selfKey)
// make the movie
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kMake | plMovieMsg::kAddCallbacks);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kMake | plMovieMsg::kAddCallbacks);
mov->SetSender(fSelfKey);
pfMovieEventMsg* movCallback = TRACKED_NEW pfMovieEventMsg(fMovieName);
pfMovieEventMsg* movCallback = new pfMovieEventMsg(fMovieName);
movCallback->AddReceiver(fSelfKey);
mov->AddCallback(movCallback);
mov->Send();
@ -83,9 +83,9 @@ void pyMoviePlayer::MakeMovie(const char* movieName, pyKey& selfKey)
fSelfKey = selfKey.getKey();
if (fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kMake | plMovieMsg::kAddCallbacks);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kMake | plMovieMsg::kAddCallbacks);
mov->SetSender(fSelfKey);
pfMovieEventMsg* movCallback = TRACKED_NEW pfMovieEventMsg(fMovieName);
pfMovieEventMsg* movCallback = new pfMovieEventMsg(fMovieName);
movCallback->AddReceiver(fSelfKey);
mov->AddCallback(movCallback);
mov->Send();
@ -97,7 +97,7 @@ void pyMoviePlayer::SetCenter(float x, float y)
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kMove);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kMove);
mov->SetSender(fSelfKey);
mov->SetCenterX(x);
mov->SetCenterY(y);
@ -109,7 +109,7 @@ void pyMoviePlayer::SetScale(float width, float height)
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kScale);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kScale);
mov->SetSender(fSelfKey);
mov->SetScaleX(width);
mov->SetScaleY(height);
@ -121,7 +121,7 @@ void pyMoviePlayer::SetColor(pyColor color)
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kColor);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kColor);
mov->SetSender(fSelfKey);
mov->SetColor(color.getColor());
mov->Send();
@ -132,7 +132,7 @@ void pyMoviePlayer::SetVolume(float volume)
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kVolume);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kVolume);
mov->SetSender(fSelfKey);
mov->SetVolume(volume);
mov->Send();
@ -143,7 +143,7 @@ void pyMoviePlayer::SetOpacity(float opacity)
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kOpacity);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kOpacity);
mov->SetSender(fSelfKey);
mov->SetOpacity(opacity);
mov->Send();
@ -155,7 +155,7 @@ void pyMoviePlayer::Play()
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kStart);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kStart);
mov->SetSender(fSelfKey);
mov->Send();
}
@ -165,7 +165,7 @@ void pyMoviePlayer::PlayPaused()
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kStart | plMovieMsg::kPause);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kStart | plMovieMsg::kPause);
mov->SetSender(fSelfKey);
mov->Send();
}
@ -175,7 +175,7 @@ void pyMoviePlayer::Pause()
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kPause);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kPause);
mov->SetSender(fSelfKey);
mov->Send();
}
@ -185,7 +185,7 @@ void pyMoviePlayer::Resume()
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kResume);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kResume);
mov->SetSender(fSelfKey);
mov->Send();
}
@ -195,7 +195,7 @@ void pyMoviePlayer::Stop()
{
if ( fMovieName)
{
plMovieMsg* mov = TRACKED_NEW plMovieMsg(fMovieName, plMovieMsg::kStop);
plMovieMsg* mov = new plMovieMsg(fMovieName, plMovieMsg::kStop);
mov->SetSender(fSelfKey);
mov->Send();
}

View File

@ -191,7 +191,7 @@ void pyNotify::Send()
return;
// create new notify message to do the actual send with
plNotifyMsg* pNMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pNMsg = new plNotifyMsg;
if ( fNetPropagate )
pNMsg->SetBCastFlag(plMessage::kNetPropagate);

View File

@ -632,7 +632,7 @@ void pySceneObject::PushCutsceneCamera(hsBool cut, pyKey& avKey)
const plCameraModifier1* pCam = plCameraModifier1::ConvertNoRef(obj->GetModifier(i));
if (pCam)
{
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
// set command to do the transition
@ -666,7 +666,7 @@ void pySceneObject::PopCutsceneCamera(pyKey& avKey)
const plCameraModifier1* pCam = plCameraModifier1::ConvertNoRef(obj->GetModifier(i));
if (pCam)
{
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
// set command to do the transition
@ -695,7 +695,7 @@ void pySceneObject::PushCamera(pyKey& avKey)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
@ -724,7 +724,7 @@ void pySceneObject::PushCameraCut(pyKey& avKey)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
@ -762,7 +762,7 @@ void pySceneObject::PopCamera(pyKey& avKey)
{
// create message
plCameraMsg* pMsg = TRACKED_NEW plCameraMsg;
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
@ -832,7 +832,7 @@ void pySceneObject::Animate()
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(obj->GetKey());
pMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
pMsg->SetCmd(plAnimCmdMsg::kContinue);
@ -861,7 +861,7 @@ void pySceneObject::RewindAnim(const char* animName)
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(obj->GetKey());
pMsg->SetAnimName(animName);
pMsg->SetCmd(plAnimCmdMsg::kGoToBegin);
@ -875,7 +875,7 @@ void pySceneObject::PlayAnim(const char* animName)
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(obj->GetKey());
pMsg->SetAnimName(animName);
pMsg->SetCmd(plAnimCmdMsg::kContinue);
@ -889,7 +889,7 @@ void pySceneObject::StopAnim(const char* animName)
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(obj->GetKey());
pMsg->SetAnimName(animName);
pMsg->SetCmd(plAnimCmdMsg::kStop);
@ -906,13 +906,13 @@ void pySceneObject::RunResponder(int state)
const plModifier* pMod = obj->GetModifierByType(plResponderModifier::Index());
if (pMod)
{
plNotifyMsg* pMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pMsg = new plNotifyMsg;
pMsg->fType = plNotifyMsg::kResponderChangeState;
pMsg->AddResponderStateEvent(state);
pMsg->AddReceiver(pMod->GetKey());
pMsg->Send();
plNotifyMsg* pMsg0 = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pMsg0 = new plNotifyMsg;
pMsg0->fState = true;
pMsg0->AddReceiver(pMod->GetKey());
pMsg0->Send();
@ -929,7 +929,7 @@ void pySceneObject::FFResponder(int state)
const plModifier* pMod = obj->GetModifierByType(plResponderModifier::Index());
if (pMod)
{
plNotifyMsg* pMsg = TRACKED_NEW plNotifyMsg;
plNotifyMsg* pMsg = new plNotifyMsg;
pMsg->fType = plNotifyMsg::kResponderFF;
pMsg->AddResponderStateEvent(state);
pMsg->AddReceiver(pMod->GetKey());

View File

@ -88,7 +88,7 @@ hsBool pyStream::Open(const wchar_t* fileName, const wchar_t* flags)
// force encryption?
if (encryptflag)
{
fStream = TRACKED_NEW plEncryptedStream;
fStream = new plEncryptedStream;
fStream->Open(fileName, L"wb");
}
else

View File

@ -68,7 +68,7 @@ PYTHON_METHOD_DEFINITION(ptStream, open, args)
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
filename = text;
@ -92,7 +92,7 @@ PYTHON_METHOD_DEFINITION(ptStream, open, args)
if (PyUnicode_Check(flagsObj))
{
int strLen = PyUnicode_GetSize(flagsObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)flagsObj, text, strLen);
text[strLen] = L'\0';
flags = text;

View File

@ -136,7 +136,7 @@ PYTHON_METHOD_DEFINITION(ptVaultFolderNode, setFolderNameW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* name = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* name = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, name, strLen);
name[strLen] = L'\0';
self->fThis->Folder_SetNameW(name);

View File

@ -71,7 +71,7 @@ static plKey CreateAndRefImageKey (unsigned nodeId, plMipmap * mipmap) {
hsgResMgr::ResMgr()->AddViaNotify(
key,
NEW(plGenRefMsg)(
new plGenRefMsg(
plNetClientMgr::GetInstance()->GetKey(),
plRefMsg::kOnCreate,
0,
@ -233,7 +233,7 @@ void pyVaultImageNode::SetImageFromScrShot()
if (cyMisc::GetPipeline()) {
VaultImageNode access(fNode);
fMipmap = NEW(plMipmap);
fMipmap = new plMipmap();
if (cyMisc::GetPipeline()->CaptureScreen(fMipmap, false, 800, 600)) {
fMipmapKey = fMipmap->GetKey();
if (!fMipmapKey)

View File

@ -126,7 +126,7 @@ PYTHON_METHOD_DEFINITION(ptVaultImageNode, setTitleW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* title = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* title = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, title, strLen);
title[strLen] = L'\0';
self->fThis->Image_SetTitleW(title);

View File

@ -182,7 +182,7 @@ PyObject *pyVaultPlayerNode::GetPlayerInfo()
PyObject *pyVaultPlayerNode::GetLinkToMyNeighborhood()
{
plAgeLinkStruct * link = NEW(plAgeLinkStruct);
plAgeLinkStruct * link = new plAgeLinkStruct();
if (VaultGetLinkToMyNeighborhood(link)) {
PyObject * result = pyAgeLinkStruct::New(link);
@ -195,7 +195,7 @@ PyObject *pyVaultPlayerNode::GetLinkToMyNeighborhood()
PyObject *pyVaultPlayerNode::GetLinkToCity()
{
plAgeLinkStruct * link = NEW(plAgeLinkStruct);
plAgeLinkStruct * link = new plAgeLinkStruct();
if (VaultGetLinkToCity(link)) {
PyObject * result = pyAgeLinkStruct::New(link);

View File

@ -146,7 +146,7 @@ PYTHON_METHOD_DEFINITION(ptVaultTextNoteNode, setTitleW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* title = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* title = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, title, strLen);
title[strLen] = L'\0';
self->fThis->Note_SetTitleW(title);
@ -198,7 +198,7 @@ PYTHON_METHOD_DEFINITION(ptVaultTextNoteNode, setTextW, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->Note_SetTextW(text);