From 5013a978eb23d2b2e9e3de1c3f35fd44b1e82151 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 21 Jan 2012 01:09:48 -0800 Subject: [PATCH] Get rid of NEW(), TRACKED_NEW, and ZERO(). --- Sources/Plasma/Apps/plClient/plClient.cpp | 72 +++---- Sources/Plasma/Apps/plClient/winmain.cpp | 16 +- .../Plasma/Apps/plClientPatcher/UruPlayer.cpp | 12 +- Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp | 2 +- Sources/Plasma/Apps/plPageOptimizer/main.cpp | 4 +- Sources/Plasma/Apps/plUruLauncher/Main.cpp | 12 +- .../Plasma/Apps/plUruLauncher/SelfPatcher.cpp | 4 +- Sources/Plasma/CoreLib/hsBiExpander.h | 8 +- Sources/Plasma/CoreLib/hsBitVector.cpp | 6 +- Sources/Plasma/CoreLib/hsBitVector.h | 6 +- Sources/Plasma/CoreLib/hsBounds.cpp | 6 +- Sources/Plasma/CoreLib/hsExceptionStack.h | 2 +- Sources/Plasma/CoreLib/hsHashTable.h | 2 +- Sources/Plasma/CoreLib/hsMalloc.h | 3 - Sources/Plasma/CoreLib/hsMemory.cpp | 10 +- Sources/Plasma/CoreLib/hsMemory.h | 2 +- Sources/Plasma/CoreLib/hsStlUtils.cpp | 4 +- Sources/Plasma/CoreLib/hsStream.cpp | 14 +- Sources/Plasma/CoreLib/hsTemplates.cpp | 4 +- Sources/Plasma/CoreLib/hsTemplates.h | 46 ++-- Sources/Plasma/CoreLib/hsUtils.cpp | 4 +- .../pfAnimation/pfObjectFlocker.cpp | 12 +- .../FeatureLib/pfAnimation/pfObjectFlocker.h | 2 +- .../FeatureLib/pfAnimation/plFollowMod.cpp | 2 +- .../pfAnimation/plLineFollowMod.cpp | 10 +- .../pfAnimation/plRandomCommandMod.cpp | 2 +- .../pfAnimation/plViewFaceModifier.cpp | 4 +- .../Plasma/FeatureLib/pfAudio/plListener.cpp | 8 +- .../FeatureLib/pfAudio/plRandomSoundMod.cpp | 18 +- .../FeatureLib/pfCamera/plCameraBrain.cpp | 24 +-- .../FeatureLib/pfCamera/plCameraModifier.cpp | 12 +- .../pfCamera/plInterestingModifier.cpp | 2 +- .../FeatureLib/pfCamera/plVirtualCamNeu.cpp | 50 ++--- .../FeatureLib/pfCharacter/pfMarkerInfo.cpp | 16 +- .../FeatureLib/pfCharacter/pfMarkerMgr.cpp | 6 +- .../pfCharacter/plPlayerModifier.cpp | 26 +-- .../pfConditional/plANDConditionalObject.cpp | 2 +- .../plAnimationEventConditionalObject.cpp | 4 +- .../pfConditional/plORConditionalObject.cpp | 2 +- .../pfConsole/pfAvatarConsoleCommands.cpp | 32 +-- .../Plasma/FeatureLib/pfConsole/pfConsole.cpp | 8 +- .../pfConsole/pfConsoleCommands.cpp | 200 +++++++++--------- .../pfConsole/pfConsoleCommandsNet.cpp | 2 +- .../FeatureLib/pfConsole/pfConsoleDirSrc.cpp | 2 +- .../pfConsole/pfGameConsoleCommands.cpp | 52 ++--- .../FeatureLib/pfConsoleCore/pfConsoleCmd.cpp | 4 +- .../pfGameGUIMgr/pfGUIButtonMod.cpp | 14 +- .../pfGameGUIMgr/pfGUICheckBoxCtrl.cpp | 4 +- .../pfGameGUIMgr/pfGUIControlHandlers.cpp | 12 +- .../pfGameGUIMgr/pfGUIControlMod.cpp | 22 +- .../pfGameGUIMgr/pfGUICtrlGenerator.cpp | 66 +++--- .../pfGameGUIMgr/pfGUIDialogMod.cpp | 20 +- .../pfGameGUIMgr/pfGUIDialogNotifyProc.cpp | 2 +- .../pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp | 12 +- .../pfGameGUIMgr/pfGUIEditBoxMod.cpp | 2 +- .../FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp | 4 +- .../pfGameGUIMgr/pfGUIListBoxMod.cpp | 8 +- .../pfGameGUIMgr/pfGUIListElement.cpp | 8 +- .../FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp | 4 +- .../pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp | 12 +- .../pfGameGUIMgr/pfGUIPopUpMenu.cpp | 58 ++--- .../pfGameGUIMgr/pfGUIProgressCtrl.cpp | 8 +- .../pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp | 4 +- .../pfGameGUIMgr/pfGUITextBoxMod.cpp | 4 +- .../pfGameGUIMgr/pfGUIUpDownPairMod.cpp | 6 +- .../FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp | 18 +- .../Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp | 4 +- .../pfGameScoreMgr/pfGameScoreMgr.cpp | 10 +- .../pfJournalBook/pfJournalBook.cpp | 102 ++++----- .../pfLocalizationDataMgr.cpp | 6 +- .../pfLocalizationMgr/pfLocalizationMgr.cpp | 2 +- .../Games/BlueSpiral/pyBlueSpiralGameGlue.cpp | 2 +- .../ClimbingWall/pyClimbingWallGameGlue.cpp | 2 +- .../pfPython/Games/Heek/pyHeekGameGlue.cpp | 4 +- .../Games/Marker/pyMarkerGameGlue.cpp | 14 +- .../Games/TicTacToe/pyTTTGameGlue.cpp | 2 +- .../Games/VarSync/pyVarSyncGameGlue.cpp | 10 +- .../pfPython/Games/pyGameCliGlue.cpp | 2 +- .../pfPython/cyAccountManagementGlue.cpp | 6 +- .../FeatureLib/pfPython/cyAnimation.cpp | 24 +-- .../Plasma/FeatureLib/pfPython/cyAvatar.cpp | 24 +-- .../Plasma/FeatureLib/pfPython/cyCamera.cpp | 12 +- Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp | 2 +- .../FeatureLib/pfPython/cyInputInterface.cpp | 6 +- Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp | 118 +++++------ .../Plasma/FeatureLib/pfPython/cyMiscGlue.cpp | 12 +- .../FeatureLib/pfPython/cyMiscGlue2.cpp | 2 +- .../FeatureLib/pfPython/cyMiscGlue3.cpp | 4 +- .../FeatureLib/pfPython/cyMiscGlue4.cpp | 4 +- .../FeatureLib/pfPython/cyParticleSys.cpp | 2 +- .../Plasma/FeatureLib/pfPython/cyPhysics.cpp | 32 +-- .../FeatureLib/pfPython/cyPythonInterface.cpp | 8 +- .../FeatureLib/pfPython/plPythonFileMod.cpp | 14 +- .../FeatureLib/pfPython/plPythonPack.cpp | 2 +- .../FeatureLib/pfPython/plPythonParameter.h | 2 +- .../Plasma/FeatureLib/pfPython/pyAlarm.cpp | 2 +- .../pfPython/pyCritterBrainGlue.cpp | 8 +- .../FeatureLib/pfPython/pyDniCoordinates.cpp | 4 +- .../FeatureLib/pfPython/pyDrawControl.cpp | 6 +- .../FeatureLib/pfPython/pyDynamicText.cpp | 2 +- .../FeatureLib/pfPython/pyDynamicTextGlue.cpp | 2 +- Sources/Plasma/FeatureLib/pfPython/pyEnum.cpp | 2 +- .../pfPython/pyGUIControlEditBoxGlue.cpp | 2 +- .../pfPython/pyGUIControlListBox.cpp | 28 +-- .../pfPython/pyGUIControlListBoxGlue.cpp | 2 +- .../pfPython/pyGUIControlMultiLineEdit.cpp | 8 +- .../pyGUIControlMultiLineEditGlue.cpp | 6 +- .../pfPython/pyGUIControlTextBoxGlue.cpp | 2 +- .../FeatureLib/pfPython/pyGUIPopUpMenu.cpp | 2 +- .../FeatureLib/pfPython/pyGlueHelpers.h | 2 +- .../FeatureLib/pfPython/pyImageGlue.cpp | 6 +- .../FeatureLib/pfPython/pyJournalBook.cpp | 20 +- .../FeatureLib/pfPython/pyJournalBookGlue.cpp | 2 +- Sources/Plasma/FeatureLib/pfPython/pyKey.cpp | 2 +- .../FeatureLib/pfPython/pyMoviePlayer.cpp | 28 +-- .../Plasma/FeatureLib/pfPython/pyNotify.cpp | 2 +- .../FeatureLib/pfPython/pySceneObject.cpp | 24 +-- .../Plasma/FeatureLib/pfPython/pyStream.cpp | 2 +- .../FeatureLib/pfPython/pyStreamGlue.cpp | 4 +- .../pfPython/pyVaultFolderNodeGlue.cpp | 2 +- .../FeatureLib/pfPython/pyVaultImageNode.cpp | 4 +- .../pfPython/pyVaultImageNodeGlue.cpp | 2 +- .../FeatureLib/pfPython/pyVaultPlayerNode.cpp | 4 +- .../pfPython/pyVaultTextNoteNodeGlue.cpp | 4 +- .../Plasma/FeatureLib/pfStackTrace/pfArray.h | 2 +- .../FeatureLib/pfStackTrace/pfMapFile.cpp | 2 +- .../FeatureLib/pfStackTrace/pfTextFile.cpp | 2 +- .../FeatureLib/pfSurface/plDistOpacityMod.cpp | 6 +- .../FeatureLib/pfSurface/plFadeOpacityLay.cpp | 2 +- .../FeatureLib/pfSurface/plFadeOpacityMod.cpp | 6 +- .../FeatureLib/pfSurface/plGrabCubeMap.cpp | 4 +- .../FeatureLib/pfSurface/plLayerAVI.cpp | 2 +- .../FeatureLib/pfSurface/plLayerMovie.cpp | 6 +- .../NucleusLib/inc/plProfileManager.cpp | 2 +- .../pnAsyncCoreExe/Private/Nt/pnAceNtFile.cpp | 12 +- .../Private/Nt/pnAceNtSocket.cpp | 4 +- .../Private/W9x/pnAceW9xFile.cpp | 10 +- .../Private/W9x/pnAceW9xSocket.cpp | 12 +- .../Private/W9x/pnAceW9xThread.cpp | 2 +- .../Private/Win32/pnAceW32Dns.cpp | 6 +- .../Private/Win32/pnAceW32Thread.cpp | 4 +- .../NucleusLib/pnAsyncCoreExe/pnAceCore.cpp | 2 +- .../NucleusLib/pnAsyncCoreExe/pnAceIo.cpp | 2 +- .../NucleusLib/pnAsyncCoreExe/pnAceThread.cpp | 2 +- .../NucleusLib/pnAsyncCoreExe/pnAceTimer.cpp | 2 +- .../NucleusLib/pnCrashExe/Win32/pnCreMail.cpp | 2 +- .../NucleusLib/pnDispatch/plDispatch.cpp | 6 +- .../Plasma/NucleusLib/pnFactory/plCreator.h | 4 +- .../Plasma/NucleusLib/pnFactory/plFactory.cpp | 2 +- .../NucleusLib/pnIni/Private/pnIniCore.cpp | 4 +- .../pnIniExe/Private/Win32/pnW32IniChange.cpp | 2 +- .../NucleusLib/pnIniExe/Private/pnIniSrv.cpp | 2 +- .../NucleusLib/pnInputCore/plInputMap.cpp | 4 +- .../NucleusLib/pnKeyedObject/plKeyImp.cpp | 6 +- .../pnKeyedObject/plMsgForwarder.cpp | 2 +- .../Plasma/NucleusLib/pnMessage/plMessage.cpp | 6 +- .../NucleusLib/pnMessage/plNotifyMsg.cpp | 64 +++--- .../NucleusLib/pnModifier/plLogicModBase.cpp | 8 +- .../NucleusLib/pnNetCli/pnNcChannel.cpp | 4 +- .../Plasma/NucleusLib/pnNetCli/pnNcCli.cpp | 4 +- .../NucleusLib/pnNetCommon/plGenericVar.cpp | 2 +- .../pnNetCommon/plNetSharedState.cpp | 4 +- .../pnNetCommon/plSynchedObject.cpp | 10 +- .../Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp | 4 +- .../Plasma/NucleusLib/pnNetLog/pnNlApi.cpp | 2 +- .../Plasma/NucleusLib/pnNetLog/pnNlCli.cpp | 2 +- .../Plasma/NucleusLib/pnOraLib/pnOraLib.cpp | 2 +- .../pnSceneObject/plAudioInterface.cpp | 8 +- .../pnSceneObject/plCoordinateInterface.cpp | 2 +- .../pnSceneObject/plDrawInterface.cpp | 12 +- .../pnSceneObject/plObjInterface.cpp | 2 +- .../pnSceneObject/plSceneObject.cpp | 16 +- .../pnSceneObject/plSimulationInterface.cpp | 2 +- .../NucleusLib/pnSimpleNet/pnSimpleNet.cpp | 2 +- .../NucleusLib/pnSqlLib/Private/pnSqlConn.cpp | 4 +- .../pnTimer/plTimerCallbackManager.cpp | 4 +- .../pnUtils/Private/Win32/pnUtW32Sync.cpp | 2 +- .../NucleusLib/pnUtils/Private/pnUtBigNum.cpp | 6 +- .../NucleusLib/pnUtils/Private/pnUtCmd.cpp | 2 +- .../NucleusLib/pnUtils/Private/pnUtCrypt.cpp | 4 +- .../NucleusLib/pnUtils/Private/pnUtSort.h | 2 +- .../NucleusLib/pnUtils/Private/pnUtSubst.cpp | 6 +- .../plAgeDescription/plAgeManifest.cpp | 2 +- .../PubUtilLib/plAgeLoader/plAgeLoader.cpp | 18 +- .../plAgeLoader/plAgeLoaderPaging.cpp | 4 +- .../PubUtilLib/plAudible/plAudibleNull.cpp | 2 +- .../PubUtilLib/plAudible/plWinAudible.cpp | 26 +-- .../PubUtilLib/plAudio/plAudioSystem.cpp | 14 +- .../PubUtilLib/plAudio/plDSoundBuffer.cpp | 2 +- .../PubUtilLib/plAudio/plEAXListenerMod.cpp | 6 +- Sources/Plasma/PubUtilLib/plAudio/plSound.cpp | 4 +- .../PubUtilLib/plAudio/plSoundEvent.cpp | 2 +- .../Plasma/PubUtilLib/plAudio/plVoiceChat.cpp | 24 +-- .../plAudio/plWin32GroupedSound.cpp | 2 +- .../PubUtilLib/plAudio/plWin32Sound.cpp | 6 +- .../PubUtilLib/plAudio/plWin32StaticSound.cpp | 2 +- .../plAudio/plWin32StreamingSound.cpp | 4 +- .../PubUtilLib/plAudio/plWinMicLevel.cpp | 2 +- .../plAudioCore/plAudioFileReader.cpp | 12 +- .../plAudioCore/plBufferedFileReader.cpp | 2 +- .../PubUtilLib/plAudioCore/plOGGCodec.cpp | 2 +- .../PubUtilLib/plAudioCore/plSoundBuffer.cpp | 8 +- .../plAudioCore/plSoundDeswizzler.cpp | 2 +- .../PubUtilLib/plAudioCore/plWavFile.cpp | 16 +- .../Plasma/PubUtilLib/plAvatar/plAGAnim.cpp | 2 +- .../PubUtilLib/plAvatar/plAGAnimInstance.cpp | 10 +- .../PubUtilLib/plAvatar/plAGMasterMod.cpp | 16 +- .../plAvatar/plAGMasterSDLModifier.cpp | 2 +- .../Plasma/PubUtilLib/plAvatar/plAGModifier.h | 2 +- .../PubUtilLib/plAvatar/plAnimStage.cpp | 2 +- .../PubUtilLib/plAvatar/plArmatureEffects.cpp | 10 +- .../PubUtilLib/plAvatar/plArmatureMod.cpp | 78 +++---- .../PubUtilLib/plAvatar/plAvBrainClimb.cpp | 42 ++-- .../PubUtilLib/plAvatar/plAvBrainCoop.cpp | 2 +- .../PubUtilLib/plAvatar/plAvBrainCritter.cpp | 12 +- .../PubUtilLib/plAvatar/plAvBrainDrive.cpp | 4 +- .../PubUtilLib/plAvatar/plAvBrainGeneric.cpp | 12 +- .../PubUtilLib/plAvatar/plAvBrainHuman.cpp | 100 ++++----- .../plAvBrainRideAnimatedPhysical.cpp | 38 ++-- .../PubUtilLib/plAvatar/plAvBrainSwim.cpp | 36 ++-- .../plAvatar/plAvCallbackAction.cpp | 8 +- .../plAvatar/plAvLadderModifier.cpp | 18 +- .../PubUtilLib/plAvatar/plAvTaskSeek.cpp | 6 +- .../PubUtilLib/plAvatar/plAvatarClothing.cpp | 54 ++--- .../PubUtilLib/plAvatar/plAvatarMgr.cpp | 48 ++--- .../plAvatar/plAvatarSDLModifier.cpp | 10 +- .../PubUtilLib/plAvatar/plAvatarTasks.cpp | 14 +- .../PubUtilLib/plAvatar/plClothingLayout.h | 58 ++--- .../PubUtilLib/plAvatar/plCoopCoordinator.cpp | 28 +-- .../PubUtilLib/plAvatar/plMatrixChannel.cpp | 8 +- .../plAvatar/plMultistageBehMod.cpp | 14 +- .../PubUtilLib/plAvatar/plNPCSpawnMod.cpp | 2 +- .../PubUtilLib/plAvatar/plOneShotMod.cpp | 2 +- .../plAvatar/plPhysicalControllerCore.cpp | 2 +- .../PubUtilLib/plAvatar/plPointChannel.cpp | 8 +- .../PubUtilLib/plAvatar/plQuatChannel.cpp | 8 +- .../PubUtilLib/plAvatar/plScalarChannel.cpp | 8 +- .../PubUtilLib/plAvatar/plSeekPointMod.cpp | 2 +- .../PubUtilLib/plAvatar/plSittingModifier.cpp | 28 +-- .../PubUtilLib/plAvatar/plSwimRegion.cpp | 4 +- .../plClientResMgr/plClientResMgr.cpp | 2 +- .../plCompression/plZlibCompress.cpp | 6 +- .../PubUtilLib/plCompression/plZlibStream.cpp | 4 +- .../PubUtilLib/plContainer/hsStringTable.cpp | 2 +- .../PubUtilLib/plDrawable/plAccMeshSmooth.cpp | 8 +- .../plDrawable/plAccessGeometry.cpp | 4 +- .../plDrawable/plAccessSnapShot.cpp | 2 +- .../plDrawable/plActivePrintShape.cpp | 2 +- .../PubUtilLib/plDrawable/plAvMeshSmooth.cpp | 8 +- .../PubUtilLib/plDrawable/plCluster.cpp | 2 +- .../PubUtilLib/plDrawable/plClusterGroup.cpp | 16 +- .../plDrawable/plDrawableGenerator.cpp | 4 +- .../PubUtilLib/plDrawable/plDrawableSpans.cpp | 38 ++-- .../plDrawable/plDrawableSpansExport.cpp | 2 +- .../PubUtilLib/plDrawable/plDynaBulletMgr.cpp | 2 +- .../PubUtilLib/plDrawable/plDynaDecalMgr.cpp | 38 ++-- .../PubUtilLib/plDrawable/plDynaFootMgr.cpp | 2 +- .../PubUtilLib/plDrawable/plDynaRippleMgr.cpp | 4 +- .../plDrawable/plDynaRippleMgrVS.cpp | 4 +- .../plDrawable/plDynaTorpedoVSMgr.cpp | 4 +- .../PubUtilLib/plDrawable/plDynaWakeMgr.cpp | 2 +- .../PubUtilLib/plDrawable/plGeoSpanDice.cpp | 16 +- .../PubUtilLib/plDrawable/plGeometrySpan.cpp | 48 ++--- .../plDrawable/plInstanceDrawInterface.cpp | 12 +- .../plDrawable/plInterMeshSmooth.cpp | 8 +- .../PubUtilLib/plDrawable/plMorphDelta.cpp | 2 +- .../PubUtilLib/plDrawable/plMorphSequence.cpp | 4 +- .../plDrawable/plMorphSequenceSDLMod.cpp | 2 +- .../PubUtilLib/plDrawable/plProxyGen.cpp | 6 +- .../PubUtilLib/plDrawable/plSharedMesh.cpp | 4 +- .../plDrawable/plSpaceTreeMaker.cpp | 14 +- .../PubUtilLib/plDrawable/plSpanInstance.cpp | 4 +- .../PubUtilLib/plDrawable/plSpanTemplate.cpp | 8 +- .../PubUtilLib/plDrawable/plSpanTypes.cpp | 2 +- .../PubUtilLib/plDrawable/plWaveSet7.cpp | 166 +++++++-------- .../PubUtilLib/plDrawable/plWaveSetBase.cpp | 4 +- .../PubUtilLib/plEncryption/plChecksum.cpp | 2 +- Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp | 2 +- .../Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp | 6 +- .../Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp | 2 +- .../Plasma/PubUtilLib/plFile/hsFiles_Win.cpp | 4 +- .../PubUtilLib/plFile/plEncryptedStream.cpp | 14 +- .../PubUtilLib/plFile/plInitFileReader.cpp | 2 +- .../PubUtilLib/plFile/plSecureStream.cpp | 14 +- .../PubUtilLib/plGImage/hsDXTDirectXCodec.cpp | 6 +- .../plGImage/hsDXTSoftwareCodec.cpp | 4 +- .../PubUtilLib/plGImage/plBumpMapGen.cpp | 2 +- .../PubUtilLib/plGImage/plCubicEnvironmap.cpp | 2 +- .../plGImage/plDynSurfaceWriter.cpp | 4 +- .../PubUtilLib/plGImage/plDynamicTextMap.cpp | 6 +- Sources/Plasma/PubUtilLib/plGImage/plFont.cpp | 24 +-- .../PubUtilLib/plGImage/plFontCache.cpp | 4 +- .../PubUtilLib/plGImage/plLODMipmap.cpp | 8 +- .../Plasma/PubUtilLib/plGImage/plMipmap.cpp | 32 +-- Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp | 6 +- .../PubUtilLib/plGImage/plWinFontCache.cpp | 2 +- .../plGLight/plDirectShadowMaster.cpp | 6 +- .../PubUtilLib/plGLight/plLightInfo.cpp | 16 +- .../PubUtilLib/plGLight/plLightSpace.cpp | 4 +- .../plGLight/plPointShadowMaster.cpp | 4 +- .../PubUtilLib/plGLight/plShadowCaster.cpp | 2 +- .../PubUtilLib/plGLight/plShadowMaster.cpp | 2 +- .../plGRenderProcs/hsSfxDistShade.cpp | 2 +- .../plInputCore/plAvatarInputInterface.cpp | 126 +++++------ .../PubUtilLib/plInputCore/plDInputDevice.cpp | 48 ++--- .../plInputCore/plDebugInputInterface.cpp | 8 +- .../PubUtilLib/plInputCore/plInputDevice.cpp | 22 +- .../plInputCore/plInputInterface.cpp | 6 +- .../plInputCore/plInputInterfaceMgr.cpp | 10 +- .../PubUtilLib/plInputCore/plInputManager.cpp | 22 +- .../plInputCore/plSceneInputInterface.cpp | 42 ++-- .../PubUtilLib/plInterp/plATCEaseCurves.cpp | 8 +- .../PubUtilLib/plInterp/plAnimTimeConvert.cpp | 10 +- .../PubUtilLib/plInterp/plController.cpp | 30 +-- .../plIntersect/plHardRegionTypes.cpp | 2 +- .../plIntersect/plSoftVolumeTypes.cpp | 2 +- Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp | 14 +- .../Plasma/PubUtilLib/plMath/hsNoiseFunc.cpp | 2 +- .../PubUtilLib/plMath/hsSearchVersion.h | 10 +- .../Plasma/PubUtilLib/plMessage/plAvatarMsg.h | 2 +- .../PubUtilLib/plMessage/plDynamicTextMsg.cpp | 6 +- .../PubUtilLib/plMessage/plLoadAgeMsg.cpp | 2 +- .../PubUtilLib/plMessage/plLoadAvatarMsg.cpp | 2 +- .../PubUtilLib/plMessage/plOneShotMsg.cpp | 2 +- .../plModifier/plAnimEventModifier.cpp | 4 +- .../plModifier/plAxisAnimModifier.cpp | 36 ++-- .../plModifier/plCloneSpawnModifier.cpp | 6 +- .../plModifier/plDecalEnableMod.cpp | 2 +- .../plModifier/plExcludeRegionModifier.cpp | 10 +- .../plModifier/plGameMarkerModifier.cpp | 2 +- .../PubUtilLib/plModifier/plImageLibMod.cpp | 2 +- .../PubUtilLib/plModifier/plLogicModifier.cpp | 10 +- .../plModifier/plResponderModifier.cpp | 12 +- .../PubUtilLib/plModifier/plSDLModifier.cpp | 4 +- .../PubUtilLib/plModifier/plSpawnModifier.cpp | 2 +- .../plNetClient/plLinkEffectsMgr.cpp | 32 +-- .../plNetClient/plNetCliAgeJoiner.cpp | 2 +- .../plNetClient/plNetCliAgeLeaver.cpp | 2 +- .../PubUtilLib/plNetClient/plNetClientMgr.cpp | 20 +- .../plNetClient/plNetClientMgrLoad.cpp | 4 +- .../plNetClient/plNetClientMgrRecord.cpp | 12 +- .../plNetClient/plNetClientMgrSend.cpp | 8 +- .../plNetClient/plNetClientMgrVoice.cpp | 2 +- .../plNetClient/plNetClientMsgHandler.cpp | 20 +- .../plNetClient/plNetLinkingMgr.cpp | 22 +- .../plNetClient/plNetObjectDebugger.cpp | 2 +- .../PubUtilLib/plNetClient/plNetVoiceList.cpp | 4 +- .../plNetClientComm/plNetClientComm.cpp | 38 ++-- .../plNetClientStreamRecorder.cpp | 4 +- .../plNetCommon/plNetCommonHelpers.cpp | 6 +- .../plNetGameLib/Private/plNglAuth.cpp | 76 +++---- .../plNetGameLib/Private/plNglCore.cpp | 2 +- .../plNetGameLib/Private/plNglCsr.cpp | 8 +- .../plNetGameLib/Private/plNglFile.cpp | 8 +- .../plNetGameLib/Private/plNglGame.cpp | 4 +- .../plNetGameLib/Private/plNglGateKeeper.cpp | 8 +- .../plNetMessage/plNetCommonMessage.h | 2 +- .../PubUtilLib/plNetMessage/plNetMessage.cpp | 2 +- .../plNetMessage/plNetMsgHelpers.cpp | 6 +- .../PubUtilLib/plNetMessage/plNetMsgHelpers.h | 2 +- .../plNetTransport/plNetTransport.cpp | 2 +- .../plParticleSystem/plConvexVolume.cpp | 12 +- .../plParticleSystem/plParticleEffect.cpp | 6 +- .../plParticleSystem/plParticleEmitter.cpp | 4 +- .../plParticleSystem/plParticleGenerator.cpp | 10 +- .../plParticleSystem/plParticleSystem.cpp | 12 +- .../PubUtilLib/plPhysX/plLOSDispatch.cpp | 4 +- .../PubUtilLib/plPhysX/plPXPhysical.cpp | 16 +- .../plPhysX/plPXPhysicalController.cpp | 10 +- .../plPhysX/plPXPhysicalControllerCore.cpp | 12 +- .../PubUtilLib/plPhysX/plSimulationMgr.cpp | 8 +- .../plPhysical/plCollisionDetector.cpp | 18 +- .../plPhysical/plDetectorModifier.h | 2 +- .../plPhysical/plPhysicalSndGroup.cpp | 8 +- .../plPhysical/plPickingDetector.cpp | 2 +- .../plPipeline/hsG3DDeviceSelector.cpp | 8 +- .../PubUtilLib/plPipeline/plCaptureRender.cpp | 12 +- .../plPipeline/plCubicRenderTarget.h | 2 +- .../plCubicRenderTargetModifier.cpp | 8 +- .../PubUtilLib/plPipeline/plDXDeviceRefs.cpp | 2 +- .../PubUtilLib/plPipeline/plDXEnumerate.cpp | 4 +- .../PubUtilLib/plPipeline/plDXPipeline.cpp | 96 ++++----- .../PubUtilLib/plPipeline/plDynamicEnvMap.cpp | 36 ++-- .../PubUtilLib/plPipeline/plGBufferGroup.cpp | 22 +- .../Plasma/PubUtilLib/plPipeline/plPlates.cpp | 16 +- .../PubUtilLib/plPipeline/plRenderTarget.cpp | 2 +- .../PubUtilLib/plPipeline/plTextFont.cpp | 2 +- .../PubUtilLib/plPipeline/plTextGenerator.cpp | 2 +- .../plProgressMgr/plProgressMgr.cpp | 4 +- .../PubUtilLib/plResMgr/plBSDiffBuffer.cpp | 16 +- .../PubUtilLib/plResMgr/plDiffBuffer.cpp | 10 +- .../PubUtilLib/plResMgr/plRegistryKeyList.cpp | 2 +- .../PubUtilLib/plResMgr/plRegistryNode.cpp | 4 +- .../PubUtilLib/plResMgr/plResManager.cpp | 24 +-- .../plResMgr/plResManagerHelper.cpp | 16 +- Sources/Plasma/PubUtilLib/plSDL/plSDLMgr.cpp | 2 +- .../Plasma/PubUtilLib/plSDL/plSDLParser.cpp | 6 +- .../plSDL/plStateChangeNotifier.cpp | 2 +- .../PubUtilLib/plSDL/plStateDataRecord.cpp | 8 +- .../PubUtilLib/plSDL/plStateDescriptor.cpp | 4 +- .../PubUtilLib/plSDL/plStateVariable.cpp | 100 ++++----- .../Plasma/PubUtilLib/plScene/plOccluder.cpp | 6 +- .../PubUtilLib/plScene/plPostEffectMod.cpp | 10 +- .../PubUtilLib/plScene/plRelevanceMgr.cpp | 4 +- .../PubUtilLib/plScene/plRelevanceRegion.cpp | 4 +- .../PubUtilLib/plScene/plRenderRequest.cpp | 2 +- .../Plasma/PubUtilLib/plScene/plSceneNode.cpp | 4 +- .../Plasma/PubUtilLib/plScene/plVisMgr.cpp | 2 +- .../Plasma/PubUtilLib/plScene/plVisRegion.cpp | 4 +- .../PubUtilLib/plSockets/plMemBuffer.cpp | 6 +- .../PubUtilLib/plStatGather/plAutoProfile.cpp | 8 +- .../PubUtilLib/plStatusLog/plStatusLog.cpp | 8 +- .../plStreamLogger/plStreamLogger.cpp | 4 +- .../PubUtilLib/plSurface/hsGMaterial.cpp | 10 +- .../PubUtilLib/plSurface/plGrassShaderMod.cpp | 14 +- .../Plasma/PubUtilLib/plSurface/plLayer.cpp | 34 +-- .../PubUtilLib/plSurface/plLayerAnimation.cpp | 30 +-- .../PubUtilLib/plSurface/plLayerInterface.cpp | 4 +- .../PubUtilLib/plSurface/plLayerMultiply.cpp | 12 +- .../Plasma/PubUtilLib/plSurface/plLayerOr.cpp | 2 +- .../plSurface/plLayerShadowBase.cpp | 12 +- .../PubUtilLib/plVault/plVaultClientApi.cpp | 68 +++--- .../PubUtilLib/plVault/plVaultNodeAccess.cpp | 2 +- 423 files changed, 2501 insertions(+), 2504 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 11927aa2..968a3736 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -222,11 +222,11 @@ plClient::plClient() /// allow console commands to start working early // Create the console engine - fConsoleEngine = TRACKED_NEW pfConsoleEngine(); + fConsoleEngine = new pfConsoleEngine(); // create network mgr before console runs - plNetClientMgr::SetInstance(TRACKED_NEW plNetClientMgr); - plAgeLoader::SetInstance(TRACKED_NEW plAgeLoader); + plNetClientMgr::SetInstance(new plNetClientMgr); + plAgeLoader::SetInstance(new plAgeLoader); // Use it to parse the init directory wchar_t initFolder[MAX_PATH]; @@ -274,7 +274,7 @@ hsBool plClient::Shutdown() plBinkPlayer::DeInit(); // // Get any proxies to commit suicide. - plProxyDrawMsg* nuke = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAllTypes + plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAllTypes | plProxyDrawMsg::kDestroy); plgDispatch::MsgSend(nuke); @@ -447,17 +447,17 @@ void plClient::InitAuxInits() void plClient::InitInputs() { hsStatusMessage("InitInputs client\n"); - fInputManager = TRACKED_NEW plInputManager( fWindowHndl ); + fInputManager = new plInputManager( fWindowHndl ); fInputManager->CreateInterfaceMod(fPipeline); fInputManager->RegisterAs( kInput_KEY ); plgDispatch::Dispatch()->RegisterForExactType(plIMouseXEventMsg::Index(), fInputManager->GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plIMouseYEventMsg::Index(), fInputManager->GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plIMouseBEventMsg::Index(), fInputManager->GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), fInputManager->GetKey()); - plInputDevice* pKeyboard = TRACKED_NEW plKeyboardDevice(); + plInputDevice* pKeyboard = new plKeyboardDevice(); fInputManager->AddInputDevice(pKeyboard); - plInputDevice* pMouse = TRACKED_NEW plMouseDevice(); + plInputDevice* pMouse = new plMouseDevice(); fInputManager->AddInputDevice(pMouse); if( fWindowActive ) @@ -792,7 +792,7 @@ hsBool plClient::MsgReceive(plMessage* msg) plAudible* aud = plAudible::ConvertNoRef(callback->GetSender()->ObjectIsLoaded()); if( simpMod ) { - plAnimCmdMsg* cmd = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* cmd = new plAnimCmdMsg; cmd->AddReceiver(simpMod->GetKey()); cmd->SetCmd(plAnimCmdMsg::kRemoveCallbacks); cmd->AddCallback(callback); @@ -801,7 +801,7 @@ hsBool plClient::MsgReceive(plMessage* msg) } else if( aud ) { - plSoundMsg* cmd = TRACKED_NEW plSoundMsg; + plSoundMsg* cmd = new plSoundMsg; cmd->AddReceiver(aud->GetKey()); cmd->SetCmd(plSoundMsg::kRemoveCallbacks); cmd->AddCallback(callback); @@ -891,7 +891,7 @@ hsBool plClient::IHandleMovieMsg(plMovieMsg* mov) if( i == fMovies.GetCount() ) { - fMovies.Append(TRACKED_NEW plBinkPlayer); + fMovies.Append(new plBinkPlayer); fMovies[i]->SetFileName(mov->GetFileName()); } @@ -1010,7 +1010,7 @@ void plClient::IQueueRoomLoad(const std::vector& locs, bool hold) continue; } - fLoadRooms.push_back(TRACKED_NEW LoadRequest(loc, hold)); + fLoadRooms.push_back(new LoadRequest(loc, hold)); if (!lastAgeName || hsStrEQ(info->GetAge(), lastAgeName)) lastAgeName = info->GetAge(); @@ -1050,7 +1050,7 @@ void plClient::ILoadNextRoom() if (req) { - plClientRefMsg* pRefMsg = TRACKED_NEW plClientRefMsg(GetKey(), + plClientRefMsg* pRefMsg = new plClientRefMsg(GetKey(), plRefMsg::kOnCreate, -1, req->hold ? plClientRefMsg::kLoadRoomHold : plClientRefMsg::kLoadRoom); @@ -1062,7 +1062,7 @@ void plClient::ILoadNextRoom() delete req; - plClientMsg* nextRoom = TRACKED_NEW plClientMsg(plClientMsg::kLoadNextRoom); + plClientMsg* nextRoom = new plClientMsg(plClientMsg::kLoadNextRoom); nextRoom->Send(GetKey()); } } @@ -1236,7 +1236,7 @@ void plClient::IRoomLoaded(plSceneNode* node, bool hold) // now tell all those who are interested that a room was loaded if (!hold) { - plRoomLoadNotifyMsg* loadmsg = TRACKED_NEW plRoomLoadNotifyMsg; + plRoomLoadNotifyMsg* loadmsg = new plRoomLoadNotifyMsg; loadmsg->SetRoom(pRmKey); loadmsg->SetWhatHappen(plRoomLoadNotifyMsg::kLoaded); plgDispatch::MsgSend(loadmsg); @@ -1272,7 +1272,7 @@ void plClient::IRoomUnloaded(plSceneNode* node) plAgeLoader::GetInstance()->FinishedPagingOutRoom(&pRmKey, 1); // tell all those who are interested that a room was unloaded - plRoomLoadNotifyMsg* loadmsg = TRACKED_NEW plRoomLoadNotifyMsg; + plRoomLoadNotifyMsg* loadmsg = new plRoomLoadNotifyMsg; loadmsg->SetRoom(pRmKey); loadmsg->SetWhatHappen(plRoomLoadNotifyMsg::kUnloaded); plgDispatch::MsgSend(loadmsg); @@ -1472,7 +1472,7 @@ hsBool plClient::StartInit() InitDLLs(); plGlobalVisMgr::Init(); - fPageMgr = TRACKED_NEW plPageTreeMgr; + fPageMgr = new plPageTreeMgr; plVisLOSMgr::Init(fPipeline, fPageMgr); @@ -1492,26 +1492,26 @@ hsBool plClient::StartInit() /// Note: this can be done last because the console engine was inited first, and /// everything in code that works with the console does so through the console engine - fConsole = TRACKED_NEW pfConsole(); + fConsole = new pfConsole(); pfConsole::SetPipeline( fPipeline ); fConsole->RegisterAs( kConsoleObject_KEY ); // fixedKey from plFixedKey.h fConsole->Init( fConsoleEngine ); /// Init the font cache - fFontCache = TRACKED_NEW plFontCache(); + fFontCache = new plFontCache(); /// Init the transition manager - fTransitionMgr = TRACKED_NEW plTransitionMgr(); + fTransitionMgr = new plTransitionMgr(); fTransitionMgr->RegisterAs( kTransitionMgr_KEY ); // fixedKey from plFixedKey.h fTransitionMgr->Init(); // Init the Age Linking effects manager - fLinkEffectsMgr = TRACKED_NEW plLinkEffectsMgr(); + fLinkEffectsMgr = new plLinkEffectsMgr(); fLinkEffectsMgr->RegisterAs( kLinkEffectsMgr_KEY ); // fixedKey from plFixedKey.h fLinkEffectsMgr->Init(); /// Init the in-game GUI manager - fGameGUIMgr = TRACKED_NEW pfGameGUIMgr(); + fGameGUIMgr = new pfGameGUIMgr(); fGameGUIMgr->RegisterAs( kGameGUIMgr_KEY ); fGameGUIMgr->Init(); @@ -1533,14 +1533,14 @@ hsBool plClient::StartInit() plAgeLoader::GetInstance()->Init(); pfSecurePreloader::GetInstance()->Init(); - plCmdIfaceModMsg* pModMsg2 = TRACKED_NEW plCmdIfaceModMsg; + plCmdIfaceModMsg* pModMsg2 = new plCmdIfaceModMsg; pModMsg2->SetBCastFlag(plMessage::kBCastByExactType); pModMsg2->SetSender(fConsole->GetKey()); pModMsg2->SetCmd(plCmdIfaceModMsg::kAdd); plgDispatch::MsgSend(pModMsg2); // create new the virtual camera - fNewCamera = TRACKED_NEW plVirtualCam1; + fNewCamera = new plVirtualCam1; fNewCamera->RegisterAs( kVirtualCamera1_KEY ); fNewCamera->Init(); fNewCamera->SetPipeline( GetPipeline() ); @@ -1554,7 +1554,7 @@ hsBool plClient::StartInit() plInputManager::SetRecenterMouse(false); // create the listener for the audio system: - plListener* pLMod = TRACKED_NEW plListener; + plListener* pLMod = new plListener; pLMod->RegisterAs(kListenerMod_KEY ); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pLMod->GetKey()); @@ -1564,7 +1564,7 @@ hsBool plClient::StartInit() if (StrCmp(NetCommGetStartupAge()->ageDatasetName, "StartUp") == 0) { - plNetCommAuthMsg * msg = NEW(plNetCommAuthMsg); + plNetCommAuthMsg * msg = new plNetCommAuthMsg(); msg->result = kNetSuccess; msg->param = nil; msg->Send(); @@ -1748,18 +1748,18 @@ hsBool plClient::IUpdate() // starting trouble during their update. So to get rid of this message, some // other way of flushing the dispatch after NegClientMgr's update is needed. mf plProfile_BeginTiming(TimeMsg); - plTimeMsg* msg = TRACKED_NEW plTimeMsg(nil, nil, nil, nil); + plTimeMsg* msg = new plTimeMsg(nil, nil, nil, nil); plgDispatch::MsgSend(msg); plProfile_EndTiming(TimeMsg); plProfile_BeginTiming(EvalMsg); - plEvalMsg* eval = TRACKED_NEW plEvalMsg(nil, nil, nil, nil); + plEvalMsg* eval = new plEvalMsg(nil, nil, nil, nil); plgDispatch::MsgSend(eval); plProfile_EndTiming(EvalMsg); char *xFormLap1 = "Main"; plProfile_BeginLap(TransformMsg, xFormLap1); - plTransformMsg* xform = TRACKED_NEW plTransformMsg(nil, nil, nil, nil); + plTransformMsg* xform = new plTransformMsg(nil, nil, nil, nil); plgDispatch::MsgSend(xform); plProfile_EndLap(TransformMsg, xFormLap1); @@ -1777,7 +1777,7 @@ hsBool plClient::IUpdate() { char *xFormLap2 = "Simulation"; plProfile_BeginLap(TransformMsg, xFormLap2); - xform = TRACKED_NEW plTransformMsg(nil, nil, nil, nil); + xform = new plTransformMsg(nil, nil, nil, nil); plgDispatch::MsgSend(xform); plProfile_EndLap(TransformMsg, xFormLap2); } @@ -1785,7 +1785,7 @@ hsBool plClient::IUpdate() { char *xFormLap3 = "Delayed"; plProfile_BeginLap(TransformMsg, xFormLap3); - xform = TRACKED_NEW plDelayedTransformMsg(nil, nil, nil, nil); + xform = new plDelayedTransformMsg(nil, nil, nil, nil); plgDispatch::MsgSend(xform); plProfile_EndLap(TransformMsg, xFormLap3); } @@ -1793,7 +1793,7 @@ hsBool plClient::IUpdate() plCoordinateInterface::SetTransformPhase(plCoordinateInterface::kTransformPhaseNormal); plProfile_BeginTiming(CameraMsg); - plCameraMsg* cameras = TRACKED_NEW plCameraMsg; + plCameraMsg* cameras = new plCameraMsg; cameras->SetCmd(plCameraMsg::kUpdateCameras); cameras->SetBCastFlag(plMessage::kBCastByExactType); plgDispatch::MsgSend(cameras); @@ -1866,11 +1866,11 @@ hsBool plClient::IDraw() plProfile_EndTiming(VisEval); plProfile_BeginTiming(RenderMsg); - plRenderMsg* rendMsg = TRACKED_NEW plRenderMsg(fPipeline); + plRenderMsg* rendMsg = new plRenderMsg(fPipeline); plgDispatch::MsgSend(rendMsg); plProfile_EndTiming(RenderMsg); - plPreResourceMsg* preMsg = TRACKED_NEW plPreResourceMsg(fPipeline); + plPreResourceMsg* preMsg = new plPreResourceMsg(fPipeline); plgDispatch::MsgSend(preMsg); // This might not be the ideal place for this, but it @@ -2444,7 +2444,7 @@ void plClient::IOnAsyncInitComplete () { pfMarkerMgr::Instance(); - fAnimDebugList = TRACKED_NEW plAnimDebugList(); + fAnimDebugList = new plAnimDebugList(); /// Now parse final init files (*.fni). These are files just like ini files, only to be run /// after all hell has broken loose in the client. @@ -2476,7 +2476,7 @@ void plClient::IOnAsyncInitComplete () { // Tell the transition manager to start faded out. This is so we don't // get a frame or two of non-faded drawing before we do our initial fade in - (void)(TRACKED_NEW plTransitionMsg( plTransitionMsg::kFadeOut, 0.0f, true ))->Send(); + (void)(new plTransitionMsg( plTransitionMsg::kFadeOut, 0.0f, true ))->Send(); fFlags.SetBit(kFlagAsyncInitComplete); if (fFlags.IsBitSet(kFlagGlobalDataLoaded)) @@ -2494,7 +2494,7 @@ void plClient::ICompleteInit () { hsStatusMessage("Client init complete."); // Tell everyone we're ready to rock. - plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kInitComplete); + plClientMsg* clientMsg = new plClientMsg(plClientMsg::kInitComplete); clientMsg->SetBCastFlag(plMessage::kBCastByType); clientMsg->Send(); diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 4bc0769b..9a09d6ec 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -302,7 +302,7 @@ static bool TGRunLoginDialog (LoginDialogParam *pLoginParam) if (pWStr) Len += StrLen (pWStr) + 2; - pTmpStr = TRACKED_NEW char[Len]; + pTmpStr = new char[Len]; StrCopy (pTmpStr, pStr1, StrLen (pStr1)); if (pStr2) { @@ -661,8 +661,8 @@ bool InitPhysX() // launch the PhysX installer STARTUPINFOW startupInfo; PROCESS_INFORMATION processInfo; - ZERO(startupInfo); - ZERO(processInfo); + memset(&startupInfo, 0, sizeof(startupInfo)); + memset(&processInfo, 0, sizeof(processInfo)); startupInfo.cb = sizeof(startupInfo); if(!CreateProcessW(NULL, s_physXSetupExeName, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo)) { @@ -702,7 +702,7 @@ bool InitPhysX() bool InitClient( HWND hWnd ) { - plResManager *resMgr = TRACKED_NEW plResManager; + plResManager *resMgr = new plResManager; resMgr->SetDataPath("dat"); hsgResMgr::Init(resMgr); @@ -713,7 +713,7 @@ bool InitClient( HWND hWnd ) } plClientResMgr::Instance().ILoadResources("resource.dat"); - gClient = TRACKED_NEW plClient; + gClient = new plClient; if( gClient == nil ) return false; @@ -939,7 +939,7 @@ BOOL CALLBACK UruTOSDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l char* eulaData = NULL; unsigned dataLen = stream.GetSizeLeft(); - eulaData = TRACKED_NEW char[dataLen + 1]; + eulaData = new char[dataLen + 1]; ZeroMemory(eulaData, dataLen + 1); stream.Read(dataLen, eulaData); @@ -1455,8 +1455,8 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC // if the client was started directly, run the patcher, and shutdown STARTUPINFOW si; PROCESS_INFORMATION pi; - ZERO(si); - ZERO(pi); + memset(&si, 0, sizeof(si)); + memset(&pi, 0, sizeof(pi)); si.cb = sizeof(si); wchar_t cmdLine[MAX_PATH]; const wchar_t ** addrs; diff --git a/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp b/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp index 00f61137..add04291 100644 --- a/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp +++ b/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp @@ -361,7 +361,7 @@ static void RequestNextManifestFile () { PathRemoveFilename(basePath, basePath, arrsize(basePath)); PathCreateDirectory(basePath, kPathCreateDirFlagEntireTree); - ProgressStream *writer = NEW(ProgressStream); // optimization: dont delete and recreate. Doesn't seem to be working currently, ZLibStream is breaking + ProgressStream *writer = new ProgressStream(); // optimization: dont delete and recreate. Doesn't seem to be working currently, ZLibStream is breaking if(!writer->Open(path, "wb")) { writer->Close(); @@ -435,7 +435,7 @@ static void DownloadCallback ( #endif // PLASMA_EXTERNAL_RELEASE Shutdown(mf->info); } - writer = NEW(ProgressStream); + writer = new ProgressStream(); if (!writer->Open(path, "wb")) { #ifdef PLASMA_EXTERNAL_RELEASE MessageBox(nil, s_fileOpenError, "URU Launcher", MB_ICONERROR); @@ -617,7 +617,7 @@ static void ProcessManifest (void * param) { PathRemoveFilename(basePath, basePath, arrsize(basePath)); PathCreateDirectory(basePath, kPathCreateDirFlagEntireTree); - ManifestFile * mf = NEW(ManifestFile)( + ManifestFile * mf = new ManifestFile( manifest[index].clientName, manifest[index].downloadName, manifest[index].md5, @@ -689,7 +689,7 @@ static void ManifestCallback ( return; } - ManifestResult * mr = NEW(ManifestResult); + ManifestResult * mr = new ManifestResult(); StrCopy(mr->group, group, arrsize(mr->group)); mr->manifest.Set(manifest, entryCount); mr->info = info; @@ -991,8 +991,8 @@ void UruStartProc (void * param) { fprintf(stderr, "URUPlayer StartProc, running game process at dir:%ws, cmd:%ws for application:%ws\n", workDir, cmdLine, s_clientExeName); STARTUPINFOW si; - ZERO(si); - ZERO(s_pi); + memset(&si, 0, sizeof(si)); + memset(&s_pi, 0, sizeof(s_pi)); si.cb = sizeof(si); info->SetText("Launching URU..."); diff --git a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp index 6d0b94b4..299b1bc1 100644 --- a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp +++ b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp @@ -129,7 +129,7 @@ int main(int argc, char* argv[]) plResMgrSettings::Get().SetFilterNewerPageVersions(false); plResMgrSettings::Get().SetFilterOlderPageVersions(false); plResMgrSettings::Get().SetLoadPagesOnInit(false); - gResMgr = TRACKED_NEW plResManager; + gResMgr = new plResManager; hsgResMgr::Init(gResMgr); gResMgr->AddSinglePage(pageFile); diff --git a/Sources/Plasma/Apps/plPageOptimizer/main.cpp b/Sources/Plasma/Apps/plPageOptimizer/main.cpp index d817de9d..e3967ce4 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/main.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/main.cpp @@ -63,12 +63,12 @@ int main(int argc, char* argv[]) try { #endif - plResManager* resMgr = TRACKED_NEW plResManager; + plResManager* resMgr = new plResManager; hsgResMgr::Init(resMgr); // Setup all the crap that needs to be around to load plSimulationMgr::Init(); - fontCache = TRACKED_NEW plFontCache; + fontCache = new plFontCache; plPythonFileMod::SetAtConvertTime(); #ifndef _DEBUG } catch (...) diff --git a/Sources/Plasma/Apps/plUruLauncher/Main.cpp b/Sources/Plasma/Apps/plUruLauncher/Main.cpp index f5965ce1..3b27e30b 100644 --- a/Sources/Plasma/Apps/plUruLauncher/Main.cpp +++ b/Sources/Plasma/Apps/plUruLauncher/Main.cpp @@ -774,7 +774,7 @@ int __stdcall WinMain ( TGDoCiderDetection (); s_hInstance = hInstance; - ZERO(s_launcherInfo); + memset(&s_launcherInfo, 0, sizeof(s_launcherInfo)); StrPrintf(s_launcherInfo.cmdLine, arrsize(s_launcherInfo.cmdLine), appCmdLine); s_launcherInfo.returnCode = 0; @@ -860,8 +860,8 @@ int __stdcall WinMain ( // launch new patcher STARTUPINFOW si; PROCESS_INFORMATION pi; - ZERO(si); - ZERO(pi); + memset(&si, 0, sizeof(si)); + memset(&pi, 0, sizeof(pi)); si.cb = sizeof(si); wchar_t cmdline[MAX_PATH]; @@ -990,7 +990,7 @@ void SetReturnCode (DWORD retCode) { //============================================================================ void SetProgress (unsigned progress) { - SetProgressEvent *event = NEW(SetProgressEvent); + SetProgressEvent *event = new SetProgressEvent(); event->type = kEventSetProgress; event->progress = progress; PostEvent(event); @@ -998,7 +998,7 @@ void SetProgress (unsigned progress) { //============================================================================ void SetText (const char text[]) { - SetTextEvent *event = NEW(SetTextEvent); + SetTextEvent *event = new SetTextEvent(); event->type = kEventSetText; StrCopy(event->text, text, arrsize(event->text)); PostEvent(event); @@ -1006,7 +1006,7 @@ void SetText (const char text[]) { //============================================================================ void SetStatusText (const char text[]) { - SetTextEvent *event = NEW(SetTextEvent); + SetTextEvent *event = new SetTextEvent(); event->type = kEventSetStatusText; StrCopy(event->text, text, arrsize(event->text)); PostEvent(event); diff --git a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp index 12d84d87..cc552e4c 100644 --- a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp +++ b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp @@ -263,8 +263,8 @@ static bool SelfPatcherProc (bool * abort, plLauncherInfo *info) { // launch new patcher STARTUPINFOW si; PROCESS_INFORMATION pi; - ZERO(si); - ZERO(pi); + memset(&si, 0, sizeof(si)); + memset(&pi, 0, sizeof(pi)); si.cb = sizeof(si); wchar_t cmdline[MAX_PATH]; diff --git a/Sources/Plasma/CoreLib/hsBiExpander.h b/Sources/Plasma/CoreLib/hsBiExpander.h index 6dadb6c8..7e07aa65 100644 --- a/Sources/Plasma/CoreLib/hsBiExpander.h +++ b/Sources/Plasma/CoreLib/hsBiExpander.h @@ -127,7 +127,7 @@ void hsExpander::IExpand(int newSize) newPostAlloc++; while( newPostAlloc <= newSize ) newPostAlloc = fGrowBy ? newPostAlloc + fGrowBy : newPostAlloc << 1; - T* newArray = TRACKED_NEW T[newPostAlloc]; + T* newArray = new T[newPostAlloc]; int i; for( i = 0; i < fNumPost; i++ ) newArray[i] = fArray[i]; @@ -145,7 +145,7 @@ hsExpander::hsExpander(int32_t minSize, int32_t growBy) fMinSize = minSize+1; fGrowBy = growBy; - fArray = TRACKED_NEW T[fMinSize]; + fArray = new T[fMinSize]; fNumPostAlloc = fMinSize; fNumPost = 0; @@ -339,7 +339,7 @@ void hsBiExpander::IExpand(int newSize, hsBool towardEnd) while( newPreAlloc <= newSize ) newPreAlloc = fGrowBy ? newPreAlloc + fGrowBy : newPreAlloc << 1; } - T* newArray = TRACKED_NEW T[newPreAlloc + newPostAlloc]; + T* newArray = new T[newPreAlloc + newPostAlloc]; newArray += newPreAlloc; int i; for( i = -fNumPre; i < fNumPost; i++ ) @@ -361,7 +361,7 @@ hsBiExpander::hsBiExpander(int32_t minSize, int32_t growBy) fMinSize = minSize+1; fGrowBy = growBy; - fArray = TRACKED_NEW T[fMinSize << 1]; + fArray = new T[fMinSize << 1]; fNumPreAlloc = fNumPostAlloc = fMinSize; fArray += fNumPreAlloc; diff --git a/Sources/Plasma/CoreLib/hsBitVector.cpp b/Sources/Plasma/CoreLib/hsBitVector.cpp index f4b14f2a..c3194b2c 100644 --- a/Sources/Plasma/CoreLib/hsBitVector.cpp +++ b/Sources/Plasma/CoreLib/hsBitVector.cpp @@ -73,7 +73,7 @@ void hsBitVector::IGrow(uint32_t newNumBitVectors) { hsAssert(newNumBitVectors > fNumBitVectors, "Growing smaller"); uint32_t *old = fBitVectors; - fBitVectors = TRACKED_NEW uint32_t[newNumBitVectors]; + fBitVectors = new uint32_t[newNumBitVectors]; int i; for( i = 0; i < fNumBitVectors; i++ ) fBitVectors[i] = old[i]; @@ -96,7 +96,7 @@ hsBitVector& hsBitVector::Compact() if( hiVec >= 0 ) { uint32_t *old = fBitVectors; - fBitVectors = TRACKED_NEW uint32_t[++hiVec]; + fBitVectors = new uint32_t[++hiVec]; int i; for( i = 0; i < hiVec; i++ ) fBitVectors[i] = old[i]; @@ -119,7 +119,7 @@ void hsBitVector::Read(hsStream* s) if( fNumBitVectors ) { delete [] fBitVectors; - fBitVectors = TRACKED_NEW uint32_t[fNumBitVectors]; + fBitVectors = new uint32_t[fNumBitVectors]; int i; for( i = 0; i < fNumBitVectors; i++ ) s->LogReadLE(&fBitVectors[i],"BitVector"); diff --git a/Sources/Plasma/CoreLib/hsBitVector.h b/Sources/Plasma/CoreLib/hsBitVector.h index fc3aebb9..bd2fe865 100644 --- a/Sources/Plasma/CoreLib/hsBitVector.h +++ b/Sources/Plasma/CoreLib/hsBitVector.h @@ -102,7 +102,7 @@ public: // integer level access uint32_t GetNumBitVectors() const { return fNumBitVectors; } uint32_t GetBitVector(int i) const { return fBitVectors[i]; } - void SetNumBitVectors(uint32_t n) { Reset(); fNumBitVectors=n; fBitVectors = TRACKED_NEW uint32_t[n]; } + void SetNumBitVectors(uint32_t n) { Reset(); fNumBitVectors=n; fBitVectors = new uint32_t[n]; } void SetBitVector(int i, uint32_t val) { fBitVectors[i]=val; } // Do dst.SetCount(0), then add each set bit's index into dst, returning dst. @@ -118,7 +118,7 @@ inline hsBitVector::hsBitVector(const hsBitVector& other) { if( 0 != (fNumBitVectors = other.fNumBitVectors) ) { - fBitVectors = TRACKED_NEW uint32_t[fNumBitVectors]; + fBitVectors = new uint32_t[fNumBitVectors]; int i; for( i = 0; i < fNumBitVectors; i++ ) fBitVectors[i] = other.fBitVectors[i]; @@ -160,7 +160,7 @@ inline hsBitVector& hsBitVector::operator=(const hsBitVector& other) { Reset(); fNumBitVectors = other.fNumBitVectors; - fBitVectors = TRACKED_NEW uint32_t[fNumBitVectors]; + fBitVectors = new uint32_t[fNumBitVectors]; } else { diff --git a/Sources/Plasma/CoreLib/hsBounds.cpp b/Sources/Plasma/CoreLib/hsBounds.cpp index 0c1cccb6..ad7c9124 100644 --- a/Sources/Plasma/CoreLib/hsBounds.cpp +++ b/Sources/Plasma/CoreLib/hsBounds.cpp @@ -554,7 +554,7 @@ hsBool hsBoundsOriented::IsInside(const hsPoint3* pos) const void hsBoundsOriented::SetNumberPlanes(uint32_t n) { delete [] fPlanes; - fPlanes = TRACKED_NEW hsPlane3[fNumPlanes = n]; + fPlanes = new hsPlane3[fNumPlanes = n]; } void hsBoundsOriented::SetPlane(uint32_t i, hsPlane3 *pln) @@ -562,7 +562,7 @@ void hsBoundsOriented::SetPlane(uint32_t i, hsPlane3 *pln) fType = kBoundsNormal; if( i >= fNumPlanes ) { - hsPlane3 *newPlanes = TRACKED_NEW hsPlane3[i+1]; + hsPlane3 *newPlanes = new hsPlane3[i+1]; if( fPlanes ) { int k; @@ -633,7 +633,7 @@ void hsBoundsOriented::Read(hsStream *stream) fNumPlanes = stream->ReadLE32(); if (fPlanes) delete [] fPlanes; - fPlanes = TRACKED_NEW hsPlane3[fNumPlanes]; + fPlanes = new hsPlane3[fNumPlanes]; int i; for( i = 0; i < fNumPlanes; i++ ) { diff --git a/Sources/Plasma/CoreLib/hsExceptionStack.h b/Sources/Plasma/CoreLib/hsExceptionStack.h index 81e29fbc..c11f0274 100644 --- a/Sources/Plasma/CoreLib/hsExceptionStack.h +++ b/Sources/Plasma/CoreLib/hsExceptionStack.h @@ -83,7 +83,7 @@ inline hsExceptionStack& hsExceptionStack::Instance() { if (!fExceptionStack) { - fExceptionStack = TRACKED_NEW hsExceptionStack; + fExceptionStack = new hsExceptionStack; } return *fExceptionStack; diff --git a/Sources/Plasma/CoreLib/hsHashTable.h b/Sources/Plasma/CoreLib/hsHashTable.h index 65c43da7..c3973a35 100644 --- a/Sources/Plasma/CoreLib/hsHashTable.h +++ b/Sources/Plasma/CoreLib/hsHashTable.h @@ -116,7 +116,7 @@ fCollisionStep(step), fCollisionCount(0) { fItemList.SetCount(1); - fHashTable = TRACKED_NEW uint32_t[fSize]; + fHashTable = new uint32_t[fSize]; memset(fHashTable,0,fSize*sizeof(uint32_t)); } diff --git a/Sources/Plasma/CoreLib/hsMalloc.h b/Sources/Plasma/CoreLib/hsMalloc.h index c46e2747..2f985e75 100644 --- a/Sources/Plasma/CoreLib/hsMalloc.h +++ b/Sources/Plasma/CoreLib/hsMalloc.h @@ -145,7 +145,6 @@ inline void CDECL operator delete (void * ptr, const char [], unsigned) { return MemFree(ptr, 0); } inline void CDECL operator delete [](void * ptr, const char [], unsigned) { return MemFree(ptr, 0); } -#define TRACKED_NEW new(__FILE__, __LINE__) // placement new @@ -165,11 +164,9 @@ inline void CDECL operator delete (void *, void *) {} ***/ #define ALLOCZERO(b) MemAlloc(b, kMemZero, __FILE__, __LINE__) -#define ZERO(s) MemSet(&s, 0, sizeof(s)) #ifdef __cplusplus -#define NEW(t) new(MemAlloc(sizeof(t), 0, __FILE__, __LINE__)) t #define NEWZERO(t) new(MemAlloc(sizeof(t), kMemZero, __FILE__, __LINE__)) t #endif // __cplusplus diff --git a/Sources/Plasma/CoreLib/hsMemory.cpp b/Sources/Plasma/CoreLib/hsMemory.cpp index d62438a5..f4e6ed23 100644 --- a/Sources/Plasma/CoreLib/hsMemory.cpp +++ b/Sources/Plasma/CoreLib/hsMemory.cpp @@ -67,7 +67,7 @@ hsBool HSMemory::EqualBlocks(const void* block1, const void* block2, uint32_t le void* HSMemory::New(uint32_t size) { - return TRACKED_NEW uint32_t[(size + 3) >> 2]; + return new uint32_t[(size + 3) >> 2]; } void HSMemory::Delete(void* block) @@ -113,7 +113,7 @@ void HSMemory::Clear(void* m, uint32_t byteLen) template T* hsSoftNew(T*& obj) { try { - obj = TRACKED_NEW T; + obj = new T; } catch (...) { obj = nil; @@ -124,7 +124,7 @@ template T* hsSoftNew(T*& obj) inline template T* hsSoftNew(T*& obj, unsigned count) { try { - obj = TRACKED_NEW T[count]; + obj = new T[count]; } catch (...) { obj = nil; @@ -138,7 +138,7 @@ void* HSMemory::SoftNew(uint32_t size) uint32_t* p; hsTry { - p = TRACKED_NEW uint32_t[(size + 3) >> 2]; + p = new uint32_t[(size + 3) >> 2]; } hsCatch(...) { p = nil; } @@ -736,7 +736,7 @@ static _CrtMemBlockHeader *cmbh_last; // Remember this header for next increme long totsize= 0; // Track Total Bytes long normsize = 0; // Track total of NORMAL Blocks - looktbl *ltb = TRACKED_NEW looktbl[LTBLMAX]; + looktbl *ltb = new looktbl[LTBLMAX]; long tblEnd=1; // first is "NULL"; memset((void *)ltb,0,sizeof(looktbl) * LTBLMAX); // clear table area diff --git a/Sources/Plasma/CoreLib/hsMemory.h b/Sources/Plasma/CoreLib/hsMemory.h index e44967f7..fa45bbaa 100644 --- a/Sources/Plasma/CoreLib/hsMemory.h +++ b/Sources/Plasma/CoreLib/hsMemory.h @@ -90,7 +90,7 @@ public: if (length > fLength) { if (fMem != fMemBuffer) delete[] fMem; - fMem = TRACKED_NEW uint8_t[length]; + fMem = new uint8_t[length]; fLength = length; } return fMem; diff --git a/Sources/Plasma/CoreLib/hsStlUtils.cpp b/Sources/Plasma/CoreLib/hsStlUtils.cpp index 8c396d08..f93e0962 100644 --- a/Sources/Plasma/CoreLib/hsStlUtils.cpp +++ b/Sources/Plasma/CoreLib/hsStlUtils.cpp @@ -262,7 +262,7 @@ bool formatv(std::string & out, const char * fmt, va_list args) { if (pbuf!=buf) delete [] pbuf; - pbuf = TRACKED_NEW char[kBufSz+kBufSz*attempts]; + pbuf = new char[kBufSz+kBufSz*attempts]; } } while (!success && attempts 0) { - char *buff = TRACKED_NEW char[len+1]; + char *buff = new char[len+1]; int i; for (i = 0; i < len; i++) { @@ -181,7 +181,7 @@ char *hsStream::ReadSafeStringLong() uint32_t numChars = ReadLE32(); if (numChars > 0 && numChars <= GetSizeLeft()) { - name = TRACKED_NEW char[numChars+1]; + name = new char[numChars+1]; Read(numChars, name); name[numChars] = '\0'; @@ -203,7 +203,7 @@ wchar_t *hsStream::ReadSafeWStringLong() uint32_t numChars = ReadLE32(); if (numChars > 0 && numChars <= (GetSizeLeft()/2)) // divide by two because each char is two bytes { - retVal = TRACKED_NEW wchar_t[numChars+1]; + retVal = new wchar_t[numChars+1]; int i; for (i=0; i 0) { - char *buff = TRACKED_NEW char[len+1]; + char *buff = new char[len+1]; int i; for (i = 0; i < len; i++) { @@ -280,7 +280,7 @@ char *hsStream::ReadSafeString() hsAssert(numChars <= GetSizeLeft(), "Bad string"); if (numChars > 0 && numChars <= GetSizeLeft()) { - name = TRACKED_NEW char[numChars+1]; + name = new char[numChars+1]; Read(numChars, name); name[numChars] = '\0'; @@ -305,7 +305,7 @@ wchar_t *hsStream::ReadSafeWString() hsAssert(numChars <= GetSizeLeft()/2, "Bad string"); if (numChars > 0 && numChars <= (GetSizeLeft()/2)) // divide by two because each char is two bytes { - retVal = TRACKED_NEW wchar_t[numChars+1]; + retVal = new wchar_t[numChars+1]; int i; for (i=0; i class hsTempArray { uint32_t fCount; hsTempArray& operator=(const hsTempArray&); public: - hsTempArray(long count) : fArray(TRACKED_NEW T[count]), fCount(count) + hsTempArray(long count) : fArray(new T[count]), fCount(count) { } - hsTempArray(long count, T initValue) : fArray(TRACKED_NEW T[count]), fCount(count) + hsTempArray(long count, T initValue) : fArray(new T[count]), fCount(count) { for (int i = 0; i < count; i++) fArray[i] = initValue; @@ -156,7 +156,7 @@ public: if (count > fCount) { delete[] fArray; fCount = count; - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; } } }; @@ -279,7 +279,7 @@ template fCount = count; fArray = nil; if (count) - fArray = TRACKED_NEW T[ count ]; + fArray = new T[ count ]; } template @@ -295,7 +295,7 @@ void hsDynamicArray::SetCount(int32_t count) { if (count == 0) this->Reset(); else - { T* newArray = TRACKED_NEW T[count]; + { T* newArray = new T[count]; if (fArray) { int copyCount = hsMinimum(count, fCount); @@ -358,7 +358,7 @@ void hsDynamicArray::Remove(int32_t index) if (--fCount > 0) { int i; - T* newList = TRACKED_NEW T[fCount]; + T* newList = new T[fCount]; for(i = 0 ; i < index;i++) newList[i] = fArray[i]; for (i = index; i < fCount; i++) @@ -388,7 +388,7 @@ int32_t hsDynamicArray::Push(const T& obj) { if (fArray) { - T* newList = TRACKED_NEW T[fCount+1]; + T* newList = new T[fCount+1]; for(int i = 0 ; i < fCount; i++) newList[i+1] = fArray[i]; newList[0] = obj; @@ -397,7 +397,7 @@ int32_t hsDynamicArray::Push(const T& obj) } else { hsAssert(fCount == 0, "mismatch"); - fArray = TRACKED_NEW T[1]; + fArray = new T[1]; fArray[0] = obj; } return ++fCount; @@ -407,7 +407,7 @@ template int32_t hsDynamicArray::Append(const T& obj) { if (fArray) - { T* newList = TRACKED_NEW T[fCount + 1]; + { T* newList = new T[fCount + 1]; for (int i = 0; i < fCount; i++) newList[i] = fArray[i]; @@ -417,7 +417,7 @@ int32_t hsDynamicArray::Append(const T& obj) } else { hsAssert(fCount == 0, "mismatch"); - fArray = TRACKED_NEW T[1]; + fArray = new T[1]; fArray[0] = obj; } return ++fCount; @@ -430,7 +430,7 @@ int32_t hsDynamicArray::InsertAtIndex(uint32_t index, const T& obj) if (fArray) { hsAssert(uint32_t(fCount) >= index, "Index too large for array"); - T* newList = TRACKED_NEW T[fCount + 1]; + T* newList = new T[fCount + 1]; unsigned i; for ( i = 0; i < index; i++) newList[i] = fArray[i]; @@ -445,7 +445,7 @@ int32_t hsDynamicArray::InsertAtIndex(uint32_t index, const T& obj) { hsAssert(fCount == 0, "mismatch"); hsAssert(index ==0,"Can't insert at non zero index in empty array"); - fArray = TRACKED_NEW T[1]; + fArray = new T[1]; fArray[0] = obj; } return ++fCount; @@ -464,7 +464,7 @@ template hsDynamicArray* hsDynamicArray::Copy(hsDynamicArray* dst) const { if (dst == nil) - dst = TRACKED_NEW hsDynamicArray; + dst = new hsDynamicArray; else dst->Reset(); @@ -659,7 +659,7 @@ template hsTArray::hsTArray(int count) : fArray(nil) hsTArray_ValidateCount(count); fUseCount = fTotalCount = count; if (count > 0) - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; } template hsTArray::hsTArray(const hsTArray& src) : fArray(nil) @@ -669,7 +669,7 @@ template hsTArray::hsTArray(const hsTArray& src) : fArray(nil) if (count > 0) { - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; hsTArray_CopyForward(src.fArray, fArray, count); } } @@ -759,7 +759,7 @@ template void hsTArray::SetCount(int count) { if (fArray) delete[] fArray; - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; fUseCount = fTotalCount = count; } fUseCount = count; @@ -770,7 +770,7 @@ template void hsTArray::Expand(int NewCount) // New Count is Absolu hsTArray_ValidateCount(NewCount); if (NewCount > fTotalCount) // This is Expand not Shrink { - T* newArray = TRACKED_NEW T[NewCount]; + T* newArray = new T[NewCount]; if (fArray != nil) { hsTArray_CopyForward(fArray, newArray, fUseCount); @@ -846,7 +846,7 @@ template void hsTArray::IncCount(int index, int count) fTotalCount = newCount; GrowArraySize(newCount); // Sets new fTotalCount - T* newArray = TRACKED_NEW T[fTotalCount]; + T* newArray = new T[fTotalCount]; if (fArray != nil) { hsTArray_CopyForward(fArray, newArray, index); @@ -1056,7 +1056,7 @@ template hsLargeArray::hsLargeArray(int count) : fArray(nil) hsLargeArray_ValidateCount(count); fUseCount = fTotalCount = count; if (count > 0) - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; } template hsLargeArray::hsLargeArray(const hsLargeArray& src) : fArray(nil) @@ -1066,7 +1066,7 @@ template hsLargeArray::hsLargeArray(const hsLargeArray& src) : f if (count > 0) { - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; hsLargeArray_CopyForward(src.fArray, fArray, count); } } @@ -1128,7 +1128,7 @@ template void hsLargeArray::SetCount(int count) { if (fArray) delete[] fArray; - fArray = TRACKED_NEW T[count]; + fArray = new T[count]; fUseCount = fTotalCount = count; } fUseCount = count; @@ -1139,7 +1139,7 @@ template void hsLargeArray::Expand(int NewCount) // New Count is Ab hsLargeArray_ValidateCount(NewCount); if (NewCount > fTotalCount) // This is Expand not Shrink { - T* newArray = TRACKED_NEW T[NewCount]; + T* newArray = new T[NewCount]; if (fArray != nil) { hsLargeArray_CopyForward(fArray, newArray, fUseCount); @@ -1215,7 +1215,7 @@ template void hsLargeArray::IncCount(int index, int count) fTotalCount = newCount; GrowArraySize(newCount); // Sets new fTotalCount - T* newArray = TRACKED_NEW T[fTotalCount]; + T* newArray = new T[fTotalCount]; if (fArray != nil) { hsLargeArray_CopyForward(fArray, newArray, index); diff --git a/Sources/Plasma/CoreLib/hsUtils.cpp b/Sources/Plasma/CoreLib/hsUtils.cpp index f03e430d..60a37f3f 100644 --- a/Sources/Plasma/CoreLib/hsUtils.cpp +++ b/Sources/Plasma/CoreLib/hsUtils.cpp @@ -328,7 +328,7 @@ wchar_t *hsStringToWString( const char *str ) { // convert the char string to a wchar_t string int len = strlen(str); - wchar_t *wideString = TRACKED_NEW wchar_t[len+1]; + wchar_t *wideString = new wchar_t[len+1]; for (int i=0; iGetKey(), 0, false); + plLoadCloneMsg* msg = new plLoadCloneMsg(fObjKey, fFlockerPtr->GetKey(), 0, false); msg->Send(); } @@ -790,7 +790,7 @@ fMaxForce(10.0f), fMaxSpeed(5.0f), fMinSpeed(4.0f) { - fDatabase = TRACKED_NEW pfBasicProximityDatabase(); + fDatabase = new pfBasicProximityDatabase(); } pfFlock::~pfFlock() @@ -886,7 +886,7 @@ void pfFlock::Update(plSceneObject *goal, float deltaTime) void pfFlock::AddBoid(pfObjectFlocker *flocker, plKey &key, hsPoint3 &pos) { - pfBoid *newBoid = TRACKED_NEW pfBoid(*fDatabase, flocker, key, pos); + pfBoid *newBoid = new pfBoid(*fDatabase, flocker, key, pos); newBoid->SetGoalWeight(fGoalWeight); newBoid->SetWanderWeight(fRandomWeight); @@ -934,7 +934,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg) plInitialAgeStateLoadedMsg* loadMsg = plInitialAgeStateLoadedMsg::ConvertNoRef(msg); if (loadMsg) { - plEnableMsg* pMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pMsg = new plEnableMsg; pMsg->AddReceiver(fBoidKey); pMsg->SetCmd(plEnableMsg::kDrawable); pMsg->AddType(plEnableMsg::kDrawable); @@ -945,7 +945,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg) hsPoint3 pos(fTarget->GetLocalToWorld().GetTranslate()); for (int i = 0; i < fNumBoids; i++) { - plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fBoidKey->GetUoid(), GetKey(), 0); + plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fBoidKey->GetUoid(), GetKey(), 0); plKey newKey = cloneMsg->GetCloneKey(); cloneMsg->Send(); @@ -966,7 +966,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg) { if (fRandomizeAnimationStart) { - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetSender(GetKey()); pMsg->SetBCastFlag(plMessage::kPropagateToModifiers | plMessage::kPropagateToChildren); pMsg->AddReceiver( lcMsg->GetCloneKey() ); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h index e6403c43..abc1a0a4 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h @@ -126,7 +126,7 @@ public: virtual ~pfBasicProximityDatabase() {} // allocate a token to represent a given client object in this database - tokenType *MakeToken(T parentObject) {return TRACKED_NEW tokenType(parentObject, fGroup);} + tokenType *MakeToken(T parentObject) {return new tokenType(parentObject, fGroup);} // return the number of tokens currently in the database int Size(void) {return fGroup.size();} diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp index 9c0f6d20..d79abc28 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp @@ -281,7 +281,7 @@ void plFollowMod::Read(hsStream* stream, hsResMgr* mgr) fLeaderType = FollowLeaderType(stream->ReadByte()); fMode = stream->ReadByte(); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefLeader), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefLeader), plRefFlags::kActiveRef); // If active? Activate(); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp index 6fa0702f..de65ba15 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp @@ -155,14 +155,14 @@ void plLineFollowMod::Read(hsStream* stream, hsResMgr* mgr) fPath = plAnimPath::ConvertNoRef(mgr->ReadCreatable(stream)); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParent), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParent), plRefFlags::kPassiveRef); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefObject), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefObject), plRefFlags::kPassiveRef); int n = stream->ReadLE32(); while(n--) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef); } uint32_t f = stream->ReadLE32(); @@ -616,12 +616,12 @@ void plLineFollowMod::RemoveTarget(plSceneObject* so) void plLineFollowMod::AddStereizer(const plKey& key) { - hsgResMgr::ResMgr()->SendRef(plKey(key), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(plKey(key), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef); } void plLineFollowMod::RemoveStereizer(const plKey& key) { - hsgResMgr::ResMgr()->SendRef(plKey(key), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefStereizer), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(plKey(key), new plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefStereizer), plRefFlags::kPassiveRef); } // derived version of this class for rail cameras diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp index 2d7376ef..3601316c 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp @@ -300,7 +300,7 @@ void plRandomCommandMod::IRetry(float secs) double t = hsTimer::GetSysSeconds() + secs; - plAnimCmdMsg* msg = TRACKED_NEW plAnimCmdMsg(nil, GetKey(), &t); + plAnimCmdMsg* msg = new plAnimCmdMsg(nil, GetKey(), &t); msg->SetCmd(plAnimCmdMsg::kContinue); plgDispatch::MsgSend(msg); } diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp index d63cc0e2..c9b4bd17 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp @@ -86,7 +86,7 @@ void plViewFaceModifier::Read(hsStream* s, hsResMgr* mgr) fOrigParentToLocal.Read(s); if( HasFlag(kFaceObj) ) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefFaceObj), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefFaceObj), plRefFlags::kPassiveRef); fOffset.Read(s); @@ -390,7 +390,7 @@ void plViewFaceModifier::IOnRemove(plGenRefMsg* refMsg) void plViewFaceModifier::ISetObject(plKey soKey) { - hsgResMgr::ResMgr()->SendRef(soKey, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFaceObj), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(soKey, new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFaceObj), plRefFlags::kPassiveRef); } void plViewFaceModifier::SetFollowMode(FollowMode m, plKey soKey) diff --git a/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp b/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp index d1c37ee4..d536058b 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp +++ b/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp @@ -170,7 +170,7 @@ hsBool plListener::IEval(double secs, float del, uint32_t dirty) } // Got the params, now construct and send out the message, as well as update the audio system - plListenerMsg* msg = TRACKED_NEW plListenerMsg; + plListenerMsg* msg = new plListenerMsg; msg->SetDirection( dir ); msg->SetUp( up ); msg->SetPosition( position ); @@ -207,7 +207,7 @@ hsBool plListener::IEval(double secs, float del, uint32_t dirty) void plListener::ISetRef( const plKey &ref, hsBool binding, int type ) { if( binding ) - hsgResMgr::ResMgr()->AddViaNotify( ref, TRACKED_NEW plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, type ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( ref, new plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, type ), plRefFlags::kPassiveRef ); else GetKey()->Release( ref ); } @@ -293,9 +293,9 @@ hsBool plListener::MsgReceive(plMessage* msg) if( fInitMe ) { // By default, position and orientation are camera based - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); set->Send(); - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); + set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); set->Send(); fInitMe = false; diff --git a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp index c6b2d59d..5fd76452 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp @@ -66,7 +66,7 @@ void plRandomSoundModGroup::Read(hsStream *s) { fNumSounds = s->ReadLE16(); fGroupedIdx = s->ReadLE16(); - fIndices = TRACKED_NEW uint16_t[fNumSounds]; + fIndices = new uint16_t[fNumSounds]; int i; for (i = 0; i < fNumSounds; i++) @@ -119,7 +119,7 @@ void plRandomSoundMod::IStop() if( fGroups != nil && fGroups[ fCurrentGroup ].fGroupedIdx != -1 ) { - plSoundMsg *msg = TRACKED_NEW plSoundMsg(); + plSoundMsg *msg = new plSoundMsg(); msg->SetCmd(plSoundMsg::kStop); msg->fIndex = fGroups[ fCurrentGroup ].fIndices[ fCurrent ]; plgDispatch::MsgSend(msg); @@ -128,7 +128,7 @@ void plRandomSoundMod::IStop() { if(fCurrent == -1) return; uint16_t currentSndIdx = ( fGroups != nil ) ? fGroups[fCurrentGroup].fIndices[fCurrent] : fActiveList[fCurrent]; - plSoundMsg* snd = TRACKED_NEW plSoundMsg(GetKey(), GetTarget()->GetKey(), nil); + plSoundMsg* snd = new plSoundMsg(GetKey(), GetTarget()->GetKey(), nil); snd->SetCmd(plSoundMsg::kStop); snd->fIndex = currentSndIdx; plgDispatch::MsgSend(snd); @@ -188,7 +188,7 @@ void plRandomSoundMod::IPlayNext() float delay = IGetDelay(0); double t = hsTimer::GetSysSeconds() + delay; - plAnimCmdMsg* anim = TRACKED_NEW plAnimCmdMsg(GetKey(), GetKey(), &t); + plAnimCmdMsg* anim = new plAnimCmdMsg(GetKey(), GetKey(), &t); anim->SetCmd(plAnimCmdMsg::kContinue); plgDispatch::MsgSend(anim); return; @@ -217,13 +217,13 @@ void plRandomSoundMod::IPlayNext() sound->SetLocalOnly(true); // Send msg to the grouped sound to switch sounds - plSoundMsg *snd = TRACKED_NEW plSoundMsg(); + plSoundMsg *snd = new plSoundMsg(); snd->SetCmd( plSoundMsg::kSelectFromGroup ); snd->fIndex = currentSndIdx; snd->Send( sound->GetKey() ); // Now tell the audio interface to play the sound (probably should change this....) - snd = TRACKED_NEW plSoundMsg(GetKey(), GetTarget()->GetKey(), nil); + snd = new plSoundMsg(GetKey(), GetTarget()->GetKey(), nil); snd->SetCmd(plSoundMsg::kGoToTime); snd->fTime = (0); snd->SetCmd(plSoundMsg::kStop); @@ -266,7 +266,7 @@ void plRandomSoundMod::IPlayNext() double t = hsTimer::GetSysSeconds() + delay; - plAnimCmdMsg* anim = TRACKED_NEW plAnimCmdMsg(GetKey(), GetKey(), &t); + plAnimCmdMsg* anim = new plAnimCmdMsg(GetKey(), GetKey(), &t); anim->SetCmd(plAnimCmdMsg::kContinue); plgDispatch::MsgSend(anim); } @@ -297,7 +297,7 @@ void plRandomSoundMod::Read(hsStream *s, hsResMgr *mgr) fNumGroups = s->ReadLE16(); if (fNumGroups > 0) { - fGroups = TRACKED_NEW plRandomSoundModGroup[fNumGroups]; + fGroups = new plRandomSoundModGroup[fNumGroups]; int i; for (i = 0; i < fNumGroups; i++) fGroups[i].Read(s); @@ -428,4 +428,4 @@ plSound *plRandomSoundMod::IGetSoundPtr() pSound = ai->GetSound( currentSndIdx ); return pSound; -} \ No newline at end of file +} diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp index 1fdf3eb8..bec4f890 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp @@ -487,10 +487,10 @@ void plCameraBrain1::Read(hsStream* stream, hsResMgr* mgr) { hsKeyedObject::Read(stream, mgr); fPOAOffset.Read(stream); - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject mgr->ReadKeyNotifyMe( stream, msg, plRefFlags::kActiveRef ); - plGenRefMsg* msg2 = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnRequest, 0, kRailComponent ); // SceneObject + plGenRefMsg* msg2 = new plGenRefMsg( GetKey(), plRefMsg::kOnRequest, 0, kRailComponent ); // SceneObject mgr->ReadKeyNotifyMe( stream, msg2, plRefFlags::kActiveRef ); fFlags.Read(stream); @@ -613,7 +613,7 @@ hsBool plCameraBrain1::MsgReceive(plMessage* msg) } else { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject hsgResMgr::ResMgr()->AddViaNotify(pPMsg->fPlayer, msg, plRefFlags::kPassiveRef); fFlags.SetBit(kCutPosOnce); @@ -973,7 +973,7 @@ plCameraBrain1_Avatar::~plCameraBrain1_Avatar() if (fFaded) { - plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg; + plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg; pMsg->SetFadeOut(false); pMsg->SetSubjectKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -1102,7 +1102,7 @@ void plCameraBrain1_Avatar::CalculatePosition() // check LOS if (GetCamera()->GetKey() && fFlags.IsBitSet(kMaintainLOS) && (plVirtualCam1::Instance()->GetCurrentStackCamera() == GetCamera())) { - plLOSRequestMsg* pMsg = TRACKED_NEW plLOSRequestMsg( GetCamera()->GetKey(), fPOAGoal, fGoal, plSimDefs::kLOSDBCameraBlockers, + plLOSRequestMsg* pMsg = new plLOSRequestMsg( GetCamera()->GetKey(), fPOAGoal, fGoal, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest, plLOSRequestMsg::kReportHitOrMiss); plgDispatch::MsgSend( pMsg ); } @@ -1148,7 +1148,7 @@ void plCameraBrain1_Avatar::ISendFadeMsg(hsBool fade) else plVirtualCam1::AddMsgToLog("current camera sending Fade In message to Avatar"); - plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg; + plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg; pMsg->SetFadeOut(fade); pMsg->SetSubjectKey(GetSubject()->GetKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -1397,7 +1397,7 @@ void plCameraBrain1_FirstPerson::CalculatePosition() // check LOS if (GetCamera()->GetKey() && fFlags.IsBitSet(kMaintainLOS) && (plVirtualCam1::Instance()->GetCurrentStackCamera() == GetCamera())) { - plLOSRequestMsg* pMsg = TRACKED_NEW plLOSRequestMsg( GetCamera()->GetKey(), fPOAGoal, fGoal, plSimDefs::kLOSDBCameraBlockers, + plLOSRequestMsg* pMsg = new plLOSRequestMsg( GetCamera()->GetKey(), fPOAGoal, fGoal, plSimDefs::kLOSDBCameraBlockers, plLOSRequestMsg::kTestClosest, plLOSRequestMsg::kReportHitOrMiss); plgDispatch::MsgSend( pMsg ); } @@ -1436,7 +1436,7 @@ void plCameraBrain1_FirstPerson::Push(hsBool recenter) if (plCameraBrain1_FirstPerson::fDontFade) return; - plEnableMsg* pMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pMsg = new plEnableMsg; pMsg->SetCmd(plEnableMsg::kDisable); pMsg->AddType(plEnableMsg::kDrawable); pMsg->SetBCastFlag(plMessage::kPropagateToModifiers); @@ -1481,7 +1481,7 @@ plCameraBrain1_Fixed::~plCameraBrain1_Fixed() void plCameraBrain1_Fixed::Read(hsStream* stream, hsResMgr* mgr) { plCameraBrain1::Read(stream, mgr); - mgr->ReadKeyNotifyMe( stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, 99), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( stream, new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, 99), plRefFlags::kPassiveRef); } void plCameraBrain1_Fixed::Write(hsStream* stream, hsResMgr* mgr) @@ -1783,9 +1783,9 @@ void plCameraBrain1_Circle::Read(hsStream* stream, hsResMgr* mgr) fCenter.Read(stream); SetRadius(stream->ReadLEScalar()); - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kCircleTarget ); // SceneObject + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kCircleTarget ); // SceneObject mgr->ReadKeyNotifyMe( stream, msg, plRefFlags::kActiveRef ); - plGenRefMsg* msg2 = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnRequest, 0, kPOAObject ); // SceneObject + plGenRefMsg* msg2 = new plGenRefMsg( GetKey(), plRefMsg::kOnRequest, 0, kPOAObject ); // SceneObject mgr->ReadKeyNotifyMe( stream, msg2, plRefFlags::kActiveRef ); fCirPerSec = stream->ReadLEScalar(); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey()); @@ -1842,7 +1842,7 @@ hsBool plCameraBrain1_Circle::MsgReceive(plMessage* msg) } if (fFlags.IsBitSet(kFollowLocalAvatar)) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kSubject ); // SceneObject hsgResMgr::ResMgr()->AddViaNotify(pPMsg->fPlayer, msg, plRefFlags::kPassiveRef); fFlags.SetBit(kCutPosOnce); diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp index ed1d9982..0e592c70 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp @@ -323,7 +323,7 @@ void plCameraModifier1::Read(hsStream* stream, hsResMgr* mgr) { hsKeyedObject::Read(stream, mgr); fBrain = nil; - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefBrain), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefBrain), plRefFlags::kActiveRef); int count = stream->ReadLE32(); int i; for (i = 0; i < count; i++) @@ -340,7 +340,7 @@ void plCameraModifier1::Read(hsStream* stream, hsResMgr* mgr) float pA = stream->ReadLEScalar(); float pD = stream->ReadLEScalar(); - CamTrans* camTrans = TRACKED_NEW CamTrans(key); + CamTrans* camTrans = new CamTrans(key); camTrans->fAccel = a; camTrans->fDecel = d; camTrans->fVelocity = v; @@ -364,7 +364,7 @@ void plCameraModifier1::Read(hsStream* stream, hsResMgr* mgr) } for(i = 0; i < n; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kRefCallbackMsg), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kRefCallbackMsg), plRefFlags::kActiveRef); } n = stream->ReadLE32(); @@ -430,7 +430,7 @@ void plCameraModifier1::Push(hsBool recenter) { if (fStartAnimOnPush) { - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetCmd(plAnimCmdMsg::kRunForward); pMsg->SetBCastFlag(plMessage::kPropagateToModifiers); pMsg->AddReceiver(GetTarget()->GetKey()); @@ -455,7 +455,7 @@ void plCameraModifier1::Pop() { if (fStopAnimOnPop) { - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetCmd(plAnimCmdMsg::kStop); pMsg->SetBCastFlag(plMessage::kPropagateToModifiers); pMsg->AddReceiver(GetTarget()->GetKey()); @@ -465,7 +465,7 @@ void plCameraModifier1::Pop() } if (fResetAnimOnPop) { - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetCmd(plAnimCmdMsg::kGoToBegin); pMsg->SetBCastFlag(plMessage::kPropagateToModifiers); pMsg->AddReceiver(GetTarget()->GetKey()); diff --git a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp index ac48f348..09b69885 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp @@ -65,7 +65,7 @@ hsBool plInterestingModifier::IEval(double secs, float del, uint32_t dirty) const hsBounds3Ext& targBnd = GetTarget(i)->GetDrawInterface()->GetWorldBounds(); if( targBnd.GetType() == kBoundsNormal ) { - plInterestingModMsg* pMsg = TRACKED_NEW plInterestingModMsg; + plInterestingModMsg* pMsg = new plInterestingModMsg; pMsg->fPos= GetTarget(i)->GetDrawInterface()->GetWorldBounds().GetCenter(); pMsg->fSize = GetTarget(i)->GetDrawInterface()->GetWorldBounds().GetMaxDim(); pMsg->fRadius = fInterestRadius; diff --git a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp index 00750703..91f271a7 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp @@ -148,7 +148,7 @@ plVirtualCam1::plVirtualCam1() fThirdPersonCam = nil; fTransPos = POS_TRANS_OFF; fPrevCam = nil; - fTransitionCamera = TRACKED_NEW plCameraModifier1; + fTransitionCamera = new plCameraModifier1; fTransitionCamera->RegisterAs(kTransitionCamera_KEY); // set initial view position fOutputPos.Set(100,100,100); @@ -164,8 +164,8 @@ plVirtualCam1::plVirtualCam1() fCameraDriveInterface = plDebugInputInterface::GetInstance(); hsRefCnt_SafeRef( fCameraDriveInterface ); - fDriveCamera = TRACKED_NEW plCameraModifier1; - plCameraBrain1* pDriveBrain = TRACKED_NEW plCameraBrain1_Drive(fDriveCamera); + fDriveCamera = new plCameraModifier1; + plCameraBrain1* pDriveBrain = new plCameraBrain1_Drive(fDriveCamera); PushCamera(fDriveCamera); fForceCutOnce=false; @@ -262,7 +262,7 @@ void plVirtualCam1::RebuildStack(const plKey& key) } if (!HasFlags(kFirstPersonAtLinkOut)) { - plEnableMsg* pMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pMsg = new plEnableMsg; pMsg->SetSender(GetKey()); pMsg->SetCmd(plEnableMsg::kEnable); pMsg->AddType(plEnableMsg::kDrawable); @@ -824,7 +824,7 @@ void plVirtualCam1::Output() fFadeCounter-=1; if (fFadeCounter == 0 && fFirstPersonOverride == nil) { - plEnableMsg* pMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pMsg = new plEnableMsg; pMsg->SetSender(GetKey()); pMsg->SetCmd(plEnableMsg::kEnable); pMsg->AddType(plEnableMsg::kDrawable); @@ -888,7 +888,7 @@ void plVirtualCam1::Init() plgDispatch::Dispatch()->RegisterForExactType(plPlayerPageMsg::Index(), GetKey()); // register for control messages - plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg; + plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg; pModMsg->SetBCastFlag(plMessage::kBCastByExactType); pModMsg->SetSender(GetKey()); pModMsg->SetCmd(plCmdIfaceModMsg::kAdd); @@ -1238,7 +1238,7 @@ hsBool plVirtualCam1::MsgReceive(plMessage* msg) fPythonOverride->Push(!HasFlags(kAvatarWalking)); - CamTrans* pTrans = TRACKED_NEW CamTrans(fPythonOverride->GetKey()); + CamTrans* pTrans = new CamTrans(fPythonOverride->GetKey()); if (pCam->Cmd(plCameraMsg::kPythonOverridePushCut)) pTrans->fCutPOA = pTrans->fCutPos = true; StartTransition(pTrans); @@ -1302,7 +1302,7 @@ hsBool plVirtualCam1::MsgReceive(plMessage* msg) if (HasFlags(kJustLinkedIn)) { ClearFlags(kJustLinkedIn); - plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg; + plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg; pMsg->SetFadeOut(true); pMsg->SetSubjectKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -1420,17 +1420,17 @@ void plVirtualCam1::CreateDefaultCamera(plSceneObject* subject) if (mod->GetSubject() == subject) return; - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnReplace, 0, plCameraBrain1::kSubject ); + plGenRefMsg* msg = new plGenRefMsg(mod->GetKey(), plRefMsg::kOnReplace, 0, plCameraBrain1::kSubject ); msg->SetOldRef(mod->GetSubject()); hsgResMgr::ResMgr()->AddViaNotify(subject->GetKey(), msg, plRefFlags::kPassiveRef); } else { - plCameraModifier1* pMod = TRACKED_NEW plCameraModifier1; - plCameraBrain1_FirstPerson* pBrain = TRACKED_NEW plCameraBrain1_FirstPerson(pMod); + plCameraModifier1* pMod = new plCameraModifier1; + plCameraBrain1_FirstPerson* pBrain = new plCameraBrain1_FirstPerson(pMod); pMod->RegisterAs( kDefaultCameraMod1_KEY ); //pBrain->SetSubject(subject); - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, 0, plCameraBrain1::kSubject ); // SceneObject + plGenRefMsg* msg = new plGenRefMsg(pMod->GetKey(), plRefMsg::kOnCreate, 0, plCameraBrain1::kSubject ); // SceneObject hsgResMgr::ResMgr()->AddViaNotify(subject->GetKey(), msg, plRefFlags::kPassiveRef); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pMod->GetKey()); @@ -1459,16 +1459,16 @@ void plVirtualCam1::CreateDefaultCamera(plSceneObject* subject) if (mod->GetSubject() == subject) return; - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(mod->GetKey(), plRefMsg::kOnReplace, 0, plCameraBrain1::kSubject ); + plGenRefMsg* msg = new plGenRefMsg(mod->GetKey(), plRefMsg::kOnReplace, 0, plCameraBrain1::kSubject ); msg->SetOldRef(mod->GetSubject()); hsgResMgr::ResMgr()->AddViaNotify(subject->GetKey(), msg, plRefFlags::kPassiveRef); } else { - plCameraModifier1* pModx = TRACKED_NEW plCameraModifier1; - plCameraBrain1_Avatar* pBrainx = TRACKED_NEW plCameraBrain1_Avatar(pModx); + plCameraModifier1* pModx = new plCameraModifier1; + plCameraBrain1_Avatar* pBrainx = new plCameraBrain1_Avatar(pModx); pModx->RegisterAs( kBuiltIn3rdPersonCamera_KEY ); - plGenRefMsg* msgx = TRACKED_NEW plGenRefMsg(pModx->GetKey(), plRefMsg::kOnCreate, 0, plCameraBrain1::kSubject ); // SceneObject + plGenRefMsg* msgx = new plGenRefMsg(pModx->GetKey(), plRefMsg::kOnCreate, 0, plCameraBrain1::kSubject ); // SceneObject hsgResMgr::ResMgr()->AddViaNotify(subject->GetKey(), msgx, plRefFlags::kPassiveRef); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pModx->GetKey()); @@ -1503,7 +1503,7 @@ void plVirtualCam1::AddCameraToStack(plCameraModifier1* pCam) } if (pCam->GetKey()) - hsgResMgr::ResMgr()->AddViaNotify(pCam->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(pCam->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef); } void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault) @@ -1570,7 +1570,7 @@ void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault) if (!pCam->SetFaded(true)) { // new camera doesn't support fading, fade him back in - plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg; + plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg; pMsg->SetFadeOut(false); pMsg->SetSubjectKey(GetCurrentStackCamera()->GetBrain()->GetSubject()->GetKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -1628,7 +1628,7 @@ void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault) // do a track transition here; fPrevCam = GetCurrentStackCamera(); AddCameraToStack(pCam); - pTrans = TRACKED_NEW CamTrans(pCam->GetKey()); + pTrans = new CamTrans(pCam->GetKey()); StartTransition(pTrans); delete(pTrans); #ifdef STATUS_LOG @@ -1639,7 +1639,7 @@ void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault) { // both fixed brains, cut between them AddCameraToStack(pCam); - pTrans = TRACKED_NEW CamTrans(pCam->GetKey()); + pTrans = new CamTrans(pCam->GetKey()); pTrans->fCutPOA = true; pTrans->fCutPos = true; StartTransition(pTrans); @@ -1747,7 +1747,7 @@ void plVirtualCam1::PopCamera(plCameraModifier1* pCam) if (!GetCurrentStackCamera()->SetFaded(true)) { // new camera doesn't support fading, fade him back in - plCameraTargetFadeMsg* pMsg = TRACKED_NEW plCameraTargetFadeMsg; + plCameraTargetFadeMsg* pMsg = new plCameraTargetFadeMsg; pMsg->SetFadeOut(false); pMsg->SetSubjectKey(pCam->GetBrain()->GetSubject()->GetKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -1781,14 +1781,14 @@ void plVirtualCam1::PopCamera(plCameraModifier1* pCam) { // do a track transition here; fPrevCam = pCam; - pTrans = TRACKED_NEW CamTrans(GetCurrentStackCamera()->GetKey()); + pTrans = new CamTrans(GetCurrentStackCamera()->GetKey()); StartTransition(pTrans); delete(pTrans); } else { fPrevCam = pCam; - pTrans = TRACKED_NEW CamTrans(GetCurrentStackCamera()->GetKey()); + pTrans = new CamTrans(GetCurrentStackCamera()->GetKey()); pTrans->fCutPOA = true; pTrans->fCutPos = true; StartTransition(pTrans); @@ -1867,7 +1867,7 @@ void plVirtualCam1::StartTransition(CamTrans* transition) if ( (fPythonOverride && plCameraBrain1_Avatar::ConvertNoRef(fPythonOverride->GetBrain())) || (plCameraBrain1_Avatar::ConvertNoRef(pCam->GetBrain()) && !fPythonOverride) ) { - plCameraBrain1_Avatar* pAvBrain = TRACKED_NEW plCameraBrain1_Avatar; + plCameraBrain1_Avatar* pAvBrain = new plCameraBrain1_Avatar; pAvBrain->SetOffset(((plCameraBrain1_Avatar*)pCam->GetBrain())->GetOffset()); pAvBrain->SetPOAOffset(pCam->GetBrain()->GetPOAOffset()); @@ -1888,7 +1888,7 @@ void plVirtualCam1::StartTransition(CamTrans* transition) } else { - pBrain = TRACKED_NEW plCameraBrain1; + pBrain = new plCameraBrain1; } pBrain->SetFlags(plCameraBrain1::kIsTransitionCamera); diff --git a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp index 270c96b0..6acd87bb 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp +++ b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp @@ -67,7 +67,7 @@ void pfMarkerInfo::Init() plResManager* resMgr = (plResManager*)hsgResMgr::ResMgr(); // Force the client to keep the GlobalMarkers keys loaded, so we don't load them every time we clone - plClientMsg* loadAgeKeysMsg = TRACKED_NEW plClientMsg(plClientMsg::kLoadAgeKeys); + plClientMsg* loadAgeKeysMsg = new plClientMsg(plClientMsg::kLoadAgeKeys); loadAgeKeysMsg->SetAgeName("GlobalMarkers"); loadAgeKeysMsg->Send(resMgr->FindKey(kClient_KEY)); @@ -112,7 +112,7 @@ void pfMarkerInfo::Spawn(MarkerType type) fType = type; fLastChange = 0; - plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0); + plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fMarkerUoid, pfMarkerMgr::Instance()->GetKey(), 0); cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false); fKey = cloneMsg->GetCloneKey(); @@ -133,7 +133,7 @@ void pfMarkerInfo::InitSpawned(plKey markerKey) hsMatrix44 pos; pos.Reset(); pos.SetTranslate(&fPosition); - plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos); + plWarpMsg* warpMsg = new plWarpMsg(pfMarkerMgr::Instance()->GetKey(), fKey, plWarpMsg::kFlushTransform, pos); warpMsg->Send(); // update its state @@ -148,7 +148,7 @@ void pfMarkerInfo::Show(bool show) fVisible = show; if (fSpawned) { - plEnableMsg* msg = TRACKED_NEW plEnableMsg; + plEnableMsg* msg = new plEnableMsg; msg->SetBCastFlag(plMessage::kPropagateToChildren); msg->SetCmd(plEnableMsg::kDrawable); msg->SetCmd(plEnableMsg::kPhysical); @@ -183,7 +183,7 @@ void pfMarkerInfo::Remove() { if (fKey) { - plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false); + plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fKey, pfMarkerMgr::Instance()->GetKey(), 0, false); cloneMsg->SetBCastFlag(plMessage::kNetPropagate, false); cloneMsg->Send(); @@ -210,7 +210,7 @@ void pfMarkerInfo::IPlayBounce(bool play) if (fMod && fSpawned) { // Send anim start/stop msg - plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* animMsg = new plAnimCmdMsg; animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop); animMsg->SetCmd(plAnimCmdMsg::kSetLooping); animMsg->SetCmd(plAnimCmdMsg::kGoToBegin); @@ -242,7 +242,7 @@ void pfMarkerInfo::IPlayColor(bool play) break; } - plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* animMsg = new plAnimCmdMsg; animMsg->SetCmd(play ? plAnimCmdMsg::kContinue : plAnimCmdMsg::kStop); animMsg->SetCmd(plAnimCmdMsg::kSetLooping); animMsg->SetCmd(plAnimCmdMsg::kGoToBegin); @@ -258,7 +258,7 @@ void pfMarkerInfo::IPlaySound(bool place) { const plAudioInterface* ai = fMod->GetTarget()->GetAudioInterface(); - plSoundMsg* msg = TRACKED_NEW plSoundMsg; + plSoundMsg* msg = new plSoundMsg; msg->fIndex = place ? fMod->fPlaceSndIdx : fMod->fHitSndIdx; msg->SetCmd(plSoundMsg::kPlay); msg->SetSender(pfMarkerMgr::Instance()->GetKey()); diff --git a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp index 677e74a3..8ac17bc9 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp @@ -62,7 +62,7 @@ pfMarkerMgr* pfMarkerMgr::Instance() { if (!pfMarkerMgr::fInstance) { - pfMarkerMgr::fInstance = TRACKED_NEW pfMarkerMgr; + pfMarkerMgr::fInstance = new pfMarkerMgr; pfMarkerMgr::fInstance->IInit(); } @@ -153,7 +153,7 @@ void pfMarkerMgr::IMarkerHit(plKey markerKey, plKey playerKey) return; // marker frozen, abort // tell people about it - pfMarkerMsg* msg = TRACKED_NEW pfMarkerMsg; + pfMarkerMsg* msg = new pfMarkerMsg; msg->fType = pfMarkerMsg::kMarkerCaptured; msg->fMarkerID = id; msg->Send(); @@ -169,7 +169,7 @@ void pfMarkerMgr::AddMarker(double x, double y, double z, uint32_t id, bool just } hsPoint3 pos((float)x, (float)y, (float)z); - fMarkers[id] = TRACKED_NEW pfMarkerInfo(pos, justCreated); + fMarkers[id] = new pfMarkerInfo(pos, justCreated); fMarkers[id]->Spawn(pfMarkerInfo::kMarkerOpen); } diff --git a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp index f1c06984..bda6531f 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp @@ -107,15 +107,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //{ // if( fTarget && fTarget->IsLocallyOwned()==plSynchedObject::kYes ) // { -// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; +// plCameraMsg* pMsg = new plCameraMsg; // pMsg->SetCmd(plCameraMsg::kSetSubject); // pMsg->SetSubject(nil); // pMsg->SetBCastFlag( plMessage::kBCastByExactType ); // plgDispatch::MsgSend(pMsg); // -// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera); -// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera); -// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera); +// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRefCamera); +// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRefCamera); +// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRefCamera); // plgDispatch::MsgSend(pAudMsg1); // plgDispatch::MsgSend(pAudMsg2); // plgDispatch::MsgSend(pAudMsg3); @@ -152,14 +152,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // //void plPlayerModifier::IDoLocalSetup(plSceneObject* so) //{ -// plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; +// plCameraMsg* pMsg = new plCameraMsg; // pMsg->SetCmd(plCameraMsg::kSetSubject); // pMsg->SetSubject(so); // pMsg->SetBCastFlag( plMessage::kBCastByExactType ); // plgDispatch::MsgSend(pMsg); // // // this is to solve the problem of physical vs nonphysical players... -//// plCameraMsg* pMsg2 = TRACKED_NEW plCameraMsg; +//// plCameraMsg* pMsg2 = new plCameraMsg; //// pMsg2->SetBCastFlag(plMessage::kBCastByExactType); //// pMsg2->SetCmd(plCameraMsg::kSetOffset); //// pMsg2->SetCmd(plCameraMsg::kEntering); @@ -172,11 +172,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //void plPlayerModifier::IMakeUsListener( plSceneObject *so ) //{ // // set the listener to use us... -// plAudioSysMsg* pAudMsg1 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef); +// plAudioSysMsg* pAudMsg1 = new plAudioSysMsg(plAudioSysMsg::kSetListenerFacingRef); // pAudMsg1->SetSceneObject(so->GetKey()); -// plAudioSysMsg* pAudMsg2 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef); +// plAudioSysMsg* pAudMsg2 = new plAudioSysMsg(plAudioSysMsg::kSetListenerCoordinateRef); // pAudMsg2->SetSceneObject(so->GetKey()); -// plAudioSysMsg* pAudMsg3 = TRACKED_NEW plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef); +// plAudioSysMsg* pAudMsg3 = new plAudioSysMsg(plAudioSysMsg::kSetListenerVelocityRef); // pAudMsg3->SetSceneObject(so->GetKey()); // plgDispatch::MsgSend(pAudMsg1); // plgDispatch::MsgSend(pAudMsg2); @@ -209,7 +209,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // plSpawnModMsg* pSpawn = plSpawnModMsg::ConvertNoRef(msg); // if (pSpawn && HasFlag(kWantsToSpawn)) // { -// spawnPt* pt = TRACKED_NEW spawnPt; +// spawnPt* pt = new spawnPt; // pt->pt = pSpawn->fPos; // // hsVector3 temp(fTarget->GetCoordinateInterface()->GetLocalToWorld().GetTranslate() - pt->pt); @@ -260,7 +260,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //{ // if (b != bMoving) // { -// plPlayerMsg* pMsg = TRACKED_NEW plPlayerMsg; +// plPlayerMsg* pMsg = new plPlayerMsg; // // if (b) // pMsg->SetCmd( plPlayerMsg::kMovementStarted ); @@ -330,7 +330,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // fSpawnPoints[fSpawnPoints.Count()-1]->pt : fSpawnPoints[netID]->pt; //#endif // // Send msg for net synchronization -// plWarpMsg* warpMsg = TRACKED_NEW plWarpMsg; +// plWarpMsg* warpMsg = new plWarpMsg; // warpMsg->fPos = warpPoint; // warpMsg->AddReceiver( fTarget->GetKey() ); // warpMsg->SetWarpFlags(warpMsg->GetWarpFlags() | plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity ); @@ -350,7 +350,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // } // else // { -// plSpawnRequestMsg* pMsg = TRACKED_NEW plSpawnRequestMsg; +// plSpawnRequestMsg* pMsg = new plSpawnRequestMsg; // pMsg->SetSender(GetKey()); // plgDispatch::MsgSend( pMsg ); // } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp index fb29a74c..2ddd1273 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp @@ -107,7 +107,7 @@ void plANDConditionalObject::Read(hsStream* stream, hsResMgr* mgr) fChildren.SetCountAndZero(n); for(int i = 0; i < n; i++ ) { - refMsg = TRACKED_NEW plCondRefMsg(GetKey(), i); + refMsg = new plCondRefMsg(GetKey(), i); mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef); } } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp index 7cc9d51a..b5813439 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp @@ -69,11 +69,11 @@ hsBool plAnimationEventConditionalObject::MsgReceive(plMessage* msg) void plAnimationEventConditionalObject::SetEvent(const CallbackEvent b, float time) { - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->AddReceiver(fTarget); pMsg->SetSender( GetKey() ); - plEventCallbackMsg* cb = TRACKED_NEW plEventCallbackMsg(GetKey(), b, 0, time); + plEventCallbackMsg* cb = new plEventCallbackMsg(GetKey(), b, 0, time); pMsg->AddCallback( cb ); hsRefCnt_SafeUnRef(cb); diff --git a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp index e631c287..56ed738c 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp @@ -112,7 +112,7 @@ void plORConditionalObject::Read(hsStream* stream, hsResMgr* mgr) fChildren.SetCountAndZero(n); for(int i = 0; i < n; i++ ) { - refMsg = TRACKED_NEW plCondRefMsg(GetKey(), i); + refMsg = new plCondRefMsg(GetKey(), i); mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef); } } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp index 33099156..9eb94b4c 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp @@ -358,14 +358,14 @@ PF_CONSOLE_CMD( Avatar_Multistage, Trigger, "string multiComp", "Triggers the na if (key) { - plNotifyMsg *msg = TRACKED_NEW plNotifyMsg; + plNotifyMsg *msg = new plNotifyMsg; msg->fType = plNotifyMsg::kActivator; msg->fState = 1; // Triggered // Setup the event data in case this is a OneShot responder that needs it plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey(); - proPickedEventData *ed = TRACKED_NEW proPickedEventData; + proPickedEventData *ed = new proPickedEventData; ed->fPicker = playerKey; ed->fPicked = key; // ??? msg->AddEvent(ed); @@ -385,7 +385,7 @@ PF_CONSOLE_CMD( Avatar_Multistage, Advance, "", "Advances the avatar's current m { plKey avKey = avatar->GetKey(); - plAvBrainGenericMsg *msg = TRACKED_NEW plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kNextStage, 0, true, 0.5f); + plAvBrainGenericMsg *msg = new plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kNextStage, 0, true, 0.5f); msg->Send(); } } @@ -399,7 +399,7 @@ PF_CONSOLE_CMD( Avatar_Multistage, Regress, "", "Regresses the avatar's current { plKey avKey = avatar->GetKey(); - plAvBrainGenericMsg *msg = TRACKED_NEW plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kPrevStage, 0, true, 0.5f); + plAvBrainGenericMsg *msg = new plAvBrainGenericMsg(nil, avKey, plAvBrainGenericMsg::kPrevStage, 0, true, 0.5f); msg->Send(); } } @@ -503,7 +503,7 @@ PF_CONSOLE_CMD( Avatar, SeekPoint, "string seekpoint", "Move to the given seekpo plKey avKey = avatar->GetKey(); float unused = 0.0f; - plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, avKey, targetKey, unused, false); + plAvSeekMsg *msg = new plAvSeekMsg(nil, avKey, targetKey, unused, false); plgDispatch::MsgSend(msg); } @@ -525,7 +525,7 @@ PF_CONSOLE_CMD( Avatar, if (avMod) { - plArmatureEffectStateMsg *msg = TRACKED_NEW plArmatureEffectStateMsg(); + plArmatureEffectStateMsg *msg = new plArmatureEffectStateMsg(); msg->AddReceiver(avMod->GetArmatureEffects()->GetKey()); msg->fSurface = (int)params[0]; plgDispatch::MsgSend(msg); @@ -542,7 +542,7 @@ PF_CONSOLE_CMD( Avatar, SetStealthMode, "int mode", "Set the stealth mode of you int level = mode==plAvatarStealthModeMsg::kStealthVisible ? 0 : 1; // send msg to make myself invisible locally - plAvatarStealthModeMsg *msg = TRACKED_NEW plAvatarStealthModeMsg(); + plAvatarStealthModeMsg *msg = new plAvatarStealthModeMsg(); msg->SetSender(avKey); msg->fMode = mode; msg->fLevel = level; @@ -551,7 +551,7 @@ PF_CONSOLE_CMD( Avatar, SetStealthMode, "int mode", "Set the stealth mode of you // send net msg to other players to synch them up // the msg will go to their NetClientMgr who will decide whether they see // our avatar as total or semi-invisible based on the invis level. - plCCRInvisibleMsg *invisMsg = TRACKED_NEW plCCRInvisibleMsg; // ctor sets flags and receiver + plCCRInvisibleMsg *invisMsg = new plCCRInvisibleMsg; // ctor sets flags and receiver invisMsg->fInvisLevel=level; invisMsg->fAvKey=avKey; invisMsg->Send(); @@ -594,7 +594,7 @@ PF_CONSOLE_CMD( Avatar, FakeLinkToObj, "string objName", "Pseudo-Link the avatar PrintString("Can't find object with that name, fake link failed."); return; } - plPseudoLinkEffectMsg* msg = TRACKED_NEW plPseudoLinkEffectMsg; + plPseudoLinkEffectMsg* msg = new plPseudoLinkEffectMsg; msg->fAvatarKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); msg->fLinkObjKey = seekKey; plgDispatch::MsgSend(msg); @@ -616,7 +616,7 @@ PF_CONSOLE_CMD( Avatar_Physics, TogglePhysical, "", "Disable/enable physics on t if(avatar) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlActivated(true); pMsg->SetControlCode(B_CONTROL_TOGGLE_PHYSICAL); @@ -779,7 +779,7 @@ PF_CONSOLE_CMD( Avatar_Climb, Start, "string direction", "Specify initial mount mode = plAvBrainClimb::kMountingLeft; else if(stricmp(dirStr, "right") == 0) mode = plAvBrainClimb::kMountingRight; - plAvBrainClimb *brain = TRACKED_NEW plAvBrainClimb(mode); + plAvBrainClimb *brain = new plAvBrainClimb(mode); avMod->PushBrain(brain); } } @@ -801,7 +801,7 @@ PF_CONSOLE_CMD( Avatar_Climb, EnableDismount, "string direction", "Let the avata dir = plClimbMsg::kLeft; else if(stricmp(dirStr, "right") == 0) dir = plClimbMsg::kRight; - plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kEnableDismount, dir, true); + plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kEnableDismount, dir, true); msg->Send(); } } @@ -824,7 +824,7 @@ PF_CONSOLE_CMD( Avatar_Climb, EnableClimb, "string direction, int onOff", "Allow else if(stricmp(dirStr, "right") == 0) dir = plClimbMsg::kRight; hsBool enable = static_cast(params[1]) ? true : false; - plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kEnableClimb, dir, enable); + plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kEnableClimb, dir, enable); msg->Send(); } } @@ -836,7 +836,7 @@ PF_CONSOLE_CMD( Avatar_Climb, Release, "", "") { plKey mgr = plAvatarMgr::GetInstance()->GetKey(); plKey avKey = avMod->GetKey(); - plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kRelease); + plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kRelease); msg->Send(); } } @@ -848,7 +848,7 @@ PF_CONSOLE_CMD( Avatar_Climb, FallOff, "", "") { plKey mgr = plAvatarMgr::GetInstance()->GetKey(); plKey avKey = avMod->GetKey(); - plClimbMsg *msg = TRACKED_NEW plClimbMsg(mgr, avKey, plClimbMsg::kFallOff); + plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kFallOff); msg->Send(); } } @@ -868,7 +868,7 @@ PF_CONSOLE_CMD( Avatar_Swim, Start, "", "") plArmatureMod *avMod = const_cast(plAvatarMgr::GetInstance()->GetLocalAvatar()); if(avMod) { - plAvBrainSwim * brayne = TRACKED_NEW plAvBrainSwim(); + plAvBrainSwim * brayne = new plAvBrainSwim(); avMod->PushBrain(brayne); } } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp index d8c304f1..b6c37b98 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp @@ -185,7 +185,7 @@ pfConsole::~pfConsole() { if( fInputInterface != nil ) { - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( fInputInterface ); plgDispatch::MsgSend( msg ); @@ -218,7 +218,7 @@ pfConsole * pfConsole::GetInstance () { void pfConsole::Init( pfConsoleEngine *engine ) { - fDisplayBuffer = TRACKED_NEW char[ fNumDisplayLines * kMaxCharsWide ]; + fDisplayBuffer = new char[ fNumDisplayLines * kMaxCharsWide ]; memset( fDisplayBuffer, 0, fNumDisplayLines * kMaxCharsWide ); memset( fWorkingLine, 0, sizeof( fWorkingLine ) ); @@ -239,8 +239,8 @@ void pfConsole::Init( pfConsoleEngine *engine ) memset( fLastHelpMsg, 0, sizeof( fLastHelpMsg ) ); fEngine = engine; - fInputInterface = TRACKED_NEW pfConsoleInputInterface( this ); - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); + fInputInterface = new pfConsoleInputInterface( this ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); msg->SetIFace( fInputInterface ); plgDispatch::MsgSend( msg ); diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp index d4c536f0..aea4249d 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp @@ -443,13 +443,13 @@ PF_CONSOLE_BASE_CMD( SampleCmd3, "int, ...", "Sample command #3" ) PF_CONSOLE_BASE_CMD( FadeIn, "float len, bool hold", "Sample command #1" ) { - plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( plTransitionMsg::kFadeIn, (float)params[ 0 ], (bool)params[ 1 ] ); + plTransitionMsg *msg = new plTransitionMsg( plTransitionMsg::kFadeIn, (float)params[ 0 ], (bool)params[ 1 ] ); plgDispatch::MsgSend( msg ); } PF_CONSOLE_BASE_CMD( FadeOut, "float len, bool hold", "Sample command #1" ) { - plTransitionMsg *msg = TRACKED_NEW plTransitionMsg( plTransitionMsg::kFadeOut, (float)params[ 0 ], (bool)params[ 1 ] ); + plTransitionMsg *msg = new plTransitionMsg( plTransitionMsg::kFadeOut, (float)params[ 0 ], (bool)params[ 1 ] ); plgDispatch::MsgSend( msg ); } @@ -896,13 +896,13 @@ PF_CONSOLE_CMD( Console, ClearAllVars, "", "Wipes the global console variable co PF_CONSOLE_CMD( Console, ExecuteFile, "string filename", "Runs the given file as if it were an .ini or .fni file" ) { - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kExecuteFile, params[ 0 ] ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kExecuteFile, params[ 0 ] ); cMsg->Send(); } PF_CONSOLE_CMD( Console, ExecuteFileDelayed, "string filename, float timeInSecs", "Runs the given file as if it were an .ini or .fni file, but at some given point in the future" ) { - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kExecuteFile, params[ 0 ] ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kExecuteFile, params[ 0 ] ); cMsg->SetTimeStamp( hsTimer::GetSysSeconds() + (float)params[ 1 ] ); cMsg->Send(); } @@ -1746,10 +1746,10 @@ PF_CONSOLE_CMD( Graphics_Renderer, GenerateReflectMaps, "string baseObject, stri hsAssert( pfConsole::GetPipeline() != nil, "Cannot use this command before pipeline initialization" ); // First, create the renderTarget for the renderRequests - plRenderTarget *target = TRACKED_NEW plRenderTarget( plRenderTarget::kIsProjected | plRenderTarget::kIsTexture, + plRenderTarget *target = new plRenderTarget( plRenderTarget::kIsProjected | plRenderTarget::kIsTexture, params[ 2 ], params[ 2 ], 32, 24, 0 ); -// plMipmap *newMip = TRACKED_NEW plMipmap( size, size, plMipmap::kARGB32Config, 1 ); +// plMipmap *newMip = new plMipmap( size, size, plMipmap::kARGB32Config, 1 ); c.Set( params[ 0 ], params[ 1 ], params[ 2 ], 1.0f ); @@ -1873,7 +1873,7 @@ PF_CONSOLE_CMD( Graphics_Show, Bounds, "", "Toggle object bounds display") PF_CONSOLE_CMD( Graphics_Show, Sound, "", "Toggle sound fields visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); if( on ) pfConsole::GetPipeline()->SetDrawableTypeMask(pfConsole::GetPipeline()->GetDrawableTypeMask() | plDrawableSpans::kAudibleProxy); @@ -1910,7 +1910,7 @@ PF_CONSOLE_CMD( Graphics_Show, SingleSound, } plKey aiKey = ai->GetKey(); - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg( plProxyDrawMsg::kAudible | plProxyDrawMsg::kToggle ); + plProxyDrawMsg* msg = new plProxyDrawMsg( plProxyDrawMsg::kAudible | plProxyDrawMsg::kToggle ); msg->SetBCastFlag( plMessage::kBCastByExactType, false ); msg->AddReceiver( aiKey ); plgDispatch::MsgSend( msg ); @@ -1928,7 +1928,7 @@ PF_CONSOLE_CMD( Graphics_Show, SingleSound, PF_CONSOLE_CMD( Graphics_Show, SoundOnly, "", "Toggle only sound fields visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); static uint32_t oldMask = plDrawableSpans::kNormal; if( on ) @@ -1982,7 +1982,7 @@ PF_CONSOLE_CMD( Graphics_Show, OccSnapOnly, "", "Take snapshot of current occlus PF_CONSOLE_CMD( Graphics_Show, Occluders, "", "Toggle occluder geometry visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); if( on ) @@ -1998,7 +1998,7 @@ PF_CONSOLE_CMD( Graphics_Show, Occluders, "", "Toggle occluder geometry visible" PF_CONSOLE_CMD( Graphics_Show, OccludersOnly, "", "Toggle only occluder geometry visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); static uint32_t oldMask = plDrawableSpans::kNormal; if( on ) @@ -2018,7 +2018,7 @@ PF_CONSOLE_CMD( Graphics_Show, OccludersOnly, "", "Toggle only occluder geometry PF_CONSOLE_CMD( Graphics_Show, Physicals, "", "Toggle Physical geometry visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); if( on ) pfConsole::GetPipeline()->SetDrawableTypeMask(pfConsole::GetPipeline()->GetDrawableTypeMask() | plDrawableSpans::kPhysicalProxy); @@ -2033,7 +2033,7 @@ PF_CONSOLE_CMD( Graphics_Show, Physicals, "", "Toggle Physical geometry visible" PF_CONSOLE_CMD( Graphics_Show, PhysicalsOnly, "", "Toggle only Physical geometry visible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); static uint32_t oldMask = plDrawableSpans::kNormal; if( on ) @@ -2084,7 +2084,7 @@ PF_CONSOLE_CMD( Graphics_Show, NormalOnly, "", "Toggle only normal geometry visi PF_CONSOLE_CMD( Graphics_Show, Lights, "", "Toggle visible proxies for lights") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); if( on ) pfConsole::GetPipeline()->SetDrawableTypeMask(pfConsole::GetPipeline()->GetDrawableTypeMask() | plDrawableSpans::kLightProxy); @@ -2099,7 +2099,7 @@ PF_CONSOLE_CMD( Graphics_Show, Lights, "", "Toggle visible proxies for lights") PF_CONSOLE_CMD( Graphics_Show, LightsOnly, "", "Toggle visible proxies for lights and everything else invisible") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); static uint32_t oldMask = plDrawableSpans::kNormal; if( on ) @@ -2119,7 +2119,7 @@ PF_CONSOLE_CMD( Graphics_Show, LightsOnly, "", "Toggle visible proxies for light PF_CONSOLE_CMD( Graphics_Show, Clicks, "", "Toggle visible proxies for clicks") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); if( on ) pfConsole::GetPipeline()->SetDrawableTypeMask(pfConsole::GetPipeline()->GetDrawableTypeMask() | plDrawableSpans::kCameraProxy); @@ -2135,7 +2135,7 @@ PF_CONSOLE_CMD( Graphics_Show, Clicks, "", "Toggle visible proxies for clicks") PF_CONSOLE_CMD( Graphics_Show, ClickOnly, "", "Toggle visible proxies for click points") { static hsBool on = false; - plProxyDrawMsg* msg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); + plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy)); plgDispatch::MsgSend(msg); static uint32_t oldMask = plDrawableSpans::kNormal; if( on ) @@ -2252,7 +2252,7 @@ PF_CONSOLE_CMD( App, return; } - plAnimCmdMsg* cmd = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* cmd = new plAnimCmdMsg; cmd->SetSender(plClient::GetInstance()->GetKey()); cmd->SetCmd(plAnimCmdMsg::kAddCallbacks); #if 1 @@ -2288,7 +2288,7 @@ PF_CONSOLE_CMD( App, } reps--; - plEventCallbackMsg* callback = TRACKED_NEW plEventCallbackMsg(plClient::GetInstance()->GetKey(), event, 0, secs, reps); + plEventCallbackMsg* callback = new plEventCallbackMsg(plClient::GetInstance()->GetKey(), event, 0, secs, reps); cmd->AddCallback(callback); hsRefCnt_SafeUnRef(callback); plgDispatch::MsgSend(cmd); @@ -2312,7 +2312,7 @@ PF_CONSOLE_CMD( App, PrintString(str); - plSoundMsg* cmd = TRACKED_NEW plSoundMsg; + plSoundMsg* cmd = new plSoundMsg; cmd->SetSender(plClient::GetInstance()->GetKey()); cmd->SetCmd(plSoundMsg::kAddCallbacks); cmd->AddReceiver(key); @@ -2343,7 +2343,7 @@ PF_CONSOLE_CMD( App, } reps--; - plEventCallbackMsg* callback = TRACKED_NEW plEventCallbackMsg(plClient::GetInstance()->GetKey(), event, 0, secs, reps); + plEventCallbackMsg* callback = new plEventCallbackMsg(plClient::GetInstance()->GetKey(), event, 0, secs, reps); cmd->AddCallback(callback); hsRefCnt_SafeUnRef(callback); plgDispatch::MsgSend(cmd); @@ -2385,7 +2385,7 @@ PF_CONSOLE_CMD( App, } strcpy(str, name); - plAnimCmdMsg* cmd = TRACKED_NEW plAnimCmdMsg(nil, obj->GetModifier(i)->GetKey(), nil); + plAnimCmdMsg* cmd = new plAnimCmdMsg(nil, obj->GetModifier(i)->GetKey(), nil); if( numParams > 1 ) { @@ -3001,7 +3001,7 @@ PF_CONSOLE_CMD( Camera, SwitchTo, "string cameraName", "Switch to the named came if (key) { - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetCmd(plCameraMsg::kResponderTrigger); pMsg->SetCmd(plCameraMsg::kRegionPushCamera); pMsg->SetNewCam(key); @@ -3160,7 +3160,7 @@ PF_CONSOLE_CMD(Logic, EnableDetector, "string detectorComp, bool enable", "Enabl plLogicModBase *mod = FindLogicMod((const char*)params[0]); if (mod) { - plEnableMsg* enableMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* enableMsg = new plEnableMsg; enableMsg->SetCmd(params[1] ? plEnableMsg::kEnable : plEnableMsg::kDisable); enableMsg->SetCmd(plEnableMsg::kAll); enableMsg->Send(mod->GetKey()); @@ -3169,7 +3169,7 @@ PF_CONSOLE_CMD(Logic, EnableDetector, "string detectorComp, bool enable", "Enabl static void ResponderSendTrigger(plKey responderKey, int responderState, bool fastForward = false) { - plNotifyMsg *msg = TRACKED_NEW plNotifyMsg; + plNotifyMsg *msg = new plNotifyMsg; if (fastForward) { @@ -3579,7 +3579,7 @@ PF_CONSOLE_CMD( Audio, SetVolume, const plAudioInterface *ai = obj->GetAudioInterface(); plKey aiKey = ai->GetKey(); - plSoundMsg* cmd = TRACKED_NEW plSoundMsg; + plSoundMsg* cmd = new plSoundMsg; cmd->SetSender( plClient::GetInstance()->GetKey() ); cmd->SetCmd( plSoundMsg::kSetVolume ); cmd->fVolume = params[ 1 ]; @@ -3621,10 +3621,10 @@ PF_CONSOLE_CMD( Audio, IsolateSound, return; } - asMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kMuteAll ); + asMsg = new plAudioSysMsg( plAudioSysMsg::kMuteAll ); plgDispatch::MsgSend( asMsg ); - asMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kUnmuteAll ); + asMsg = new plAudioSysMsg( plAudioSysMsg::kUnmuteAll ); asMsg->AddReceiver( ai->GetKey() ); asMsg->SetBCastFlag( plMessage::kBCastByExactType, false ); plgDispatch::MsgSend( asMsg ); @@ -3702,19 +3702,19 @@ PF_CONSOLE_CMD( Listener, ShowDebugInfo, "bool show", "Shows or hides debugging PF_CONSOLE_CMD( Listener, UseCameraOrientation, "", "Use the camera's orientation to orient the listener") { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); set->Send(); } PF_CONSOLE_CMD( Listener, UseCameraPosition, "", "Use the canera's position to position the listener") { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); set->Send(); } PF_CONSOLE_CMD( Listener, UseCameraVelocity, "", "Use the camera's velocity to set the listener velocity") { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kVelocity, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kVelocity, nil, true ); set->Send(); } @@ -3723,7 +3723,7 @@ PF_CONSOLE_CMD( Listener, UsePlayerOrientation, "", "Use the player's orientatio plKey pKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); if( pKey ) { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kFacing, pKey, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kFacing, pKey, true ); set->Send(); } } @@ -3732,7 +3732,7 @@ PF_CONSOLE_CMD( Listener, UsePlayerPosition, "", "Use the player's position to p plKey pKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); if (pKey) { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); set->Send(); } } @@ -3742,7 +3742,7 @@ PF_CONSOLE_CMD( Listener, UsePlayerVelocity, "", "Use the player's velocity to s plKey pKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); if (pKey) { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); set->Send(); } } @@ -3775,13 +3775,13 @@ PF_CONSOLE_CMD( Listener, XMode, "bool b", "Sets velocity and position to avatar plStatusLog::AddLineS("audio.log", "XMode on"); - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); set->Send(); if (pKey) { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); + set = new plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); set->Send(); - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); + set = new plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); set->Send(); } } @@ -3789,32 +3789,32 @@ PF_CONSOLE_CMD( Listener, XMode, "bool b", "Sets velocity and position to avatar { if(oldPosType == plListener::kCamera) { - plSetListenerMsg *set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); + plSetListenerMsg *set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kPosition, nil, true ); set->Send(); } else { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); + set = new plSetListenerMsg( plSetListenerMsg::kPosition, pKey, true ); set->Send(); } if(oldFacingType == plListener::kCamera) { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); + set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kFacing, nil, true ); set->Send(); } else { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kFacing, pKey, true ); + set = new plSetListenerMsg( plSetListenerMsg::kFacing, pKey, true ); set->Send(); } if(oldVelType == plListener::kCamera) { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kVelocity, nil, true ); + set = new plSetListenerMsg( plSetListenerMsg::kVCam | plSetListenerMsg::kVelocity, nil, true ); set->Send(); } else { - set = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); + set = new plSetListenerMsg( plSetListenerMsg::kVelocity, pKey, true ); set->Send(); } plStatusLog::AddLineS("audio.log", "%s, %d, %d, %d", "XMode off", oldPosType, oldFacingType, oldVelType); @@ -3841,7 +3841,7 @@ PF_CONSOLE_CMD( DInput, UseDInput, "bool on", "Turns off DirectInput") PF_CONSOLE_CMD( DInput, Config, "", "Launch DInput configuration screen") { plgAudioSys::Activate(false); - plInputEventMsg* pMsg = TRACKED_NEW plInputEventMsg; + plInputEventMsg* pMsg = new plInputEventMsg; pMsg->fEvent = plInputEventMsg::kConfigure; pMsg->AddReceiver( plInputManager::GetInstance()->GetKey() ); pMsg->SetBCastFlag(plMessage::kBCastByType, false); @@ -3972,7 +3972,7 @@ PF_CONSOLE_CMD( Nav, PageInNode, // Group name, Function name "Pages in a scene node." ) // Help string { plSynchEnabler ps(false); // disable dirty tracking while paging in - plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoom); + plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kLoadRoom); pMsg1->AddReceiver( plClient::GetInstance()->GetKey() ); pMsg1->AddRoomLoc(plKeyFinder::Instance().FindLocation(nil, params[0])); plgDispatch::MsgSend(pMsg1); @@ -3990,7 +3990,7 @@ PF_CONSOLE_CMD( Nav, PageInNodeList, // Group name, Function name pageInNodesStr += "*.prx"; hsFolderIterator pageInNodesIter(pageInNodesStr.data(), true); - plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoom); + plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kLoadRoom); while (pageInNodesIter.NextFile()) { char nodeName[255]; @@ -4009,7 +4009,7 @@ PF_CONSOLE_CMD( Nav, PageOutNode, // Group name, Function name "pages out a scene node." ) // Help string { plSynchEnabler ps(false); // disable dirty tracking while paging out - plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kUnloadRoom); + plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kUnloadRoom); pMsg1->AddReceiver( plClient::GetInstance()->GetKey() ); pMsg1->AddRoomLoc(plKeyFinder::Instance().FindLocation(nil, params[0])); plgDispatch::MsgSend(pMsg1); @@ -4048,7 +4048,7 @@ PF_CONSOLE_CMD( Nav, MovePlayer, // Group name, Function name if( !nodeKey ) return; - plNodeChangeMsg* msg = TRACKED_NEW plNodeChangeMsg(nil, playerKey, nodeKey); + plNodeChangeMsg* msg = new plNodeChangeMsg(nil, playerKey, nodeKey); plgDispatch::MsgSend(msg); sprintf(str, "%s moved to %s", (char*)params[0], (char*)params[1]); PrintString(str); @@ -4083,11 +4083,11 @@ PF_CONSOLE_CMD( Movie, "Start of movie with this filename" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kStart); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kStart); //#define MF_TEST_MOVIECALLBACKS #ifdef MF_TEST_MOVIECALLBACKS - plMovieMsg* cb = TRACKED_NEW plMovieMsg("avi/intro0.bik", plMovieMsg::kStart); + plMovieMsg* cb = new plMovieMsg("avi/intro0.bik", plMovieMsg::kStart); mov->AddCallback(cb); mov->SetCmd(mov->GetCmd() | plMovieMsg::kAddCallbacks); #endif // MF_TEST_MOVIECALLBACKS @@ -4103,7 +4103,7 @@ PF_CONSOLE_CMD( Movie, "Stop movie with this filename" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kStop); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kStop); mov->Send(); PrintStringF(PrintString, "%s now stopping", filename); @@ -4115,7 +4115,7 @@ PF_CONSOLE_CMD( Movie, "Pause movie with this filename" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kPause); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kPause); mov->Send(); PrintStringF(PrintString, "%s now pausing", filename); @@ -4127,7 +4127,7 @@ PF_CONSOLE_CMD( Movie, "Resume movie with this filename" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kResume); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kResume); mov->Send(); PrintStringF(PrintString, "%s now resuming", filename); @@ -4139,7 +4139,7 @@ PF_CONSOLE_CMD( Movie, "Move center of movie with this filename to x,y" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kMove); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kMove); float x = params[1]; float y = params[2]; mov->SetCenter(x, y); @@ -4154,7 +4154,7 @@ PF_CONSOLE_CMD( Movie, "Scale movie with this filename by x,y" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kScale); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kScale); float x = params[1]; float y = params[2]; mov->SetScale(x, y); @@ -4169,7 +4169,7 @@ PF_CONSOLE_CMD( Movie, "Set opacity of movie with this filename to a" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kOpacity); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kOpacity); float a = params[1]; mov->SetOpacity(a); mov->Send(); @@ -4183,7 +4183,7 @@ PF_CONSOLE_CMD( Movie, "Color movie with this filename as r,g,b" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kColor); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kColor); float r = params[1]; float g = params[2]; float b = params[3]; @@ -4199,7 +4199,7 @@ PF_CONSOLE_CMD( Movie, "Set volume of movie with this filename to v" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kVolume); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kVolume); float v = params[1]; mov->SetVolume(v); mov->Send(); @@ -4213,7 +4213,7 @@ PF_CONSOLE_CMD( Movie, "Fade in movie with this filename from r,g,b,a over secs seconds" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kFadeIn); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kFadeIn); float secs = params[1]; float r = params[2]; float g = params[3]; @@ -4232,7 +4232,7 @@ PF_CONSOLE_CMD( Movie, "Fade out movie with this filename to r,g,b,a over secs seconds" ) { char* filename = params[0]; - plMovieMsg* mov = TRACKED_NEW plMovieMsg(filename, plMovieMsg::kFadeOut); + plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kFadeOut); float secs = params[1]; float r = params[2]; float g = params[3]; @@ -4635,13 +4635,13 @@ PF_CONSOLE_CMD( Access, float fadeUp = params[1]; float fadeDown = params[2]; - plFadeOpacityMod* mod = TRACKED_NEW plFadeOpacityMod; + plFadeOpacityMod* mod = new plFadeOpacityMod; mod->SetFadeUp(fadeUp); mod->SetFadeDown(fadeDown); hsgResMgr::ResMgr()->NewKey(obj->GetKey()->GetName(), mod, obj->GetKey()->GetUoid().GetLocation()); - hsgResMgr::ResMgr()->AddViaNotify(mod->GetKey(), TRACKED_NEW plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mod->GetKey(), new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef); } @@ -4782,7 +4782,7 @@ PF_CONSOLE_CMD( Access, float range = gunRange; - plBulletMsg* bull = TRACKED_NEW plBulletMsg(nil, nil, nil); + plBulletMsg* bull = new plBulletMsg(nil, nil, nil); bull->FireShot(pos, dir, radius, range); bull->Send(); @@ -4811,7 +4811,7 @@ PF_CONSOLE_CMD( Access, float range = gunRange; - plBulletMsg* bull = TRACKED_NEW plBulletMsg(nil, nil, nil); + plBulletMsg* bull = new plBulletMsg(nil, nil, nil); bull->FireShot(pos, dir, radius, range); bull->Send(); @@ -4839,7 +4839,7 @@ PF_CONSOLE_CMD( Access, PrintString("Psys not found"); return; } - hsgResMgr::ResMgr()->AddViaNotify(sysKey, TRACKED_NEW plGenRefMsg(bullKey, plRefMsg::kOnCreate, 0, plDynaBulletMgr::kRefPartyObject), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(sysKey, new plGenRefMsg(bullKey, plRefMsg::kOnCreate, 0, plDynaBulletMgr::kRefPartyObject), plRefFlags::kPassiveRef); PrintString("sys added"); } @@ -5521,7 +5521,7 @@ PF_CONSOLE_CMD( SceneObject_SetEnable, Drawable, // Group name, Function name bool enable = params[1]; - plEnableMsg* pEMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pEMsg = new plEnableMsg; pEMsg->SetCmd( enable ? plEnableMsg::kEnable : plEnableMsg::kDisable ); pEMsg->SetCmd( plEnableMsg::kDrawable ); pEMsg->AddReceiver( key ); @@ -5540,7 +5540,7 @@ PF_CONSOLE_CMD( SceneObject_SetEnable, Physical, // Group name, Function name bool enable = params[1]; - plEnableMsg* pEMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pEMsg = new plEnableMsg; pEMsg->SetCmd( enable ? plEnableMsg::kEnable : plEnableMsg::kDisable ); pEMsg->SetCmd( plEnableMsg::kPhysical ); pEMsg->AddReceiver( key ); @@ -5559,7 +5559,7 @@ PF_CONSOLE_CMD( SceneObject_SetEnable, PhysicalT, // Group name, Function name bool enable = params[1]; - plEventGroupEnableMsg* pMsg = TRACKED_NEW plEventGroupEnableMsg; + plEventGroupEnableMsg* pMsg = new plEventGroupEnableMsg; if( enable ) pMsg->SetFlags(plEventGroupEnableMsg::kCollideOn | plEventGroupEnableMsg::kReportOn); else @@ -5582,7 +5582,7 @@ PF_CONSOLE_CMD( SceneObject_SetEnable, Audible, // Group name, Function name bool enable = params[1]; - plEnableMsg* pEMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pEMsg = new plEnableMsg; pEMsg->SetCmd( enable ? plEnableMsg::kEnable : plEnableMsg::kDisable ); pEMsg->SetCmd( plEnableMsg::kAudible ); pEMsg->AddReceiver( key ); @@ -5601,7 +5601,7 @@ PF_CONSOLE_CMD( SceneObject_SetEnable, All, // Group name, Function name bool enable = params[1]; - plEnableMsg* pEMsg = TRACKED_NEW plEnableMsg; + plEnableMsg* pEMsg = new plEnableMsg; pEMsg->SetCmd( enable ? plEnableMsg::kEnable : plEnableMsg::kDisable ); pEMsg->SetCmd( plEnableMsg::kAll ); pEMsg->AddReceiver( key ); @@ -5638,7 +5638,7 @@ PF_CONSOLE_CMD( SceneObject, Attach, // Group name, Function name return; } - plAttachMsg* attMsg = TRACKED_NEW plAttachMsg(parentKey, child, plRefMsg::kOnRequest, nil); + plAttachMsg* attMsg = new plAttachMsg(parentKey, child, plRefMsg::kOnRequest, nil); plgDispatch::MsgSend(attMsg); sprintf(str, "%s now child of %s", childName, parentName); @@ -5674,7 +5674,7 @@ PF_CONSOLE_CMD( SceneObject, Detach, // Group name, Function name && child->GetCoordinateInterface()->GetParent()->GetOwner() ) { plKey parentKey = child->GetCoordinateInterface()->GetParent()->GetOwner()->GetKey(); - plAttachMsg* attMsg = TRACKED_NEW plAttachMsg(parentKey, child, plRefMsg::kOnRemove, nil); + plAttachMsg* attMsg = new plAttachMsg(parentKey, child, plRefMsg::kOnRemove, nil); plgDispatch::MsgSend(attMsg); sprintf(str, "%s detached from %s", childName, parentKey->GetName()); @@ -5780,7 +5780,7 @@ PF_CONSOLE_CMD( Physics, ApplyForce, "string Object, float x, float y, float z", if(key) { hsVector3 force(params[1], params[2], params[3]); - plForceMsg *m = TRACKED_NEW plForceMsg(nil, key, force); + plForceMsg *m = new plForceMsg(nil, key, force); plgDispatch::MsgSend(m); } } @@ -5793,7 +5793,7 @@ PF_CONSOLE_CMD( Physics, ApplyForceAtPoint, "string Object, float forceX, float { hsVector3 force(params[1], params[2], params[3]); hsPoint3 point(params[4], params[5], params[6]); - plOffsetForceMsg *m = TRACKED_NEW plOffsetForceMsg(nil, key, force, point); + plOffsetForceMsg *m = new plOffsetForceMsg(nil, key, force, point); plgDispatch::MsgSend(m); } } @@ -5805,7 +5805,7 @@ PF_CONSOLE_CMD( Physics, ApplyTorque, "string Object, float axisX, float axisY, if(key) { hsVector3 torque(params[1], params[2], params[3]); - plTorqueMsg *m = TRACKED_NEW plTorqueMsg(nil, key, torque); + plTorqueMsg *m = new plTorqueMsg(nil, key, torque); plgDispatch::MsgSend(m); } } @@ -5817,7 +5817,7 @@ PF_CONSOLE_CMD( Physics, ApplyImpulse, "string Object, float x, float y, float z if(key) { hsVector3 impulse(params[1], params[2], params[3]); - plImpulseMsg *m = TRACKED_NEW plImpulseMsg(nil, key, impulse); + plImpulseMsg *m = new plImpulseMsg(nil, key, impulse); plgDispatch::MsgSend(m); } } @@ -5830,7 +5830,7 @@ PF_CONSOLE_CMD( Physics, ApplyImpulseAtPoint, "string Object, float impulseX, fl { hsVector3 impulse(params[1], params[2], params[3]); hsPoint3 point(params[4], params[5], params[6]); - plOffsetImpulseMsg *m = TRACKED_NEW plOffsetImpulseMsg(nil, key, impulse, point); + plOffsetImpulseMsg *m = new plOffsetImpulseMsg(nil, key, impulse, point); plgDispatch::MsgSend(m); } } @@ -5842,7 +5842,7 @@ PF_CONSOLE_CMD( Physics, ApplyAngularImpulse, "string Object, float x, float y, if(key) { hsVector3 impulse(params[1], params[2], params[3]); - plAngularImpulseMsg *m = TRACKED_NEW plAngularImpulseMsg(nil, key, impulse); + plAngularImpulseMsg *m = new plAngularImpulseMsg(nil, key, impulse); plgDispatch::MsgSend(m); } } @@ -5854,7 +5854,7 @@ PF_CONSOLE_CMD( Physics, ApplyDamping, "string Object, float dampFactor", "Reduc if(key) { float dampFactor = params[1]; - plDampMsg *m = TRACKED_NEW plDampMsg(nil, key, dampFactor); + plDampMsg *m = new plDampMsg(nil, key, dampFactor); plgDispatch::MsgSend(m); } } @@ -5866,7 +5866,7 @@ PF_CONSOLE_CMD( Physics, ShiftMass, "string Object, float x, float y, float z", if(key) { hsVector3 offset(params[1], params[2], params[3]); - plShiftMassMsg *m = TRACKED_NEW plShiftMassMsg(nil, key, offset); + plShiftMassMsg *m = new plShiftMassMsg(nil, key, offset); plgDispatch::MsgSend(m); } } @@ -5879,7 +5879,7 @@ PF_CONSOLE_CMD( Physics, Suppress, "string Object, int doSuppress", "Remove(true int iDoSuppress = params[1]; bool doSuppress = iDoSuppress ? true : false; - plSimSuppressMsg *msg = TRACKED_NEW plSimSuppressMsg(nil, key, doSuppress); + plSimSuppressMsg *msg = new plSimSuppressMsg(nil, key, doSuppress); msg->Send(); } } @@ -5891,7 +5891,7 @@ PF_CONSOLE_CMD( Physics, SetEventGroup, "string Object, int group, int status, i if(key) { int group = params[1], status = params[2], clearOthers = params[3]; - plEventGroupMsg *m = TRACKED_NEW plEventGroupMsg(nil, key, group, status, clearOthers); + plEventGroupMsg *m = new plEventGroupMsg(nil, key, group, status, clearOthers); plgDispatch::MsgSend(m); } } @@ -5904,7 +5904,7 @@ PF_CONSOLE_CMD( Physics, Freeze, "string Object, int status", "Immobilize the gi { int status = params[1]; - plFreezeMsg *m = TRACKED_NEW plFreezeMsg(nil, key, nil, status); + plFreezeMsg *m = new plFreezeMsg(nil, key, nil, status); plgDispatch::MsgSend(m); } @@ -6254,7 +6254,7 @@ void UpdateParticleParam(char *objName, int32_t paramID, float value, void (*Pri const plParticleSystem *sys = plParticleSystem::ConvertNoRef(so->GetModifier(i)); if (sys != nil) { - plgDispatch::MsgSend(TRACKED_NEW plParticleUpdateMsg(nil, sys->GetKey(), nil, paramID, value)); + plgDispatch::MsgSend(new plParticleUpdateMsg(nil, sys->GetKey(), nil, paramID, value)); PrintString("Particle system successfully updated."); return; } @@ -6374,7 +6374,7 @@ PF_CONSOLE_CMD( ParticleSystem, plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar(); if (avMod) - (TRACKED_NEW plParticleTransferMsg(nil, avMod->GetKey(), 0, so->GetKey(), (int)params[1]))->Send(); + (new plParticleTransferMsg(nil, avMod->GetKey(), 0, so->GetKey(), (int)params[1]))->Send(); } PF_CONSOLE_CMD( ParticleSystem, @@ -6395,7 +6395,7 @@ PF_CONSOLE_CMD( ParticleSystem, if (sys != nil) { uint8_t flags = (params[3] ? plParticleKillMsg::kParticleKillPercentage : 0); - (TRACKED_NEW plParticleKillMsg(nil, sys->GetKey(), 0, params[2], params[1], flags))->Send(); + (new plParticleKillMsg(nil, sys->GetKey(), 0, params[2], params[1], flags))->Send(); } } @@ -6433,7 +6433,7 @@ PF_CONSOLE_CMD( ParticleSystem_Flock, plParticleEffect *flock = FindFlock(params[0]); if (flock) { - (TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, params[1], params[2], params[3]))->Send(); + (new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetOffset, params[1], params[2], params[3]))->Send(); } } @@ -6445,7 +6445,7 @@ PF_CONSOLE_CMD( ParticleSystem_Flock, plParticleEffect *flock = FindFlock(params[0]); if (flock) { - (TRACKED_NEW plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, params[1], params[2], params[3]))->Send(); + (new plParticleFlockMsg(nil, flock->GetKey(), 0, plParticleFlockMsg::kFlockCmdSetDissentPoint, params[1], params[2], params[3]))->Send(); } } @@ -6599,7 +6599,7 @@ PF_CONSOLE_CMD( Animation, // Group name "string objName, string animName", // Params "Start the animation" ) // Help string { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd(plAnimCmdMsg::kContinue); msg->SetAnimName(nil); msg->SetBCastFlag(plMessage::kPropagateToModifiers); @@ -6611,7 +6611,7 @@ PF_CONSOLE_CMD( Animation, // Group name "string objName, string animName", // Params "Stop the animation" ) // Help string { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd(plAnimCmdMsg::kStop); msg->SetAnimName(nil); msg->SetBCastFlag(plMessage::kPropagateToModifiers); @@ -6623,7 +6623,7 @@ PF_CONSOLE_CMD( Animation, // Group name "string objName, string animName, float blend, float rate", // Params "Set the animation's blend value and rate to change" ) // Help string { - plAGCmdMsg *msg = TRACKED_NEW plAGCmdMsg(); + plAGCmdMsg *msg = new plAGCmdMsg(); msg->SetCmd(plAGCmdMsg::kSetBlend); msg->fBlend = params[2]; msg->fBlendRate = params[3]; @@ -6637,7 +6637,7 @@ PF_CONSOLE_CMD( Animation, // Group name "string objName, string animName, float amp, float rate", // Params "Set the amplitude of this animation and rate to change" ) // Help string { - plAGCmdMsg *msg = TRACKED_NEW plAGCmdMsg(); + plAGCmdMsg *msg = new plAGCmdMsg(); msg->SetCmd(plAGCmdMsg::kSetAmp); msg->fAmp = params[2]; msg->fAmpRate = params[3]; @@ -6651,7 +6651,7 @@ PF_CONSOLE_CMD( Animation, // Group name "string objName, string animName, float speed, float rate", // Params "Set the speed of this animation and rate to change" ) // Help string { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd(plAnimCmdMsg::kSetSpeed); msg->fSpeed = params[2]; msg->fSpeedChangeRate = params[3]; @@ -6904,7 +6904,7 @@ PF_CONSOLE_CMD( KI, // Group name "Upgrade KI to new level." ) // Help string { // create the mesage to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kUpgradeKILevel ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kUpgradeKILevel ); msg->SetIntValue((int) params[0]); @@ -6918,7 +6918,7 @@ PF_CONSOLE_CMD( KI, // Group name "Downgrade KI level to next lower level." ) // Help string { // create the mesage to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kDowngradeKILevel ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kDowngradeKILevel ); msg->SetIntValue((int) params[0]); @@ -6932,7 +6932,7 @@ PF_CONSOLE_CMD( KI, // Group name "All the phased functionality turned on." ) // Help string { // create the mesage to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kKIPhasedAllOn ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kKIPhasedAllOn ); // send it off plgDispatch::MsgSend( msg ); @@ -6944,7 +6944,7 @@ PF_CONSOLE_CMD( KI, // Group name "All the phased functionality turned off." ) // Help string { // create the mesage to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kKIPhasedAllOff ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kKIPhasedAllOff ); // send it off plgDispatch::MsgSend( msg ); @@ -6956,7 +6956,7 @@ PF_CONSOLE_CMD( KI, // Group name "Add the journal to the Blackbar." ) // Help string { // create the message to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kAddJournalBook ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kAddJournalBook ); // send if off plgDispatch::MsgSend( msg ); @@ -6968,7 +6968,7 @@ PF_CONSOLE_CMD( KI, // Group name "Removes the journal from the Blackbar." ) // Help string { // create the message to send - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kRemoveJournalBook ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kRemoveJournalBook ); // send if off plgDispatch::MsgSend( msg ); @@ -7045,7 +7045,7 @@ PF_CONSOLE_CMD( Python, const char* extraParms = ""; if (numParams > 1) extraParms = params[1]; - pfBackdoorMsg *msg = TRACKED_NEW pfBackdoorMsg( params[0],extraParms ); + pfBackdoorMsg *msg = new pfBackdoorMsg( params[0],extraParms ); // send it off plgDispatch::MsgSend( msg ); } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp index 29e33d57..fe20bba3 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp @@ -237,7 +237,7 @@ PF_CONSOLE_CMD( Net, // groupName text += (char*)params[i]; text += " "; } - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, text.c_str() ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kAddLine, text.c_str() ); cMsg->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce); cMsg->SetBCastFlag(plMessage::kLocalPropagate, 0); plgDispatch::MsgSend( cMsg ); diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp index 0b711946..d94603d9 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp @@ -152,5 +152,5 @@ hsBool pfConsoleDirSrc::AlreadyProcessedFile(const std::wstring& path, const std void pfConsoleDirSrc::AddProcessedFile(const std::wstring& path, const std::wstring& file) { - fProcessedFiles.push_back(TRACKED_NEW FileName(path, file)); + fProcessedFiles.push_back(new FileName(path, file)); } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp index f5e97d3a..ec70cb6e 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp @@ -167,7 +167,7 @@ PF_CONSOLE_CMD( Game, LoadDialog, "string dlgName", "Loads the given GUI dialog plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog ); + pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog ); msg->SetString( params[ 0 ] ); plgDispatch::MsgSend( msg ); } @@ -179,7 +179,7 @@ PF_CONSOLE_CMD( Game, LoadLocalDialog, "string ageName, string dlgName", "Loads plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog ); + pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kLoadDialog ); msg->SetString( params[ 1 ] ); msg->SetAge( params[ 0 ] ); plgDispatch::MsgSend( msg ); @@ -192,7 +192,7 @@ PF_CONSOLE_CMD( Game, ShowDialog, "string dlgName", "Shows the given GUI dialog" plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog ); + pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog ); msg->SetString( params[ 0 ] ); plgDispatch::MsgSend( msg ); } @@ -204,7 +204,7 @@ PF_CONSOLE_CMD( Game, HideDialog, "string dlgName", "Hides the given GUI dialog" plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog ); + pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog ); msg->SetString( params[ 0 ] ); plgDispatch::MsgSend( msg ); } @@ -218,11 +218,11 @@ PF_CONSOLE_CMD( Game, SwitchDialog, "string olddlgName, string newdlgName", "Hid plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - pfGameGUIMsg *msg = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog ); + pfGameGUIMsg *msg = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kHideDialog ); msg->SetString( params[ 0 ] ); plgDispatch::MsgSend( msg ); - pfGameGUIMsg *msg2 = TRACKED_NEW pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog ); + pfGameGUIMsg *msg2 = new pfGameGUIMsg( mgrKey, pfGameGUIMsg::kShowDialog ); msg2->SetString( params[ 1 ] ); plgDispatch::MsgSend( msg2 ); } @@ -275,116 +275,116 @@ PF_CONSOLE_CMD( Game_GUI, CreateDialog, "string name", "" ) PF_CONSOLE_CMD( Game, EnterChatMode, "", "Enters in-game chat mode" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kEnterChatMode); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kEnterChatMode); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIToggleMini, "", "Toggle between mini and big KI" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kMiniBigKIToggle); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kMiniBigKIToggle); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIPutAway, "", "Put KI completely away" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIPutAway); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIPutAway); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatPageUp, "", "Scroll chat display one page up" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaPageUp); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaPageUp); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatPageDown, "", "Scroll chat display one page down" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaPageDown); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaPageDown); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatToStart, "", "Scroll chat display to top of buffer" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaGoToBegin); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaGoToBegin); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatToEnd, "", "Scroll chat display to bottom of buffer" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kChatAreaGoToEnd); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kChatAreaGoToEnd); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KITakePicture, "", "Take picture with KI" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKITakePicture); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKITakePicture); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KICreateJournal, "", "Create journal note entry" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateJournalNote); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateJournalNote); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatToggleFaded, "", "Toggle fade of chat display" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIToggleFade); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIToggleFade); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIChatToggleFadeEnable, "", "Toggle enable of chat fade" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIToggleFadeEnable); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIToggleFadeEnable); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIUpSizeFont, "", "Up size the KI font (chatarea)" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIUpSizeFont); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIUpSizeFont); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIDownSizeFont, "", "Down size the KI font (chatarea)" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIDownSizeFont); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIDownSizeFont); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIOpenYeeshaBook, "", "Open the player's Yeesha book" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIOpenYeehsaBook); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIOpenYeehsaBook); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIOpenKI, "", "Open the KI a little at a time" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIOpenKI); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIOpenKI); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KIHelp, "", "Open the CCR help dialog" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIShowCCRHelp); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKIShowCCRHelp); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KICreateMarker, "", "Create marker in the working marker folder" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateMarker); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateMarker); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, KICreateMarkerFolder, "", "Create marker folder in current Age's journal folder" ) { - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKICreateMarkerFolder); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kKICreateMarkerFolder); plgDispatch::MsgSend( msg ); } PF_CONSOLE_CMD( Game, SetChatFadeDelay, "float delayInSecs", "Sets the time in seconds before the chat text disappears" ) { // pfKI::GetInstance()->SetChatFadeDelay( params[ 0 ] ); - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kSetChatFadeDelay); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kSetChatFadeDelay); msg->SetDelay( params[0] ); plgDispatch::MsgSend( msg ); } @@ -448,7 +448,7 @@ PF_CONSOLE_CMD( Game_Emote, Sit, "", "") PF_CONSOLE_CMD( Game, SetLocalClientAsAdmin, "bool enable", "Makes chat messages from this client appear as admin messages" ) { // pfKI::GetInstance()->SetTextChatAdminMode( (bool)params[ 0 ] ); - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kSetTextChatAdminMode); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kSetTextChatAdminMode); msg->SetFlags( params[0] ? pfKIMsg::kAdminMsg : 0 ); plgDispatch::MsgSend( msg ); } diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp index c630be8d..6dda99d0 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp @@ -106,7 +106,7 @@ pfConsoleCmdGroup *pfConsoleCmdGroup::GetBaseGroup( void ) if( fBaseCmdGroup == nil ) { /// Initialize base group - fBaseCmdGroup = TRACKED_NEW pfConsoleCmdGroup( nil, nil ); + fBaseCmdGroup = new pfConsoleCmdGroup( nil, nil ); } return fBaseCmdGroup; @@ -226,7 +226,7 @@ pfConsoleCmdGroup *pfConsoleCmdGroup::FindSubGroupRecurse( const char *name ) static char seps[] = " ._"; - string = TRACKED_NEW char[ strlen( name ) + 1 ]; + string = new char[ strlen( name ) + 1 ]; hsAssert( string != nil, "Cannot allocate string in FindSubGroupRecurse()" ); strcpy( string, name ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp index b4aed294..5225d19d 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp @@ -142,7 +142,7 @@ void pfGUIButtonMod::StartDragging( void ) fOrigHandler = fDraggable->GetHandler(); fDraggable->SetVisible( true ); - fDraggable->SetHandler( TRACKED_NEW pfGUIButtonDragProc( this, fDraggable, fOrigHandler, fOrigReportedDrag ) ); + fDraggable->SetHandler( new pfGUIButtonDragProc( this, fDraggable, fOrigHandler, fOrigReportedDrag ) ); fDraggable->HandleMouseDown( fOrigMouseDownPt, 0 ); } @@ -213,7 +213,7 @@ void pfGUIButtonMod::Read( hsStream *s, hsResMgr *mgr ) fMouseOverAnimName = s->ReadSafeString(); fNotifyType = s->ReadLE32(); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDraggable ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDraggable ), plRefFlags::kActiveRef ); } void pfGUIButtonMod::Write( hsStream *s, hsResMgr *mgr ) @@ -254,7 +254,7 @@ void pfGUIButtonMod::HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ) fClicking = true; if( fAnimationKeys.GetCount() > 0 ) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kContinue ); msg->SetCmd( plAnimCmdMsg::kSetForewards ); msg->SetCmd( plAnimCmdMsg::kGoToBegin ); @@ -284,7 +284,7 @@ void pfGUIButtonMod::HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ) fClicking = false; if( fAnimationKeys.GetCount() > 0 ) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kContinue ); msg->SetCmd( plAnimCmdMsg::kSetBackwards ); msg->SetCmd( plAnimCmdMsg::kGoToEnd ); @@ -351,7 +351,7 @@ void pfGUIButtonMod::SetInteresting( hsBool i ) if( fMouseOverAnimKeys.GetCount() ) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kContinue ); msg->SetCmd( fInteresting ? plAnimCmdMsg::kSetForewards : plAnimCmdMsg::kSetBackwards ); msg->SetAnimName( fMouseOverAnimName ); @@ -372,7 +372,7 @@ void pfGUIButtonMod::SetAnimationKeys( hsTArray &keys, const char *nam delete [] fAnimName; if( name != nil ) { - fAnimName = TRACKED_NEW char[ strlen( name ) + 1 ]; + fAnimName = new char[ strlen( name ) + 1 ]; strcpy( fAnimName, name ); } else @@ -385,7 +385,7 @@ void pfGUIButtonMod::SetMouseOverAnimKeys( hsTArray &keys, const char delete [] fMouseOverAnimName; if( name != nil ) { - fMouseOverAnimName = TRACKED_NEW char[ strlen( name ) + 1 ]; + fMouseOverAnimName = new char[ strlen( name ) + 1 ]; strcpy( fMouseOverAnimName, name ); } else diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp index de6524de..ac43b99b 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp @@ -162,7 +162,7 @@ void pfGUICheckBoxCtrl::SetChecked( hsBool checked, hsBool immediate /*= fals fChecked = checked; if( fAnimationKeys.GetCount() > 0 ) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); if( fChecked ) { // Moving to true @@ -203,7 +203,7 @@ void pfGUICheckBoxCtrl::SetAnimationKeys( hsTArray &keys, const char * delete [] fAnimName; if( name != nil ) { - fAnimName = TRACKED_NEW char[ strlen( name ) + 1 ]; + fAnimName = new char[ strlen( name ) + 1 ]; strcpy( fAnimName, name ); } else diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.cpp index c5eb5ea8..41fd0600 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.cpp @@ -77,15 +77,15 @@ pfGUICtrlProcWriteableObject *pfGUICtrlProcWriteableObject::Read( hsStream *s ) switch( type ) { case kConsoleCmd: - obj = TRACKED_NEW pfGUIConsoleCmdProc; + obj = new pfGUIConsoleCmdProc; break; case kPythonScript: - obj = TRACKED_NEW pfGUIPythonScriptProc; + obj = new pfGUIPythonScriptProc; break; case kCloseDlg: - obj = TRACKED_NEW pfGUICloseDlgProc; + obj = new pfGUICloseDlgProc; break; case kNull: @@ -128,7 +128,7 @@ void pfGUIConsoleCmdProc::IRead( hsStream *s ) int i = s->ReadLE32(); if( i > 0 ) { - fCommand = TRACKED_NEW char[ i + 1 ]; + fCommand = new char[ i + 1 ]; memset( fCommand, 0, i + 1 ); s->Read( i, fCommand ); } @@ -151,7 +151,7 @@ void pfGUIConsoleCmdProc::DoSomething( pfGUIControlMod *ctrl ) { if( fCommand != nil ) { - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kExecuteLine, fCommand ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kExecuteLine, fCommand ); plgDispatch::MsgSend( cMsg ); } } @@ -164,7 +164,7 @@ void pfGUIConsoleCmdProc::SetCommand( const char *cmd ) fCommand = nil; else { - fCommand = TRACKED_NEW char[ strlen( cmd ) + 1 ]; + fCommand = new char[ strlen( cmd ) + 1 ]; memset( fCommand, 0, strlen( cmd ) + 1 ); strcpy( fCommand, cmd ); } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp index 4a529bf5..c5a64d50 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp @@ -246,7 +246,7 @@ static hsBool CreateConvexHull( hsPoint3 *inPoints, int &numPoints ) // Step 2: Sort all the in points by the angle to the X axis (vector <1,0>). // Step A: Calculate all the angles - angles = TRACKED_NEW float[ numPoints ]; + angles = new float[ numPoints ]; hsPoint3 xAxisPoint( avgPoint.fX + 1, avgPoint.fY, avgPoint.fZ ); for( i = 0; i < numPoints; i++ ) angles[ i ] = GetVectorAngle( avgPoint, inPoints[ i ], xAxisPoint ); @@ -737,8 +737,8 @@ void pfGUIControlMod::SetColorScheme( pfGUIColorScheme *newScheme ) void pfGUIControlMod::SetDynTextMap( plLayerInterface *layer, plDynamicTextMap *dynText ) { - hsgResMgr::ResMgr()->AddViaNotify( layer->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefDynTextLayer ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( dynText->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefDynTextMap ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( layer->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefDynTextLayer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( dynText->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, pfGUIControlMod::kRefDynTextMap ), plRefFlags::kActiveRef ); } //// SetEnabled ////////////////////////////////////////////////////////////// @@ -788,7 +788,7 @@ void pfGUIControlMod::SetVisible( hsBool vis ) fVisible = vis; if (fTarget) { - plEnableMsg *msg = TRACKED_NEW plEnableMsg(); + plEnableMsg *msg = new plEnableMsg(); msg->SetCmd( fVisible ? plEnableMsg::kEnable : plEnableMsg::kDisable ); msg->SetCmd( plEnableMsg::kDrawable ); msg->AddReceiver( fTarget->GetKey() ); @@ -818,8 +818,8 @@ void pfGUIControlMod::Read( hsStream *s, hsResMgr *mgr ) // Read in the dynTextMap if there is one if( s->ReadBool() ) { - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDynTextLayer ), plRefFlags::kActiveRef ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDynTextMap ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDynTextLayer ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDynTextMap ), plRefFlags::kActiveRef ); } else { @@ -830,7 +830,7 @@ void pfGUIControlMod::Read( hsStream *s, hsResMgr *mgr ) if( s->ReadBool() ) { SetColorScheme( nil ); - fColorScheme = TRACKED_NEW pfGUIColorScheme(); + fColorScheme = new pfGUIColorScheme(); fColorScheme->Read( s ); } @@ -846,9 +846,9 @@ void pfGUIControlMod::Read( hsStream *s, hsResMgr *mgr ) } if( HasFlag( kHasProxy ) ) - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefProxy ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefProxy ), plRefFlags::kActiveRef ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); } void pfGUIControlMod::Write( hsStream *s, hsResMgr *mgr ) @@ -984,7 +984,7 @@ void pfGUIControlMod::IPlaySound( uint8_t guiCtrlEvent, hsBool loop /* = fals if( GetTarget() == nil || GetTarget()->GetAudioInterface() == nil ) return; - plSoundMsg *msg = TRACKED_NEW plSoundMsg; + plSoundMsg *msg = new plSoundMsg; msg->fIndex = fSoundIndices[ guiCtrlEvent ] - 1; msg->SetCmd( plSoundMsg::kGoToTime ); msg->fTime = 0.f; @@ -1005,7 +1005,7 @@ void pfGUIControlMod::IStopSound(uint8_t guiCtrlEvent) if (GetTarget() == nil || GetTarget()->GetAudioInterface() == nil ) return; - plSoundMsg *msg = TRACKED_NEW plSoundMsg; + plSoundMsg *msg = new plSoundMsg; msg->fIndex = fSoundIndices[guiCtrlEvent] - 1; msg->SetCmd(plSoundMsg::kStop); msg->Send(GetTarget()->GetAudioInterface()->GetKey()); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp index 91453f2c..dcec2d73 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp @@ -158,7 +158,7 @@ hsGMaterial *pfGUICtrlGenerator::ICreateSolidMaterial( hsColorRGBA &color ) // Create a material with a simple blank layer, fully ambient - hsGMaterial *material = TRACKED_NEW hsGMaterial; + hsGMaterial *material = new hsGMaterial; IAddKey( material, "GUIMaterial" ); plLayer *lay = material->MakeBaseLayer(); @@ -187,11 +187,11 @@ hsGMaterial *pfGUICtrlGenerator::ICreateTextMaterial( const char *text, hsColorR pixHeight = (uint16_t)(objHeight * 64.f); // Create blank mipmap - plMipmap *bitmap = TRACKED_NEW plMipmap( 1, 1, plMipmap::kRGB32Config, 1 ); + plMipmap *bitmap = new plMipmap( 1, 1, plMipmap::kRGB32Config, 1 ); IAddKey( bitmap, "GUIMipmap" ); // Create textGen to write string with - plTextGenerator *textGen = TRACKED_NEW plTextGenerator( bitmap, pixWidth, pixHeight ); + plTextGenerator *textGen = new plTextGenerator( bitmap, pixWidth, pixHeight ); textGen->SetFont( fFontFace, (uint16_t)fFontSize ); textGen->ClearToColor( bgColor ); textGen->SetTextColor( textColor ); @@ -201,7 +201,7 @@ hsGMaterial *pfGUICtrlGenerator::ICreateTextMaterial( const char *text, hsColorR fTextGens.Append( textGen ); // Create a material with a simple blank layer, fully ambient - hsGMaterial *material = TRACKED_NEW hsGMaterial; + hsGMaterial *material = new hsGMaterial; IAddKey( material, "GUIMaterial" ); plLayer *lay = material->MakeBaseLayer(); @@ -212,7 +212,7 @@ hsGMaterial *pfGUICtrlGenerator::ICreateTextMaterial( const char *text, hsColorR lay->SetPreshadeColor( black ); lay->SetAmbientColor( white ); - hsgResMgr::ResMgr()->AddViaNotify( bitmap->GetKey(), TRACKED_NEW plLayRefMsg( lay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( bitmap->GetKey(), new plLayRefMsg( lay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); // lay->SetTexture( bitmap ); lay->SetTransform( textGen->GetLayerTransform() ); @@ -235,20 +235,20 @@ plSceneObject *pfGUICtrlGenerator::IGenSceneObject( pfGUIDialogMod *dlg, plDra if( snKey == nil ) snKey = fDynDlgNodes.Peek()->GetKey(); - hsgResMgr::ResMgr()->SendRef( myDraw->GetKey(), TRACKED_NEW plNodeRefMsg( snKey, plRefMsg::kOnCreate, 0, plNodeRefMsg::kDrawable ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( myDraw->GetKey(), new plNodeRefMsg( snKey, plRefMsg::kOnCreate, 0, plNodeRefMsg::kDrawable ), plRefFlags::kActiveRef ); - plDrawInterface *newDI = TRACKED_NEW plDrawInterface; + plDrawInterface *newDI = new plDrawInterface; IAddKey( newDI, "GUIDrawIFace" ); - plSceneObject *newObj = TRACKED_NEW plSceneObject; + plSceneObject *newObj = new plSceneObject; IAddKey( newObj, "GUISceneObject" ); - plCoordinateInterface *newCI = TRACKED_NEW plCoordinateInterface; + plCoordinateInterface *newCI = new plCoordinateInterface; IAddKey( newCI, "GUICoordIFace" ); - hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->SendRef( newDI->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->SendRef( myDraw->GetKey(), TRACKED_NEW plIntRefMsg( newDI->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kDrawable ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( newDI->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( myDraw->GetKey(), new plIntRefMsg( newDI->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kDrawable ), plRefFlags::kActiveRef ); if( parent == nil ) { @@ -258,8 +258,8 @@ plSceneObject *pfGUICtrlGenerator::IGenSceneObject( pfGUIDialogMod *dlg, plDra } if( parent != nil ) -// hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), TRACKED_NEW plIntRefMsg( parent->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kChild ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), TRACKED_NEW plAttachMsg( parent->GetKey(), nil, plRefMsg::kOnRequest ), plRefFlags::kActiveRef ); +// hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), new plIntRefMsg( parent->GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kChild ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), new plAttachMsg( parent->GetKey(), nil, plRefMsg::kOnRequest ), plRefFlags::kActiveRef ); newObj->SetSceneNode( snKey ); @@ -289,7 +289,7 @@ pfGUIButtonMod *pfGUICtrlGenerator::GenerateRectButton( const char *title, floa pfGUIButtonMod *but = CreateRectButton( dlgToAddTo, title, x, y, width, height, material ); if( but != nil ) - but->SetHandler( TRACKED_NEW pfGUIConsoleCmdProc( consoleCmd ) ); + but->SetHandler( new pfGUIConsoleCmdProc( consoleCmd ) ); return but; } @@ -329,11 +329,11 @@ pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, c plSceneObject *newObj = IGenSceneObject( parent, myDraw ); - pfGUIButtonMod *newBtn = asMenuItem ? TRACKED_NEW pfGUIMenuItem : TRACKED_NEW pfGUIButtonMod; + pfGUIButtonMod *newBtn = asMenuItem ? new pfGUIMenuItem : new pfGUIButtonMod; IAddKey( newBtn, "GUIButton" ); - hsgResMgr::ResMgr()->SendRef( newBtn->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( newBtn->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); parent->AddControl( newBtn ); - hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), TRACKED_NEW plGenRefMsg( parent->GetKey(), plRefMsg::kOnCreate, parent->GetNumControls() - 1, pfGUIDialogMod::kControlRef ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), new plGenRefMsg( parent->GetKey(), plRefMsg::kOnCreate, parent->GetNumControls() - 1, pfGUIDialogMod::kControlRef ), plRefFlags::kActiveRef ); return newBtn; } @@ -373,10 +373,10 @@ pfGUIButtonMod *pfGUICtrlGenerator::GenerateSphereButton( float x, float y, flo plSceneObject *newObj = IGenSceneObject( dlgToAddTo, myDraw );//, nil, &l2w, &w2l ); - pfGUIButtonMod *newBtn = TRACKED_NEW pfGUIButtonMod; + pfGUIButtonMod *newBtn = new pfGUIButtonMod; IAddKey( newBtn, "GUIButton" ); - newBtn->SetHandler( TRACKED_NEW pfGUIConsoleCmdProc( consoleCmd ) ); - hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + newBtn->SetHandler( new pfGUIConsoleCmdProc( consoleCmd ) ); + hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); dlgToAddTo->AddControl( newBtn ); return newBtn; @@ -420,9 +420,9 @@ pfGUIDragBarCtrl *pfGUICtrlGenerator::GenerateDragBar( float x, float y, float w fDynDragBars[ fDynDragBars.GetCount() - 1 ] = newObj; - pfGUIDragBarCtrl *newBtn = TRACKED_NEW pfGUIDragBarCtrl; + pfGUIDragBarCtrl *newBtn = new pfGUIDragBarCtrl; IAddKey( newBtn, "GUIDragBar" ); - hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( newBtn->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); dlgToAddTo->AddControl( newBtn ); /* vec.Set( -x, y, 100 ); @@ -456,7 +456,7 @@ pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float sc // Create the rendermod - plPostEffectMod *renderMod = TRACKED_NEW plPostEffectMod; + plPostEffectMod *renderMod = new plPostEffectMod; IAddKey( renderMod, "GUIRenderMod" ); renderMod->SetHither( 0.5f ); @@ -470,27 +470,27 @@ pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float sc renderMod->SetFovY( fovY * 180.f / M_PI ); // Create the sceneNode to go with it - node = TRACKED_NEW plSceneNode; + node = new plSceneNode; IAddKey( node, "GUISceneNode" ); node->GetKey()->RefObject(); fDynDlgNodes.Append( node ); fDynDragBars.Append( nil ); - hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), TRACKED_NEW plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( node->GetKey(), new plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); // Create the dialog - dialog = TRACKED_NEW pfGUIDialogMod; + dialog = new pfGUIDialogMod; IAddKey( dialog, "GUIDialog" ); dialog->SetRenderMod( renderMod ); dialog->SetName( name ); // Create the dummy scene object to hold the dialog - plSceneObject *newObj = TRACKED_NEW plSceneObject; + plSceneObject *newObj = new plSceneObject; IAddKey( newObj, "GUISceneObject" ); // *#&$(*@&#$ need a coordIface... - plCoordinateInterface *newCI = TRACKED_NEW plCoordinateInterface; + plCoordinateInterface *newCI = new plCoordinateInterface; IAddKey( newCI, "GUICoordIFace" ); hsMatrix44 l2w, w2l; @@ -501,13 +501,13 @@ pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float sc // Using SendRef here because AddViaNotify will queue the messages up, which doesn't do us any good // if we need these refs right away - hsgResMgr::ResMgr()->SendRef( dialog->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( dialog->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( newCI->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( newCI->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( renderMod->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); // Add the dialog to the GUI mgr - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg( pfGameGUIMgr::GetInstance()->GetKey(), + plGenRefMsg *refMsg = new plGenRefMsg( pfGameGUIMgr::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, pfGameGUIMgr::kDlgModRef ); hsgResMgr::ResMgr()->AddViaNotify( dialog->GetKey(), refMsg, plRefFlags::kActiveRef ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp index 64b83d12..0171f9a1 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp @@ -88,7 +88,7 @@ pfGUIDialogMod::pfGUIDialogMod() : fRenderMod( nil ), fNext( nil ), fPrevPtr( ni fDragTarget = nil; fProcReceiver = nil; - fColorScheme = TRACKED_NEW pfGUIColorScheme(); + fColorScheme = new pfGUIColorScheme(); } pfGUIDialogMod::~pfGUIDialogMod() @@ -102,7 +102,7 @@ pfGUIDialogMod::~pfGUIDialogMod() plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg( mgrKey, plRefMsg::kOnRemove, 0, pfGameGUIMgr::kDlgModRef ); + plGenRefMsg *refMsg = new plGenRefMsg( mgrKey, plRefMsg::kOnRemove, 0, pfGameGUIMgr::kDlgModRef ); refMsg->SetRef( this ); plgDispatch::MsgSend( refMsg ); } @@ -163,14 +163,14 @@ hsBool pfGUIDialogMod::MsgReceive( plMessage *msg ) if( fEnabled ) { - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); + plAnimCmdMsg *animMsg = new plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); animMsg->SetCmd( plAnimCmdMsg::kContinue ); plgDispatch::MsgSend( animMsg ); } } else if( ref->GetContext() & ( plRefMsg::kOnRemove | plRefMsg::kOnDestroy ) ) { - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); + plAnimCmdMsg *animMsg = new plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); animMsg->SetCmd( plAnimCmdMsg::kStop ); plgDispatch::MsgSend( animMsg ); @@ -235,7 +235,7 @@ void pfGUIDialogMod::AddControl( pfGUIControlMod *ctrl ) void pfGUIDialogMod::AddControlOnExport( pfGUIControlMod *ctrl ) { fControls.Append( ctrl ); - hsgResMgr::ResMgr()->AddViaNotify( ctrl->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fControls.GetCount() - 1, pfGUIDialogMod::kControlRef ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( ctrl->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fControls.GetCount() - 1, pfGUIDialogMod::kControlRef ), plRefFlags::kActiveRef ); } //// SetEnabled ////////////////////////////////////////////////////////////// @@ -271,7 +271,7 @@ void pfGUIDialogMod::SetEnabled( hsBool e ) if( fRenderMod != nil ) { - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); + plAnimCmdMsg *animMsg = new plAnimCmdMsg( GetKey(), fRenderMod->GetKey(), nil ); if( fEnabled ) { animMsg->SetCmd( plAnimCmdMsg::kContinue ); @@ -292,21 +292,21 @@ void pfGUIDialogMod::Read( hsStream *s, hsResMgr *mgr ) { plSingleModifier::Read(s, mgr); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRenderModRef ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRenderModRef ), plRefFlags::kActiveRef ); s->Read( sizeof( fName ), fName ); uint32_t i, count = s->ReadLE32(); fControls.SetCountAndZero( count ); for( i = 0; i < count; i++ ) - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kControlRef ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kControlRef ), plRefFlags::kActiveRef ); // Register us with the Game GUI manager plUoid lu( kGameGUIMgr_KEY ); plKey mgrKey = hsgResMgr::ResMgr()->FindKey( lu ); if( mgrKey ) { - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg( mgrKey, plRefMsg::kOnCreate, 0, pfGameGUIMgr::kDlgModRef ); + plGenRefMsg *refMsg = new plGenRefMsg( mgrKey, plRefMsg::kOnCreate, 0, pfGameGUIMgr::kDlgModRef ); hsgResMgr::ResMgr()->AddViaNotify( GetKey(), refMsg, plRefFlags::kPassiveRef ); } @@ -314,7 +314,7 @@ void pfGUIDialogMod::Read( hsStream *s, hsResMgr *mgr ) fProcReceiver = mgr->ReadKey( s ); if( fProcReceiver != nil ) - SetHandler( TRACKED_NEW pfGUIDialogNotifyProc( fProcReceiver ) ); + SetHandler( new pfGUIDialogNotifyProc( fProcReceiver ) ); s->ReadLE( &fVersion ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp index 34d180f8..5c923bbe 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp @@ -75,7 +75,7 @@ pfGUIDialogNotifyProc::pfGUIDialogNotifyProc( plKey &r ) void pfGUIDialogNotifyProc::ISendNotify( plKey ctrlKey, uint32_t event ) { - pfGUINotifyMsg *notify = TRACKED_NEW pfGUINotifyMsg( fDialog->GetKey(), fReceiver, nil ); + pfGUINotifyMsg *notify = new pfGUINotifyMsg( fDialog->GetKey(), fReceiver, nil ); notify->SetEvent( ctrlKey, event ); plgDispatch::MsgSend( notify ); } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp index 08ea21bc..ca12ac62 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp @@ -124,17 +124,17 @@ void pfGUIDynDisplayCtrl::Read( hsStream *s, hsResMgr *mgr ) count = s->ReadLE32(); fTextMaps.SetCountAndZero( count ); for( i = 0; i < count; i++ ) - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefTextMap ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefTextMap ), plRefFlags::kActiveRef ); count = s->ReadLE32(); fLayers.SetCountAndZero( count ); for( i = 0; i < count; i++ ) - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefLayer ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefLayer ), plRefFlags::kActiveRef ); count = s->ReadLE32(); fMaterials.SetCountAndZero( count ); for( i = 0; i < count; i++ ) - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefMaterial ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefMaterial ), plRefFlags::kActiveRef ); } void pfGUIDynDisplayCtrl::Write( hsStream *s, hsResMgr *mgr ) @@ -163,7 +163,7 @@ void pfGUIDynDisplayCtrl::Write( hsStream *s, hsResMgr *mgr ) void pfGUIDynDisplayCtrl::AddMap( plDynamicTextMap *map ) { fTextMaps.Append( map ); - hsgResMgr::ResMgr()->AddViaNotify( map->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fTextMaps.GetCount() - 1, kRefTextMap ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( map->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fTextMaps.GetCount() - 1, kRefTextMap ), plRefFlags::kActiveRef ); } //// AddLayer //////////////////////////////////////////////////////////////// @@ -172,7 +172,7 @@ void pfGUIDynDisplayCtrl::AddMap( plDynamicTextMap *map ) void pfGUIDynDisplayCtrl::AddLayer( plLayerInterface *layer ) { fLayers.Append( layer ); - hsgResMgr::ResMgr()->AddViaNotify( layer->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fLayers.GetCount() - 1, kRefLayer ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( layer->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fLayers.GetCount() - 1, kRefLayer ), plRefFlags::kActiveRef ); } //// AddMaterial ///////////////////////////////////////////////////////////// @@ -181,5 +181,5 @@ void pfGUIDynDisplayCtrl::AddLayer( plLayerInterface *layer ) void pfGUIDynDisplayCtrl::AddMaterial( hsGMaterial *material ) { fMaterials.Append( material ); - hsgResMgr::ResMgr()->AddViaNotify( material->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fMaterials.GetCount() - 1, kRefMaterial ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( material->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, fMaterials.GetCount() - 1, kRefMaterial ), plRefFlags::kActiveRef ); } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp index 382e11e5..7b6e8880 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp @@ -477,7 +477,7 @@ void pfGUIEditBoxMod::SetBufferSize( uint32_t size ) fBufferSize = size; if( size > 0 ) { - fBuffer = TRACKED_NEW wchar_t[ size + 1 ]; + fBuffer = new wchar_t[ size + 1 ]; memset( fBuffer, 0, (size + 1) * sizeof(wchar_t) ); } else diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp index d26dbe30..45a2ca64 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp @@ -268,7 +268,7 @@ void pfGUIKnobCtrl::SetAnimationKeys( hsTArray &keys, const char *name delete [] fAnimName; if( name != nil ) { - fAnimName = TRACKED_NEW char[ strlen( name ) + 1 ]; + fAnimName = new char[ strlen( name ) + 1 ]; strcpy( fAnimName, name ); } else @@ -353,7 +353,7 @@ void pfGUIKnobCtrl::SetCurrValue( float v ) else newTime = ( ( fValue - fMin ) / ( fMax - fMin ) ) * tLength + fAnimBegin; } - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kGoToTime ); msg->SetAnimName( fAnimName ); msg->fTime = newTime; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp index 1e2f23a5..6cb1c5e2 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp @@ -516,9 +516,9 @@ void pfGUIListBoxMod::Read( hsStream *s, hsResMgr *mgr ) fScrollControl = nil; if( s->ReadBool() ) { - fScrollProc = TRACKED_NEW pfScrollProc( this ); + fScrollProc = new pfScrollProc( this ); fScrollProc->IncRef(); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefScrollCtrl ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefScrollCtrl ), plRefFlags::kActiveRef ); } if( HasFlag( kDisableSelection ) ) @@ -1154,12 +1154,12 @@ void pfGUIListBoxMod::ClearAllElements( void ) uint16_t pfGUIListBoxMod::AddString( const char *string ) { - return AddElement( TRACKED_NEW pfGUIListText( string ) ); + return AddElement( new pfGUIListText( string ) ); } uint16_t pfGUIListBoxMod::AddString( const wchar_t *string ) { - return AddElement( TRACKED_NEW pfGUIListText( string ) ); + return AddElement( new pfGUIListText( string ) ); } int16_t pfGUIListBoxMod::FindString( const char *toCompareTo ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp index 1dd0c0a4..713c4c23 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp @@ -91,7 +91,7 @@ pfGUIListText::pfGUIListText( const char *text ) : pfGUIListElement( kText ) pfGUIListText::pfGUIListText( const wchar_t *text ) : pfGUIListElement( kText ) { - fText = TRACKED_NEW wchar_t[ wcslen( text ) + 1 ]; + fText = new wchar_t[ wcslen( text ) + 1 ]; wcscpy( fText, text ); fJustify = kLeftJustify; } @@ -173,7 +173,7 @@ void pfGUIListText::SetText( const wchar_t *text ) delete [] fText; if( text != nil ) { - fText = TRACKED_NEW wchar_t[ wcslen( text ) + 1 ]; + fText = new wchar_t[ wcslen( text ) + 1 ]; wcscpy( fText, text ); } else @@ -309,7 +309,7 @@ pfGUIListTreeRoot::pfGUIListTreeRoot( const char *text ) : pfGUIListElement( kTr pfGUIListTreeRoot::pfGUIListTreeRoot( const wchar_t *text ) : pfGUIListElement( kTreeRoot ) { - fText = TRACKED_NEW wchar_t[ wcslen( text ) + 1 ]; + fText = new wchar_t[ wcslen( text ) + 1 ]; wcscpy( fText, text ); } @@ -432,7 +432,7 @@ void pfGUIListTreeRoot::SetTitle( const wchar_t *text ) delete [] fText; if( text != nil ) { - fText = TRACKED_NEW wchar_t[ wcslen( text ) + 1 ]; + fText = new wchar_t[ wcslen( text ) + 1 ]; wcscpy( fText, text ); } else diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp index 05b2df39..f0f62a84 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp @@ -89,7 +89,7 @@ void pfGUIMenuItem::SetName( const wchar_t *name ) delete [] fName; if (name != nil) { - fName = TRACKED_NEW wchar_t[wcslen(name)+1]; + fName = new wchar_t[wcslen(name)+1]; wcscpy(fName,name); } else @@ -107,7 +107,7 @@ void pfGUIMenuItem::SetSkin( pfGUISkin *skin, HowToSkin s ) GetKey()->Release( fSkin->GetKey() ); if( skin != nil ) - hsgResMgr::ResMgr()->SendRef( skin->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( skin->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); fHowToSkin = s; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp index ffb69c42..ff584844 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp @@ -649,9 +649,9 @@ void pfGUIMultiLineEditCtrl::Read( hsStream *s, hsResMgr *mgr ) fScrollControl = nil; if( s->ReadBool() ) { - fScrollProc = TRACKED_NEW pfMLScrollProc( this ); + fScrollProc = new pfMLScrollProc( this ); fScrollProc->IncRef(); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefScrollCtrl ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefScrollCtrl ), plRefFlags::kActiveRef ); } } @@ -1460,7 +1460,7 @@ wchar_t *pfGUIMultiLineEditCtrl::ICopyRange( int32_t start, int32_t end ) const } // Our string... - string = TRACKED_NEW wchar_t[ stringSize + 1 ]; + string = new wchar_t[ stringSize + 1 ]; // Now actually copy the characters for( stringSize = 0, pos = start; pos < end; pos = pos + IOffsetToNextChar( fBuffer[ pos ] ) ) @@ -1508,7 +1508,7 @@ void pfGUIMultiLineEditCtrl::SetBuffer( const wchar_t *asciiText ) void pfGUIMultiLineEditCtrl::SetBuffer( const uint8_t *codedText, uint32_t length ) { // convert to uint16_t and set - uint16_t *convertedText = TRACKED_NEW uint16_t[ length ]; + uint16_t *convertedText = new uint16_t[ length ]; for( int32_t curChar = 0; curChar < length; curChar++ ) convertedText[ curChar ] = (uint16_t)codedText[ curChar ]; SetBuffer(convertedText,length); @@ -1584,7 +1584,7 @@ uint8_t *pfGUIMultiLineEditCtrl::GetCodedBuffer( uint32_t &length ) const length = fBuffer.GetCount() - 1; // convert to uint8_t and return - uint8_t *buffer = TRACKED_NEW uint8_t[ length ]; + uint8_t *buffer = new uint8_t[ length ]; for (int32_t curChar = 0; curChar < length; curChar++) { @@ -1609,7 +1609,7 @@ uint16_t *pfGUIMultiLineEditCtrl::GetCodedBufferW( uint32_t &length ) const { length = fBuffer.GetCount() - 1; - uint16_t *buffer = TRACKED_NEW uint16_t[ length ]; + uint16_t *buffer = new uint16_t[ length ]; // AcquireArray() isn't const... memcpy( buffer, &fBuffer[ 0 ], length * sizeof(uint16_t) ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp index 2eec5016..4b79397d 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp @@ -236,7 +236,7 @@ void pfGUIPopUpMenu::Read( hsStream *s, hsResMgr *mgr ) pfGUIDialogMod::Read( s, mgr ); // In case we need it... - fKeyGen = TRACKED_NEW pfPopUpKeyGenerator( GetName(), GetKey()->GetUoid().GetLocation() ); + fKeyGen = new pfPopUpKeyGenerator( GetName(), GetKey()->GetUoid().GetLocation() ); fOriginX = fOriginY = -1.f; @@ -254,12 +254,12 @@ void pfGUIPopUpMenu::Read( hsStream *s, hsResMgr *mgr ) fMenuItems[ i ].fHandler = pfGUICtrlProcWriteableObject::Read( s ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefSubMenu ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefSubMenu ), plRefFlags::kActiveRef ); } - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginAnchor ), plRefFlags::kPassiveRef ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginContext ), plRefFlags::kPassiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginAnchor ), plRefFlags::kPassiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginContext ), plRefFlags::kPassiveRef ); fAlignment = (Alignment)s->ReadByte(); @@ -306,8 +306,8 @@ void pfGUIPopUpMenu::SetOriginAnchor( plSceneObject *anchor, pfGUIDialogMod * { fOriginAnchor = anchor; fOriginContext = context; - hsgResMgr::ResMgr()->AddViaNotify( fOriginAnchor->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginAnchor ), plRefFlags::kPassiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( fOriginContext->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginContext ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( fOriginAnchor->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginAnchor ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( fOriginContext->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefOriginContext ), plRefFlags::kPassiveRef ); } //// SetEnabled ////////////////////////////////////////////////////////////// @@ -438,7 +438,7 @@ hsBool pfGUIPopUpMenu::IBuildMenu( void ) if( fWaitingForSkin && fSkin == nil ) return false; // Still waiting to get our skin before building - pfGUIColorScheme *scheme = TRACKED_NEW pfGUIColorScheme(); + pfGUIColorScheme *scheme = new pfGUIColorScheme(); scheme->fForeColor.Set( 0, 0, 0, 1 ); scheme->fBackColor.Set( 1, 1, 1, 1 ); @@ -473,7 +473,7 @@ hsBool pfGUIPopUpMenu::IBuildMenu( void ) // The PROBLEM is that we can't do that unless we have a friggin surface on // which to calculate the text extents! So sadly, we're going to have to create // a whole new DTMap and use it to calculate some stuff - plDynamicTextMap *scratch = TRACKED_NEW plDynamicTextMap( 8, 8, false ); + plDynamicTextMap *scratch = new plDynamicTextMap( 8, 8, false ); scratch->SetFont( scheme->fFontFace, scheme->fFontSize, scheme->fFontFlags, true ); for( i = 0; i < fMenuItems.GetCount(); i++ ) { @@ -561,7 +561,7 @@ hsBool pfGUIPopUpMenu::IBuildMenu( void ) { button->SetColorScheme( scheme ); button->SetName( fMenuItems[ i ].fName.c_str() ); - button->SetHandler( TRACKED_NEW pfGUIMenuItemProc( this, i ) ); + button->SetHandler( new pfGUIMenuItemProc( this, i ) ); // make the tag ID the position in the menu list button->SetTagID(i); button->SetDynTextMap( mat->GetLayer( 0 ), plDynamicTextMap::ConvertNoRef( mat->GetLayer( 0 )->GetTexture() ) ); @@ -704,11 +704,11 @@ hsGMaterial *pfGUIPopUpMenu::ICreateDynMaterial( void ) // Create the new dynTextMap - plDynamicTextMap *textMap = TRACKED_NEW plDynamicTextMap(); + plDynamicTextMap *textMap = new plDynamicTextMap(); fKeyGen->CreateKey( textMap ); // Create the material - hsGMaterial *material = TRACKED_NEW hsGMaterial; + hsGMaterial *material = new hsGMaterial; fKeyGen->CreateKey( material ); // Create the layer and attach @@ -722,7 +722,7 @@ hsGMaterial *pfGUIPopUpMenu::ICreateDynMaterial( void ) lay->SetClampFlags( hsGMatState::kClampTexture ); // Do sendRef here, since we're going to need it set pretty darned quick - hsgResMgr::ResMgr()->SendRef( textMap->GetKey(), TRACKED_NEW plLayRefMsg( lay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( textMap->GetKey(), new plLayRefMsg( lay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture ), plRefFlags::kActiveRef ); return material; @@ -739,8 +739,8 @@ pfGUIPopUpMenu *pfGUIPopUpMenu::Build( const char *name, pfGUIDialogMod *parent // Create the menu and give it a key gen - pfGUIPopUpMenu *menu = TRACKED_NEW pfGUIPopUpMenu(); - menu->fKeyGen = TRACKED_NEW pfPopUpKeyGenerator( name, destLoc ); + pfGUIPopUpMenu *menu = new pfGUIPopUpMenu(); + menu->fKeyGen = new pfPopUpKeyGenerator( name, destLoc ); menu->fKeyGen->CreateKey( menu ); menu->fOriginX = x; @@ -750,7 +750,7 @@ pfGUIPopUpMenu *pfGUIPopUpMenu::Build( const char *name, pfGUIDialogMod *parent if( parent != nil && ( (pfGUIPopUpMenu *)parent )->fSkin != nil ) { menu->fWaitingForSkin = true; - hsgResMgr::ResMgr()->SendRef( ( (pfGUIPopUpMenu *)parent )->fSkin->GetKey(), TRACKED_NEW plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, -1, pfGUIPopUpMenu::kRefSkin ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( ( (pfGUIPopUpMenu *)parent )->fSkin->GetKey(), new plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, -1, pfGUIPopUpMenu::kRefSkin ), plRefFlags::kActiveRef ); } // HACK for now: create us a temp skin to use @@ -761,12 +761,12 @@ pfGUIPopUpMenu *pfGUIPopUpMenu::Build( const char *name, pfGUIDialogMod *parent loc.Set( 0x1425 ); plKey skinKey = hsgResMgr::ResMgr()->FindKey( plUoid( loc, pfGUISkin::Index(), "GUISkin01_GUISkin" ) ); menu->fWaitingForSkin = true; - hsgResMgr::ResMgr()->AddViaNotify( skinKey, TRACKED_NEW plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, -1, pfGUIPopUpMenu::kRefSkin ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( skinKey, new plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, -1, pfGUIPopUpMenu::kRefSkin ), plRefFlags::kActiveRef ); } */ // Create the rendermod - plPostEffectMod *renderMod = TRACKED_NEW plPostEffectMod; + plPostEffectMod *renderMod = new plPostEffectMod; menu->fKeyGen->CreateKey( renderMod ); renderMod->SetHither( 0.5f ); @@ -782,22 +782,22 @@ pfGUIPopUpMenu *pfGUIPopUpMenu::Build( const char *name, pfGUIDialogMod *parent renderMod->SetFovY( fovY * 180.f / M_PI ); // Create the sceneNode to go with it - menu->fParentNode= TRACKED_NEW plSceneNode; + menu->fParentNode= new plSceneNode; menu->fKeyGen->CreateKey( menu->fParentNode ); // menu->fParentNode->GetKey()->RefObject(); - hsgResMgr::ResMgr()->SendRef( menu->fParentNode->GetKey(), TRACKED_NEW plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, 0, kRefParentNode ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( menu->fParentNode->GetKey(), new plGenRefMsg( menu->GetKey(), plRefMsg::kOnCreate, 0, kRefParentNode ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->AddViaNotify( menu->fParentNode->GetKey(), TRACKED_NEW plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( menu->fParentNode->GetKey(), new plGenRefMsg( renderMod->GetKey(), plRefMsg::kOnCreate, 0, plPostEffectMod::kNodeRef ), plRefFlags::kPassiveRef ); menu->SetRenderMod( renderMod ); menu->SetName( name ); // Create the dummy scene object to hold the menu - plSceneObject *newObj = TRACKED_NEW plSceneObject; + plSceneObject *newObj = new plSceneObject; menu->fKeyGen->CreateKey( newObj ); // *#&$(*@&#$ need a coordIface... - plCoordinateInterface *newCI = TRACKED_NEW plCoordinateInterface; + plCoordinateInterface *newCI = new plCoordinateInterface; menu->fKeyGen->CreateKey( newCI ); hsMatrix44 l2w, w2l; @@ -806,15 +806,15 @@ pfGUIPopUpMenu *pfGUIPopUpMenu::Build( const char *name, pfGUIDialogMod *parent // Using SendRef here because AddViaNotify will queue the messages up, which doesn't do us any good // if we need these refs right away - hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); - hsgResMgr::ResMgr()->SendRef( renderMod->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( newCI->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( renderMod->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); newObj->SetSceneNode( menu->fParentNode->GetKey() ); newObj->SetTransform( l2w, w2l ); - hsgResMgr::ResMgr()->SendRef( menu->GetKey(), TRACKED_NEW plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( menu->GetKey(), new plObjRefMsg( newObj->GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier ), plRefFlags::kActiveRef ); // Add the menu to the GUI mgr - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg( pfGameGUIMgr::GetInstance()->GetKey(), + plGenRefMsg *refMsg = new plGenRefMsg( pfGameGUIMgr::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, pfGameGUIMgr::kDlgModRef ); hsgResMgr::ResMgr()->AddViaNotify( menu->GetKey(), refMsg, plRefFlags::kActiveRef ); @@ -833,7 +833,7 @@ void pfGUIPopUpMenu::SetSkin( pfGUISkin *skin ) if( skin != nil ) { - hsgResMgr::ResMgr()->SendRef( skin->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->SendRef( skin->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefSkin ), plRefFlags::kActiveRef ); fWaitingForSkin = true; } else @@ -904,7 +904,7 @@ void pfGUISkin::Read( hsStream *s, hsResMgr *mgr ) for( ; i < kNumElements; i++ ) fElements[ i ].Empty(); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefMipmap ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefMipmap ), plRefFlags::kActiveRef ); } void pfGUISkin::Write( hsStream *s, hsResMgr *mgr ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp index c5bd93d1..dc0ac095 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp @@ -147,7 +147,7 @@ void pfGUIProgressCtrl::SetAnimationKeys( hsTArray &keys, const char * delete [] fAnimName; if( name != nil ) { - fAnimName = TRACKED_NEW char[ strlen( name ) + 1 ]; + fAnimName = new char[ strlen( name ) + 1 ]; strcpy( fAnimName, name ); } else @@ -231,7 +231,7 @@ void pfGUIProgressCtrl::SetCurrValue( float v ) else newTime = ( ( fValue - fMin ) / ( fMax - fMin ) ) * tLength + fAnimBegin; - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kGoToTime ); msg->SetAnimName( fAnimName ); msg->fTime = newTime; @@ -249,7 +249,7 @@ void pfGUIProgressCtrl::AnimateToPercentage( float percent ) if( fAnimationKeys.GetCount() > 0 ) { - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); msg->SetCmd( plAnimCmdMsg::kPlayToPercentage ); msg->SetAnimName( fAnimName ); msg->fTime = percent; @@ -263,7 +263,7 @@ void pfGUIProgressCtrl::AnimateToPercentage( float percent ) // setup a timer to call back when we finish animating float elapsedTime = (fAnimEnd - fAnimBegin) * percent; - plTimerCallbackMsg *timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey(), fStopSoundTimer); + plTimerCallbackMsg *timerMsg = new plTimerCallbackMsg(GetKey(), fStopSoundTimer); plgTimerCallbackMgr::NewTimer(elapsedTime, timerMsg); } } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp index a30ba9c5..79bfaf3a 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp @@ -124,7 +124,7 @@ class pfGroupProc : public pfGUICtrlProcObject pfGUIRadioGroupCtrl::pfGUIRadioGroupCtrl() { - fButtonProc = TRACKED_NEW pfGroupProc( this ); + fButtonProc = new pfGroupProc( this ); fButtonProc->IncRef(); SetFlag( kIntangible ); } @@ -180,7 +180,7 @@ void pfGUIRadioGroupCtrl::Read( hsStream *s, hsResMgr *mgr ) for( i = 0; i < count; i++ ) { - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefControl ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefControl ), plRefFlags::kActiveRef ); } fValue = fDefaultValue = s->ReadLE16(); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp index 4f31ce68..9578b6b4 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp @@ -157,7 +157,7 @@ void pfGUITextBoxMod::Read( hsStream *s, hsResMgr *mgr ) uint32_t len = s->ReadLE32(); if( len > 0 ) { - char *text = TRACKED_NEW char[ len + 1 ]; + char *text = new char[ len + 1 ]; s->Read( len, text ); text[ len ] = 0; @@ -232,7 +232,7 @@ void pfGUITextBoxMod::SetText( const wchar_t *text ) delete [] fText; if (text) { - fText = TRACKED_NEW wchar_t[wcslen(text)+1]; + fText = new wchar_t[wcslen(text)+1]; wcscpy(fText,text); } else diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp index aae58025..77f9d957 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp @@ -106,7 +106,7 @@ pfGUIUpDownPairMod::pfGUIUpDownPairMod() fDownControl = nil; fValue = fMin = fMax = fStep = 0.f; - fButtonProc = TRACKED_NEW pfUpDownBtnProc( nil, nil, this ); + fButtonProc = new pfUpDownBtnProc( nil, nil, this ); fButtonProc->IncRef(); SetFlag( kIntangible ); } @@ -205,8 +205,8 @@ void pfGUIUpDownPairMod::Read( hsStream *s, hsResMgr *mgr ) fUpControl = nil; fDownControl = nil; - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefUpControl ), plRefFlags::kActiveRef ); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDownControl ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefUpControl ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDownControl ), plRefFlags::kActiveRef ); s->ReadLE( &fMin ); s->ReadLE( &fMax ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp index 92652651..19010b66 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp @@ -324,7 +324,7 @@ void pfGameGUIMgr::LoadDialog( const char *name, plKey recvrKey, const char * } if (!alreadyLoaded) { - pfDialogNameSetKey* pDNSK = TRACKED_NEW pfDialogNameSetKey(name,recvrKey); + pfDialogNameSetKey* pDNSK = new pfDialogNameSetKey(name,recvrKey); fDialogToSetKeyOf.Append(pDNSK); } } @@ -333,13 +333,13 @@ void pfGameGUIMgr::LoadDialog( const char *name, plKey recvrKey, const char * plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY ); - plClientMsg *msg = TRACKED_NEW plClientMsg( plClientMsg::kLoadRoomHold ); + plClientMsg *msg = new plClientMsg( plClientMsg::kLoadRoomHold ); msg->AddReceiver( clientKey ); msg->AddRoomLoc(plKeyFinder::Instance().FindLocation(ageName ? ageName : "GUI", name)); msg->Send(); // Now add this dialog to a list of pending loads (will remove it once it's fully loaded) -// fDlgsPendingLoad.Append( TRACKED_NEW pfDialogNameSetKey( name, nil ) ); +// fDlgsPendingLoad.Append( new pfDialogNameSetKey( name, nil ) ); } //// IShowDialog ///////////////////////////////////////////////////////////// @@ -434,7 +434,7 @@ void pfGameGUIMgr::UnloadDialog( pfGUIDialogMod *dlg ) // IRemoveDlgFromList( dlg ); // Add the name to our list of dialogs pending unload -// fDlgsPendingUnload.Append( TRACKED_NEW pfDialogNameSetKey( dlg->GetName(), nil ) ); +// fDlgsPendingUnload.Append( new pfDialogNameSetKey( dlg->GetName(), nil ) ); plKey sceneNodeKey = dlg->GetSceneNodeKey(); if( sceneNodeKey == nil ) @@ -448,7 +448,7 @@ void pfGameGUIMgr::UnloadDialog( pfGUIDialogMod *dlg ) { plKey clientKey = hsgResMgr::ResMgr()->FindKey( kClient_KEY ); - plClientMsg *msg = TRACKED_NEW plClientMsg( plClientMsg::kUnloadRoom ); + plClientMsg *msg = new plClientMsg( plClientMsg::kUnloadRoom ); msg->AddReceiver( clientKey ); // msg->SetProgressBarSuppression( true ); msg->AddRoomLoc(sceneNodeKey->GetUoid().GetLocation()); @@ -523,7 +523,7 @@ void pfGameGUIMgr::SetDialogToNotify(const char *name, plKey recvrKey) // void pfGameGUIMgr::SetDialogToNotify(pfGUIDialogMod *dlg, plKey recvrKey) { - pfGUIDialogNotifyProc* handler = TRACKED_NEW pfGUIDialogNotifyProc(recvrKey); + pfGUIDialogNotifyProc* handler = new pfGUIDialogNotifyProc(recvrKey); dlg->SetHandler(handler); handler->OnInit(); } @@ -540,14 +540,14 @@ void pfGameGUIMgr::IActivateGUI( hsBool activate ) if( activate ) { - fInputConfig = TRACKED_NEW pfGameUIInputInterface( this ); - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); + fInputConfig = new pfGameUIInputInterface( this ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); msg->SetIFace( fInputConfig ); plgDispatch::MsgSend( msg ); } else { - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( fInputConfig ); plgDispatch::MsgSend( msg ); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp index d6d18a45..5f470509 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp @@ -382,7 +382,7 @@ void pfGameMgr::JoinGame ( unsigned gameId ) { Cli2Srv_GameMgr_JoinGame msg; - ZERO(msg); + memset(&msg, 0, sizeof(msg)); msg.messageId = kCli2Srv_GameMgr_JoinGame; msg.recvGameId = 0; // send to GameMgr on server @@ -655,7 +655,7 @@ void GameMgrSend (GameMsgHeader * msg, void * param) { if (param) { msg->transId = INextTransId(); - (void)NEW(TransState)(msg->transId, param); + (void)new TransState(msg->transId, param); } else { msg->transId = 0; diff --git a/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp b/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp index 23538b5a..0bcb28b2 100644 --- a/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp @@ -101,7 +101,7 @@ void pfGameScoreMgr::AddCachedScore(pfGameScore * score) GameScoreLink * scoreLink = fScores.Find(score->scoreId); if (scoreLink == nil) { - GameScoreLink * link = TRACKED_NEW GameScoreLink(score); + GameScoreLink * link = new GameScoreLink(score); fScores.Add(link); } else @@ -240,11 +240,11 @@ static void GetScoresCallback( op->result = result; if (IS_NET_SUCCESS(result)) { - *(op->scores) = TRACKED_NEW pfGameScore*[scoreCount]; + *(op->scores) = new pfGameScore*[scoreCount]; *(op->scoreCount) = scoreCount; for (int i = 0; i < scoreCount; ++i) { - pfGameScore* score = TRACKED_NEW pfGameScore(); + pfGameScore* score = new pfGameScore(); score->IncRef(); char tempGameName[kMaxGameScoreNameLength]; @@ -414,11 +414,11 @@ static void GetRanksCallback( op->result = result; if (IS_NET_SUCCESS(result)) { - *(op->ranks) = TRACKED_NEW NetGameRank*[rankCount]; + *(op->ranks) = new NetGameRank*[rankCount]; *(op->rankCount) = rankCount; for (int i = 0; i < rankCount; ++i) { - NetGameRank * rank = TRACKED_NEW NetGameRank; + NetGameRank * rank = new NetGameRank; rank->rank = ranks[i].rank; rank->score = ranks[i].score; diff --git a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp index a90d828e..2dbba9eb 100644 --- a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp +++ b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp @@ -589,10 +589,10 @@ void pfBookData::IInitTemplate(pfGUIDialogMod *templateDlg) hsAssert(templateDlg != nil, "Nil template in pfBookData::IInitTemplate()!"); // Init and ref our fDialog pointer - hsgResMgr::ResMgr()->SendRef(templateDlg->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDialog), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(templateDlg->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDialog), plRefFlags::kPassiveRef); // Hijack the dialog proc with our own - templateDlg->SetHandlerForAll(TRACKED_NEW pfJournalDlgProc(this)); + templateDlg->SetHandlerForAll(new pfJournalDlgProc(this)); // Find our animation keys @@ -620,7 +620,7 @@ void pfBookData::IInitTemplate(pfGUIDialogMod *templateDlg) // Grab and ref the default cover mipmap plLayer *lay = plLayer::ConvertNoRef(fCoverLayer); if((lay != nil)&&(lay->GetTexture() != nil)) - hsgResMgr::ResMgr()->AddViaNotify(lay->GetTexture()->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDefaultCover), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(lay->GetTexture()->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDefaultCover), plRefFlags::kPassiveRef); fLeftPageMap->SetFlag(pfGUIClickMapCtrl::kReportHovering); fRightPageMap->SetFlag(pfGUIClickMapCtrl::kReportHovering); @@ -656,7 +656,7 @@ void pfBookData::IInitTemplate(pfGUIDialogMod *templateDlg) { fEditable = true; fLeftEditCtrl->SetNext(fRightEditCtrl); - fLeftEditCtrl->SetEventProc(TRACKED_NEW pfBookMultiLineEditProc(this)); + fLeftEditCtrl->SetEventProc(new pfBookMultiLineEditProc(this)); fTurnFrontEditCtrl->SetNext(fTurnBackEditCtrl); // these are always back to back } } @@ -844,7 +844,7 @@ void pfBookData::IFillUncoveringPage(hsBool rightSide) } // create a timer so we can hide the old left or right turn page right before the animation finishes to prevent flicker - plTimerCallbackMsg* pTimerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey(),id); + plTimerCallbackMsg* pTimerMsg = new plTimerCallbackMsg(GetKey(),id); plgTimerCallbackMgr::NewTimer( .5, pTimerMsg ); // .5 found by trial and error return; // the gui controls render everything for us, so ignoring this request } @@ -869,7 +869,7 @@ void pfBookData::ITriggerPageFlip(hsBool flipBackwards, hsBool immediate) const hsTArray &keys = fTurnPageButton->GetAnimationKeys(); const char *animName = fTurnPageButton->GetAnimationName(); - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); if (immediate) { msg->SetCmd(plAnimCmdMsg::kGoToEnd); @@ -884,7 +884,7 @@ void pfBookData::ITriggerPageFlip(hsBool flipBackwards, hsBool immediate) // Here's the whole reason why we're not just checking the checkbox: so we can attach a callback // so we know when the animation completes. Pretty sad, huh? Poor checkbox. - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(GetKey()); eventMsg->fRepeats = 0; if (immediate) @@ -905,7 +905,7 @@ void pfBookData::ITriggerPageFlip(hsBool flipBackwards, hsBool immediate) // We want a second callback to tell us when, indeed, the page has started turning // and is thus visible and thus we can actually, really, honestly, safely fill in the // page behind it - eventMsg = TRACKED_NEW plEventCallbackMsg; + eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(GetKey()); eventMsg->fRepeats = 0; eventMsg->fUser = !flipBackwards ? (0x04 | 0x01) : 0x04; @@ -1140,7 +1140,7 @@ std::map pfJournalBook::fBookGUIs; void pfJournalBook::SingletonInit( void ) { - fBookGUIs["BkBook"] = TRACKED_NEW pfBookData(); // load the default book data object + fBookGUIs["BkBook"] = new pfBookData(); // load the default book data object hsgResMgr::ResMgr()->NewKey("BkBook",fBookGUIs["BkBook"],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation()); fBookGUIs["BkBook"]->LoadGUI(); } @@ -1162,7 +1162,7 @@ void pfJournalBook::LoadGUI( const char *guiName ) { if (fBookGUIs.find(guiName) == fBookGUIs.end()) // is it already loaded? { // nope, load it - fBookGUIs[guiName] = TRACKED_NEW pfBookData(guiName); + fBookGUIs[guiName] = new pfBookData(guiName); hsgResMgr::ResMgr()->NewKey(guiName,fBookGUIs[guiName],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation()); fBookGUIs[guiName]->LoadGUI(); } @@ -1210,7 +1210,7 @@ pfJournalBook::pfJournalBook( const char *esHTMLSource, plKey coverImageKey, plK fCurBookGUI = "BkBook"; if (fBookGUIs.find(fCurBookGUI) == fBookGUIs.end()) { - fBookGUIs[fCurBookGUI] = TRACKED_NEW pfBookData(fCurBookGUI.c_str()); + fBookGUIs[fCurBookGUI] = new pfBookData(fCurBookGUI.c_str()); hsgResMgr::ResMgr()->NewKey(fCurBookGUI.c_str(),fBookGUIs[fCurBookGUI],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation()); fBookGUIs[fCurBookGUI]->LoadGUI(); } @@ -1246,7 +1246,7 @@ pfJournalBook::pfJournalBook( const wchar_t *esHTMLSource, plKey coverImageKey, fCurBookGUI = "BkBook"; if (fBookGUIs.find(fCurBookGUI) == fBookGUIs.end()) { - fBookGUIs[fCurBookGUI] = TRACKED_NEW pfBookData(fCurBookGUI.c_str()); + fBookGUIs[fCurBookGUI] = new pfBookData(fCurBookGUI.c_str()); hsgResMgr::ResMgr()->NewKey(fCurBookGUI.c_str(),fBookGUIs[fCurBookGUI],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation()); fBookGUIs[fCurBookGUI]->LoadGUI(); } @@ -1329,7 +1329,7 @@ void pfJournalBook::Show( hsBool startOpened /*= false */) { // it's a cover movie, not a decal, so we make a layer, thinking it's at 0,0 and a left map (which gives us the results we want) plLayerBink *movieLayer = IMakeMovieLayer(fCoverDecals[i],0,0,mip,pfJournalDlgProc::kTagLeftDTMap,false); - loadedMovie *movie = TRACKED_NEW loadedMovie; + loadedMovie *movie = new loadedMovie; movie->movieLayer = movieLayer; movie->movieChunk = fCoverDecals[i]; fLoadedMovies.Append(movie); @@ -1476,7 +1476,7 @@ void pfJournalBook::ITriggerCloseWithNotify( hsBool closeNotOpen, hsBool imme const hsTArray &keys = fBookGUIs[fCurBookGUI]->CoverButton()->GetAnimationKeys(); const char *animName = fBookGUIs[fCurBookGUI]->CoverButton()->GetAnimationName(); - plAnimCmdMsg *msg = TRACKED_NEW plAnimCmdMsg(); + plAnimCmdMsg *msg = new plAnimCmdMsg(); if( !immediate ) { msg->SetCmd( plAnimCmdMsg::kContinue ); @@ -1490,7 +1490,7 @@ void pfJournalBook::ITriggerCloseWithNotify( hsBool closeNotOpen, hsBool imme msg->SetAnimName( animName ); msg->AddReceivers( keys ); - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver( fBookGUIs[fCurBookGUI]->GetKey() ); eventMsg->fRepeats = 0; eventMsg->fUser = 0x08 | ( closeNotOpen ? 0x00 : 0x01 ); // So we know which this is for @@ -1817,7 +1817,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & IFreeSource(); - pfEsHTMLChunk *chunk, *lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + pfEsHTMLChunk *chunk, *lastParChunk = new pfEsHTMLChunk( nil ); const wchar_t *c, *start; wchar_t name[ 128 ], option[ 256 ]; float bookWidth=1.0, bookHeight=1.0; @@ -1845,7 +1845,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & { uint32_t count = ((uint32_t)c - (uint32_t)start)/2; // wchar_t is 2 bytes - wchar_t *temp = TRACKED_NEW wchar_t[ count + 1 ]; + wchar_t *temp = new wchar_t[ count + 1 ]; wcsncpy( temp, start, count ); temp[count] = L'\0'; lastParChunk->fText = temp; @@ -1863,7 +1863,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & { case pfEsHTMLChunk::kParagraph: c += 2; - chunk = TRACKED_NEW pfEsHTMLChunk( nil ); + chunk = new pfEsHTMLChunk( nil ); chunk->fFlags = IFindLastAlignment(); while( IGetNextOption( c, name, option ) ) { @@ -1883,7 +1883,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & case pfEsHTMLChunk::kImage: c += 4; - chunk = TRACKED_NEW pfEsHTMLChunk( nil, 0 ); + chunk = new pfEsHTMLChunk( nil, 0 ); while( IGetNextOption( c, name, option ) ) { if( wcsicmp( name, L"align" ) == 0 ) @@ -1994,7 +1994,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & else delete chunk; // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; @@ -2026,25 +2026,25 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & } } // Still gotta create a new par chunk - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; case pfEsHTMLChunk::kPageBreak: c += 3; - chunk = TRACKED_NEW pfEsHTMLChunk(); + chunk = new pfEsHTMLChunk(); while( IGetNextOption( c, name, option ) ) { } fHTMLSource.Append( chunk ); // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; case pfEsHTMLChunk::kFontChange: c += 5; - chunk = TRACKED_NEW pfEsHTMLChunk( nil, 0, 0 ); + chunk = new pfEsHTMLChunk( nil, 0, 0 ); while( IGetNextOption( c, name, option ) ) { if( wcsicmp( name, L"style" ) == 0 ) @@ -2120,7 +2120,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & } fHTMLSource.Append( chunk ); // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; @@ -2146,7 +2146,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & fBookGUIs[fCurBookGUI]->GetEditCtrl(pfJournalDlgProc::kTagTurnBackEditCtrl)->SetMargins(fPageTMargin,fPageLMargin,fPageBMargin,fPageRMargin); } // Start a new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk(nil); + lastParChunk = new pfEsHTMLChunk(nil); lastParChunk->fFlags = IFindLastAlignment(); break; @@ -2172,13 +2172,13 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & fWidthScale = 1.f - bookWidth; // Still gotta create a new par chunk - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; case pfEsHTMLChunk::kDecal: c += 6; - chunk = TRACKED_NEW pfEsHTMLChunk( nil, 0 ); + chunk = new pfEsHTMLChunk( nil, 0 ); chunk->fType = pfEsHTMLChunk::kDecal; while( IGetNextOption( c, name, option ) ) { @@ -2227,13 +2227,13 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & else delete chunk; // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; case pfEsHTMLChunk::kMovie: c += 6; - chunk = TRACKED_NEW pfEsHTMLChunk( nil, 0 ); + chunk = new pfEsHTMLChunk( nil, 0 ); chunk->fType = pfEsHTMLChunk::kMovie; while( IGetNextOption( c, name, option ) ) { @@ -2302,20 +2302,20 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & delete chunk; } // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; case pfEsHTMLChunk::kEditable: c += 9; SetEditable(true); - chunk = TRACKED_NEW pfEsHTMLChunk(); + chunk = new pfEsHTMLChunk(); while( IGetNextOption( c, name, option ) ) { } fHTMLSource.Append( chunk ); // Start new paragraph chunk after this one - lastParChunk = TRACKED_NEW pfEsHTMLChunk( nil ); + lastParChunk = new pfEsHTMLChunk( nil ); lastParChunk->fFlags = IFindLastAlignment(); break; } @@ -2340,7 +2340,7 @@ hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation & { uint32_t count = (uint32_t)c - (uint32_t)start; - wchar_t *temp = TRACKED_NEW wchar_t[ count + 1 ]; + wchar_t *temp = new wchar_t[ count + 1 ]; wcsncpy( temp, start, count + 1 ); lastParChunk->fText = temp; delete [] temp; @@ -2603,7 +2603,7 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool s plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); if (bink) // if it was a bink layer { - plMatRefMsg* refMsg = TRACKED_NEW plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it + plMatRefMsg* refMsg = new plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it hsgResMgr::ResMgr()->SendRef(material->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); } } @@ -2681,12 +2681,12 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool s // cache, but that's ok 'cause if we're doing this, it's probably invalid (or empty) // anyway int fTextLen = chunk->fText.length(); - wchar_t *s = TRACKED_NEW wchar_t[fTextLen+1]; + wchar_t *s = new wchar_t[fTextLen+1]; wcscpy(s,chunk->fText.c_str()); s[fTextLen] = L'\0'; // Note: Makes a copy of the string - pfEsHTMLChunk *c2 = TRACKED_NEW pfEsHTMLChunk( &s[ lastChar ] ); + pfEsHTMLChunk *c2 = new pfEsHTMLChunk( &s[ lastChar ] ); c2->fFlags = chunk->fFlags; fHTMLSource.Insert( idx + 1, c2 ); @@ -2825,7 +2825,7 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool s } if (!movieAlreadyLoaded) // if the movie wasn't already cached, cache it { - movie = TRACKED_NEW loadedMovie; + movie = new loadedMovie; movie->movieLayer = movieLayer; // save the layer and chunk data movie->movieChunk = chunk; fLoadedMovies.Append(movie); @@ -2872,7 +2872,7 @@ void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest ) plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); if (bink) // if it was a bink layer { - plMatRefMsg* refMsg = TRACKED_NEW plMatRefMsg(source->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it + plMatRefMsg* refMsg = new plMatRefMsg(source->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it hsgResMgr::ResMgr()->SendRef(source->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); moviesOnPage.Append(bink); } @@ -2884,7 +2884,7 @@ void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest ) plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); if (bink) // if it was a bink layer { - plMatRefMsg* refMsg = TRACKED_NEW plMatRefMsg(dest->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it + plMatRefMsg* refMsg = new plMatRefMsg(dest->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it hsgResMgr::ResMgr()->SendRef(dest->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); } } @@ -2900,7 +2900,7 @@ void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest ) void pfJournalBook::IDrawMipmap( pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *mip, plDynamicTextMap *dtMap, uint32_t whichDTMap, hsBool dontRender ) { - plMipmap *copy = TRACKED_NEW plMipmap(); + plMipmap *copy = new plMipmap(); copy->CopyFrom(mip); if (chunk->fNoResizeImg) { @@ -3045,11 +3045,11 @@ plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, ui char buff[256]; sprintf(buff, "%s_%d_ml", GetKey()->GetName(), uniqueSuffix); - layer = TRACKED_NEW plLayer; + layer = new plLayer; hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); sprintf(buff, "%s_%d_m", GetKey()->GetName(), uniqueSuffix++); - movieLayer = TRACKED_NEW plLayerBink; + movieLayer = new plLayerBink; hsgResMgr::ResMgr()->NewKey(buff, movieLayer, GetKey()->GetUoid().GetLocation()); movieLayer->GetKey()->RefObject(); // we want to own a ref so we can nuke it at will @@ -3194,7 +3194,7 @@ plLayerInterface *pfJournalBook::IMakeBaseLayer(plMipmap *image) char buff[256]; sprintf(buff, "%s_%d", GetKey()->GetName(), uniqueSuffix++); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); // Initialize it. @@ -3234,7 +3234,7 @@ plLayerInterface *pfJournalBook::IMakeBaseLayer(plMipmap *image) layer->SetTransform(xfm); // Set the texture (assumes mipmap is non-nil). - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(image->GetKey(), refMsg, plRefFlags::kActiveRef); return plLayerInterface::ConvertNoRef(layer); @@ -3249,7 +3249,7 @@ plLayerInterface *pfJournalBook::IMakeDecalLayer(pfEsHTMLChunk *decalChunk, plMi char buff[256]; sprintf(buff, "%s_%d_d", GetKey()->GetName(), uniqueSuffix++); - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); // Initialize it. @@ -3322,7 +3322,7 @@ plLayerInterface *pfJournalBook::IMakeDecalLayer(pfEsHTMLChunk *decalChunk, plMi layer->SetTransform(xfm); // Set the texture (assumes mipmap is non-nil). - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(decal->GetKey(), refMsg, plRefFlags::kActiveRef); return plLayerInterface::ConvertNoRef(layer); @@ -3334,7 +3334,7 @@ void pfJournalBook::ISetDecalLayers(hsGMaterial *material,hsTArrayGetNumLayers()-1; i >= 0; i-- ) { - plMatRefMsg* refMsg = TRACKED_NEW plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); + plMatRefMsg* refMsg = new plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); hsgResMgr::ResMgr()->SendRef(material->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -3478,7 +3478,7 @@ void pfJournalBook::ISendNotify( uint32_t type, uint32_t linkID ) { if( fCallbackKey != nil ) { - plNotifyMsg *pMsg = TRACKED_NEW plNotifyMsg; + plNotifyMsg *pMsg = new plNotifyMsg; pMsg->AddBookEvent( type, linkID ); pMsg->SetBCastFlag( plMessage::kNetPropagate, false ); // don't deliver networked! pMsg->Send( fCallbackKey ); @@ -3513,7 +3513,7 @@ void pfJournalBook::ILoadAllImages( hsBool unload ) fBookGUIs[fCurBookGUI]->GetKey()->Release( fCoverMipKey ); else { - plGenRefMsg *ref = TRACKED_NEW plGenRefMsg( fBookGUIs[fCurBookGUI]->GetKey(), plRefMsg::kOnCreate, -1, kRefImage ); + plGenRefMsg *ref = new plGenRefMsg( fBookGUIs[fCurBookGUI]->GetKey(), plRefMsg::kOnCreate, -1, kRefImage ); hsgResMgr::ResMgr()->AddViaNotify( fCoverMipKey, ref, plRefFlags::kActiveRef ); } } @@ -3526,7 +3526,7 @@ void pfJournalBook::ILoadAllImages( hsBool unload ) fBookGUIs[fCurBookGUI]->GetKey()->Release( fHTMLSource[ i ]->fImageKey ); else { - plGenRefMsg *ref = TRACKED_NEW plGenRefMsg( fBookGUIs[fCurBookGUI]->GetKey(), plRefMsg::kOnCreate, -1, kRefImage ); + plGenRefMsg *ref = new plGenRefMsg( fBookGUIs[fCurBookGUI]->GetKey(), plRefMsg::kOnCreate, -1, kRefImage ); hsgResMgr::ResMgr()->AddViaNotify( fHTMLSource[ i ]->fImageKey, ref, plRefFlags::kActiveRef ); } } diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp index 29b1636d..f1cf30d1 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp @@ -993,7 +993,7 @@ void pfLocalizationDataMgr::IConvertAge(LocAgeInfo *ageInfo, const std::wstring char *pfLocalizationDataMgr::IConvertToByteStream(const std::wstring & data, uint32_t &len) { len = data.length() * 2 + 2; // each wchar_t is two chars and add two bytes for the header - char *retVal = TRACKED_NEW char[len]; // we don't add an extra byte for the 0 because the parser doesn't need it + char *retVal = new char[len]; // we don't add an extra byte for the 0 because the parser doesn't need it char lowByte = 0, highByte = 0; retVal[0] = (char)0xFF; // insert FFFE for little-endian UTF-16 (big-endian would be FEFF) retVal[1] = (char)0xFE; @@ -1080,7 +1080,7 @@ void pfLocalizationDataMgr::Initialize(const std::string & path) if (fInstance) return; - fInstance = TRACKED_NEW pfLocalizationDataMgr(path); + fInstance = new pfLocalizationDataMgr(path); fLog = plStatusLogMgr::GetInstance().CreateStatusLog(30, "LocalizationDataMgr.log", plStatusLog::kFilledBackground | plStatusLog::kAlignToTop | plStatusLog::kTimestamp); fInstance->SetupData(); @@ -1110,7 +1110,7 @@ void pfLocalizationDataMgr::SetupData() if (fDatabase) delete fDatabase; - fDatabase = TRACKED_NEW LocalizationDatabase(); + fDatabase = new LocalizationDatabase(); fDatabase->Parse(fDataPath); char *temp = hsWStringToString(fDatabase->GetOutput().c_str()); diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationMgr.cpp b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationMgr.cpp index 92e6b3cf..a91eaa89 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationMgr.cpp @@ -78,7 +78,7 @@ void pfLocalizationMgr::Initialize(const std::string & dataPath) if (fInstance) return; - fInstance = TRACKED_NEW pfLocalizationMgr(); + fInstance = new pfLocalizationMgr(); pfLocalizationDataMgr::Initialize(dataPath); // set up the data manager } diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/BlueSpiral/pyBlueSpiralGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/BlueSpiral/pyBlueSpiralGameGlue.cpp index 148c1374..579777ca 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/BlueSpiral/pyBlueSpiralGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/BlueSpiral/pyBlueSpiralGameGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/ClimbingWall/pyClimbingWallGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/ClimbingWall/pyClimbingWallGameGlue.cpp index 0faa1734..a364f59c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/ClimbingWall/pyClimbingWallGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/ClimbingWall/pyClimbingWallGameGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/Heek/pyHeekGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/Heek/pyHeekGameGlue.cpp index b6fd40f5..3dd23419 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/Heek/pyHeekGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/Heek/pyHeekGameGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/Marker/pyMarkerGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/Marker/pyMarkerGameGlue.cpp index 4d507be0..7f7fd702 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/Marker/pyMarkerGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/Marker/pyMarkerGameGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/TicTacToe/pyTTTGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/TicTacToe/pyTTTGameGlue.cpp index fb11e6db..74ad5b98 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/TicTacToe/pyTTTGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/TicTacToe/pyTTTGameGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/VarSync/pyVarSyncGameGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/VarSync/pyVarSyncGameGlue.cpp index 45210078..d0bc4080 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/VarSync/pyVarSyncGameGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/VarSync/pyVarSyncGameGlue.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfPython/Games/pyGameCliGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/Games/pyGameCliGlue.cpp index c0b5ad06..c71a73bd 100644 --- a/Sources/Plasma/FeatureLib/pfPython/Games/pyGameCliGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/Games/pyGameCliGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAccountManagementGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAccountManagementGlue.cpp index 31f50857..a3deab97 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAccountManagementGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAccountManagementGlue.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp index cf55702d..71efed9e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp @@ -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 ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp index 6739b536..6751e1bd 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp b/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp index 0468594a..7b198cb8 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp @@ -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! diff --git a/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp b/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp index 1b93e7f7..c1eb50f4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp @@ -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 ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/cyInputInterface.cpp b/Sources/Plasma/FeatureLib/pfPython/cyInputInterface.cpp index 01e0131d..d98d5856 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyInputInterface.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyInputInterface.cpp @@ -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 ); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp index a2cf7cd8..3993fdf9 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp @@ -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 & 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 & tolis uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector & 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 & 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 & tolist) { if (tolist.size() > 0) { - plNetVoiceListMsg* pMsg = TRACKED_NEW plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode); + plNetVoiceListMsg* pMsg = new plNetVoiceListMsg(plNetVoiceListMsg::kForcedListenerMode); for (int i=0 ; iGetClientList()->Append(tolist[i]->GetPlayerID()); @@ -1335,7 +1335,7 @@ void cyMisc::SetPrivateChatList(const std::vector & 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 & 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; diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp index 90c539e8..a41a3036 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue2.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue2.cpp index d56bc254..348931cc 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue2.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue2.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp index c6e3b396..bcdfc906 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp index 2d38a56b..543e75b2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp index b6e4c075..cdf617dd 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp @@ -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 ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp index e8a74de2..5a5d2588 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp @@ -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 ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp index d429c228..a5fcf5f7 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp @@ -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 diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp index 4dde361f..24970057 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp index 4af7d7df..d44cd821 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp @@ -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()); diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h b/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h index 1317b6dc..d77db84f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h @@ -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 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAlarm.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAlarm.cpp index 17f8b57a..27d14185 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAlarm.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAlarm.cpp @@ -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() diff --git a/Sources/Plasma/FeatureLib/pfPython/pyCritterBrainGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyCritterBrainGlue.cpp index cf4594a4..da1435a6 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyCritterBrainGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyCritterBrainGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDniCoordinates.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDniCoordinates.cpp index 0b44b225..c3f30e19 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDniCoordinates.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDniCoordinates.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp index 37c13498..9c9ec3c8 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp @@ -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 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp index 58657c4c..63b48590 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp @@ -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 ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp index 66fc3a2b..83c42c49 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyEnum.cpp b/Sources/Plasma/FeatureLib/pfPython/pyEnum.cpp index 39d68cd8..3d3e3762 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyEnum.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyEnum.cpp @@ -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'; } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBoxGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBoxGlue.cpp index dec6fbd5..67e1f387 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBoxGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBoxGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp index 18440160..113480b8 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp @@ -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 ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBoxGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBoxGlue.cpp index cf8de4c1..cdafecd6 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBoxGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBoxGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp index ab27f4b8..561fa415 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp @@ -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 temp>> change 0xFFFEs back into '\0's int i; for ( i=0 ; iGetCodedBuffer( 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 ; iGetCodedBufferW( 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 ; ifThis->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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBoxGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBoxGlue.cpp index 9511ae16..bd5d49ff 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBoxGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBoxGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp index 78d8268d..93a186a3 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp @@ -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 ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h b/Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h index f9ab4090..1184c1ce 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h @@ -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); \ diff --git a/Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp index db47477f..bf0c1c01 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp index c4dc9d99..7f500857 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp @@ -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(); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyJournalBookGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyJournalBookGlue.cpp index f778c203..07257e0d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyJournalBookGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyJournalBookGlue.cpp @@ -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'; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp b/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp index 9f66018c..ca9a79ab 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp @@ -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 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyMoviePlayer.cpp b/Sources/Plasma/FeatureLib/pfPython/pyMoviePlayer.cpp index 151ccbe7..cd63a0f2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyMoviePlayer.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyMoviePlayer.cpp @@ -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(); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp b/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp index ef0147f3..9352eeaf 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp index e6d860eb..1764244a 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp @@ -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()); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp b/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp index 13ada123..55b11a84 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp @@ -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 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStreamGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyStreamGlue.cpp index 0e3a7945..c46e1e05 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStreamGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyStreamGlue.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultFolderNodeGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultFolderNodeGlue.cpp index ee72795b..48dfffa4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultFolderNodeGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultFolderNodeGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNode.cpp index 408012d9..2b96a240 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNode.cpp @@ -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) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNodeGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNodeGlue.cpp index 58b53376..758a53d4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNodeGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultImageNodeGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp index 61ef3cb9..20946203 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultTextNoteNodeGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultTextNoteNodeGlue.cpp index 4080c4ae..66028c3c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultTextNoteNodeGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultTextNoteNodeGlue.cpp @@ -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); diff --git a/Sources/Plasma/FeatureLib/pfStackTrace/pfArray.h b/Sources/Plasma/FeatureLib/pfStackTrace/pfArray.h index 523aebf5..173fd7d3 100644 --- a/Sources/Plasma/FeatureLib/pfStackTrace/pfArray.h +++ b/Sources/Plasma/FeatureLib/pfStackTrace/pfArray.h @@ -101,7 +101,7 @@ private: cap = m_cap*2; m_cap = cap; - T* data = TRACKED_NEW T[cap]; + T* data = new T[cap]; for ( int i = 0 ; i < m_len ; ++i ) data[i] = m_data[i]; delete[] m_data; diff --git a/Sources/Plasma/FeatureLib/pfStackTrace/pfMapFile.cpp b/Sources/Plasma/FeatureLib/pfStackTrace/pfMapFile.cpp index 452281ed..67ef6460 100644 --- a/Sources/Plasma/FeatureLib/pfStackTrace/pfMapFile.cpp +++ b/Sources/Plasma/FeatureLib/pfStackTrace/pfMapFile.cpp @@ -223,7 +223,7 @@ private: MapFile::MapFile( const char* filename ) { - m_this = TRACKED_NEW MapFileImpl( filename ); + m_this = new MapFileImpl( filename ); } MapFile::~MapFile() diff --git a/Sources/Plasma/FeatureLib/pfStackTrace/pfTextFile.cpp b/Sources/Plasma/FeatureLib/pfStackTrace/pfTextFile.cpp index a353f4c2..1d69377a 100644 --- a/Sources/Plasma/FeatureLib/pfStackTrace/pfTextFile.cpp +++ b/Sources/Plasma/FeatureLib/pfStackTrace/pfTextFile.cpp @@ -192,7 +192,7 @@ private: TextFile::TextFile( const char* filename ) { - m_this = TRACKED_NEW TextFileImpl( filename ); + m_this = new TextFileImpl( filename ); } TextFile::~TextFile() diff --git a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp index 7f483c37..2bade2b5 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp @@ -291,7 +291,7 @@ void plDistOpacityMod::ISetup() hsGMaterial* mat = todo[i].fMat; plLayerInterface* lay = todo[i].fLay; - plFadeOpacityLay* fade = TRACKED_NEW plFadeOpacityLay; + plFadeOpacityLay* fade = new plFadeOpacityLay; hsgResMgr::ResMgr()->NewKey(lay->GetKey()->GetName(), fade, lay->GetKey()->GetUoid().GetLocation()); @@ -300,11 +300,11 @@ void plDistOpacityMod::ISetup() // We should add a ref or something here if we're going to hold on to this (even though we created and "own" it). fFadeLays.Append(fade); - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer); msg->SetOldRef(lay); hsgResMgr::ResMgr()->SendRef(fade, msg, plRefFlags::kActiveRef); - plGenRefMsg* toMe = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay); + plGenRefMsg* toMe = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay); hsgResMgr::ResMgr()->SendRef(fade, toMe, plRefFlags::kPassiveRef); } diff --git a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityLay.cpp b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityLay.cpp index c56349a4..a94ae0dc 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityLay.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityLay.cpp @@ -48,7 +48,7 @@ plFadeOpacityLay::plFadeOpacityLay() : fOpScale(1.f) { fOwnedChannels |= kOpacity; - fOpacity = TRACKED_NEW float; + fOpacity = new float; } plFadeOpacityLay::~plFadeOpacityLay() diff --git a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp index f8619103..79e32e30 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp @@ -366,7 +366,7 @@ void plFadeOpacityMod::ISetup(plSceneObject* so) plLayerInterface* lay = mat->GetLayer(j); if( !j || !(lay->GetZFlags() & hsGMatState::kZNoZWrite) || (lay->GetMiscFlags() & hsGMatState::kMiscRestartPassHere) ) { - plFadeOpacityLay* fade = NEW(plFadeOpacityLay); + plFadeOpacityLay* fade = new plFadeOpacityLay(); hsgResMgr::ResMgr()->NewKey(lay->GetKey()->GetName(), fade, lay->GetKey()->GetUoid().GetLocation()); @@ -375,11 +375,11 @@ void plFadeOpacityMod::ISetup(plSceneObject* so) // We should add a ref or something here if we're going to hold on to this (even though we created and "own" it). fFadeLays.Append(fade); - plMatRefMsg* msg = NEW(plMatRefMsg)(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer); msg->SetOldRef(lay); hsgResMgr::ResMgr()->SendRef(fade, msg, plRefFlags::kActiveRef); - plGenRefMsg* toMe = NEW(plGenRefMsg)(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay); + plGenRefMsg* toMe = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay); hsgResMgr::ResMgr()->SendRef(fade, toMe, plRefFlags::kPassiveRef); } } diff --git a/Sources/Plasma/FeatureLib/pfSurface/plGrabCubeMap.cpp b/Sources/Plasma/FeatureLib/pfSurface/plGrabCubeMap.cpp index c202b11a..b03c156d 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plGrabCubeMap.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plGrabCubeMap.cpp @@ -136,7 +136,7 @@ void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& cente int i; for( i = 0; i < 6; i++ ) { - plGrabCubeRenderRequest* req = TRACKED_NEW plGrabCubeRenderRequest; + plGrabCubeRenderRequest* req = new plGrabCubeRenderRequest; req->SetRenderState(renderState); req->SetDrawableMask(plDrawable::kNormal); @@ -159,7 +159,7 @@ void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& cente req->fQuality = q; sprintf(req->fFileName, "%s_%s.jpg", pref, suff[i]); - plRenderRequestMsg* reqMsg = TRACKED_NEW plRenderRequestMsg(nil, req); + plRenderRequestMsg* reqMsg = new plRenderRequestMsg(nil, req); reqMsg->Send(); hsRefCnt_SafeUnRef(req); } diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp index 1e4e8bb8..b8af5b07 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp @@ -72,7 +72,7 @@ static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMi plLayerAVI::plLayerAVI() { - fAVIInfo = TRACKED_NEW plAVIFileInfo; + fAVIInfo = new plAVIFileInfo; } plLayerAVI::~plLayerAVI() diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp index fff30c51..6326de5c 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp @@ -58,7 +58,7 @@ plLayerMovie::plLayerMovie() fHeight(32) { fOwnedChannels |= kTexture; - fTexture = TRACKED_NEW plBitmap*; + fTexture = new plBitmap*; *fTexture = nil; // fTimeConvert.SetOwner(this); @@ -111,7 +111,7 @@ hsBool plLayerMovie::ISetupBitmap() { if( !GetTexture() ) { - plMipmap* b = TRACKED_NEW plMipmap( fWidth, fHeight, plMipmap::kARGB32Config, 1 ); + plMipmap* b = new plMipmap( fWidth, fHeight, plMipmap::kARGB32Config, 1 ); memset(b->GetImage(), 0x10, b->GetHeight() * b->GetRowBytes() ); b->SetFlags( b->GetFlags() | plMipmap::kDontThrowAwayImage ); @@ -188,7 +188,7 @@ void plLayerMovie::Read(hsStream* s, hsResMgr* mgr) int len = s->ReadLE32(); if( len ) { - fMovieName = TRACKED_NEW char[len+1]; + fMovieName = new char[len+1]; s->Read(len, fMovieName); fMovieName[len] = 0; } diff --git a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp b/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp index 95d7c72b..fd2b4b62 100644 --- a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp +++ b/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp @@ -507,7 +507,7 @@ plProfileVar::~plProfileVar() void plProfileVar::IBeginLap(const char* lapName) { if (!fLaps) - fLaps = TRACKED_NEW plProfileLaps; + fLaps = new plProfileLaps; fDisplayFlags |= kDisplayLaps; if(fLapsActive) fLaps->BeginLap(fValue, lapName); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtFile.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtFile.cpp index f27a4ca4..52e71086 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtFile.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtFile.cpp @@ -177,7 +177,7 @@ static void HandleFailedOp ( // create sub-operations to read the rest of the buffer for (; position < op->rw.bytes; ++subOperations) { - NtOpFileReadWrite * childOp = NEW(NtOpFileReadWrite); + NtOpFileReadWrite * childOp = new NtOpFileReadWrite; childOp->overlapped.hEvent = op->overlapped.hEvent ? CreateEvent(nil, true, false, nil) : nil; childOp->overlapped.Offset = (uint32_t) ((op->rw.offset + position) & 0xffffffff); childOp->overlapped.OffsetHigh = (uint32_t) ((op->rw.offset + position) >> 32); @@ -654,7 +654,7 @@ AsyncId NtFileRead ( // enable the sequential thread to perform a wait operation, we set the event field // into the Overlapped structure, because the event will be signaled prior to the // potentially deadlocking callback notification. - NtOpFileReadWrite * op = NEW(NtOpFileReadWrite); + NtOpFileReadWrite * op = new NtOpFileReadWrite; op->overlapped.Offset = (uint32_t) (offset & 0xffffffff); op->overlapped.OffsetHigh = (uint32_t) (offset >> 32); op->overlapped.hEvent = (flags & kAsyncFileRwSync) ? CreateEvent(nil, true, false, nil) : nil; @@ -708,7 +708,7 @@ AsyncId NtFileWrite ( // enable the sequential thread to perform a wait operation, we set the event field // into the Overlapped structure, because the event will be signaled prior to the // potentially deadlocking callback notification. - NtOpFileReadWrite * op = NEW(NtOpFileReadWrite); + NtOpFileReadWrite * op = new NtOpFileReadWrite; op->overlapped.Offset = (uint32_t) (offset & 0xffffffff); op->overlapped.OffsetHigh = (uint32_t) (offset >> 32); op->overlapped.hEvent = (flags & kAsyncFileRwSync) ? CreateEvent(nil, true, false, nil) : nil; @@ -756,7 +756,7 @@ AsyncId NtFileFlushBuffers ( ASSERT((truncateSize == kAsyncFileDontTruncate) || !(truncateSize & file->sectorSizeMask)); // create new operation - NtOpFileFlush * op = NEW(NtOpFileFlush); + NtOpFileFlush * op = new NtOpFileFlush; file->critsect.Enter(); // write operations cannot complete while a flush is in progress @@ -887,7 +887,7 @@ AsyncId NtFileCreateSequence ( ASSERT(file->ioType == kNtFile); // create new operation - NtOpFileSequence * op = NEW(NtOpFileSequence); + NtOpFileSequence * op = new NtOpFileSequence; file->critsect.Enter(); // init Operation @@ -968,7 +968,7 @@ bool NtFileWaitId (AsyncFile conn, AsyncId asyncId, unsigned timeoutMs) { // create an object to wait on if (!op->signalComplete) - op->signalComplete = NEW(CNtWaitHandle); + op->signalComplete = new CNtWaitHandle; signalComplete = op->signalComplete; signalComplete->IncRef(); break; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp index 9f5c6de4..4d8bbc26 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp @@ -971,7 +971,7 @@ void INtSocketOpCompleteSocketConnect (NtOpConnAttempt * op) { failed.param = op->param; failed.connType = op->sendData[0]; failed.remoteAddr = op->remoteAddr; - ZERO(failed.localAddr); + memset(&failed.localAddr, 0, sizeof(failed.localAddr)); op->notifyProc(nil, kNotifySocketConnectFailed, &failed, nil); } @@ -1399,7 +1399,7 @@ bool NtSocketWrite ( } // init Operation - NtOpSocketWrite * op = NEW(NtOpSocketWrite); + NtOpSocketWrite * op = new NtOpSocketWrite; op->overlapped.Offset = 0; op->overlapped.OffsetHigh = 0; op->overlapped.hEvent = nil; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xFile.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xFile.cpp index 8ba35921..7be1cac5 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xFile.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xFile.cpp @@ -322,7 +322,7 @@ AsyncId W9xFileCreateSequence ( CFile * object = (CFile *)file; // Queue an operation - FileOp * op = NEW(FileOp); + FileOp * op = new FileOp; op->code = kNotifyFileSequence; op->notify = notify; op->data.flush.param = param; @@ -342,7 +342,7 @@ AsyncId W9xFileFlushBuffers ( CFile * object = (CFile *)file; // Queue an operation - FileOp * op = NEW(FileOp); + FileOp * op = new FileOp; op->code = kNotifyFileFlush; op->notify = notify; op->data.flush.param = param; @@ -401,7 +401,7 @@ AsyncFile W9xFileOpen ( GetFileTime(fileHandle, nil, nil, (FILETIME *) &lastWriteTime); // Create a file object - CFile * object = NEW(CFile)( + CFile * object = new CFile( fileHandle, notifyProc, userState @@ -436,7 +436,7 @@ AsyncId W9xFileRead ( // Queue asynchronous operations else { - FileOp * op = NEW(FileOp); + FileOp * op = new FileOp; op->code = kNotifyFileRead; op->notify = (flags & kAsyncFileRwNotify) != 0; op->data.read.param = param; @@ -492,7 +492,7 @@ AsyncId W9xFileWrite ( // Queue asynchronous operations else { - FileOp * op = NEW(FileOp); + FileOp * op = new FileOp; op->code = kNotifyFileWrite; op->notify = (flags & kAsyncFileRwNotify) != 0; op->data.write.param = param; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp index 07114d11..a913720c 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp @@ -430,8 +430,8 @@ void CSocket::OnConnect () { // Get addresses for the connection notification AsyncNotifySocketConnect notify; - ZERO(notify.localAddr); - ZERO(notify.remoteAddr); + memset(¬ify.localAddr, 0, sizeof(notify.localAddr)); + memset(¬ify.remoteAddr, 0, sizeof(notify.remoteAddr)); int nameLen = sizeof(notify.localAddr); if (getsockname(m_sock, (sockaddr *)¬ify.localAddr, &nameLen)) if (GetLastError() == WSAENOTCONN) @@ -656,7 +656,7 @@ void CSocket::QueueConnect ( ) { ASSERT(!IsConnected() && !IsDisconnected()); - Command * command = NEW(Command); + Command * command = new Command; command->code = command->CONNECT; command->param = param; command->connect.connType = connType; @@ -671,7 +671,7 @@ void CSocket::QueueWrite ( ) { ASSERT(!IsDisconnected()); - Command * command = NEW(Command); + Command * command = new Command; command->code = command->CONNECT; command->param = param; command->write.data = data; @@ -913,7 +913,7 @@ static unsigned THREADCALL W9xSocketThreadProc (AsyncThread *) { // Register the window class HINSTANCE instance = (HINSTANCE)GetModuleHandle(nil); WNDCLASS wndClass; - ZERO(wndClass); + memset(&wndClass, 0, sizeof(wndClass)); wndClass.lpfnWndProc = WndProc; wndClass.hInstance = instance; wndClass.lpszClassName = CLASS_NAME; @@ -1027,7 +1027,7 @@ void W9xSocketConnect ( UINT message = (s_message++ & 0x3fff) | WM_APP; // range 0x8000 - 0xbfff // Create a socket object - CSocket * object = NEW(CSocket)( + CSocket * object = new CSocket( sequence, message, sock, diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp index f6a134f7..e4ef0e54 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp @@ -206,7 +206,7 @@ void CThreadDispObject::Close () { //=========================================================================== AsyncId CThreadDispObject::Queue (void * op) { AsyncId asyncId = 0; - NEW(CThreadDispRec)(this, op, &asyncId); + new CThreadDispRec(this, op, &asyncId); SetEvent(s_signalEvent); return asyncId; } diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp index 4328aade..3e67b846 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp @@ -158,7 +158,7 @@ static void LookupFindAndProcess (HANDLE cancelHandle, unsigned error) { static unsigned THREADCALL LookupThreadProc (AsyncThread * thread) { static const char WINDOW_CLASS[] = "AsyncLookupWnd"; WNDCLASS wc; - ZERO(wc); + memset(&wc, 0, sizeof(wc)); wc.lpfnWndProc = DefWindowProc; wc.hInstance = GetModuleHandle(0); wc.lpszClassName = WINDOW_CLASS; @@ -291,7 +291,7 @@ void AsyncAddressLookupName ( } // Initialize lookup - Lookup * lookup = NEW(Lookup); + Lookup * lookup = new Lookup; lookup->lookupProc = lookupProc; lookup->port = port; lookup->param = param; @@ -336,7 +336,7 @@ void AsyncAddressLookupAddr ( PerfAddCounter(kAsyncPerfNameLookupAttemptsTotal, 1); // Initialize lookup - Lookup * lookup = NEW(Lookup); + Lookup * lookup = new Lookup; lookup->lookupProc = lookupProc; lookup->port = 1; lookup->param = param; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp index e4e930d9..883b13a0 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp @@ -234,7 +234,7 @@ void AsyncThreadTaskSetThreadCount (unsigned threads) { //=========================================================================== AsyncThreadTaskList * AsyncThreadTaskListCreate () { ASSERT(s_taskPort); - AsyncThreadTaskList * taskList = NEW(AsyncThreadTaskList); + AsyncThreadTaskList * taskList = new AsyncThreadTaskList; taskList->IncRef("TaskList"); return taskList; } @@ -266,7 +266,7 @@ void AsyncThreadTaskAdd ( ASSERT(priority == kThreadTaskPriorityNormal); // Allocate a new task record - ThreadTask * task = NEW(ThreadTask); + ThreadTask * task = new ThreadTask; task->taskList = taskList; task->callback = callback; task->param = param; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp index 33fc5adb..a40d3332 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp @@ -212,7 +212,7 @@ void AsyncCoreDestroy (unsigned waitMs) { TimerDestroy(waitMs); ThreadDestroy(waitMs); - ZERO(g_api); + memset(&g_api, 0, sizeof(g_api)); } //============================================================================ diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp index 65248800..cf4d78c2 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp @@ -504,7 +504,7 @@ void AsyncSocketRegisterNotifyProc ( ASSERT(notifyProc); // Perform memory allocation outside lock - ISocketConnType * ct = NEW(ISocketConnType); + ISocketConnType * ct = new ISocketConnType; ct->notifyProc = notifyProc; ct->connType = connType; ct->buildId = buildId; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceThread.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceThread.cpp index 191f33b7..70f42889 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceThread.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceThread.cpp @@ -109,7 +109,7 @@ void * AsyncThreadCreate ( void * argument, const wchar_t name[] ) { - AsyncThread * thread = NEW(AsyncThread); + AsyncThread * thread = new AsyncThread; thread->proc = threadProc; thread->handle = nil; thread->argument = argument; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceTimer.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceTimer.cpp index ae76e31b..3e6437a0 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceTimer.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceTimer.cpp @@ -253,7 +253,7 @@ void AsyncTimerCreate ( ASSERT(timerProc); // Allocate timer outside critical section - AsyncTimer * t = NEW(AsyncTimer); + AsyncTimer * t = new AsyncTimer; t->timerProc = timerProc; t->destroyProc = nil; t->param = param; diff --git a/Sources/Plasma/NucleusLib/pnCrashExe/Win32/pnCreMail.cpp b/Sources/Plasma/NucleusLib/pnCrashExe/Win32/pnCreMail.cpp index fe62c840..4061d16a 100644 --- a/Sources/Plasma/NucleusLib/pnCrashExe/Win32/pnCreMail.cpp +++ b/Sources/Plasma/NucleusLib/pnCrashExe/Win32/pnCreMail.cpp @@ -166,7 +166,7 @@ void CrashSendEmail ( // create process STARTUPINFO si; - ZERO(si); + memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; si.wShowWindow = SW_HIDE; diff --git a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp index 7c56345d..863ea2ee 100644 --- a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp +++ b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp @@ -168,7 +168,7 @@ plMsgWrap* plDispatch::IDequeue(plMsgWrap** head, plMsgWrap** tail) hsBool plDispatch::ISortToDeferred(plMessage* msg) { - plMsgWrap* msgWrap = TRACKED_NEW plMsgWrap(msg); + plMsgWrap* msgWrap = new plMsgWrap(msg); if( !fFutureMsgQueue ) { if( IGetOwner() ) @@ -463,7 +463,7 @@ hsBool plDispatch::MsgSend(plMessage* msg, hsBool async) else if((timeMsg = plTimeMsg::ConvertNoRef(msg))) ICheckDeferred(timeMsg->DSeconds()); - plMsgWrap* msgWrap = TRACKED_NEW plMsgWrap(msg); + plMsgWrap* msgWrap = new plMsgWrap(msg); hsRefCnt_SafeUnRef(msg); // broadcast @@ -554,7 +554,7 @@ void plDispatch::RegisterForExactType(uint16_t hClass, const plKey& receiver) plTypeFilter* filt = fRegisteredExactTypes[idx]; if( !filt ) { - filt = TRACKED_NEW plTypeFilter; + filt = new plTypeFilter; fRegisteredExactTypes[idx] = filt; filt->fHClass = hClass; } diff --git a/Sources/Plasma/NucleusLib/pnFactory/plCreator.h b/Sources/Plasma/NucleusLib/pnFactory/plCreator.h index 5b48e3b9..7733bb86 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plCreator.h +++ b/Sources/Plasma/NucleusLib/pnFactory/plCreator.h @@ -86,7 +86,7 @@ public: virtual uint16_t ClassIndex() { return CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ \ - virtual plCreatable* Create() const { return TRACKED_NEW plClassName; } \ + virtual plCreatable* Create() const { return new plClassName; } \ \ }; \ static plClassName##__Creator static##plClassName##__Creator; \ @@ -145,7 +145,7 @@ public: virtual uint16_t ClassIndex() { return EXTERN_CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ \ - virtual plCreatable* Create() const { return TRACKED_NEW plClassName; } \ + virtual plCreatable* Create() const { return new plClassName; } \ \ }; \ static plClassName##__Creator static##plClassName##__Creator; \ diff --git a/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp b/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp index 44703e57..c9fab9f5 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp +++ b/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp @@ -68,7 +68,7 @@ hsBool plFactory::ICreateTheFactory() if( theFactory ) return true; - theFactory = TRACKED_NEW plFactory; + theFactory = new plFactory; return theFactory != nil; } diff --git a/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp b/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp index 23e1af62..bf969711 100644 --- a/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp +++ b/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp @@ -156,7 +156,7 @@ static IniValue * AddKeyValue ( } // Add a new value holder for the key - return NEW(IniValue)(key, lineNum); + return new IniValue(key, lineNum); } @@ -456,7 +456,7 @@ static bool ParseFile ( Ini * IniOpen ( const wchar_t fileName[] ) { - Ini * ini = NEW(Ini); + Ini * ini = new Ini; if (!ParseFile(ini, fileName)) { IniClose(ini); return nil; diff --git a/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp b/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp index 86871bca..d988aff8 100644 --- a/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp +++ b/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp @@ -321,7 +321,7 @@ void IniChangeAdd ( ASSERT(s_running); // Create a callback record - IniChangeReg * change = NEW(IniChangeReg); + IniChangeReg * change = new IniChangeReg; change->fNotify = callback; change->fLastWriteTime = 0; PathAddFilename( diff --git a/Sources/Plasma/NucleusLib/pnIniExe/Private/pnIniSrv.cpp b/Sources/Plasma/NucleusLib/pnIniExe/Private/pnIniSrv.cpp index 09f7f332..ffe2f6c6 100644 --- a/Sources/Plasma/NucleusLib/pnIniExe/Private/pnIniSrv.cpp +++ b/Sources/Plasma/NucleusLib/pnIniExe/Private/pnIniSrv.cpp @@ -102,7 +102,7 @@ static EServerRights GetServerRightsFromString(const wchar_t string[]) { } static void IAddAddressBlock(ADDRESS_BLOCK_TABLE & addrList, NetAddressNode startAddr, NetAddressNode endAddr, EServerRights srvRights) { - PrivilegedAddressBlock* addrBlock = NEW(PrivilegedAddressBlock); + PrivilegedAddressBlock* addrBlock = new PrivilegedAddressBlock; addrBlock->startAddress = startAddr; addrBlock->serverRights = srvRights; diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp index 51207ffe..37196432 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp +++ b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp @@ -201,7 +201,7 @@ hsBool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags ) if( IFindBinding( code ) != nil ) return false; - fBindings.Append( TRACKED_NEW plKeyBinding( code, codeFlags, plKeyCombo::kUnmapped, plKeyCombo::kUnmapped ) ); + fBindings.Append( new plKeyBinding( code, codeFlags, plKeyCombo::kUnmapped, plKeyCombo::kUnmapped ) ); return true; } @@ -214,7 +214,7 @@ hsBool plKeyMap::AddConsoleCommand( const char *command ) if( IFindConsoleBinding( command ) != nil ) return false; - fBindings.Append( TRACKED_NEW plKeyBinding( B_CONTROL_CONSOLE_COMMAND, + fBindings.Append( new plKeyBinding( B_CONTROL_CONSOLE_COMMAND, kControlFlagDownEvent | kControlFlagNoRepeat | kControlFlagNoDeactivate, plKeyCombo::kUnmapped, plKeyCombo::kUnmapped, command ) ); diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp index 96427af9..24c00ff1 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp @@ -289,7 +289,7 @@ void plKeyImp::UnRefObject(plRefFlags::Type flags) ClearNotifyCreated(); plKey key=plKey::Make( this ); // for linux build - plSelfDestructMsg* nuke = TRACKED_NEW plSelfDestructMsg( key ); + plSelfDestructMsg* nuke = new plSelfDestructMsg( key ); plgDispatch::Dispatch()->MsgSend(nuke); } } @@ -444,7 +444,7 @@ void plKeyImp::SatisfyPending() const if (!--fPendingRefs) { #ifdef PL_SEND_SATISFIED - plSatisfiedMsg* msg = TRACKED_NEW plSatisfiedMsg(this); + plSatisfiedMsg* msg = new plSatisfiedMsg(this); plgDispatch::MsgSend(msg); #endif // PL_SEND_SATISFIED } @@ -645,7 +645,7 @@ void plKeyImp::IRelease(plKeyImp* iTargetKey) iTargetKey->ClearNotifyCreated(); plKey key = plKey::Make(iTargetKey); - plSelfDestructMsg* nuke = TRACKED_NEW plSelfDestructMsg(key); + plSelfDestructMsg* nuke = new plSelfDestructMsg(key); plgDispatch::Dispatch()->MsgSend(nuke); } else diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp index 81790613..edcf60c5 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp @@ -124,7 +124,7 @@ hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg) hsAssert(event, "Message forwarder only supports event callback messages"); if (event) { - plForwardCallback *fc = TRACKED_NEW plForwardCallback; + plForwardCallback *fc = new plForwardCallback; fc->fNumCallbacks = fForwardKeys.Count(); // Turn off net propagate the callbacks to us will all be local. Only the diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp b/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp index 79941801..1ff3d870 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp +++ b/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp @@ -203,14 +203,14 @@ void plMessage::IMsgWriteVersion(hsStream* s, hsResMgr* mgr) void plMessage::AddNetReceiver( uint32_t plrID ) { if ( !fNetRcvrPlayerIDs ) - fNetRcvrPlayerIDs = TRACKED_NEW std::vector; + fNetRcvrPlayerIDs = new std::vector; fNetRcvrPlayerIDs->push_back( plrID ); } void plMessage::AddNetReceivers( const std::vector & plrIDs ) { if ( !fNetRcvrPlayerIDs ) - fNetRcvrPlayerIDs = TRACKED_NEW std::vector; + fNetRcvrPlayerIDs = new std::vector; std::copy( plrIDs.begin(), plrIDs.end(), std::back_inserter( *fNetRcvrPlayerIDs ) ); } @@ -359,7 +359,7 @@ int plMsgCStringHelper::Peek(char *& str, hsStream* stream, const uint32_t peekO { if (strlen) { - str = TRACKED_NEW char[strlen+1]; + str = new char[strlen+1]; str[strlen] = '\0'; if (strlen) { stream->LogRead(strlen,str,"CString"); diff --git a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp index 0d83482c..344da416 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp +++ b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp @@ -247,7 +247,7 @@ void plNotifyMsg::AddCollisionEvent( hsBool enter, const plKey &other, const plK } // create the collision event record - proCollisionEventData* pED = TRACKED_NEW proCollisionEventData; + proCollisionEventData* pED = new proCollisionEventData; pED->fEnter = enter; pED->fHitter = other; pED->fHittee = self; @@ -283,7 +283,7 @@ void plNotifyMsg::AddCallbackEvent( int32_t event ) } // create the collision event record - proCallbackEventData* pED = TRACKED_NEW proCallbackEventData; + proCallbackEventData* pED = new proCallbackEventData; pED->fEventType = event; fEvents.Append(pED); // then add it to the list of event records } @@ -318,7 +318,7 @@ void plNotifyMsg::AddResponderStateEvent( int32_t state ) } // create the collision event record - proResponderStateEventData* pED = TRACKED_NEW proResponderStateEventData; + proResponderStateEventData* pED = new proResponderStateEventData; pED->fState = state; fEvents.Append(pED); // then add it to the list of event records } @@ -335,7 +335,7 @@ void plNotifyMsg::AddMultiStageEvent( int32_t stage, int32_t event, const plKey& { // we can have multi events of this type // create the mutlistage event record - proMultiStageEventData* pED = TRACKED_NEW proMultiStageEventData; + proMultiStageEventData* pED = new proMultiStageEventData; pED->fStage = stage; pED->fEvent = event; pED->fAvatar = avatar; @@ -344,7 +344,7 @@ void plNotifyMsg::AddMultiStageEvent( int32_t stage, int32_t event, const plKey& void plNotifyMsg::AddCoopEvent(uint32_t id, uint16_t serial) { - proCoopEventData *pED = TRACKED_NEW proCoopEventData; + proCoopEventData *pED = new proCoopEventData; pED->fID = id; pED->fSerial = serial; fEvents.Append(pED); @@ -352,7 +352,7 @@ void plNotifyMsg::AddCoopEvent(uint32_t id, uint16_t serial) void plNotifyMsg::AddSpawnedEvent (const plKey &spawner, const plKey &spawnee) { - proSpawnedEventData* pED = TRACKED_NEW proSpawnedEventData(); + proSpawnedEventData* pED = new proSpawnedEventData(); pED->fSpawner = spawner; pED->fSpawnee = spawnee; fEvents.Append(pED); @@ -393,7 +393,7 @@ void plNotifyMsg::AddActivateEvent( hsBool activate ) } // create the collision event record - proActivateEventData* pED = TRACKED_NEW proActivateEventData; + proActivateEventData* pED = new proActivateEventData; pED->fActive = true; pED->fActivate = activate; fEvents.Append(pED); // then add it to the list of event records @@ -435,7 +435,7 @@ void plNotifyMsg::AddPickEvent( const plKey &other, const plKey& self, hsBool en } // create the pick event record - proPickedEventData* pED = TRACKED_NEW proPickedEventData; + proPickedEventData* pED = new proPickedEventData; pED->fPicker = other; pED->fPicked = self; pED->fEnabled = enabled; @@ -480,7 +480,7 @@ void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contai } // create the pick event record - proContainedEventData* pED = TRACKED_NEW proContainedEventData; + proContainedEventData* pED = new proContainedEventData; pED->fContained = contained; pED->fContainer = container; pED->fEntering = entering; @@ -526,7 +526,7 @@ void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, float d } // create the pick event record - proFacingEventData* pED = TRACKED_NEW proFacingEventData; + proFacingEventData* pED = new proFacingEventData; pED->fFacer = other; pED->fFacee = self; pED->dot = dot; @@ -569,7 +569,7 @@ void plNotifyMsg::AddControlKeyEvent( int32_t key, hsBool down ) } // create the control key event record - proControlKeyEventData* pED = TRACKED_NEW proControlKeyEventData; + proControlKeyEventData* pED = new proControlKeyEventData; pED->fControlKey = key; pED->fDown = down; fEvents.Append(pED); // then add it to the list of event records @@ -586,7 +586,7 @@ void plNotifyMsg::AddControlKeyEvent( int32_t key, hsBool down ) void plNotifyMsg::AddVariableEvent( const char* name, float number ) { // create the control key event record - proVariableEventData* pED = TRACKED_NEW proVariableEventData; + proVariableEventData* pED = new proVariableEventData; pED->fName = hsStrcpy(nil,name); // pED->fName = (char*)name; pED->fDataType = proEventData::kNumber; @@ -606,7 +606,7 @@ void plNotifyMsg::AddVariableEvent( const char* name, float number ) void plNotifyMsg::AddVariableEvent( const char* name, const plKey &key ) { // create the control key event record - proVariableEventData* pED = TRACKED_NEW proVariableEventData; + proVariableEventData* pED = new proVariableEventData; pED->fName = hsStrcpy(nil,name); // pED->fName = (char*)name; pED->fDataType = proEventData::kKey; @@ -651,7 +651,7 @@ void plNotifyMsg::AddClickDragEvent( const plKey& dragger, const plKey& dragee, } // create the control key event record - proClickDragEventData* pED = TRACKED_NEW proClickDragEventData; + proClickDragEventData* pED = new proClickDragEventData; pED->picked = dragee; pED->picker = dragger; pED->animPos = animPos; @@ -694,7 +694,7 @@ void plNotifyMsg::AddOfferBookEvent(const plKey& offerer, int targetAge, int off } // create the control key event record - proOfferLinkingBookEventData* pED = TRACKED_NEW proOfferLinkingBookEventData; + proOfferLinkingBookEventData* pED = new proOfferLinkingBookEventData; pED->offerer = offerer; pED->targetAge = targetAge; pED->offeree = offeree; @@ -736,7 +736,7 @@ void plNotifyMsg::AddBookEvent( uint32_t event, uint32_t linkID /*=0*/) } // create the control key event record - proBookEventData* pED = TRACKED_NEW proBookEventData; + proBookEventData* pED = new proBookEventData; pED->fEvent = event; pED->fLinkID = linkID; fEvents.Append(pED); // then add it to the list of event records @@ -776,7 +776,7 @@ void plNotifyMsg::AddHitClimbingBlockerEvent(const plKey &blocker) } // create the control key event record - proClimbingBlockerHitEventData* pED = TRACKED_NEW proClimbingBlockerHitEventData; + proClimbingBlockerHitEventData* pED = new proClimbingBlockerHitEventData; pED->fBlockerKey = blocker; fEvents.Append(pED); // then add it to the list of event records } @@ -1002,21 +1002,21 @@ proEventData* proEventData::ICreateEventDataType(int32_t type) { switch (type) { - case kCollision: return TRACKED_NEW proCollisionEventData; - case kPicked: return TRACKED_NEW proPickedEventData; - case kControlKey: return TRACKED_NEW proControlKeyEventData; - case kVariable: return TRACKED_NEW proVariableEventData; - case kFacing: return TRACKED_NEW proFacingEventData; - case kContained: return TRACKED_NEW proContainedEventData; - case kActivate: return TRACKED_NEW proActivateEventData; - case kCallback: return TRACKED_NEW proCallbackEventData; - case kResponderState: return TRACKED_NEW proResponderStateEventData; - case kMultiStage: return TRACKED_NEW proMultiStageEventData; - case kCoop: return TRACKED_NEW proCoopEventData; - case kSpawned: return TRACKED_NEW proSpawnedEventData; - case kOfferLinkingBook: return TRACKED_NEW proOfferLinkingBookEventData; - case kBook: return TRACKED_NEW proBookEventData; - case kClimbingBlockerHit: return TRACKED_NEW proClimbingBlockerHitEventData; + case kCollision: return new proCollisionEventData; + case kPicked: return new proPickedEventData; + case kControlKey: return new proControlKeyEventData; + case kVariable: return new proVariableEventData; + case kFacing: return new proFacingEventData; + case kContained: return new proContainedEventData; + case kActivate: return new proActivateEventData; + case kCallback: return new proCallbackEventData; + case kResponderState: return new proResponderStateEventData; + case kMultiStage: return new proMultiStageEventData; + case kCoop: return new proCoopEventData; + case kSpawned: return new proSpawnedEventData; + case kOfferLinkingBook: return new proOfferLinkingBookEventData; + case kBook: return new proBookEventData; + case kClimbingBlockerHit: return new proClimbingBlockerHitEventData; } return nil; diff --git a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp index dcd5d2b4..a28ef3d6 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp +++ b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp @@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com void plLogicModBase::ConsoleTrigger(plKey playerKey) { // Setup the event data in case this is a OneShot responder that needs it - proPickedEventData *ed = TRACKED_NEW proPickedEventData; + proPickedEventData *ed = new proPickedEventData; ed->fPicker = playerKey; ed->fPicked = nil; fNotify->AddEvent(ed); @@ -80,7 +80,7 @@ fTimer(0.0f), fNotify(nil), fDisabled(false) { - fNotify = TRACKED_NEW plNotifyMsg; + fNotify = new plNotifyMsg; } plLogicModBase::~plLogicModBase() @@ -113,7 +113,7 @@ void plLogicModBase::RegisterForMessageType(uint16_t hClass) void plLogicModBase::IUpdateSharedState(bool triggered) const { plNetSharedState ss("TrigState"); - plGenericVar* sv = TRACKED_NEW plGenericVar("Triggered"); + plGenericVar* sv = new plGenericVar("Triggered"); sv->Value().SetBool(triggered); // attempting to set trig state to true ss.AddVar(sv); @@ -304,7 +304,7 @@ void plLogicModBase::Reset(bool bCounterReset) void plLogicModBase::CreateNotifyMsg() { - fNotify = TRACKED_NEW plNotifyMsg; + fNotify = new plNotifyMsg; for (int i = 0; i < fReceiverList.Count(); i++) fNotify->AddReceiver(fReceiverList[i]); } diff --git a/Sources/Plasma/NucleusLib/pnNetCli/pnNcChannel.cpp b/Sources/Plasma/NucleusLib/pnNetCli/pnNcChannel.cpp index 82236330..0db62460 100644 --- a/Sources/Plasma/NucleusLib/pnNetCli/pnNcChannel.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCli/pnNcChannel.cpp @@ -261,14 +261,14 @@ static NetMsgChannel * FindChannel_CS (unsigned protocol, bool server) { //=========================================================================== static NetMsgChannel * FindOrCreateChannel_CS (unsigned protocol, bool server) { if (!s_channels) { - s_channels = NEW(LIST(NetMsgChannel)); + s_channels = new LIST(NetMsgChannel); s_channels->SetLinkOffset(offsetof(NetMsgChannel, m_link)); } // find or create protocol NetMsgChannel * channel = FindChannel_CS(protocol, server); if (!channel) { - channel = NEW(NetMsgChannel); + channel = new NetMsgChannel(); channel->m_protocol = protocol; channel->m_server = server; channel->m_largestRecv = 0; diff --git a/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp b/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp index f47606a5..3f25d060 100644 --- a/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp @@ -662,7 +662,7 @@ static void ClientConnect (NetCli * cli) { // Save client seed { - ZERO(cli->seed); + memset(&cli->seed, 0, sizeof(cli->seed)); unsigned bytes; unsigned char * data = clientSeed.GetData_LE(&bytes); MemCopy(cli->seed, data, min(bytes, sizeof(cli->seed))); @@ -724,7 +724,7 @@ static bool ServerRecvConnect ( &clientSeedValue ); - ZERO(clientSeed); + memset(&clientSeed, 0, sizeof(clientSeed)); unsigned bytes; unsigned char * data = clientSeedValue.GetData_LE(&bytes); MemCopy(clientSeed, data, min(bytes, sizeof(clientSeed))); diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp index a987d934..9109c4a4 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp @@ -304,7 +304,7 @@ void plGenericType::SetVar(Types t, unsigned int size, void* val) case kString : { delete [] fS; - fS = TRACKED_NEW char[size+1]; + fS = new char[size+1]; memcpy(fS,val,size); fS[size] = 0; break; diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp index 0683269a..faa3278c 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp @@ -75,7 +75,7 @@ void plNetSharedState::Copy(plNetSharedState *ss) int i; for(i=0;iGetNumVars();i++) { - plGenericVar* sv = TRACKED_NEW plGenericVar; + plGenericVar* sv = new plGenericVar; *sv = *(ss->GetVar(i)); AddVar(sv); } @@ -93,7 +93,7 @@ void plNetSharedState::Read(hsStream* stream) int i; for(i=0;iRead(stream); AddVar(v); } diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp index 2f6ae3e8..5e650637 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedObject.cpp @@ -101,7 +101,7 @@ plSynchedValueBase* plSynchedObject::GetSynchedValue(int i) const void plSynchedObject::IAppendSynchedValueAddrOffset(AddrOffsetType synchedValueAddrOffset) { // copy to new larger array - AddrOffsetType* tmp = TRACKED_NEW AddrOffsetType[fNumSynchedValues+1]; + AddrOffsetType* tmp = new AddrOffsetType[fNumSynchedValues+1]; int32_t i; for(i=0;iSetFlags(synchFlags); hsAssert(GetKey(), "nil key on synchedObject?"); diff --git a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp index d078539f..e0eef4cf 100644 --- a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp +++ b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp @@ -237,7 +237,7 @@ static void AuthPingProc (void * param) { if (!conn->pingsInRoute) { - AuthTrans * trans = NEW(AuthTrans)(conn); + AuthTrans * trans = new AuthTrans(conn); trans->pingAtMs = TimeGetMs(); s_critsect.Enter(); @@ -436,7 +436,7 @@ static void FilePingProc (void * param) { if (!conn->pingsInRoute) { - FileTrans * trans = NEW(FileTrans)(conn); + FileTrans * trans = new FileTrans(conn); trans->pingAtMs = TimeGetMs(); s_critsect.Enter(); diff --git a/Sources/Plasma/NucleusLib/pnNetLog/pnNlApi.cpp b/Sources/Plasma/NucleusLib/pnNetLog/pnNlApi.cpp index 9e64706f..aecc1868 100644 --- a/Sources/Plasma/NucleusLib/pnNetLog/pnNlApi.cpp +++ b/Sources/Plasma/NucleusLib/pnNetLog/pnNlApi.cpp @@ -189,7 +189,7 @@ void NetLogRegisterEvents (const NetLogEvent events[], unsigned count) { HASHTABLEDECL(NetLogEventHash, EventHash, link) tempHashTable; for(unsigned i = 0; i < count; ++i) { - hash = NEW(NetLogEventHash)(events[i].logEventType, events[i].srvType, &events[i]); + hash = new NetLogEventHash(events[i].logEventType, events[i].srvType, &events[i]); tempHashTable.Add(hash); } s_critsect.Enter(); diff --git a/Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp b/Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp index d668c5a4..f158a4e8 100644 --- a/Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp +++ b/Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp @@ -156,7 +156,7 @@ static void NetLogConnDisconnect () { //============================================================================ static void AddEventNode (Srv2Log_LogMsg *msg) { - LogConnEventNode *node = NEW(LogConnEventNode)(msg, TimeGetMs() + kIssueSaveMs); + LogConnEventNode *node = new LogConnEventNode(msg, TimeGetMs() + kIssueSaveMs); s_critsect.Enter(); { s_eventQueue.Link(node); diff --git a/Sources/Plasma/NucleusLib/pnOraLib/pnOraLib.cpp b/Sources/Plasma/NucleusLib/pnOraLib/pnOraLib.cpp index ff712593..36cd5084 100644 --- a/Sources/Plasma/NucleusLib/pnOraLib/pnOraLib.cpp +++ b/Sources/Plasma/NucleusLib/pnOraLib/pnOraLib.cpp @@ -242,7 +242,7 @@ void OraConnPool::Initialize ( const wchar_t connectString[], unsigned stmtCacheSize ) { - data = NEW(OraInitData)(stmtCacheSize, username, password, connectString); + data = new OraInitData(stmtCacheSize, username, password, connectString); critsect.Enter(); { diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp index b5a148c7..03a3d50a 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp @@ -159,7 +159,7 @@ void plAudioInterface::Read(hsStream* s, hsResMgr* mgr) { plObjInterface::Read(s, mgr); - plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); + plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kAudible); mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef); } @@ -180,7 +180,7 @@ void plAudioInterface::ISetAudible(plAudible* aud) fAudible->SetSceneObject(fOwner->GetKey()); } - plAudioSysMsg* pMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kPing ); + plAudioSysMsg* pMsg = new plAudioSysMsg( plAudioSysMsg::kPing ); pMsg->SetSender(GetKey()); // pMsg->SetBCastFlag(plMessage::kBCastByExactType, false); plgDispatch::MsgSend( pMsg ); @@ -248,7 +248,7 @@ hsBool plAudioInterface::MsgReceive(plMessage* msg) } if (pSoundMsg->Cmd( plSoundMsg::kGetNumSounds ) ) { - plSoundMsg* pReply = TRACKED_NEW plSoundMsg; + plSoundMsg* pReply = new plSoundMsg; pReply->fIndex = fAudible->GetNumSounds(); pReply->AddReceiver(pSoundMsg->GetSender()); pReply->SetCmd( plSoundMsg::kGetNumSounds ); @@ -303,7 +303,7 @@ hsBool plAudioInterface::MsgReceive(plMessage* msg) if( !fAudibleInited ) { // Arrgh, can't activate yet, so attempt to re-activate some time in the near future - pASMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kActivate ); + pASMsg = new plAudioSysMsg( plAudioSysMsg::kActivate ); pASMsg->SetBCastFlag( plMessage::kBCastByExactType, false ); pASMsg->SetBCastFlag( plMessage::kNetPropagate, false ); pASMsg->SetTimeStamp( hsTimer::GetSysSeconds() + 1.f ); diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp index f759dba0..643834be 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp @@ -561,7 +561,7 @@ void plCoordinateInterface::Read(hsStream* stream, hsResMgr* mgr) int i; for( i = 0; i < n; i++ ) { - plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject); + plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plIntRefMsg::kChildObject); mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kPassiveRef); } } diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp index 50a5ee74..67649156 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp @@ -154,7 +154,7 @@ void plDrawInterface::Read(hsStream* s, hsResMgr* mgr) { fDrawableIndices[i] = s->ReadLE32(); - plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, i, plIntRefMsg::kDrawable); + plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, i, plIntRefMsg::kDrawable); mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef); } @@ -162,7 +162,7 @@ void plDrawInterface::Read(hsStream* s, hsResMgr* mgr) fRegions.SetCountAndZero(nReg); for( i = 0; i < nReg; i++ ) { - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisRegion); + plGenRefMsg* refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisRegion); mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef); } } @@ -198,7 +198,7 @@ void plDrawInterface::ReleaseData( void ) { if( fDrawables[i] && (fDrawableIndices[i] != uint32_t(-1)) ) { - plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(fDrawables[i]->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[i], 0); + plDISpansMsg* diMsg = new plDISpansMsg(fDrawables[i]->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[i], 0); diMsg->SetSender(GetKey()); diMsg->Send(); } @@ -237,7 +237,7 @@ void plDrawInterface::ISetDrawable(uint8_t which, plDrawable* dr) #ifdef HS_DEBUGGING if( fDrawableIndices[which] != (uint32_t)-1 ) { - plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(dr->GetKey(), plDISpansMsg::kAddingSpan, fDrawableIndices[which], 0); + plDISpansMsg* diMsg = new plDISpansMsg(dr->GetKey(), plDISpansMsg::kAddingSpan, fDrawableIndices[which], 0); diMsg->SetSender(GetKey()); diMsg->Send(); } @@ -300,7 +300,7 @@ void plDrawInterface::SetDrawable(uint8_t which, plDrawable *dr) if( dr ) { // This is a little convoluted, but it makes GCC happy and doesn't hurt anybody. - plIntRefMsg* intRefMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, which, plIntRefMsg::kDrawable); + plIntRefMsg* intRefMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, which, plIntRefMsg::kDrawable); plRefMsg* refMsg = intRefMsg; // hsgResMgr::ResMgr()->SendRef(dr->GetKey(), intRefMsg, plRefFlags::kActiveRef); // THIS WON'T COMPILE UNDER GCC hsgResMgr::ResMgr()->SendRef(dr, refMsg, plRefFlags::kActiveRef); @@ -366,7 +366,7 @@ void plDrawInterface::SetUpForParticleSystem( uint32_t maxNumEmitters, uint32 int i; for( i = 0; i < lights.GetCount(); i++ ) { - hsgResMgr::ResMgr()->AddViaNotify(lights[i], TRACKED_NEW plGenRefMsg(fDrawables[0]->GetKey(), plRefMsg::kOnCreate, fDrawableIndices[0], plDrawable::kMsgPermaLightDI), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(lights[i], new plGenRefMsg(fDrawables[0]->GetKey(), plRefMsg::kOnCreate, fDrawableIndices[0], plDrawable::kMsgPermaLightDI), plRefFlags::kPassiveRef); } ISetVisRegions(0); diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp index 97c3b97f..f773fbc0 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp @@ -72,7 +72,7 @@ void plObjInterface::Read(hsStream* s, hsResMgr* mgr) { plSynchedObject::Read(s, mgr); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kOwner), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(s, new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kOwner), plRefFlags::kPassiveRef); fProps.Read(s); } diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp index fef77f1f..52102af5 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp @@ -111,16 +111,16 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr) // Interfaces will attach themselves to us on read. // DI - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); // SI - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); // CI - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); // AI - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); int i; @@ -128,7 +128,7 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr) fGenerics.SetCount(0); for( i = 0; i < nGen; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kInterface), plRefFlags::kActiveRef); } plObjRefMsg* refMsg; @@ -138,7 +138,7 @@ void plSceneObject::Read(hsStream* stream, hsResMgr* mgr) fModifiers.ExpandAndZero(nOldMods+nNewMods); // reserve space for new modifiers+existing modifiers for( i = nOldMods; i < nOldMods+nNewMods; i++ ) { - refMsg = TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, i, plObjRefMsg::kModifier); + refMsg = new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, i, plObjRefMsg::kModifier); mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef); } @@ -425,7 +425,7 @@ void plSceneObject::SetSceneNode(plKey newNode) if( newNode ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); + plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); plKey key = GetKey(); // for linux build hsgResMgr::ResMgr()->AddViaNotify(key, refMsg, plRefFlags::kActiveRef); } @@ -520,7 +520,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg) hsAssert(false, "Trying to attach a child who has no coordinateInterface"); return true; } - plIntRefMsg* intRefMsg = TRACKED_NEW plIntRefMsg(fCoordinateInterface->GetKey(), att->GetContext(), -1, plIntRefMsg::kChildObject); + plIntRefMsg* intRefMsg = new plIntRefMsg(fCoordinateInterface->GetKey(), att->GetContext(), -1, plIntRefMsg::kChildObject); intRefMsg->SetRef(child); hsgResMgr::ResMgr()->AddViaNotify(intRefMsg, plRefFlags::kPassiveRef); } diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp index 3b111837..41915e81 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp @@ -99,7 +99,7 @@ void plSimulationInterface::Read(hsStream* s, hsResMgr* mgr) // Also unnecessary int poop = s->ReadLE32(); - plIntRefMsg* refMsg = TRACKED_NEW plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical, 0); + plIntRefMsg* refMsg = new plIntRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plIntRefMsg::kPhysical, 0); mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef); } diff --git a/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp b/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp index de13808b..0743b003 100644 --- a/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp +++ b/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp @@ -565,7 +565,7 @@ void SimpleNetStartConnecting ( ASSERT(s_running); ASSERT(onConnect); - ConnectParam * cp = NEW(ConnectParam); + ConnectParam * cp = new ConnectParam; cp->callback = onConnect; cp->param = param; diff --git a/Sources/Plasma/NucleusLib/pnSqlLib/Private/pnSqlConn.cpp b/Sources/Plasma/NucleusLib/pnSqlLib/Private/pnSqlConn.cpp index 2fe918bc..164bcfa1 100644 --- a/Sources/Plasma/NucleusLib/pnSqlLib/Private/pnSqlConn.cpp +++ b/Sources/Plasma/NucleusLib/pnSqlLib/Private/pnSqlConn.cpp @@ -587,7 +587,7 @@ bool SqlConn::GrowConnections_CS (unsigned attempts) { break; // Leave the critical section to perform connection - SqlStmt * stmt = NEW(SqlStmt)(this); + SqlStmt * stmt = new SqlStmt(this); // Ensure that the connection string is valid // for the duration of the initialization by @@ -789,7 +789,7 @@ SqlConn * SqlConnCreate ( LogErr(result, SQL_HANDLE_ENV, henv, L"SQLSetEnvAttr(version)", L""); // Allocate a connection record - SqlConn * conn = NEW(SqlConn)(connectStr, henv); + SqlConn * conn = new SqlConn(connectStr, henv); // Update configuration options conn->critsect.Enter(); diff --git a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp index e7e37600..39d9019e 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp @@ -84,7 +84,7 @@ hsBool plTimerCallbackManager::MsgReceive(plMessage* msg) plTimerCallback* plTimerCallbackManager::NewTimer(float time, plMessage* pMsg) { - plTimerCallback* t = TRACKED_NEW plTimerCallback( hsTimer::GetSysSeconds() + time, pMsg ); + plTimerCallback* t = new plTimerCallback( hsTimer::GetSysSeconds() + time, pMsg ); fCallbacks.Append(t); // sort them for (int i = 0; i < fCallbacks.Count(); i++) @@ -176,7 +176,7 @@ plTimerCallbackManager* plgTimerCallbackMgr::fMgr = nil; void plgTimerCallbackMgr::Init() { - fMgr = TRACKED_NEW plTimerCallbackManager; + fMgr = new plTimerCallbackManager; fMgr->RegisterAs( kTimerCallbackManager_KEY ); // fixedKey from plFixedKey.h plgDispatch::Dispatch()->RegisterForExactType( plTimeMsg::Index(), fMgr->GetKey() ); } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp index a6610717..17c96136 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp @@ -178,7 +178,7 @@ CLockWaitSet * CLockWaitSetAllocator::Alloc () { if (!s_allocator || !s_allocator->m_spareList.Head()) { if (!s_allocator) atexit(Shutdown); - s_allocator = NEW(CLockWaitSetAllocator)(s_allocator); + s_allocator = new CLockWaitSetAllocator(s_allocator); } // Get an available wait set from the active allocator diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp index 7851873a..270e83e6 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp @@ -122,7 +122,7 @@ int BigNum::Compare (uint32_t a) const { //=========================================================================== void BigNum::FromData_LE (unsigned bytes, const void * data) { - unsigned char * buffer = TRACKED_NEW unsigned char[bytes]; + unsigned char * buffer = new unsigned char[bytes]; memcpy(buffer, data, bytes); byteswap(bytes, buffer); BN_bin2bn(buffer, bytes, &m_number); @@ -133,7 +133,7 @@ void BigNum::FromData_LE (unsigned bytes, const void * data) unsigned char * BigNum::GetData_BE (unsigned * bytes) const { *bytes = BN_num_bytes(&m_number); - unsigned char * data = TRACKED_NEW unsigned char[*bytes]; + unsigned char * data = new unsigned char[*bytes]; BN_bn2bin(&m_number, data); return data; } @@ -142,7 +142,7 @@ unsigned char * BigNum::GetData_BE (unsigned * bytes) const unsigned char * BigNum::GetData_LE (unsigned * bytes) const { *bytes = BN_num_bytes(&m_number); - unsigned char * data = TRACKED_NEW unsigned char[*bytes]; + unsigned char * data = new unsigned char[*bytes]; BN_bn2bin(&m_number, data); byteswap(*bytes, data); return data; diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp index d4ce91f2..214c7b8d 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp @@ -594,7 +594,7 @@ unsigned CCmdParser::GetUnsigned (const wchar_t name[]) const { //=========================================================================== void CCmdParser::Initialize (const CmdArgDef def[], unsigned defCount) { - fParser = NEW(CICmdParser)(def, defCount); + fParser = new CICmdParser(def, defCount); } //=========================================================================== diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp index 707b4420..9f6ecf38 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp @@ -232,9 +232,9 @@ CryptKey * CryptKeyCreate ( CryptKey * key = nil; switch (algorithm) { case kCryptRc4: { - RC4_KEY * rc4 = NEW(RC4_KEY); + RC4_KEY * rc4 = new RC4_KEY; RC4_set_key(rc4, bytes, (const unsigned char *)data); - key = NEW(CryptKey); + key = new CryptKey; key->algorithm = kCryptRc4; key->handle = rc4; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h index dcbd85c1..a26d8fb9 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h @@ -200,7 +200,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * BSEARCH * * This macro binary searches a sorted array to find an existing entry or -* the position where a TRACKED_NEW entry should be placed. It returns the index of +* the position where a new entry should be placed. It returns the index of * the first entry for which the expression is false (zero or negative), or * count if the expression is true (positive) for all entries. * diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp index 2e71a671..45036568 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp @@ -147,7 +147,7 @@ bool IParseForSubst ( // We've found a variable, copy the current data to a new object if (current != src) { int strLen = (current - src) - 1; - SUBST_BLOCK * block = NEW(SUBST_BLOCK); + SUBST_BLOCK * block = new SUBST_BLOCK; block->isVar = false; block->strLen = strLen; block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype)); @@ -166,7 +166,7 @@ bool IParseForSubst ( // Copy variable name excluding trailing '%' int strLen = (varEnd - varStart); - SUBST_BLOCK * block = NEW(SUBST_BLOCK); + SUBST_BLOCK * block = new SUBST_BLOCK; block->isVar = true; block->strLen = strLen; block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype)); @@ -180,7 +180,7 @@ bool IParseForSubst ( // Check and see if there's any data remaining if (current != src) { int strLen = (current - src); - SUBST_BLOCK * block = NEW(SUBST_BLOCK); + SUBST_BLOCK * block = new SUBST_BLOCK; block->isVar = false; block->strLen = strLen; block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype)); diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp index b9d77fdc..0e52e7b1 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp @@ -182,7 +182,7 @@ protected: if (hsCheckBits(flags, plManifestFile::kFlagZipped)) zippedSize = atoi(tokenizer->next()); - return TRACKED_NEW plManifestFile(name, "", sum, size, zippedSize, flags); + return new plManifestFile(name, "", sum, size, zippedSize, flags); } virtual hsBool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData) diff --git a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp index fdbe432c..e0a0c160 100644 --- a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp @@ -193,7 +193,7 @@ void plAgeLoader::NotifyAgeLoaded( bool loaded ) else fFlags &= ~kUnLoadingAge; - plAgeLoadedMsg * msg = TRACKED_NEW plAgeLoadedMsg; + plAgeLoadedMsg * msg = new plAgeLoadedMsg; msg->fLoaded = loaded; msg->Send(); } @@ -216,7 +216,7 @@ bool plAgeLoader::ILoadAge(const char ageName[]) fFlags |= kLoadingAge; - plAgeBeginLoadingMsg* ageBeginLoading = TRACKED_NEW plAgeBeginLoadingMsg(); + plAgeBeginLoadingMsg* ageBeginLoading = new plAgeBeginLoadingMsg(); ageBeginLoading->Send(); /////////////////////////////////////////////////////// @@ -272,7 +272,7 @@ bool plAgeLoader::ILoadAge(const char ageName[]) // Tell the client to load-and-hold all the keys for this age, to make the loading process work better - plClientMsg *loadAgeKeysMsg = TRACKED_NEW plClientMsg( plClientMsg::kLoadAgeKeys ); + plClientMsg *loadAgeKeysMsg = new plClientMsg( plClientMsg::kLoadAgeKeys ); loadAgeKeysMsg->SetAgeName( fAgeName); loadAgeKeysMsg->Send( clientKey ); @@ -282,12 +282,12 @@ bool plAgeLoader::ILoadAge(const char ageName[]) plUoid oid=nc->GetAgeSDLObjectUoid(fAgeName); plKey ageSDLObjectKey = hsgResMgr::ResMgr()->FindKey(oid); if (ageSDLObjectKey) - hsgResMgr::ResMgr()->AddViaNotify(ageSDLObjectKey, TRACKED_NEW plGenRefMsg(nc->GetKey(), plRefMsg::kOnCreate, -1, + hsgResMgr::ResMgr()->AddViaNotify(ageSDLObjectKey, new plGenRefMsg(nc->GetKey(), plRefMsg::kOnCreate, -1, plNetClientMgr::kAgeSDLHook), plRefFlags::kActiveRef); int nPages = 0; - plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoom); + plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kLoadRoom); pMsg1->SetAgeName(fAgeName); // Loop and ref! @@ -308,7 +308,7 @@ bool plAgeLoader::ILoadAge(const char ageName[]) pMsg1->Send(clientKey); // Send the client a message to let go of the extra keys it was holding on to - plClientMsg *dumpAgeKeys = TRACKED_NEW plClientMsg( plClientMsg::kReleaseAgeKeys ); + plClientMsg *dumpAgeKeys = new plClientMsg( plClientMsg::kReleaseAgeKeys ); dumpAgeKeys->SetAgeName( fAgeName); dumpAgeKeys->Send( clientKey ); @@ -358,7 +358,7 @@ bool plAgeLoader::IUnloadAge() hsAssert( (fFlags & kLoadMask)==0, "already loading or unloading an age?"); fFlags |= kUnLoadingAge; - plAgeBeginLoadingMsg* msg = TRACKED_NEW plAgeBeginLoadingMsg(); + plAgeBeginLoadingMsg* msg = new plAgeBeginLoadingMsg(); msg->fLoading = false; msg->Send(); @@ -395,7 +395,7 @@ bool plAgeLoader::IUnloadAge() // before any messages get processed for( i = 0; i < newPageOuts.size(); i++ ) { - plClientMsg *pMsg1 = TRACKED_NEW plClientMsg( plClientMsg::kUnloadRoom ); + plClientMsg *pMsg1 = new plClientMsg( plClientMsg::kUnloadRoom ); pMsg1->AddRoomLoc(newPageOuts[i]->GetUoid().GetLocation()); pMsg1->Send( clientKey ); } @@ -415,7 +415,7 @@ void plAgeLoader::ExecPendingAgeFniFiles() int i; for (i=0;iSetNetProtocol(kNetProtocolCli2Game); int i; for(i=0;iSend(); // join task will call NotifyAgeLoaded for us later } diff --git a/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.cpp b/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.cpp index f85d9b65..e1208fdc 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.cpp +++ b/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.cpp @@ -68,7 +68,7 @@ void plAudibleNull::SetSceneNode(plKey newNode) if( newNode ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kAudible); + plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kAudible); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kActiveRef); } if( oldNode ) diff --git a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp index c5f13ced..5941e6a9 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp +++ b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp @@ -98,7 +98,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plWinAudible::plWinAudible() : fSceneNode(nil), fSceneObj(nil), fSDLMod(nil) { - fProxyGen = TRACKED_NEW plWinAudibleProxy; + fProxyGen = new plWinAudibleProxy; fProxyGen->Init(this); fLocalToWorld.Reset(); @@ -142,7 +142,7 @@ void plWinAudible::SetSceneObject(plKey obj) { so->RemoveModifier(fSDLMod); delete fSDLMod; - fSDLMod=TRACKED_NEW plSoundSDLModifier; + fSDLMod=new plSoundSDLModifier; so->AddModifier(fSDLMod); } @@ -152,7 +152,7 @@ void plWinAudible::SetSceneObject(plKey obj) { if( obj != nil ) { - plGenRefMsg *replaceMsg = TRACKED_NEW plGenRefMsg( fSoundObjs[ i ]->GetKey(), plRefMsg::kOnReplace, 0, plSound::kRefParentSceneObject ); + plGenRefMsg *replaceMsg = new plGenRefMsg( fSoundObjs[ i ]->GetKey(), plRefMsg::kOnReplace, 0, plSound::kRefParentSceneObject ); hsgResMgr::ResMgr()->AddViaNotify( obj, replaceMsg, plRefFlags::kPassiveRef ); } else if( oldKey != nil ) @@ -172,7 +172,7 @@ void plWinAudible::SetSceneNode(plKey newNode) if( newNode ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kAudible); + plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kAudible); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef); } @@ -213,14 +213,14 @@ hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D ) hsAssert(pSnd->GetKey() != nil, "Adding a new sound with no key."); if (plgAudioSys::Active()) { - hsgResMgr::ResMgr()->AddViaNotify( pSnd->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( pSnd->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); return true; } else { pSnd->SetProperty( plSound::kPropIs3DSound, is3D ); - hsgResMgr::ResMgr()->AddViaNotify( pSnd->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( pSnd->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); return true; } @@ -229,7 +229,7 @@ hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D ) /* Unused int plWinAudible::AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, hsBool is3D ) { - //plWin32Sound* pSnd = TRACKED_NEW plWin32Sound; + //plWin32Sound* pSnd = new plWin32Sound; //IAssignSoundKey( pSnd, GetKey() ? GetKeyName() : "", fSoundObjs.Count() - 1 ); if (plgAudioSys::Active()) @@ -457,7 +457,7 @@ void plWinAudible::Read(hsStream* s, hsResMgr* mgr) fSoundObjs.SetCountAndZero(n); for(int i = 0; i < n; i++ ) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, 0); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, 0); mgr->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); //plSound* pSnd = plSound::ConvertNoRef(mgr->ReadCreatable(s)); //IAssignSoundKey( pSnd, GetKey() ? GetKeyName() : "", i ); @@ -467,7 +467,7 @@ void plWinAudible::Read(hsStream* s, hsResMgr* mgr) } plKey pSceneKey = mgr->ReadKey(s); - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(pSceneKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kAudible); + plNodeRefMsg* refMsg = new plNodeRefMsg(pSceneKey, plRefMsg::kOnCreate, -1, plNodeRefMsg::kAudible); mgr->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef); } @@ -677,13 +677,13 @@ void pl2WayWinAudible::Init(hsBool isLocal) if (!fVoicePlayer) { if(!isLocal) - fVoicePlayer = TRACKED_NEW plVoicePlayer; + fVoicePlayer = new plVoicePlayer; } if(!fVoiceRecorder) { if(isLocal) { - fVoiceRecorder = TRACKED_NEW plVoiceRecorder; + fVoiceRecorder = new plVoiceRecorder; } } Activate(); @@ -702,7 +702,7 @@ void pl2WayWinAudible::Activate() } if (fVoiceRecorder) { - plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg; + plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg; pModMsg->SetBCastFlag(plMessage::kBCastByExactType); pModMsg->SetSender(GetKey()); pModMsg->SetCmd(plCmdIfaceModMsg::kAdd); @@ -724,7 +724,7 @@ void pl2WayWinAudible::DeActivate() } if (fVoiceRecorder) { - plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg; + plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg; pModMsg->SetBCastFlag(plMessage::kBCastByExactType); pModMsg->SetSender(GetKey()); pModMsg->SetCmd(plCmdIfaceModMsg::kRemove); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index 84772ce5..d9a46287 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -553,7 +553,7 @@ void plAudioSystem::SetActive( hsBool b ) if( fActive ) { // Clear to send activate message (if listener not inited yet, delay until then) - plgDispatch::MsgSend( TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kActivate ) ); + plgDispatch::MsgSend( new plAudioSysMsg( plAudioSysMsg::kActivate ) ); } } @@ -565,7 +565,7 @@ void plAudioSystem::SetActive( hsBool b ) // need to be recalced, just resorted. void plAudioSystem::RegisterSoftSound( const plKey soundKey ) { - plSoftSoundNode *node = TRACKED_NEW plSoftSoundNode( soundKey ); + plSoftSoundNode *node = new plSoftSoundNode( soundKey ); node->Link( &fSoftRegionSounds ); fCurrDebugSound = nil; @@ -906,7 +906,7 @@ hsBool plAudioSystem::MsgReceive(plMessage* msg) { if (pASMsg->GetAudFlag() == plAudioSysMsg::kPing && fListenerInit) { - plAudioSysMsg* pMsg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kActivate ); + plAudioSysMsg* pMsg = new plAudioSysMsg( plAudioSysMsg::kActivate ); pMsg->AddReceiver( pASMsg->GetSender() ); pMsg->SetBCastFlag(plMessage::kBCastByExactType, false); plgDispatch::MsgSend( pMsg ); @@ -1011,7 +1011,7 @@ hsBool plgAudioSys::fMutedStateChange = false; void plgAudioSys::Init(hsWindowHndl hWnd) { - fSys = TRACKED_NEW plAudioSystem; + fSys = new plAudioSystem; fSys->RegisterAs( kAudioSystem_KEY ); plgDispatch::Dispatch()->RegisterForExactType( plAudioSysMsg::Index(), fSys->GetKey() ); plgDispatch::Dispatch()->RegisterForExactType( plRenderMsg::Index(), fSys->GetKey() ); @@ -1159,7 +1159,7 @@ void plgAudioSys::Activate(hsBool b) if( !IsMuted() ) { SetMuted( true ); - plAudioSysMsg *msg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kUnmuteAll ); + plAudioSysMsg *msg = new plAudioSysMsg( plAudioSysMsg::kUnmuteAll ); msg->SetTimeStamp( hsTimer::GetSysSeconds() ); msg->AddReceiver( fSys->GetKey() ); msg->SetBCastFlag( plMessage::kBCastByExactType, false ); @@ -1171,11 +1171,11 @@ void plgAudioSys::Activate(hsBool b) fSys->SetActive( false ); plStatusLog::AddLineS( "audio.log", plStatusLog::kBlue, "ASYS: -- Sending deactivate/destroy messages --" ); - plgDispatch::MsgSend( TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kDeActivate ) ); + plgDispatch::MsgSend( new plAudioSysMsg( plAudioSysMsg::kDeActivate ) ); // Send ourselves a shutdown message, so that the deactivates get processed first fSys->fWaitingForShutdown = true; - plAudioSysMsg *msg = TRACKED_NEW plAudioSysMsg( plAudioSysMsg::kDestroy ); + plAudioSysMsg *msg = new plAudioSysMsg( plAudioSysMsg::kDestroy ); msg->SetBCastFlag( plMessage::kBCastByExactType, false ); msg->Send( fSys->GetKey() ); // fSys->Shutdown(); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp index a8b635df..f7703ccb 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp @@ -103,7 +103,7 @@ plDSoundBuffer::~plDSoundBuffer() void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic ) { // Create a DSound buffer description - fBufferDesc = TRACKED_NEW plWAVHeader; + fBufferDesc = new plWAVHeader; *fBufferDesc = bufferDesc; fBufferSize = size; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp index ae78e889..cae75865 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plEAXListenerMod::plEAXListenerMod() { - fListenerProps = TRACKED_NEW EAXREVERBPROPERTIES; + fListenerProps = new EAXREVERBPROPERTIES; fSoftRegion = nil; fRegistered = false; fGetsMessages = false; @@ -102,7 +102,7 @@ void plEAXListenerMod::IRegister( void ) plKey sysKey = hsgResMgr::ResMgr()->FindKey( plUoid( kAudioSystem_KEY ) ); if( sysKey != nil ) { - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg( sysKey, plRefMsg::kOnCreate, 0, plAudioSystem::kRefEAXRegion ); + plGenRefMsg *refMsg = new plGenRefMsg( sysKey, plRefMsg::kOnCreate, 0, plAudioSystem::kRefEAXRegion ); hsgResMgr::ResMgr()->AddViaNotify( GetKey(), refMsg, plRefFlags::kPassiveRef ); fRegistered = true; } @@ -170,7 +170,7 @@ void plEAXListenerMod::Read( hsStream* s, hsResMgr* mgr ) plSingleModifier::Read( s, mgr ); // Read in the soft region - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftRegion ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftRegion ), plRefFlags::kActiveRef ); // Read the listener params fListenerProps->ulEnvironment = s->ReadLE32(); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp index 3f012a8c..1c0c72b9 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp @@ -1297,7 +1297,7 @@ void plSound::IRead( hsStream *s, hsResMgr *mgr ) fFadeOutParams.Read( s ); // Read in soft volume key - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftVolume ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftVolume ), plRefFlags::kActiveRef ); // Read in the data buffer key fDataBufferKey = mgr->ReadKey( s ); @@ -1306,7 +1306,7 @@ void plSound::IRead( hsStream *s, hsResMgr *mgr ) fEAXSettings.Read( s ); // EAX soft keys - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftOcclusionRegion ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftOcclusionRegion ), plRefFlags::kActiveRef ); } void plSound::IWrite( hsStream *s, hsResMgr *mgr ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp index 0320e6a0..e9d34c59 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp @@ -137,7 +137,7 @@ void plSoundEvent::SendCallbacks( void ) // Note: we get fancy here. We never want to remove the callback directly, // because the sound won't know about it. So instead, send it a message to // remove the callback for us - sMsg = TRACKED_NEW plSoundMsg(); + sMsg = new plSoundMsg(); sMsg->SetBCastFlag( plMessage::kLocalPropagate, true ); sMsg->AddReceiver( fOwner->GetKey() ); sMsg->SetCmd( plSoundMsg::kRemoveCallbacks ); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp index c49f63c3..ddecec0a 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp @@ -135,7 +135,7 @@ void plVoiceRecorder::SetQuality(int quality) char str[] = "Voice quality setting out of range. Must be between 1 and 10 inclusive"; if(quality < 1 || quality > 10) { - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, str ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kAddLine, str ); plgDispatch::MsgSend( cMsg ); return; } @@ -164,7 +164,7 @@ void plVoiceRecorder::SetComplexity(int c) char str[] = "Voice quality setting out of range. Must be between 1 and 10 inclusive"; if(c < 1 || c > 10) { - plConsoleMsg *cMsg = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, str ); + plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kAddLine, str ); plgDispatch::MsgSend( cMsg ); return; } @@ -266,7 +266,7 @@ void plVoiceRecorder::Update(double time) totalSamples = MAX_DATA_SIZE; // convert to correct units: - short *buffer = TRACKED_NEW short[totalSamples]; + short *buffer = new short[totalSamples]; alcCaptureSamples(captureDevice, buffer, totalSamples); @@ -284,7 +284,7 @@ void plVoiceRecorder::Update(double time) } else // use the speex voice compression lib { - uint8_t *packet = TRACKED_NEW uint8_t[totalSamples]; // packet to send encoded data in + uint8_t *packet = new uint8_t[totalSamples]; // packet to send encoded data in int packedLength = 0; // the size of the packet that will be sent hsRAMStream ram; // ram stream to hold output data from speex uint8_t numFrames = totalSamples / EncoderFrameSize; // number of frames to be encoded @@ -315,7 +315,7 @@ void plVoiceRecorder::Update(double time) } else if(!fMikeOpen) { - short *buffer = TRACKED_NEW short[samples]; + short *buffer = new short[samples]; // the mike has since closed, and there isn't enough data to meet our minimum, so throw this data out alcCaptureSamples(captureDevice, buffer, samples); delete[] buffer; @@ -349,7 +349,7 @@ void plVoicePlayer::PlaybackVoiceMessage(void* data, unsigned size, int numFrame { int numBytes; // the number of bytes that speex decompressed the data to. int bufferSize = numFramesInBuffer * plSpeex::GetInstance()->GetFrameSize(); - short *nBuff = TRACKED_NEW short[bufferSize]; + short *nBuff = new short[bufferSize]; memset(nBuff, 0, bufferSize); // Decode the encoded voice data using speex @@ -436,7 +436,7 @@ hsBool plVoiceSound::LoadSound( hsBool is3D ) header.fBlockAlign = header.fNumChannels * header.fBitsPerSample / 2; header.fAvgBytesPerSec = header.fNumSamplesPerSec * header.fBlockAlign; - fDSoundBuffer = TRACKED_NEW plDSoundBuffer(0, header, true, false, false, true); + fDSoundBuffer = new plDSoundBuffer(0, header, true, false, false, true); if(!fDSoundBuffer) return false; fDSoundBuffer->SetupVoiceSource(); @@ -528,7 +528,7 @@ fComplexity(3), fENH(false), fInitialized(false) { - fBits = TRACKED_NEW SpeexBits; + fBits = new SpeexBits; Init(kNarrowband); // if no one initialized us initialize using a narrowband encoder } @@ -602,9 +602,9 @@ hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStrea *packedLength = 0; short *pData = data; // pointer to input data - float *input = TRACKED_NEW float[fFrameSize]; // input to speex - used as am intermediate array since speex requires float data + float *input = new float[fFrameSize]; // input to speex - used as am intermediate array since speex requires float data uint8_t frameLength; // number of bytes speex compressed frame to - uint8_t *frameData = TRACKED_NEW uint8_t[fFrameSize]; // holds one frame of encoded data + uint8_t *frameData = new uint8_t[fFrameSize]; // holds one frame of encoded data // encode data for( int i = 0; i < numFrames; i++ ) @@ -641,11 +641,11 @@ hsBool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputByt *numOutputBytes = 0; hsReadOnlyStream stream( size, data ); - float *speexOutput = TRACKED_NEW float[fFrameSize]; // holds output from speex + float *speexOutput = new float[fFrameSize]; // holds output from speex short *pOut = out; // pointer to output short buffer // create buffer for input data - uint8_t *frameData = TRACKED_NEW uint8_t[fFrameSize]; // holds the current frames data to be decoded + uint8_t *frameData = new uint8_t[fFrameSize]; // holds the current frames data to be decoded uint8_t frameLen; // holds the length of the current frame being decoded. diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp index 2eb5ba3c..a1004d71 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp @@ -209,7 +209,7 @@ hsBool plWin32GroupedSound::LoadSound( hsBool is3D ) fNumDestBytesPerSample = (uint8_t)(header.fBlockAlign); // Create our DSound buffer (or rather, the wrapper around it) - fDSoundBuffer = TRACKED_NEW plDSoundBuffer( bufferSize, header, is3D, IsPropertySet( kPropLooping ), true ); + fDSoundBuffer = new plDSoundBuffer( bufferSize, header, is3D, IsPropertySet( kPropLooping ), true ); if( !fDSoundBuffer->IsValid() ) { char str[256]; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp index 0ce0421d..3aef6660 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp @@ -185,7 +185,7 @@ void plWin32Sound::IActuallyStop() plSoundMsg* plWin32Sound::GetStatus(plSoundMsg* pMsg) { - plSoundMsg* pReply = TRACKED_NEW plSoundMsg; + plSoundMsg* pReply = new plSoundMsg; pReply->AddReceiver( pMsg->GetSender() ); pReply->SetCmd(plSoundMsg::kStatusReply); pReply->fLoop = IsPropertySet( kPropLooping ); @@ -334,7 +334,7 @@ void plWin32Sound::IAddCallback( plEventCallbackMsg *pMsg ) if( event == nil ) { // Add a new sound event for this guy - event = TRACKED_NEW plSoundEvent( type, byteTime, this ); + event = new plSoundEvent( type, byteTime, this ); //fDSoundBuffer->AddPosNotify( byteTime ); fSoundEvents.Append( event ); } @@ -346,7 +346,7 @@ void plWin32Sound::IAddCallback( plEventCallbackMsg *pMsg ) if( event == nil ) { // Add a new sound event for this guy - event = TRACKED_NEW plSoundEvent( type, this ); + event = new plSoundEvent( type, this ); fSoundEvents.Append( event ); } } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp index c8f4c98b..3e5d89f1 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp @@ -150,7 +150,7 @@ hsBool plWin32StaticSound::LoadSound( hsBool is3D ) tryStatic = false; // Create our DSound buffer (or rather, the wrapper around it) - fDSoundBuffer = TRACKED_NEW plDSoundBuffer( bufferSize, header, is3D, IsPropertySet( kPropLooping ), tryStatic ); + fDSoundBuffer = new plDSoundBuffer( bufferSize, header, is3D, IsPropertySet( kPropLooping ), tryStatic ); if( !fDSoundBuffer->IsValid() ) { char str[256]; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index 33eabbfd..3d22d128 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -293,7 +293,7 @@ hsBool plWin32StreamingSound::LoadSound( hsBool is3D ) } // Actually create the buffer now (always looping) - fDSoundBuffer = TRACKED_NEW plDSoundBuffer( bufferSize, header, is3D, IsPropertySet(kPropLooping), false, true ); + fDSoundBuffer = new plDSoundBuffer( bufferSize, header, is3D, IsPropertySet(kPropLooping), false, true ); if( !fDSoundBuffer->IsValid() ) { fDataStream->Close(); @@ -369,7 +369,7 @@ hsBool plWin32StreamingSound::LoadSound( hsBool is3D ) // Set up our deswizzler, if necessary delete fDeswizzler; if( fDataStream->GetHeader().fNumChannels != header.fNumChannels ) - fDeswizzler = TRACKED_NEW plSoundDeswizzler( (uint32_t)(fBufferLengthInSecs * fDataStream->GetHeader().fAvgBytesPerSec), + fDeswizzler = new plSoundDeswizzler( (uint32_t)(fBufferLengthInSecs * fDataStream->GetHeader().fAvgBytesPerSec), (uint8_t)(fDataStream->GetHeader().fNumChannels), header.fBitsPerSample / 8 ); else diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp index 9a3ed41d..5faa122d 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp @@ -361,7 +361,7 @@ MIXERLINE *IGetMixerSubLineByType( MIXERCONTROL *mux, DWORD type ) { // A mixer or MUX is really a combination of MORE lines. And beautifully, you can't // just ask for a single one off of it, you have to ask for them all and search through yourself - MIXERCONTROLDETAILS_LISTTEXT *lineInfo = TRACKED_NEW MIXERCONTROLDETAILS_LISTTEXT[ mux->cMultipleItems ]; + MIXERCONTROLDETAILS_LISTTEXT *lineInfo = new MIXERCONTROLDETAILS_LISTTEXT[ mux->cMultipleItems ]; if( lineInfo == nil ) return nil; diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp index dcb0dc13..514fd583 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp @@ -90,24 +90,24 @@ plAudioFileReader* plAudioFileReader::CreateReader(const char* path, plAudioCore { char cachedPath[256]; IGetCachedPath(path, cachedPath, whichChan); - plAudioFileReader *r = TRACKED_NEW plCachedFileReader(cachedPath, plAudioCore::kAll); + plAudioFileReader *r = new plCachedFileReader(cachedPath, plAudioCore::kAll); if (!r->IsValid()) { // So we tried to play a cached file and it didn't exist // Oops... we should cache it now delete r; ICacheFile(path, true, whichChan); - r = TRACKED_NEW plCachedFileReader(cachedPath, plAudioCore::kAll); + r = new plCachedFileReader(cachedPath, plAudioCore::kAll); } return r; } - plAudioFileReader *r = TRACKED_NEW plFastWAV(path, whichChan); + plAudioFileReader *r = new plFastWAV(path, whichChan); return r; } else if (type == kStreamRAM) - return TRACKED_NEW plBufferedFileReader(path, whichChan); + return new plBufferedFileReader(path, whichChan); else if (type == kStreamNative) - return TRACKED_NEW plOGGCodec(path, whichChan); + return new plOGGCodec(path, whichChan); return nil; } @@ -116,7 +116,7 @@ plAudioFileReader* plAudioFileReader::CreateWriter(const char* path, plWAVHeader { const char* ext = plFileUtils::GetFileExt(path); - plAudioFileReader* writer = TRACKED_NEW plCachedFileReader(path, plAudioCore::kAll); + plAudioFileReader* writer = new plCachedFileReader(path, plAudioCore::kAll); writer->OpenForWriting(path, header); return writer; } diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp index af5205bb..e3a12769 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp @@ -86,7 +86,7 @@ plBufferedFileReader::plBufferedFileReader( const char *path, plAudioCore::Chann fHeader = reader->GetHeader(); fBufferSize = reader->GetDataSize(); - fBuffer = TRACKED_NEW uint8_t[ fBufferSize ]; + fBuffer = new uint8_t[ fBufferSize ]; //plProfile_NewMem( SndBufferedMem, fBufferSize ); if( fBuffer == nil ) { diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp index 5fb0cd21..d3230fc8 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp @@ -126,7 +126,7 @@ void plOGGCodec::IOpen( const char *path, plAudioCore::ChannelSelect whichCha if( fFileHandle != nil ) { /// Create the OGG data struct - fOggFile = TRACKED_NEW OggVorbis_File; + fOggFile = new OggVorbis_File; /// Open the OGG decompressor if( ov_open( fFileHandle, fOggFile, NULL, 0 ) < 0 ) diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp index dcf604be..c944cb49 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp @@ -237,7 +237,7 @@ void plSoundBuffer::Read( hsStream *s, hsResMgr *mgr ) fValid = false; if( !( fFlags & kIsExternal ) ) { - fData = TRACKED_NEW uint8_t[ fDataLength ]; + fData = new uint8_t[ fDataLength ]; if( fData == nil ) fFlags |= kIsExternal; else @@ -360,7 +360,7 @@ plSoundBuffer::ELoadReturnVal plSoundBuffer::AsyncLoad(plAudioFileReader::Stream fStreamType = type; if(fData == nil ) { - fData = TRACKED_NEW uint8_t[ fAsyncLoadLength ? fAsyncLoadLength : fDataLength ]; + fData = new uint8_t[ fAsyncLoadLength ? fAsyncLoadLength : fDataLength ]; if( fData == nil ) return kError; } @@ -465,7 +465,7 @@ void plSoundBuffer::SetInternalData( plWAVHeader &header, uint32_t length, ui fFlags = 0; fDataLength = length; - fData = TRACKED_NEW uint8_t[ length ]; + fData = new uint8_t[ length ]; memcpy( fData, data, length ); fValid = true; @@ -477,7 +477,7 @@ plSoundBuffer::ELoadReturnVal plSoundBuffer::EnsureInternal() { if( fData == nil ) { - fData = TRACKED_NEW uint8_t[fDataLength ]; + fData = new uint8_t[fDataLength ]; if( fData == nil ) return kError; } diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp index c8b38bd5..9ea85ea2 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.cpp @@ -65,7 +65,7 @@ plSoundDeswizzler::plSoundDeswizzler( uint32_t srcLength, uint8_t numChannels, u fNumSamples = srcLength / sampleSize; fSampleSize = sampleSize; fStride = fSampleSize * numChannels; - fData = TRACKED_NEW uint8_t[ srcLength ]; + fData = new uint8_t[ srcLength ]; fOwnsData = true; } diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp index 80fa5ce0..1759c9b9 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp @@ -169,7 +169,7 @@ HRESULT CWaveFile::Open(const char *strFileName, WAVEFORMATEX* pwfx, DWORD dwFla if( NULL == ( pvRes = LockResource( hResData ) ) ) return DXTRACE_ERR( TEXT("LockResource"), E_FAIL ); - CHAR* pData = TRACKED_NEW CHAR[ dwSize ]; + CHAR* pData = new CHAR[ dwSize ]; memcpy( pData, pvRes, dwSize ); MMIOINFO mmioInfo; @@ -359,7 +359,7 @@ HRESULT CWaveFile::ReadMMIO() // uint16_t, and thats how many extra bytes to allocate. if( pcmWaveFormat.wf.wFormatTag == WAVE_FORMAT_PCM ) { - m_pwfx = (WAVEFORMATEX*)( TRACKED_NEW CHAR[ sizeof( WAVEFORMATEX ) ] ); + m_pwfx = (WAVEFORMATEX*)( new CHAR[ sizeof( WAVEFORMATEX ) ] ); if( NULL == m_pwfx ) return DXTRACE_ERR( TEXT("m_pwfx"), E_FAIL ); @@ -374,7 +374,7 @@ HRESULT CWaveFile::ReadMMIO() if( mmioRead( m_hmmio, (CHAR*)&cbExtraBytes, sizeof(WORD)) != sizeof(WORD) ) return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL ); - m_pwfx = (WAVEFORMATEX*)( TRACKED_NEW CHAR[ sizeof(WAVEFORMATEX) + cbExtraBytes ] ); + m_pwfx = (WAVEFORMATEX*)( new CHAR[ sizeof(WAVEFORMATEX) + cbExtraBytes ] ); if( NULL == m_pwfx ) return DXTRACE_ERR( TEXT("new"), E_FAIL ); @@ -421,7 +421,7 @@ HRESULT CWaveFile::ReadMMIO() return DXTRACE_ERR( TEXT("sizeof(CueChunk)"), E_FAIL ); #endif - DWORD* CueBuff = TRACKED_NEW DWORD[ckIn.cksize]; + DWORD* CueBuff = new DWORD[ckIn.cksize]; DWORD Results; Read((BYTE*)CueBuff, ckIn.cksize, &Results); @@ -457,7 +457,7 @@ HRESULT CWaveFile::ReadMMIO() plSoundMarker *newMarker; - BYTE *labelBuf = TRACKED_NEW BYTE [ckIn.cksize]; + BYTE *labelBuf = new BYTE [ckIn.cksize]; // Read the entire lable chunk and then lets parse out the individual lables. Read(labelBuf, ckIn.cksize-4, &Results); @@ -468,7 +468,7 @@ HRESULT CWaveFile::ReadMMIO() { DWORD size = *(DWORD*)(bp + 4); DWORD id = *(DWORD*)(bp + 8); - newMarker = TRACKED_NEW plSoundMarker; // Grab a new label + newMarker = new plSoundMarker; // Grab a new label int i; @@ -484,7 +484,7 @@ HRESULT CWaveFile::ReadMMIO() } } int stringSize = size - sizeof(DWORD); // text string is size of chunck - size of the size uint16_t - newMarker->fName = TRACKED_NEW char[ stringSize]; + newMarker->fName = new char[ stringSize]; strcpy(newMarker->fName, (char*)(bp + 12)); @@ -1053,7 +1053,7 @@ public: chunkSize = ChunkSize; dwCuePoints = (ChunkSize - (sizeof(DWORD)*1))/(sizeof(CuePoint)); //points = NULL; - //points = TRACKED_NEW CuePoint[dwCuePoints]; + //points = new CuePoint[dwCuePoints]; } //Cue diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp index 525710a5..00bb52db 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp @@ -88,7 +88,7 @@ plAGAnim::plAGAnim(const char *name, double start, double end) if (name == nil) name = ""; - fName = TRACKED_NEW char[strlen(name) + 1]; + fName = new char[strlen(name) + 1]; strcpy(fName, name); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp index 0a7003ff..2ebd587e 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp @@ -108,13 +108,13 @@ plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, plATCAnim *atcAnim = plATCAnim::ConvertNoRef(anim); if (atcAnim) { - fTimeConvert = TRACKED_NEW plAnimTimeConvert(); + fTimeConvert = new plAnimTimeConvert(); fTimeConvert->Init(atcAnim, this, master); - timeChan = TRACKED_NEW plATCChannel(fTimeConvert); + timeChan = new plATCChannel(fTimeConvert); } else { - timeChan = TRACKED_NEW plScalarSDLChannel(anim->GetLength()); + timeChan = new plScalarSDLChannel(anim->GetLength()); fSDLChannels.push_back((plScalarSDLChannel *)timeChan); } @@ -404,7 +404,7 @@ void plAGAnimInstance::AttachCallbacks(plOneShotCallbacks *callbacks) { plOneShotCallbacks::plOneShotCallback& cb = callbacks->GetCallback(i); - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(cb.fReceiver); eventMsg->fRepeats = 0; eventMsg->fUser = cb.fUser; @@ -567,7 +567,7 @@ static agAllocMap gAGAllocs; void RegisterAGAlloc(plAGChannel *object, const char *chanName, const char *animName, uint16_t classIndex) { - gAGAllocs[object] = TRACKED_NEW agAlloc(object, chanName, animName, classIndex); + gAGAllocs[object] = new agAlloc(object, chanName, animName, classIndex); } void DumpAGAllocs() diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp index 9d496646..0de037c9 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp @@ -112,7 +112,7 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr) ////////////////////////////////////////// int nameLength = stream->ReadLE32(); // Unused. Nuke next format change. - char *junk = TRACKED_NEW char[nameLength+1]; // + char *junk = new char[nameLength+1]; // stream->Read(nameLength, junk); // junk[nameLength] = 0; // delete [] junk; // @@ -123,14 +123,14 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr) int i; for (i = 0; i < numPrivateAnims; i++) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim); mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef); } fIsGrouped = stream->Readbool(); fIsGroupMaster = stream->Readbool(); if (fIsGroupMaster) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef); } @@ -183,7 +183,7 @@ void plAGMasterMod::AddTarget(plSceneObject * object) { // add sdl modifier delete fAGMasterSDLMod; - fAGMasterSDLMod = TRACKED_NEW plAGMasterSDLModifier; + fAGMasterSDLMod = new plAGMasterSDLModifier; object->AddModifier(fAGMasterSDLMod); } } @@ -347,7 +347,7 @@ plAGModifier * plAGMasterMod::GetChannelMod(const char * name, hsBool dontCache // CACHECHANNELMOD plAGModifier * plAGMasterMod::ICacheChannelMod(plAGModifier *mod) const { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); hsgResMgr::ResMgr()->SendRef(mod, msg, plRefFlags::kActiveRef); return mod; @@ -403,10 +403,10 @@ plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim, } if (i == fPrivateAnims.end()) // Didn't find it. Ref it! { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPublicAnim); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPublicAnim); hsgResMgr::ResMgr()->SendRef(anim, msg, plRefFlags::kActiveRef); } - instance = TRACKED_NEW plAGAnimInstance(anim, this, blendFactor, blendPriority, cache, false); + instance = new plAGAnimInstance(anim, this, blendFactor, blendPriority, cache, false); fAnimInstances.push_back(instance); plATCAnim *atcAnim = plATCAnim::ConvertNoRef(anim); @@ -450,7 +450,7 @@ void plAGMasterMod::PlaySimpleAnim(const char *name) instance->SetLoop(false); instance->Start(); - plAGDetachCallbackMsg *msg = TRACKED_NEW plAGDetachCallbackMsg(GetKey(), kStop); + plAGDetachCallbackMsg *msg = new plAGDetachCallbackMsg(GetKey(), kStop); msg->SetAnimName(name); instance->GetTimeConvert()->AddCallback(msg); hsRefCnt_SafeUnRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterSDLModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterSDLModifier.cpp index 0f5e022f..69a92837 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterSDLModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterSDLModifier.cpp @@ -193,7 +193,7 @@ void plAGMasterSDLModifier::ISetCurrentStateFrom(const plStateDataRecord* srcSta { float animTimeFromWorldTime = (objAGMaster->GetNumATCAnimations() > 0) ? objAGMaster->GetATCAnimInstance(0)->GetTimeConvert()->WorldToAnimTimeNoUpdate(time) : 0.0f; - plAGCmdMsg *msg = TRACKED_NEW plAGCmdMsg(); + plAGCmdMsg *msg = new plAGCmdMsg(); msg->SetCmd(plAGCmdMsg::kSetAnimTime); msg->fAnimTime = animTimeFromWorldTime; msg->AddReceiver(objAGMaster->fMsgForwarder->GetKey()); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h index 1abbf4e3..703ac05b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h @@ -103,7 +103,7 @@ public: channels attached to it that were intended for "Lamont." */ void SetChannelName(char * name); - /** Attach a TRACKED_NEW applicator to our modifier. Will arbitrate with existing + /** Attach a new applicator to our modifier. Will arbitrate with existing modifiers if necessary, based on pin type. May destruct existing applicators. */ plAGChannel *MergeChannel(plAGApplicator *app, plAGChannel *chan, plScalarChannel *blend, plAGAnimInstance *anim, int priority); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp index f809279e..d4408413 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp @@ -296,7 +296,7 @@ hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArma plKey avKey = armature->GetTarget(0)->GetKey(); if (fMod) avKey = fMod->GetKey(); - plNotifyMsg *msg = TRACKED_NEW plNotifyMsg(); + plNotifyMsg *msg = new plNotifyMsg(); msg->SetSender(avKey); if (fMod) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp index d45a4cce..9849dda8 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp @@ -86,7 +86,7 @@ void plArmatureEffectsMgr::Read(hsStream *s, hsResMgr *mgr) int numEffects = s->ReadLE32(); while (numEffects > 0) { - plRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); + plRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); numEffects--; } @@ -182,7 +182,7 @@ void plArmatureEffectsMgr::ResetEffects() plArmatureEffectFootSound::plArmatureEffectFootSound() { - plArmatureEffectFootSurface *surface = TRACKED_NEW plArmatureEffectFootSurface; + plArmatureEffectFootSurface *surface = new plArmatureEffectFootSurface; surface->fID = plArmatureEffectsMgr::kFootNoSurface; surface->fTrigger = nil; fSurfaces.Append(surface); @@ -209,7 +209,7 @@ void plArmatureEffectFootSound::Read(hsStream* s, hsResMgr* mgr) int i; for (i = 0; i < count; i++) { - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1); + plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1); mgr->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); } } @@ -272,7 +272,7 @@ hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg) if (plgAudioSys::Active() && fActiveSurfaces.IsBitSet(curSurfaceIndex)) { fMods[curSurfaceIndex]->SetCurrentGroup(eMsg->fTriggerIdx); - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *animMsg = new plAnimCmdMsg; animMsg->AddReceiver(fMods[curSurfaceIndex]->GetKey()); animMsg->SetCmd(plAnimCmdMsg::kContinue); plgDispatch::MsgSend(animMsg); @@ -294,7 +294,7 @@ hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg) { plStatusLog::AddLineS("audio.log", "FTSP: Switching to surface - %s", plArmatureEffectsMgr::SurfaceStrings[sMsg->fSurface]); - plArmatureEffectFootSurface *surface = TRACKED_NEW plArmatureEffectFootSurface; + plArmatureEffectFootSurface *surface = new plArmatureEffectFootSurface; surface->fID = sMsg->fSurface; surface->fTrigger = sMsg->GetSender(); fSurfaces.Append(surface); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index da8412ef..30e6393f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -220,7 +220,7 @@ void plArmatureModBase::Read(hsStream * stream, hsResMgr *mgr) plKey meshKey = mgr->ReadKey(stream); fMeshKeys.push_back(meshKey); - plKeyVector *vec = TRACKED_NEW plKeyVector; + plKeyVector *vec = new plKeyVector; int boneCount = stream->ReadLE32(); for(int j = 0; j < boneCount; j++) vec->push_back(mgr->ReadKey(stream)); @@ -276,7 +276,7 @@ void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, hsBool st if (!object) return; - plEnableMsg *msg = TRACKED_NEW plEnableMsg; + plEnableMsg *msg = new plEnableMsg; if (status) msg->SetCmd( plEnableMsg::kEnable ); else @@ -604,7 +604,7 @@ void plArmatureModBase::ICustomizeApplicator() } } plAGModifier *volAGMod = const_cast(agMod); - plMatrixDifferenceApp *differ = TRACKED_NEW plMatrixDifferenceApp(); + plMatrixDifferenceApp *differ = new plMatrixDifferenceApp(); fRootAnimator = differ; volAGMod->SetApplicator(differ); @@ -769,7 +769,7 @@ const plSceneObject *plArmatureMod::FindBone(uint32_t id) const void plArmatureMod::AddBoneMapping(uint32_t id, const plSceneObject *bone) { if(!fBoneMap) - fBoneMap = TRACKED_NEW plAvBoneMap(); + fBoneMap = new plAvBoneMap(); fBoneMap->AddBoneMapping(id, bone); } @@ -888,7 +888,7 @@ void plArmatureMod::SpawnAt(int spawnNum, double time) } fWaitFlags &= ~kNeedSpawn; - plAvatarSpawnNotifyMsg *notify = TRACKED_NEW plAvatarSpawnNotifyMsg(); + plAvatarSpawnNotifyMsg *notify = new plAvatarSpawnNotifyMsg(); notify->SetTimeStamp(hsTimer::GetSysSeconds() + 0.1); notify->SetBCastFlag(plMessage::kBCastByExactType); notify->Send(); @@ -901,10 +901,10 @@ void plArmatureMod::SetFollowerParticleSystemSO(plSceneObject *follower) // TODO: Check for old one and clean up. hsPoint3 trans = GetTarget(0)->GetLocalToWorld().GetTranslate() - follower->GetLocalToWorld().GetTranslate(); - plWarpMsg *warp = TRACKED_NEW plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity, + plWarpMsg *warp = new plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity, GetTarget(0)->GetLocalToWorld()); warp->Send(); - hsgResMgr::ResMgr()->AddViaNotify(follower->GetKey(), TRACKED_NEW plAttachMsg(GetTarget(0)->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(follower->GetKey(), new plAttachMsg(GetTarget(0)->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); fFollowerParticleSystemSO = follower; plParticleSystem *sys = const_cast(plParticleSystem::ConvertNoRef(follower->GetModifierByType(plParticleSystem::Index()))); @@ -936,7 +936,7 @@ void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart) { if (fNotifyKeys.GetCount() > 0) { - plAvatarBehaviorNotifyMsg *msg = TRACKED_NEW plAvatarBehaviorNotifyMsg(); + plAvatarBehaviorNotifyMsg *msg = new plAvatarBehaviorNotifyMsg(); msg->SetSender(GetKey()); msg->AddReceivers(fNotifyKeys); msg->fType = type; @@ -963,7 +963,7 @@ void plArmatureMod::EnterAge(hsBool reSpawn) if (sys) { // Need to tell other clients about this - plLoadCloneMsg *clone = TRACKED_NEW plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), true); + plLoadCloneMsg *clone = new plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), true); clone->SetBCastFlag(plMessage::kLocalPropagate, false); clone->Send(); @@ -998,7 +998,7 @@ void plArmatureMod::LeaveAge() if (GetFollowerParticleSystemSO()) { // Need to tell other clients to remove this - plLoadCloneMsg *clone = TRACKED_NEW plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), false); + plLoadCloneMsg *clone = new plLoadCloneMsg(GetFollowerParticleSystemSO()->GetKey(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID(), false); clone->SetBCastFlag(plMessage::kLocalPropagate, false); clone->Send(); } @@ -1024,7 +1024,7 @@ void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */) plNetApp::StaticDebugMsg("plArmatureMod::PanicLink()"); // make the player book blink as they are linking out - pfKIMsg *msg = TRACKED_NEW pfKIMsg( pfKIMsg::kStartBookAlert ); + pfKIMsg *msg = new pfKIMsg( pfKIMsg::kStartBookAlert ); plgDispatch::MsgSend( msg ); // Can't depend on the anim to link if the human brain isn't ready to deal with it @@ -1035,13 +1035,13 @@ void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */) if (playLinkOutAnim) { - plAvOneShotLinkTask *task = TRACKED_NEW plAvOneShotLinkTask; + plAvOneShotLinkTask *task = new plAvOneShotLinkTask; char *animName = MakeAnimationName("FallingLinkOut"); task->SetAnimName(animName); task->SetMarkerName("touch"); - plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(GetKey(), GetKey(), task); + plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task); taskMsg->Send(); delete [] animName; @@ -1061,13 +1061,13 @@ void plArmatureMod::PersonalLink() ILinkToPersonalAge(); else { - plAvOneShotLinkTask *task = TRACKED_NEW plAvOneShotLinkTask; + plAvOneShotLinkTask *task = new plAvOneShotLinkTask; char *animName = MakeAnimationName("PersonalLink"); task->SetAnimName(animName); task->SetMarkerName("touch"); delete [] animName; - plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(GetKey(), GetKey(), task); + plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task); taskMsg->SetBCastFlag(plMessage::kNetPropagate); taskMsg->Send(); } @@ -1253,7 +1253,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) return true; // Only the local player can create the clone. // Clone is sent to all players. - plLoadCloneMsg *cloneMsg = TRACKED_NEW plLoadCloneMsg(partMsg->fSysSOKey->GetUoid(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID()); + plLoadCloneMsg *cloneMsg = new plLoadCloneMsg(partMsg->fSysSOKey->GetUoid(), plAvatarMgr::GetInstance()->GetKey(), GetKey()->GetUoid().GetClonePlayerID()); cloneMsg->SetTriggerMsg(partMsg); cloneMsg->SetBCastFlag(plMessage::kNetForce); cloneMsg->Send(); @@ -1302,7 +1302,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) if(spawnSO) { hsMatrix44 l2w = spawnSO->GetLocalToWorld(); - plWarpMsg *warpM = TRACKED_NEW plWarpMsg(nil, GetTarget(0)->GetKey(), plWarpMsg::kFlushTransform, l2w); + plWarpMsg *warpM = new plWarpMsg(nil, GetTarget(0)->GetKey(), plWarpMsg::kFlushTransform, l2w); warpM->Send(); fWaitFlags &= ~kNeedSpawn; } @@ -1508,7 +1508,7 @@ void plArmatureMod::SynchInputState(uint32_t rcvID /* = kInvalidPlayerID */) if (plAvatarMgr::GetInstance()->GetLocalAvatar() != this) return; - plAvatarInputStateMsg *msg = TRACKED_NEW plAvatarInputStateMsg(); + plAvatarInputStateMsg *msg = new plAvatarInputStateMsg(); int i; uint32_t curBit; for (i = 0, curBit = 0x1; i < plAvatarInputStateMsg::fMapSize; i++, curBit <<= 1) @@ -1542,7 +1542,7 @@ void plArmatureMod::ILinkToPersonalAge() link.SetSpawnPoint(hutSpawnPoint); link.SetLinkingRules( plNetCommon::LinkingRules::kOriginalBook ); - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( &link ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( &link ); pMsg->SetLinkInAnimName("PersonalBookEnter"); pMsg->AddReceiver(nc->GetKey()); pMsg->Send(); @@ -1631,7 +1631,7 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty) hsPoint3 trans = GetTarget(0)->GetLocalToWorld().GetTranslate() - follower->GetLocalToWorld().GetTranslate(); if (trans.MagnitudeSquared() > 1) // we can be a bit fuzzy about this, since the particle system is rather large and people won't notice it being off { - plWarpMsg *warp = TRACKED_NEW plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity, + plWarpMsg *warp = new plWarpMsg(GetKey(), follower->GetKey(), plWarpMsg::kFlushTransform | plWarpMsg::kZeroVelocity, GetTarget(0)->GetLocalToWorld()); warp->Send(); @@ -1666,29 +1666,29 @@ void plArmatureMod::AddTarget(plSceneObject* so) // attach a clothingSDLModifier to handle clothing saveState delete fClothingSDLMod; - fClothingSDLMod = TRACKED_NEW plClothingSDLModifier; + fClothingSDLMod = new plClothingSDLModifier; fClothingSDLMod->SetClothingOutfit(GetClothingOutfit()); // ok if clothingOutfit is nil at this point so->AddModifier(fClothingSDLMod); // add avatar sdl modifier delete fAvatarSDLMod; - fAvatarSDLMod = TRACKED_NEW plAvatarSDLModifier; + fAvatarSDLMod = new plAvatarSDLModifier; so->AddModifier(fAvatarSDLMod); delete fAvatarPhysicalSDLMod; - fAvatarPhysicalSDLMod = TRACKED_NEW plAvatarPhysicalSDLModifier; + fAvatarPhysicalSDLMod = new plAvatarPhysicalSDLModifier; so->AddModifier(fAvatarPhysicalSDLMod); // At export time, this key will be nil. This is important, or else we'll overwrite the page the key comes from. if (fFootSoundSOKey != nil) - hsgResMgr::ResMgr()->AddViaNotify(fFootSoundSOKey, TRACKED_NEW plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fFootSoundSOKey, new plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); if (fLinkSoundSOKey != nil) - hsgResMgr::ResMgr()->AddViaNotify(fLinkSoundSOKey, TRACKED_NEW plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(fLinkSoundSOKey, new plAttachMsg(so->GetKey(), nil, plRefMsg::kOnRequest), plRefFlags::kActiveRef); if (fUpdateMsg) fUpdateMsg->UnRef(); // delete an old one. - fUpdateMsg = TRACKED_NEW plArmatureUpdateMsg(GetKey(), so->IsLocallyOwned(), true, this); + fUpdateMsg = new plArmatureUpdateMsg(GetKey(), so->IsLocallyOwned(), true, this); } void plArmatureMod::RemoveTarget(plSceneObject* so) @@ -1772,7 +1772,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr) } if( stream->ReadBool() ) - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase else fClothingOutfit = nil; @@ -1781,7 +1781,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr) if( stream->ReadBool() ) { plKey effectMgrKey = mgr->ReadKey(stream); - mgr->AddViaNotify(effectMgrKey, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plArmatureEffects + mgr->AddViaNotify(effectMgrKey, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plArmatureEffects // Attach the Footstep emitter scene object hsResMgr *mgr = hsgResMgr::ResMgr(); @@ -1810,7 +1810,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr) effectKey = mgr->ReRegister(nil, effectUoid); } if (effectKey != nil) - mgr->AddViaNotify(effectKey, TRACKED_NEW plGenRefMsg(effectMgrKey, plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); + mgr->AddViaNotify(effectKey, new plGenRefMsg(effectMgrKey, plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // Get the linking sound plUoid LinkUoid(gLoc, plSceneObject::Index(), "LinkSoundSource"); @@ -1882,14 +1882,14 @@ void plArmatureMod::IFinalize() if (fWaitFlags & kNeedAudio) { - plSetListenerMsg *msg = TRACKED_NEW plSetListenerMsg( plSetListenerMsg::kVelocity, GetTarget(0)->GetKey(), true ); + plSetListenerMsg *msg = new plSetListenerMsg( plSetListenerMsg::kVelocity, GetTarget(0)->GetKey(), true ); msg->Send(); fWaitFlags &= ~kNeedAudio; } if (fWaitFlags & kNeedCamera) { - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetCmd(plCameraMsg::kCreateNewDefaultCam); pMsg->SetCmd(plCameraMsg::kSetSubject); pMsg->SetSubject(GetTarget(0)); @@ -1925,7 +1925,7 @@ void plArmatureMod::ICustomizeApplicator() } } plAGModifier *volAGMod = const_cast(agMod); - fBoneRootAnimator = TRACKED_NEW plMatrixDelayedCorrectionApplicator(); + fBoneRootAnimator = new plMatrixDelayedCorrectionApplicator(); volAGMod->SetApplicator(fBoneRootAnimator); fWaitFlags &= ~kNeedApplicator; } @@ -2056,7 +2056,7 @@ hsBool plArmatureMod::ValidateMesh() // If we haven't created the mapping yet... if (fClothToSOMap.GetCount() <= i || fClothToSOMap[i] == nil) { - plGenRefMsg *refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, i, 0); + plGenRefMsg *refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, i, 0); hsgResMgr::ResMgr()->SendRef(meshObj->GetKey(), refMsg, plRefFlags::kPassiveRef); } } @@ -2439,11 +2439,11 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at { plEventCallbackInterceptMsg *iMsg; - plArmatureEffectMsg *msg = TRACKED_NEW plArmatureEffectMsg(fEffects->GetKey(), kTime); + plArmatureEffectMsg *msg = new plArmatureEffectMsg(fEffects->GetKey(), kTime); msg->fEventTime = time; msg->fTriggerIdx = AnimNameToIndex(anim->GetName()); - iMsg = TRACKED_NEW plEventCallbackInterceptMsg(); + iMsg = new plEventCallbackInterceptMsg(); iMsg->AddReceiver(fEffects->GetKey()); iMsg->fEventTime = time; iMsg->fEvent = kTime; @@ -2452,10 +2452,10 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at hsRefCnt_SafeUnRef(msg); hsRefCnt_SafeUnRef(iMsg); - plAvatarFootMsg* foot = TRACKED_NEW plAvatarFootMsg(GetKey(), this, isLeft); + plAvatarFootMsg* foot = new plAvatarFootMsg(GetKey(), this, isLeft); foot->fEventTime = time; - iMsg = TRACKED_NEW plEventCallbackInterceptMsg(); + iMsg = new plEventCallbackInterceptMsg(); iMsg->AddReceiver(fEffects->GetKey()); iMsg->fEventTime = time; iMsg->fEvent = kTime; @@ -2614,7 +2614,7 @@ void plArmatureLODMod::Read(hsStream *stream, hsResMgr *mgr) plKey meshKey = mgr->ReadKey(stream); fMeshKeys.push_back(meshKey); - plKeyVector *vec = TRACKED_NEW plKeyVector; + plKeyVector *vec = new plKeyVector; int boneCount = stream->ReadLE32(); for(int j = 0; j < boneCount; j++) vec->push_back(mgr->ReadKey(stream)); @@ -2790,7 +2790,7 @@ public: plAvBoneMap::plAvBoneMap() { - fImp = TRACKED_NEW BoneMapImp; + fImp = new BoneMapImp; } plAvBoneMap::~plAvBoneMap() diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp index 83f4eed4..802d5be3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp @@ -284,7 +284,7 @@ hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg) && fCurMode != kFallingOff && fCurMode != kFinishing) { - plClimbEventMsg* pMsg = TRACKED_NEW plClimbEventMsg; + plClimbEventMsg* pMsg = new plClimbEventMsg; pMsg->SetSender(msg->fTarget); pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kLocalPropagate); @@ -679,20 +679,20 @@ void plAvBrainClimb::IProbeEnvironment() plKey ourKey = fAvMod->GetKey(); // *** would be cool if we could hint that these should be batched for spatial coherence optimization - plLOSRequestMsg *upReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, up, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); + plLOSRequestMsg *upReq = new plLOSRequestMsg(ourKey, start, up, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); upReq->SetRequestID(static_cast(plClimbMsg::kUp)); upReq->Send(); - plLOSRequestMsg *downReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, down, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); + plLOSRequestMsg *downReq = new plLOSRequestMsg(ourKey, start, down, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); downReq->SetRequestID(static_cast(plClimbMsg::kDown)); downReq->Send(); - plLOSRequestMsg *leftReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, left, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); + plLOSRequestMsg *leftReq = new plLOSRequestMsg(ourKey, start, left, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); leftReq->SetRequestID(static_cast(plClimbMsg::kLeft)); leftReq->SetRequestType(plSimDefs::kLOSDBCustom); leftReq->Send(); - plLOSRequestMsg *rightReq = TRACKED_NEW plLOSRequestMsg(ourKey, start, right, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); + plLOSRequestMsg *rightReq = new plLOSRequestMsg(ourKey, start, right, plSimDefs::kLOSDBCustom, plLOSRequestMsg::kTestAny, plLOSRequestMsg::kReportHit); rightReq->SetRequestID(static_cast(plClimbMsg::kRight)); rightReq->Send(); @@ -732,52 +732,52 @@ void plAvBrainClimb::ICalcProbeLengths() // --------------- hsBool plAvBrainClimb::IInitAnimations() { - fUp = TRACKED_NEW plAnimStage("WallClimbUp", + fUp = new plAnimStage("WallClimbUp", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto, 0); - fDown = TRACKED_NEW plAnimStage("WallClimbDown", + fDown = new plAnimStage("WallClimbDown", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto, 0); - fLeft = TRACKED_NEW plAnimStage("WallClimbLeft", + fLeft = new plAnimStage("WallClimbLeft", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto, 0); - fRight = TRACKED_NEW plAnimStage("WallClimbRight", + fRight = new plAnimStage("WallClimbRight", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto, 0); // the mounts - fMountUp = TRACKED_NEW plAnimStage("WallClimbMountUp", + fMountUp = new plAnimStage("WallClimbMountUp", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fMountDown = TRACKED_NEW plAnimStage("WallClimbMountDown", + fMountDown = new plAnimStage("WallClimbMountDown", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fMountLeft = TRACKED_NEW plAnimStage("WallClimbMountLeft", + fMountLeft = new plAnimStage("WallClimbMountLeft", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fMountRight = TRACKED_NEW plAnimStage("WallClimbMountRight", + fMountRight = new plAnimStage("WallClimbMountRight", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); // and here's the dismount - fDismountUp = TRACKED_NEW plAnimStage("WallClimbDismountUp", + fDismountUp = new plAnimStage("WallClimbDismountUp", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fDismountDown = TRACKED_NEW plAnimStage("WallClimbDismountDown", + fDismountDown = new plAnimStage("WallClimbDismountDown", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fDismountLeft = TRACKED_NEW plAnimStage("WallClimbDismountLeft", + fDismountLeft = new plAnimStage("WallClimbDismountLeft", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fDismountRight = TRACKED_NEW plAnimStage("WallClimbDismountUp", + fDismountRight = new plAnimStage("WallClimbDismountUp", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); // other - fIdle = TRACKED_NEW plAnimStage("WallClimbIdle", + fIdle = new plAnimStage("WallClimbIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fRelease = TRACKED_NEW plAnimStage("WallClimbRelease", + fRelease = new plAnimStage("WallClimbRelease", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - fFallOff = TRACKED_NEW plAnimStage("WallClimbFallOff", + fFallOff = new plAnimStage("WallClimbFallOff", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); return true; @@ -1049,4 +1049,4 @@ const char *plAvBrainClimb::ModeStr(Mode mode) default: return "WTF???!!!"; } -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp index bde4b15c..3728c72a 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp @@ -130,7 +130,7 @@ hsBool plAvBrainCoop::MsgReceive(plMessage *msg) if(localPlayer == fGuestKey) { - plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestAccepted, fInitiatorID, fInitiatorSerial); + plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestAccepted, fInitiatorID, fInitiatorSerial); coopM->SetBCastFlag(plMessage::kNetPropagate); coopM->Send(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp index 84a1b85f..88003c14 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp @@ -193,12 +193,12 @@ void plAvBrainCritter::Activate(plArmatureModBase* avMod) plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = avMod->GetController(); - fCallbackAction = TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction = new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } // tell people that care that we are good to go - plAIBrainCreatedMsg* brainCreated = TRACKED_NEW plAIBrainCreatedMsg(fArmature->GetKey()); + plAIBrainCreatedMsg* brainCreated = new plAIBrainCreatedMsg(fArmature->GetKey()); plgDispatch::MsgSend(brainCreated); } @@ -238,7 +238,7 @@ void plAvBrainCritter::AddBehavior(const std::string& animationName, const std:: return; // can't find it, die // create the behavior and set it up - CritterBehavior* behavior = TRACKED_NEW CritterBehavior(behaviorName, randomStartPos, fadeInLen, fadeOutLen); + CritterBehavior* behavior = new CritterBehavior(behaviorName, randomStartPos, fadeInLen, fadeOutLen); fBehaviors.Push(behavior); behavior->Init(anim, loop, this, fAvMod, fBehaviors.Count() - 1); fUserBehaviors[behaviorName].push_back(fBehaviors.Count() - 1); @@ -459,14 +459,14 @@ hsBool plAvBrainCritter::IInitBaseAnimations() CritterBehavior* behavior; if (idle) { - fBehaviors[kIdle] = behavior = TRACKED_NEW CritterBehavior(kDefaultIdleBehName, true); // starts at a random start point each time + fBehaviors[kIdle] = behavior = new CritterBehavior(kDefaultIdleBehName, true); // starts at a random start point each time behavior->Init(idle, true, this, fAvMod, kIdle); fUserBehaviors[kDefaultIdleBehName].push_back(kIdle); } if (run) { - fBehaviors[kRun] = behavior = TRACKED_NEW CritterBehavior(kDefaultRunBehName); + fBehaviors[kRun] = behavior = new CritterBehavior(kDefaultRunBehName); behavior->Init(run, true, this, fAvMod, kRun); fUserBehaviors[kDefaultRunBehName].push_back(kRun); } @@ -606,7 +606,7 @@ void plAvBrainCritter::IEvalGoal() // tell everyone who cares that we have arrived for (unsigned i = 0; i < fReceivers.size(); ++i) { - plAIArrivedAtGoalMsg* msg = TRACKED_NEW plAIArrivedAtGoalMsg(fArmature->GetKey(), fReceivers[i]); + plAIArrivedAtGoalMsg* msg = new plAIArrivedAtGoalMsg(fArmature->GetKey(), fReceivers[i]); msg->Goal(fFinalGoalPos); msg->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp index f66ca8cb..777b60ed 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp @@ -75,7 +75,7 @@ void plAvBrainDrive::Activate(plArmatureModBase *avMod) plArmatureBrain::Activate(avMod); IEnablePhysics(false, avMod->GetTarget(0)->GetKey()); - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetCmd(plCameraMsg::kNonPhysOn); pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->Send(); @@ -87,7 +87,7 @@ void plAvBrainDrive::Deactivate() if (fAvMod) { IEnablePhysics(true, fAvMod->GetTarget(0)->GetKey()); - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetCmd(plCameraMsg::kNonPhysOff); pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->Send(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp index 476768f7..37349445 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp @@ -83,7 +83,7 @@ const float plAvBrainGeneric::kDefaultFadeOut = 0.f; // instant fade out. // ----------------- plAvBrainGeneric::plAvBrainGeneric() : fRecipient(nil), - fStages(TRACKED_NEW plAnimStageVec), + fStages(new plAnimStageVec), fCurStage(0), fType(kGeneric), fExitFlags(kExitNormal), @@ -172,7 +172,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod) if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar()) { - plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables ); + plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables ); plgDispatch::MsgSend(msg); } @@ -208,7 +208,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod) if (plAvBrainGeneric::fForce3rdPerson && fAvMod->IsLocalAvatar()) { // create message to force 3rd person mode - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); @@ -307,7 +307,7 @@ void plAvBrainGeneric::Deactivate() if (plAvBrainGeneric::fForce3rdPerson && fAvMod->IsLocalAvatar()) { // create message to force 3rd person mode - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson); @@ -318,7 +318,7 @@ void plAvBrainGeneric::Deactivate() if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar()) { - plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables ); + plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables ); plgDispatch::MsgSend(msg); } } @@ -879,7 +879,7 @@ hsBool plAvBrainGeneric::LeaveAge() int plAvBrainGeneric::AddStage(plAnimStage *stage) { if(!fStages) - fStages = TRACKED_NEW plAnimStageVec; + fStages = new plAnimStageVec; fStages->push_back(stage); return fStages->size() - 1; } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp index 65bde6e3..0d1d292b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp @@ -182,7 +182,7 @@ void plAvBrainHuman::Activate(plArmatureModBase *avMod) plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = avMod->GetController(); - fCallbackAction = TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction = new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } @@ -378,7 +378,7 @@ hsBool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg) case B_CONTROL_TOGGLE_PHYSICAL: { #ifndef PLASMA_EXTERNAL_RELEASE // external clients can't go non-physical - plAvBrainDrive *driver = TRACKED_NEW plAvBrainDrive(20, 1); + plAvBrainDrive *driver = new plAvBrainDrive(20, 1); fAvMod->PushBrain(driver); #endif return true; @@ -451,7 +451,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg) { if (swim->GetIsEntering()) { - plAvBrainSwim *swimBrain = TRACKED_NEW plAvBrainSwim(); + plAvBrainSwim *swimBrain = new plAvBrainSwim(); swimBrain->MsgReceive(swim); fAvMod->PushBrain(swimBrain); } @@ -466,13 +466,13 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg) { if(ride->Entering()) { - //plAvBrainRideAnimatedPhysical *rideBrain = TRACKED_NEW plAvBrainRideAnimatedPhysical(); + //plAvBrainRideAnimatedPhysical *rideBrain = new plAvBrainRideAnimatedPhysical(); //fAvMod->PushBrain(rideBrain); delete fCallbackAction; plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = fAvMod->GetController(); - fCallbackAction= TRACKED_NEW plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction= new plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } @@ -482,7 +482,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg) plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = fAvMod->GetController(); - fCallbackAction= TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction= new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); //hsStatusMessage("Got an exiting ride animated physical message"); } @@ -498,7 +498,7 @@ hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg) { // let's build a seek task to get us to the attach point plKey seekTarget = msg->fTarget; - plAvTaskSeek *seekTask = TRACKED_NEW plAvTaskSeek(seekTarget); + plAvTaskSeek *seekTask = new plAvTaskSeek(seekTarget); QueueTask(seekTask); // now a brain task to start the actual climb. @@ -518,8 +518,8 @@ hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg) startMode = plAvBrainClimb::kMountingRight; break; } - plAvBrainClimb *brain = TRACKED_NEW plAvBrainClimb(startMode); - plAvTaskBrain *brainTask = TRACKED_NEW plAvTaskBrain(brain); + plAvBrainClimb *brain = new plAvBrainClimb(startMode); + plAvTaskBrain *brainTask = new plAvTaskBrain(brain); QueueTask(brainTask); } // ** potentially controversial: @@ -605,14 +605,14 @@ hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg) if(seekM->fSmartSeek) { // use smart seek - plAvTaskSeek * seek = TRACKED_NEW plAvTaskSeek(seekM); + plAvTaskSeek * seek = new plAvTaskSeek(seekM); QueueTask(seek); } else if (!seekM->fNoSeek) { // use dumb seek - plAvSeekTask *seek = TRACKED_NEW plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName); + plAvSeekTask *seek = new plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName); QueueTask(seek); } // else don't seek at all. @@ -621,14 +621,14 @@ hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg) if(oneshotM) { // if it's a oneshot, add the oneshot task as well - plAvOneShotTask *oneshot = TRACKED_NEW plAvOneShotTask(oneshotM, fAvMod, this); + plAvOneShotTask *oneshot = new plAvOneShotTask(oneshotM, fAvMod, this); QueueTask(oneshot); } } else if (plAvPushBrainMsg *pushM = plAvPushBrainMsg::ConvertNoRef(msg)) { - plAvTaskBrain * push = TRACKED_NEW plAvTaskBrain(pushM->fBrain); + plAvTaskBrain * push = new plAvTaskBrain(pushM->fBrain); QueueTask(push); } else if (plAvPopBrainMsg *popM = plAvPopBrainMsg::ConvertNoRef(msg)) { - plAvTaskBrain * pop = TRACKED_NEW plAvTaskBrain(); + plAvTaskBrain * pop = new plAvTaskBrain(); QueueTask(pop); } else if (plAvTaskMsg *taskM = plAvTaskMsg::ConvertNoRef(msg)) { plAvTask *task = taskM->GetTask(); @@ -688,7 +688,7 @@ void plAvBrainHuman::TurnToPoint(hsPoint3 point) avPos = subworldCI->GetWorldToLocal() * avPos; } - plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, fAvMod->GetKey(), nil, 1.f, true); + plAvSeekMsg *msg = new plAvSeekMsg(nil, fAvMod->GetKey(), nil, 1.f, true); hsClearBits(msg->fFlags, plAvSeekMsg::kSeekFlagForce3rdPersonOnStart); hsSetBits(msg->fFlags, plAvSeekMsg::kSeekFlagNoWarpOnTimeout | plAvSeekMsg::kSeekFlagRotationOnly); msg->fTargetLookAt = point; @@ -705,10 +705,10 @@ void plAvBrainHuman::IChatOn() if (!fAvMod->FindAnimInstance(chatAnimName)) { plKey avKey = fAvMod->GetKey(); - plAvAnimTask *animTask = TRACKED_NEW plAvAnimTask(chatAnimName, 0.0, 1.0, 1.0, 0.0, true, true, true); + plAvAnimTask *animTask = new plAvAnimTask(chatAnimName, 0.0, 1.0, 1.0, 0.0, true, true, true); if (animTask) { - plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(avKey, avKey, animTask); + plAvTaskMsg *taskMsg = new plAvTaskMsg(avKey, avKey, animTask); taskMsg->SetBCastFlag(plMessage::kNetPropagate); taskMsg->Send(); } @@ -721,10 +721,10 @@ void plAvBrainHuman::IChatOff() { char *chatAnimName = fAvMod->MakeAnimationName("Talk"); plKey avKey = fAvMod->GetKey(); - plAvAnimTask *animTask = TRACKED_NEW plAvAnimTask(chatAnimName, -1.0); + plAvAnimTask *animTask = new plAvAnimTask(chatAnimName, -1.0); if (animTask) { - plAvTaskMsg *taskMsg = TRACKED_NEW plAvTaskMsg(avKey, avKey, animTask); + plAvTaskMsg *taskMsg = new plAvTaskMsg(avKey, avKey, animTask); taskMsg->SetBCastFlag(plMessage::kNetPropagate); taskMsg->Send(); } @@ -761,62 +761,62 @@ hsBool plAvBrainHuman::IInitAnimations() { plHBehavior *behavior; fBehaviors.SetCountAndZero(kHuBehaviorMax); - fBehaviors[kIdle] = behavior = TRACKED_NEW Idle; + fBehaviors[kIdle] = behavior = new Idle; behavior->Init(idle, true, this, fAvMod, kDefaultFade, kDefaultFade, kIdle, plHBehavior::kBehaviorTypeIdle); behavior->SetStrength(1.f, 0.f); - fBehaviors[kWalk] = behavior = TRACKED_NEW Walk; + fBehaviors[kWalk] = behavior = new Walk; behavior->Init(walk, true, this, fAvMod, kDefaultFade, 5.f, kWalk, plHBehavior::kBehaviorTypeWalk); - fBehaviors[kRun] = behavior = TRACKED_NEW Run; + fBehaviors[kRun] = behavior = new Run; behavior->Init(run, true, this, fAvMod, kDefaultFade, 2.0, kRun, plHBehavior::kBehaviorTypeRun); - fBehaviors[kWalkBack] = behavior = TRACKED_NEW WalkBack; + fBehaviors[kWalkBack] = behavior = new WalkBack; behavior->Init(walkBack, true, this, fAvMod, kDefaultFade, kDefaultFade, kWalkBack, plHBehavior::kBehaviorTypeWalkBack); - fBehaviors[kStandingTurnLeft] = behavior = TRACKED_NEW StandingTurnLeft; + fBehaviors[kStandingTurnLeft] = behavior = new StandingTurnLeft; behavior->Init(standingLeft, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnLeft, plHBehavior::kBehaviorTypeTurnLeft); - fBehaviors[kStandingTurnRight] = behavior = TRACKED_NEW StandingTurnRight; + fBehaviors[kStandingTurnRight] = behavior = new StandingTurnRight; behavior->Init(standingRight, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnRight, plHBehavior::kBehaviorTypeTurnRight); - fBehaviors[kStepLeft] = behavior = TRACKED_NEW StepLeft; + fBehaviors[kStepLeft] = behavior = new StepLeft; behavior->Init(stepLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepLeft, plHBehavior::kBehaviorTypeSidestepLeft); - fBehaviors[kStepRight] = behavior = TRACKED_NEW StepRight; + fBehaviors[kStepRight] = behavior = new StepRight; behavior->Init(stepRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepRight, plHBehavior::kBehaviorTypeSidestepRight); // Warning: Changing the blend times of the jump animations will affect the path you take, because until we're fully blended, // we won't be using the full motion defined in the animation. This isn't an issue for standing jump, but you need to be // aware of it for the walk/run jumps. - fBehaviors[kFall] = behavior = TRACKED_NEW Fall; + fBehaviors[kFall] = behavior = new Fall; behavior->Init(fall, true, this, fAvMod, 1.0f, 10, kFall, plHBehavior::kBehaviorTypeFall); - fBehaviors[kStandingJump] = behavior = TRACKED_NEW StandingJump; + fBehaviors[kStandingJump] = behavior = new StandingJump; behavior->Init(standJump, false, this, fAvMod, kDefaultFade, kDefaultFade, kStandingJump, plHBehavior::kBehaviorTypeStandingJump); - fBehaviors[kWalkingJump] = behavior = TRACKED_NEW WalkingJump; + fBehaviors[kWalkingJump] = behavior = new WalkingJump; behavior->Init(walkJump, false, this, fAvMod, 10, 3.0, kWalkingJump, plHBehavior::kBehaviorTypeWalkingJump); - fBehaviors[kRunningJump] = behavior = TRACKED_NEW RunningJump; + fBehaviors[kRunningJump] = behavior = new RunningJump; behavior->Init(runJump, false, this, fAvMod, 10, 2.0, kRunningJump, plHBehavior::kBehaviorTypeRunningJump); - fBehaviors[kGroundImpact] = behavior = TRACKED_NEW GroundImpact; + fBehaviors[kGroundImpact] = behavior = new GroundImpact; behavior->Init(groundImpact, false, this, fAvMod, 6.0f, kDefaultFade, kGroundImpact, plHBehavior::kBehaviorTypeGroundImpact); - fBehaviors[kRunningImpact] = behavior = TRACKED_NEW RunningImpact; + fBehaviors[kRunningImpact] = behavior = new RunningImpact; behavior->Init(runningImpact, false, this, fAvMod, 6.0f, kDefaultFade, kRunningImpact, plHBehavior::kBehaviorTypeRunningImpact); - fBehaviors[kMovingTurnLeft] = behavior = TRACKED_NEW MovingTurnLeft; + fBehaviors[kMovingTurnLeft] = behavior = new MovingTurnLeft; behavior->Init(movingLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnLeft, plHBehavior::kBehaviorTypeMovingTurnLeft); - fBehaviors[kMovingTurnRight] = behavior = TRACKED_NEW MovingTurnRight; + fBehaviors[kMovingTurnRight] = behavior = new MovingTurnRight; behavior->Init(movingRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnRight, plHBehavior::kBehaviorTypeMovingTurnRight); - fBehaviors[kPushWalk] = behavior = TRACKED_NEW PushWalk; + fBehaviors[kPushWalk] = behavior = new PushWalk; behavior->Init(pushWalk, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushWalk, plHBehavior::kBehaviorTypePushWalk); - //fBehaviors[kPushIdle] = behavior = TRACKED_NEW PushIdle; + //fBehaviors[kPushIdle] = behavior = new PushIdle; //behavior->Init(pushIdle, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushIdle, plHBehavior::kBehaviorTypePushIdle); result = true; @@ -879,7 +879,7 @@ hsBool plAvBrainHuman::LeaveAge() delete fCallbackAction; plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); - fCallbackAction= TRACKED_NEW plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction= new plWalkingController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } plArmatureBrain::LeaveAge(); @@ -1386,32 +1386,32 @@ bool PushSimpleMultiStage(plArmatureMod *avatar, const char *enterAnim, const ch // key. otherwise, we'll loop until someone sends a message telling us explicitly to advance plAnimStage::AdvanceType idleAdvance = autoExit ? plAnimStage::kAdvanceOnMove : plAnimStage::kAdvanceNone; - plAnimStageVec *v = TRACKED_NEW plAnimStageVec; - plAnimStage *s1 = TRACKED_NEW plAnimStage(enterAnim, + plAnimStageVec *v = new plAnimStageVec; + plAnimStage *s1 = new plAnimStage(enterAnim, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); v->push_back(s1); - plAnimStage *s2 = TRACKED_NEW plAnimStage(idleAnim, 0, + plAnimStage *s2 = new plAnimStage(idleAnim, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, idleAdvance, plAnimStage::kRegressNone, -1); v->push_back(s2); - plAnimStage *s3 = TRACKED_NEW plAnimStage(exitAnim, 0, + plAnimStage *s3 = new plAnimStage(exitAnim, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); v->push_back(s3); - plAvBrainGeneric *b = TRACKED_NEW plAvBrainGeneric(v, nil, nil, nil, plAvBrainGeneric::kExitAnyTask | plAvBrainGeneric::kExitNewBrain, + plAvBrainGeneric *b = new plAvBrainGeneric(v, nil, nil, nil, plAvBrainGeneric::kExitAnyTask | plAvBrainGeneric::kExitNewBrain, 2.0f, 2.0f, plAvBrainGeneric::kMoveStandstill); b->SetBodyUsage(bodyUsage); b->SetType(type); - plAvTaskBrain *bt = TRACKED_NEW plAvTaskBrain(b); - plAvTaskMsg *btm = TRACKED_NEW plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avatar->GetKey(), bt); + plAvTaskBrain *bt = new plAvTaskBrain(b); + plAvTaskMsg *btm = new plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avatar->GetKey(), bt); if(netPropagate) btm->SetBCastFlag(plMessage::kNetPropagate); btm->Send(); @@ -1440,23 +1440,23 @@ bool AvatarEmote(plArmatureMod *avatar, const char *emoteName) plKey avKey = avatar->GetKey(); float fadeIn = emote->GetFadeIn(); float fadeOut = emote->GetFadeOut(); - plAnimStage *s1 = TRACKED_NEW plAnimStage(emoteName, + plAnimStage *s1 = new plAnimStage(emoteName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceOnMove, plAnimStage::kRegressNone, 0); - plAnimStageVec *v = TRACKED_NEW plAnimStageVec; + plAnimStageVec *v = new plAnimStageVec; v->push_back(s1); - plAvBrainGeneric *b = TRACKED_NEW plAvBrainGeneric(v, nil, nil, nil, + plAvBrainGeneric *b = new plAvBrainGeneric(v, nil, nil, nil, plAvBrainGeneric::kExitAnyInput | plAvBrainGeneric::kExitNewBrain | plAvBrainGeneric::kExitAnyTask, 2.0f, 2.0f, huBrain->IsActor() ? plAvBrainGeneric::kMoveRelative : plAvBrainGeneric::kMoveStandstill); b->SetType(plAvBrainGeneric::kEmote); b->SetBodyUsage(emote->GetBodyUsage()); - plAvTaskBrain *bt = TRACKED_NEW plAvTaskBrain(b); - plAvTaskMsg *btm = TRACKED_NEW plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avKey, bt); + plAvTaskBrain *bt = new plAvTaskBrain(b); + plAvTaskMsg *btm = new plAvTaskMsg(plAvatarMgr::GetInstance()->GetKey(), avKey, bt); btm->SetBCastFlag(plMessage::kNetPropagate); btm->Send(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp index bdf5055f..f10bc7b8 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp @@ -57,7 +57,7 @@ void plAvBrainRideAnimatedPhysical::Activate(plArmatureModBase *avMod) plSceneObject* avObj = fArmature->GetTarget(0); plAGModifier* agMod = const_cast(plAGModifier::ConvertNoRef(FindModifierByClass(avObj, plAGModifier::Index()))); plPhysicalControllerCore* controller = avMod->GetController(); - fCallbackAction = TRACKED_NEW plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller); + fCallbackAction = new plRidingAnimatedPhysicalController(avObj, agMod->GetApplicator(kAGPinTransform), controller); fCallbackAction->ActivateController(); } } @@ -118,62 +118,62 @@ hsBool plAvBrainRideAnimatedPhysical::IInitAnimations() { plHBehavior *behavior; fBehaviors.SetCountAndZero(kHuBehaviorMax); - fBehaviors[kIdle] = behavior = TRACKED_NEW Idle; + fBehaviors[kIdle] = behavior = new Idle; behavior->Init(idle, true, this, fAvMod, kDefaultFade, kDefaultFade, kIdle, plHBehavior::kBehaviorTypeIdle); behavior->SetStrength(1.f, 0.f); - fBehaviors[kWalk] = behavior = TRACKED_NEW Walk; + fBehaviors[kWalk] = behavior = new Walk; behavior->Init(walk, true, this, fAvMod, kDefaultFade, 5.f, kWalk, plHBehavior::kBehaviorTypeWalk); - fBehaviors[kRun] = behavior = TRACKED_NEW Run; + fBehaviors[kRun] = behavior = new Run; behavior->Init(run, true, this, fAvMod, kDefaultFade, 2.0, kRun, plHBehavior::kBehaviorTypeRun); - fBehaviors[kWalkBack] = behavior = TRACKED_NEW WalkBack; + fBehaviors[kWalkBack] = behavior = new WalkBack; behavior->Init(walkBack, true, this, fAvMod, kDefaultFade, kDefaultFade, kWalkBack, plHBehavior::kBehaviorTypeWalkBack); - fBehaviors[kStandingTurnLeft] = behavior = TRACKED_NEW StandingTurnLeft; + fBehaviors[kStandingTurnLeft] = behavior = new StandingTurnLeft; behavior->Init(standingLeft, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnLeft, plHBehavior::kBehaviorTypeTurnLeft); - fBehaviors[kStandingTurnRight] = behavior = TRACKED_NEW StandingTurnRight; + fBehaviors[kStandingTurnRight] = behavior = new StandingTurnRight; behavior->Init(standingRight, true, this, fAvMod, 3.0f, 6.0f, kStandingTurnRight, plHBehavior::kBehaviorTypeTurnRight); - fBehaviors[kStepLeft] = behavior = TRACKED_NEW StepLeft; + fBehaviors[kStepLeft] = behavior = new StepLeft; behavior->Init(stepLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepLeft, plHBehavior::kBehaviorTypeSidestepLeft); - fBehaviors[kStepRight] = behavior = TRACKED_NEW StepRight; + fBehaviors[kStepRight] = behavior = new StepRight; behavior->Init(stepRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kStepRight, plHBehavior::kBehaviorTypeSidestepRight); // Warning: Changing the blend times of the jump animations will affect the path you take, because until we're fully blended, // we won't be using the full motion defined in the animation. This isn't an issue for standing jump, but you need to be // aware of it for the walk/run jumps. - fBehaviors[kFall] = behavior = TRACKED_NEW Fall; + fBehaviors[kFall] = behavior = new Fall; behavior->Init(fall, true, this, fAvMod, 1.0f, 10, kFall, plHBehavior::kBehaviorTypeFall); - fBehaviors[kStandingJump] = behavior = TRACKED_NEW StandingJump; + fBehaviors[kStandingJump] = behavior = new StandingJump; behavior->Init(standJump, false, this, fAvMod, kDefaultFade, kDefaultFade, kStandingJump, plHBehavior::kBehaviorTypeStandingJump); - fBehaviors[kWalkingJump] = behavior = TRACKED_NEW WalkingJump; + fBehaviors[kWalkingJump] = behavior = new WalkingJump; behavior->Init(walkJump, false, this, fAvMod, 10, 3.0, kWalkingJump, plHBehavior::kBehaviorTypeWalkingJump); - fBehaviors[kRunningJump] = behavior = TRACKED_NEW RunningJump; + fBehaviors[kRunningJump] = behavior = new RunningJump; behavior->Init(runJump, false, this, fAvMod, 10, 2.0, kRunningJump, plHBehavior::kBehaviorTypeRunningJump); - fBehaviors[kGroundImpact] = behavior = TRACKED_NEW GroundImpact; + fBehaviors[kGroundImpact] = behavior = new GroundImpact; behavior->Init(groundImpact, false, this, fAvMod, 6.0f, kDefaultFade, kGroundImpact, plHBehavior::kBehaviorTypeGroundImpact); - fBehaviors[kRunningImpact] = behavior = TRACKED_NEW RunningImpact; + fBehaviors[kRunningImpact] = behavior = new RunningImpact; behavior->Init(runningImpact, false, this, fAvMod, 6.0f, kDefaultFade, kRunningImpact, plHBehavior::kBehaviorTypeRunningImpact); - fBehaviors[kMovingTurnLeft] = behavior = TRACKED_NEW MovingTurnLeft; + fBehaviors[kMovingTurnLeft] = behavior = new MovingTurnLeft; behavior->Init(movingLeft, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnLeft, plHBehavior::kBehaviorTypeMovingTurnLeft); - fBehaviors[kMovingTurnRight] = behavior = TRACKED_NEW MovingTurnRight; + fBehaviors[kMovingTurnRight] = behavior = new MovingTurnRight; behavior->Init(movingRight, true, this, fAvMod, kDefaultFade, kDefaultFade, kMovingTurnRight, plHBehavior::kBehaviorTypeMovingTurnRight); - fBehaviors[kPushWalk] = behavior = TRACKED_NEW PushWalk; + fBehaviors[kPushWalk] = behavior = new PushWalk; behavior->Init(pushWalk, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushWalk, plHBehavior::kBehaviorTypePushWalk); - //fBehaviors[kPushIdle] = behavior = TRACKED_NEW PushIdle; + //fBehaviors[kPushIdle] = behavior = new PushIdle; //behavior->Init(pushIdle, true, this, fAvMod, kDefaultFade, kDefaultFade, kPushIdle, plHBehavior::kBehaviorTypePushIdle); result = true; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp index f86e6ae2..884a0f68 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp @@ -241,7 +241,7 @@ plAvBrainSwim::plAvBrainSwim() : fMode(kWalking), fSurfaceDistance(0.f) { - fSurfaceProbeMsg = TRACKED_NEW plLOSRequestMsg(); + fSurfaceProbeMsg = new plLOSRequestMsg(); fSurfaceProbeMsg->SetReportType(plLOSRequestMsg::kReportHitOrMiss); fSurfaceProbeMsg->SetRequestType(plSimDefs::kLOSDBSwimRegion); fSurfaceProbeMsg->SetTestType(plLOSRequestMsg::kTestAny); @@ -277,11 +277,11 @@ hsBool plAvBrainSwim::Apply(double time, float elapsed) if (huBrain && !huBrain->fCallbackAction->IsOnGround()) { // We're jumping in! Trigger splash effect (sound) - plArmatureEffectMsg *msg = TRACKED_NEW plArmatureEffectMsg(fAvMod->GetArmatureEffects()->GetKey(), kTime); + plArmatureEffectMsg *msg = new plArmatureEffectMsg(fAvMod->GetArmatureEffects()->GetKey(), kTime); msg->fEventTime = (float)time; msg->fTriggerIdx = plArmatureMod::kImpact; - plEventCallbackInterceptMsg *iMsg = TRACKED_NEW plEventCallbackInterceptMsg; + plEventCallbackInterceptMsg *iMsg = new plEventCallbackInterceptMsg; iMsg->AddReceiver(fAvMod->GetArmatureEffects()->GetKey()); iMsg->fEventTime = (float)time; iMsg->fEvent = kTime; @@ -381,7 +381,7 @@ hsBool plAvBrainSwim::MsgReceive(plMessage *msg) if (!seekM->fNoSeek) { // use dumb seek - plAvSeekTask *seek = TRACKED_NEW plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName); + plAvSeekTask *seek = new plAvSeekTask(seekM->fSeekPoint, seekM->fAlignType, seekM->fAnimName); QueueTask(seek); } // else don't seek at all. @@ -390,7 +390,7 @@ hsBool plAvBrainSwim::MsgReceive(plMessage *msg) if(oneshotM) { // if it's a oneshot, add the oneshot task as well - plAvOneShotTask *oneshot = TRACKED_NEW plAvOneShotTask(oneshotM, fAvMod, this); + plAvOneShotTask *oneshot = new plAvOneShotTask(oneshotM, fAvMod, this); QueueTask(oneshot); } return true; @@ -464,7 +464,7 @@ void plAvBrainSwim::IStartWading() if (fAvMod->IsLocalAvatar()) { - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson); @@ -487,7 +487,7 @@ void plAvBrainSwim::IStartSwimming(bool is2D) if (fAvMod->IsLocalAvatar()) { - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson); @@ -535,34 +535,34 @@ hsBool plAvBrainSwim::IInitAnimations() static const float defaultFade = 2.0f; fBehaviors.SetCountAndZero(kSwimBehaviorMax); plSwimBehavior *behavior; - fBehaviors[kTreadWater] = behavior = TRACKED_NEW TreadWater; + fBehaviors[kTreadWater] = behavior = new TreadWater; behavior->Init(treadWater, true, this, fAvMod, kTreadWater); - fBehaviors[kSwimForward] = behavior = TRACKED_NEW SwimForward; + fBehaviors[kSwimForward] = behavior = new SwimForward; behavior->Init(swimForward, true, this, fAvMod, kSwimForward); - fBehaviors[kSwimForwardFast] = behavior = TRACKED_NEW SwimForwardFast; + fBehaviors[kSwimForwardFast] = behavior = new SwimForwardFast; behavior->Init(swimForwardFast, true, this, fAvMod, kSwimForwardFast); - fBehaviors[kSwimBack] = behavior = TRACKED_NEW SwimBack; + fBehaviors[kSwimBack] = behavior = new SwimBack; behavior->Init(swimBack, true, this, fAvMod, kSwimBack); - fBehaviors[kSwimLeft] = behavior = TRACKED_NEW SwimLeft; + fBehaviors[kSwimLeft] = behavior = new SwimLeft; behavior->Init(swimLeft, true, this, fAvMod, kSwimLeft); - fBehaviors[kSwimRight] = behavior = TRACKED_NEW SwimRight; + fBehaviors[kSwimRight] = behavior = new SwimRight; behavior->Init(swimRight, true, this, fAvMod, kSwimRight); - fBehaviors[kSwimTurnLeft] = behavior = TRACKED_NEW SwimTurnLeft; + fBehaviors[kSwimTurnLeft] = behavior = new SwimTurnLeft; behavior->Init(nil, true, this, fAvMod, kSwimTurnLeft); - fBehaviors[kSwimTurnRight] = behavior = TRACKED_NEW SwimTurnRight; + fBehaviors[kSwimTurnRight] = behavior = new SwimTurnRight; behavior->Init(nil, true, this, fAvMod, kSwimTurnRight); - fBehaviors[kTreadTurnLeft] = behavior = TRACKED_NEW TreadTurnLeft; + fBehaviors[kTreadTurnLeft] = behavior = new TreadTurnLeft; behavior->Init(treadWaterLeft, true, this, fAvMod, kTreadTurnLeft); - fBehaviors[kTreadTurnRight] = behavior = TRACKED_NEW TreadTurnRight; + fBehaviors[kTreadTurnRight] = behavior = new TreadTurnRight; behavior->Init(treadWaterRight, true, this, fAvMod, kTreadTurnRight); return true; @@ -641,7 +641,7 @@ hsBool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg) case B_CONTROL_TOGGLE_PHYSICAL: { #ifndef PLASMA_EXTERNAL_RELEASE // external clients can't go non-physical - plAvBrainDrive *driver = TRACKED_NEW plAvBrainDrive(20, 1); + plAvBrainDrive *driver = new plAvBrainDrive(20, 1); fAvMod->PushBrain(driver); #endif return true; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp index 555bd2fd..946721a2 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp @@ -113,7 +113,7 @@ plWalkingController::plWalkingController(plSceneObject* rootObject, plAGApplicat { if (fController) { - fWalkingStrategy= TRACKED_NEW plWalkingStrategy(fController); + fWalkingStrategy= new plWalkingStrategy(fController); fController->SetMovementSimulationInterface(fWalkingStrategy); } else @@ -178,7 +178,7 @@ void plWalkingController::Reset(bool newAge) } else { - fWalkingStrategy= TRACKED_NEW plWalkingStrategy(fController); + fWalkingStrategy= new plWalkingStrategy(fController); fWalkingStrategy->RefreshConnectionToControllerCore(); } @@ -404,7 +404,7 @@ plSwimmingController::plSwimmingController(plSceneObject* rootObject, plAGApplic :plAnimatedController(rootObject,rootApp,controller) { if (controller) - fSwimmingStrategy= TRACKED_NEW plSwimStrategy(controller); + fSwimmingStrategy= new plSwimStrategy(controller); else fSwimmingStrategy = nil; } @@ -417,7 +417,7 @@ plRidingAnimatedPhysicalController::plRidingAnimatedPhysicalController(plSceneOb : plWalkingController(rootObject, rootApp, controller) { if(controller) - fWalkingStrategy = TRACKED_NEW plRidingAnimatedPhysicalStrategy(controller); + fWalkingStrategy = new plRidingAnimatedPhysicalStrategy(controller); else fWalkingStrategy = nil; } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp index 5df8711d..444991c4 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp @@ -155,7 +155,7 @@ void plAvLadderMod::ITriggerSelf(plKey avKey) { plKey avPhysKey = avKey; // I'm going to lie and pretend it's from the avatar. the alternative is lengthy and unreadable. - plNotifyMsg *notifyMsg = TRACKED_NEW plNotifyMsg(avPhysKey, GetKey()); + plNotifyMsg *notifyMsg = new plNotifyMsg(avPhysKey, GetKey()); notifyMsg->fID = kNotifyTrigger; notifyMsg->Send(); fAvatarMounting = true; @@ -266,9 +266,9 @@ void plAvLadderMod::EmitCommand(const plKey receiver) traverseName = "LadderDown"; } - plAnimStageVec *v = TRACKED_NEW plAnimStageVec; + plAnimStageVec *v = new plAnimStageVec; - plAnimStage *s1 = TRACKED_NEW plAnimStage(mountName, + plAnimStage *s1 = new plAnimStage(mountName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackAuto, @@ -282,7 +282,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver) // if loops is zero, we don't need the traverse animation at all. if(fLoops) { - plAnimStage *s2 = TRACKED_NEW plAnimStage(traverseName, + plAnimStage *s2 = new plAnimStage(traverseName, 0, plAnimStage::kForwardKey, plAnimStage::kBackKey, @@ -296,7 +296,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver) s2->SetReverseOnIdle(true); v->push_back(s2); } - plAnimStage *s3 = TRACKED_NEW plAnimStage(dismountName, + plAnimStage *s3 = new plAnimStage(dismountName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackAuto, @@ -307,12 +307,12 @@ void plAvLadderMod::EmitCommand(const plKey receiver) s3->SetReverseOnIdle(true); v->push_back(s3); - plNotifyMsg* enterNotify = TRACKED_NEW plNotifyMsg(GetKey(), GetKey()); + plNotifyMsg* enterNotify = new plNotifyMsg(GetKey(), GetKey()); enterNotify->fID = kNotifyAvatarOnLadder; uint32_t exitFlags = plAvBrainGeneric::kExitNormal; - plAvBrainGeneric *ladBrain = TRACKED_NEW plAvBrainGeneric(v, enterNotify, nil, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn, + plAvBrainGeneric *ladBrain = new plAvBrainGeneric(v, enterNotify, nil, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn, plAvBrainGeneric::kDefaultFadeOut, plAvBrainGeneric::kMoveRelative); ladBrain->SetType(plAvBrainGeneric::kLadder); ladBrain->SetReverseFBControlsOnRelease(!fGoingUp); @@ -321,9 +321,9 @@ void plAvLadderMod::EmitCommand(const plKey receiver) // Very important that we dumb seek here. Otherwise you can run off the edge of a ladder, and seek will be helpless // until you hit the ground, at which point you have no hope of successfully seeking. - plAvSeekMsg *seeker = TRACKED_NEW plAvSeekMsg(nil, avKey, seekKey, 1.0f, false); + plAvSeekMsg *seeker = new plAvSeekMsg(nil, avKey, seekKey, 1.0f, false); seeker->Send(); - plAvPushBrainMsg *brainer = TRACKED_NEW plAvPushBrainMsg(nil, avKey, ladBrain); + plAvPushBrainMsg *brainer = new plAvPushBrainMsg(nil, avKey, ladBrain); brainer->Send(); } } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp index 35b4a2e0..a720ab14 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp @@ -224,7 +224,7 @@ hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar() && (fFlags & plAvSeekMsg::kSeekFlagForce3rdPersonOnStart)) { // create message - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson); @@ -281,7 +281,7 @@ void plAvTaskSeek::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar() && (fFlags & plAvSeekMsg::kSeekFlagUnForce3rdPersonOnFinish)) { // create message - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson); @@ -293,7 +293,7 @@ void plAvTaskSeek::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double if (fNotifyFinishedKey) { - plAvTaskSeekDoneMsg *msg = TRACKED_NEW plAvTaskSeekDoneMsg(avatar->GetKey(), fNotifyFinishedKey); + plAvTaskSeekDoneMsg *msg = new plAvTaskSeekDoneMsg(avatar->GetKey(), fNotifyFinishedKey); msg->fAborted = (fState == kSeekAbort); msg->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp index 244d01f6..5c497296 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp @@ -178,7 +178,7 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr) fCustomText = s->ReadSafeString(); fDescription = s->ReadSafeString(); if (s->ReadBool()) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail int tileCount = s->ReadLE32(); int i, j; @@ -190,23 +190,23 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr) for (j = 0; j < layerCount; j++) { int layer = s->ReadByte(); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plElementRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1, nil, layer), plRefFlags::kActiveRef); // texture + mgr->ReadKeyNotifyMe(s, new plElementRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1, nil, layer), plRefFlags::kActiveRef); // texture } } for (i = 0; i < kMaxNumLODLevels; i++) { if (s->ReadBool()) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1), plRefFlags::kActiveRef); // shared mesh + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, -1), plRefFlags::kActiveRef); // shared mesh } fElements.SetCountAndZero(tileCount); if (plClothingMgr::GetClothingMgr()) { - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(plClothingMgr::GetClothingMgr()->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg = new plGenRefMsg(plClothingMgr::GetClothingMgr()->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), msg, plRefFlags::kActiveRef); } - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // forced accessory + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // forced accessory for (i = 0; i < 3; i++) { @@ -313,7 +313,7 @@ hsBool plClothingItem::MsgReceive(plMessage* msg) fElementNames.Set(eMsg->fWhich, hsStrcpy(eMsg->fElementName)); if (fTextures.Get(eMsg->fWhich) == nil) { - plMipmap **layers = TRACKED_NEW plMipmap*[plClothingElement::kLayerMax]; + plMipmap **layers = new plMipmap*[plClothingElement::kLayerMax]; int i; for (i = 0; i < plClothingElement::kLayerMax; i++) layers[i] = nil; @@ -393,7 +393,7 @@ void plClothingBase::Read(hsStream* s, hsResMgr* mgr) fName = s->ReadSafeString(); if (s->ReadBool()) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); fLayoutName = s->ReadSafeString(); } @@ -456,7 +456,7 @@ void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */, if (fItems.Find(item) != fItems.kMissingIndex) return; - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kAddItem); msg->fItemKey = item->GetKey(); @@ -477,7 +477,7 @@ void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */, void plClothingOutfit::ForceUpdate(bool retry) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddCommand(plClothingMsg::kUpdateTexture); if (retry) msg->AddCommand(plClothingMsg::kRetry); // force a resend @@ -489,7 +489,7 @@ void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true if (fItems.Find(item) == fItems.kMissingIndex) return; - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kRemoveItem); msg->SetBCastFlag(plMessage::kNetPropagate); @@ -506,7 +506,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */, hsBool retry /* = true */, uint8_t layer /* = kLayerTint1 */) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kTintItem); msg->fItemKey = item->GetKey(); @@ -529,7 +529,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl void plClothingOutfit::TintSkin(float red, float green, float blue, hsBool update /* = true */, hsBool broadcast /* = true */) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kTintSkin); msg->fColor.Set(red, green, blue, 1.f); @@ -544,7 +544,7 @@ void plClothingOutfit::TintSkin(float red, float green, float blue, void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, hsBool retry /* = true */) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kMorphItem); msg->fItemKey = item->GetKey(); @@ -563,7 +563,7 @@ void plClothingOutfit::SetAge(float age, hsBool update /* = true */, hsBool broa void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, hsBool update /* = true */, hsBool broadcast /* = true */) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kBlendSkin); msg->fLayer = layer; @@ -618,7 +618,7 @@ void plClothingOutfit::IAddItem(plClothingItem *item) break; } fItems.Insert(i, item); - plClothingItemOptions *op = TRACKED_NEW plClothingItemOptions; + plClothingItemOptions *op = new plClothingItemOptions; fOptions.Insert(i, op); IInstanceSharedMeshes(item); fDirtyItems.SetBit(item->fTileset); @@ -745,12 +745,12 @@ void plClothingOutfit::Read(hsStream* s, hsResMgr* mgr) plSynchedObject::Read(s, mgr); fGroup = s->ReadByte(); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // plClothingBase if (fGroup != plClothingMgr::kClothingBaseNoOptions) { - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // target layer - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // material + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // target layer + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // material } plgDispatch::Dispatch()->RegisterForExactType(plPreResourceMsg::Index(), GetKey()); //ReadItems(s, mgr, false); @@ -827,7 +827,7 @@ void plClothingOutfit::ReadFromVault() plStateDataRecord::ReadStreamHeader(&ram, &sdlRecName, &sdlRecVersion); plStateDescriptor * desc = plSDLMgr::GetInstance()->FindDescriptor(sdlRecName, sdlRecVersion); if (desc) { - plStateDataRecord * sdlDataRec = TRACKED_NEW plStateDataRecord(desc); + plStateDataRecord * sdlDataRec = new plStateDataRecord(desc); if (sdlDataRec->Read(&ram, 0)) { if (!strcmp(sdlRecName, kSDLMorphSequence)) IHandleMorphSDR(sdlDataRec); @@ -849,7 +849,7 @@ void plClothingOutfit::ReadFromVault() void plClothingOutfit::SaveCustomizations(hsBool retry /* = true */) { - plClothingMsg *msg = TRACKED_NEW plClothingMsg(); + plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); msg->AddCommand(plClothingMsg::kSaveCustomizations); if (retry) @@ -901,7 +901,7 @@ void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs) for (unsigned i = 0; i < morphsSDRs.GetCount(); ++i) { for (unsigned j = 0; j < fAvatar->GetNumLOD(); j++) { if (fAvatar->GetClothingSO(j) == morphsSDRs[i]->GetTarget(0)) { - plStateDataRecord * morphSDR = TRACKED_NEW plStateDataRecord(kSDLMorphSequence); + plStateDataRecord * morphSDR = new plStateDataRecord(kSDLMorphSequence); plSimpleStateVariable * lodVar = morphSDR->FindVar(plMorphSequenceSDLMod::kStrTargetID); if (lodVar) lodVar->Set((int)j); @@ -997,7 +997,7 @@ void plClothingOutfit::IUpdate() if (avMod->GetClothingOutfit()==this) { // Let the GUI know we changed clothes - plClothingUpdateBCMsg *BCMsg = TRACKED_NEW plClothingUpdateBCMsg(); + plClothingUpdateBCMsg *BCMsg = new plClothingUpdateBCMsg(); BCMsg->SetSender(GetKey()); plgDispatch::MsgSend(BCMsg); } @@ -1311,12 +1311,12 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg) { if (cMsg->GetCommand(plClothingMsg::kAddItem)) { - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(cMsg->fItemKey, msg, plRefFlags::kActiveRef); plClothingItem *accessory = plClothingItem::ConvertNoRef(cMsg->fItemKey->GetObjectPtr())->fAccessory; if (accessory) { - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(accessory->GetKey(), msg, plRefFlags::kActiveRef); } } @@ -1392,7 +1392,7 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg) // as a solo command, so that it happens after any other AddViaNotify messages if (cMsg->ResendUpdate()) { - plClothingMsg *update = TRACKED_NEW plClothingMsg(); + plClothingMsg *update = new plClothingMsg(); update->AddReceiver(GetKey()); update->AddCommand(plClothingMsg::kUpdateTexture); plgDispatch::MsgSend(update); @@ -1744,7 +1744,7 @@ hsBool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2) void plClothingMgr::Init() { - fInstance = TRACKED_NEW plClothingMgr; + fInstance = new plClothingMgr; fInstance->RegisterAs(kClothingMgr_KEY); fInstance->IInit(); } @@ -1752,7 +1752,7 @@ void plClothingMgr::Init() void plClothingMgr::IInit() { plClothingElement::GetElements(fElements); - plClothingLayout *layout = TRACKED_NEW plClothingLayout("BasicHuman", 1024); + plClothingLayout *layout = new plClothingLayout("BasicHuman", 1024); layout->fElements.Append(FindElementByName("shirt-chest")); layout->fElements.Append(FindElementByName("shirt-sleeve")); layout->fElements.Append(FindElementByName("face")); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp index b9fe8695..d961f5c1 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp @@ -110,7 +110,7 @@ plAvatarMgr * plAvatarMgr::GetInstance() { if(!fInstance) { - fInstance = TRACKED_NEW plAvatarMgr; + fInstance = new plAvatarMgr; fInstance->RegisterAs(kAvatarMgr_KEY); fInstance->Ref(); } @@ -210,7 +210,7 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is if (loc.IsValid()) { plUoid uID(loc, plSceneObject::Index(), theName); - plLoadAvatarMsg *cloneMsg = TRACKED_NEW plLoadAvatarMsg (uID, requestor, 0, isPlayer, spawnPoint, initialTask, userStr); + plLoadAvatarMsg *cloneMsg = new plLoadAvatarMsg (uID, requestor, 0, isPlayer, spawnPoint, initialTask, userStr); result = cloneMsg->GetCloneKey(); // the clone message is automatically addressed to the net client manager @@ -224,7 +224,7 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is void plAvatarMgr::UnLoadAvatar(plKey avatarKey, bool isPlayer) { hsBool isLoading = false; - plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(avatarKey, GetKey(), 0, isPlayer, isLoading); + plLoadAvatarMsg *msg = new plLoadAvatarMsg(avatarKey, GetKey(), 0, isPlayer, isLoading); msg->Send(); } @@ -238,7 +238,7 @@ void plAvatarMgr::PropagateLocalPlayer(int spawnPoint) plKey requestor = GetKey(); bool isPlayer = true; hsBool isLoading = true; - plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); + plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); if (spawnPoint >= 0) { @@ -267,7 +267,7 @@ bool plAvatarMgr::UnPropagateLocalPlayer() plKey requestor = GetKey(); bool isPlayer = true; hsBool isLoading = false; - plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); + plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); msg->SetBCastFlag(plMessage::kLocalPropagate, false); msg->Send(); return true; @@ -283,7 +283,7 @@ void plAvatarMgr::UnLoadRemotePlayer(plKey remotePlayer) plKey requestor = GetKey(); bool isPlayer = true; hsBool isLoading = false; - plLoadAvatarMsg * msg = TRACKED_NEW plLoadAvatarMsg(remotePlayer, requestor, 0, isPlayer, isLoading); + plLoadAvatarMsg * msg = new plLoadAvatarMsg(remotePlayer, requestor, 0, isPlayer, isLoading); // don't propagate over the network. this is just for removing our local version msg->SetBCastFlag(plMessage::kNetPropagate, false); @@ -300,7 +300,7 @@ void plAvatarMgr::UnLoadLocalPlayer() plKey mgrKey = GetKey(); bool isPlayer = true; hsBool isLoading = false; - plLoadAvatarMsg *msg = TRACKED_NEW plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading); + plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading); msg->Send(); } } @@ -471,7 +471,7 @@ void plAvatarMgr::IFinishLoadingAvatar(plLoadAvatarMsg *cloneMsg) // *** might want to move this to the human brain so we can make sure the // *** avatar is sufficiently initialized before anyone accesses him bool isLocal = cloneMsg->GetOriginatingPlayerID() == plNetClientMgr::GetInstance()->GetPlayerID(); - plPlayerPageMsg* pageM = TRACKED_NEW plPlayerPageMsg; + plPlayerPageMsg* pageM = new plPlayerPageMsg; pageM->SetBCastFlag(plMessage::kBCastByExactType); pageM->fLocallyOriginated = isLocal; pageM->fPlayer = avatarKey; @@ -482,7 +482,7 @@ void plAvatarMgr::IFinishLoadingAvatar(plLoadAvatarMsg *cloneMsg) // This can probably be replaced by the plPlayerPageMsg: // ...keeping for the moment for compatibility - plMemberUpdateMsg* mu = TRACKED_NEW plMemberUpdateMsg; + plMemberUpdateMsg* mu = new plMemberUpdateMsg; mu->Send(); } @@ -498,7 +498,7 @@ void plAvatarMgr::IFinishUnloadingAvatar(plLoadAvatarMsg *cloneMsg) plKey avatar = cloneMsg->GetCloneKey(); bool isLocal = cloneMsg->GetOriginatingPlayerID() == plNetClientMgr::GetInstance()->GetPlayerID(); - plPlayerPageMsg *pageM = TRACKED_NEW plPlayerPageMsg; + plPlayerPageMsg *pageM = new plPlayerPageMsg; pageM->SetBCastFlag(plMessage::kBCastByExactType); pageM->fLocallyOriginated = isLocal; pageM->fPlayer = avatar; @@ -510,7 +510,7 @@ void plAvatarMgr::IFinishUnloadingAvatar(plLoadAvatarMsg *cloneMsg) } // check on this...can it be subsumed by plPlayerPageMsg ? - plMemberUpdateMsg *mu = TRACKED_NEW plMemberUpdateMsg; + plMemberUpdateMsg *mu = new plMemberUpdateMsg; mu->Send(); } @@ -834,7 +834,7 @@ int plAvatarMgr::WarpPlayerToAnother(hsBool iMove, uint32_t remoteID) if (!localSO) return plCCRError::kNilLocalAvatar; - plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, (iMove ? localSO->GetKey() : remoteSO->GetKey()), + plWarpMsg *warp = new plWarpMsg(nil, (iMove ? localSO->GetKey() : remoteSO->GetKey()), plWarpMsg::kFlushTransform, (iMove ? remoteSO->GetLocalToWorld() : localSO->GetLocalToWorld())); warp->SetBCastFlag(plMessage::kNetPropagate); @@ -853,7 +853,7 @@ int plAvatarMgr::WarpPlayerToXYZ(float x, float y, float z) hsVector3 v(x, y, z); m.SetTranslate(&v); - plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, localSO->GetKey(), plWarpMsg::kFlushTransform, m); + plWarpMsg *warp = new plWarpMsg(nil, localSO->GetKey(), plWarpMsg::kFlushTransform, m); warp->SetBCastFlag(plMessage::kNetPropagate); plgDispatch::MsgSend(warp); @@ -873,7 +873,7 @@ int plAvatarMgr::WarpPlayerToXYZ(int pid, float x, float y, float z) hsVector3 v(x, y, z); m.SetTranslate(&v); - plWarpMsg *warp = TRACKED_NEW plWarpMsg(nil, player->GetKey(), 0, m); + plWarpMsg *warp = new plWarpMsg(nil, player->GetKey(), 0, m); warp->SetBCastFlag(plMessage::kNetPropagate); plgDispatch::MsgSend(warp); @@ -899,7 +899,7 @@ void plAvatarMgr::RemoveMaintainersMarker(plMaintainersMarkerModifier *mm) void plAvatarMgr::PointToDniCoordinate(hsPoint3 pt, plDniCoordinateInfo* ret) { int count = fMaintainersMarkers.Count(); - // plDniCoordinateInfo ret = TRACKED_NEW plDniCoordinateInfo; + // plDniCoordinateInfo ret = new plDniCoordinateInfo; if (count > 0) { @@ -1007,14 +1007,14 @@ void plAvatarMgr::OfferLinkingBook(plKey hostKey, plKey guestKey, plMessage *lin { // make the host brain - plAvBrainCoop * brainH = TRACKED_NEW plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, guestKey); + plAvBrainCoop * brainH = new plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, guestKey); - plAnimStage *hostOffer = TRACKED_NEW plAnimStage("BookOffer", plAnimStage::kNotifyAdvance); // autoforward, autoadvance + plAnimStage *hostOffer = new plAnimStage("BookOffer", plAnimStage::kNotifyAdvance); // autoforward, autoadvance // repeats until the guest brain tells us that it's done - plAnimStage *hostIdle = TRACKED_NEW plAnimStage("BookOfferIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, + plAnimStage *hostIdle = new plAnimStage("BookOfferIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceNone, plAnimStage::kRegressNone, -1); - plAnimStage *hostFinish = TRACKED_NEW plAnimStage("BookOfferFinish", plAnimStage::kNotifyAdvance); // autoforward, autoadvance + plAnimStage *hostFinish = new plAnimStage("BookOfferFinish", plAnimStage::kNotifyAdvance); // autoforward, autoadvance brainH->AddStage(hostOffer); brainH->AddStage(hostIdle); @@ -1025,19 +1025,19 @@ void plAvatarMgr::OfferLinkingBook(plKey hostKey, plKey guestKey, plMessage *lin // make the guest brain - plAvBrainCoop * brainG = TRACKED_NEW plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, + plAvBrainCoop * brainG = new plAvBrainCoop(plAvBrainGeneric::kExitNormal, 3.0, 3.0, plAvBrainGeneric::kMoveRelative, hostID, (uint16_t)hostSerial, hostKey); - plAnimStage *guestAccept = TRACKED_NEW plAnimStage("BookAccept", plAnimStage::kNotifyAdvance); - plAnimStage *guestAcceptIdle = TRACKED_NEW plAnimStage("BookAcceptIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, + plAnimStage *guestAccept = new plAnimStage("BookAccept", plAnimStage::kNotifyAdvance); + plAnimStage *guestAcceptIdle = new plAnimStage("BookAcceptIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceNone, plAnimStage::kRegressNone, -1); brainG->AddStage(guestAccept); brainG->AddStage(guestAcceptIdle); - plCoopCoordinator *coord = TRACKED_NEW plCoopCoordinator(hostKey, guestKey, brainH, brainG, "Convergence", 1, 1, linkMsg, true); + plCoopCoordinator *coord = new plCoopCoordinator(hostKey, guestKey, brainH, brainG, "Convergence", 1, 1, linkMsg, true); - plAvCoopMsg *coMg = TRACKED_NEW plAvCoopMsg(hostKey, coord); + plAvCoopMsg *coMg = new plAvCoopMsg(hostKey, coord); coMg->SetBCastFlag(plMessage::kNetPropagate); coMg->SetBCastFlag(plMessage::kNetForce); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp index 1dff5a3b..2dd0ea8f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp @@ -299,7 +299,7 @@ void plAvatarSDLModifier::IPutClimbBrainIn(plArmatureMod *avMod, plAvBrainClimb void plAvatarSDLModifier::ISetClimbBrainFrom(plArmatureMod *avMod, const plStateDataRecord* srcState) { - plAvBrainClimb *climbBrain = TRACKED_NEW plAvBrainClimb(); + plAvBrainClimb *climbBrain = new plAvBrainClimb(); avMod->PushBrain(climbBrain); climbBrain->LoadFromSDL(srcState); } @@ -311,7 +311,7 @@ void plAvatarSDLModifier::IPutDriveBrainIn(plArmatureMod *avMod, plAvBrainDrive void plAvatarSDLModifier::ISetDriveBrainFrom(plArmatureMod *avMod, const plStateDataRecord* src) { - plAvBrainDrive *driveBrain = TRACKED_NEW plAvBrainDrive(); + plAvBrainDrive *driveBrain = new plAvBrainDrive(); avMod->PushBrain(driveBrain); } @@ -357,7 +357,7 @@ bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plSta return false; } - plAnimStageVec * stages = TRACKED_NEW plAnimStageVec(); + plAnimStageVec * stages = new plAnimStageVec(); for (int j = 0; j < numStages; j++) { plStateDataRecord* stageState = stagesVar->GetStateDataRecord(j); @@ -418,7 +418,7 @@ bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plSta } plAvBrainGeneric *newBrain = - TRACKED_NEW plAvBrainGeneric(stages, + new plAvBrainGeneric(stages, nil, nil, callbackRcvr, exitFlags, @@ -499,7 +499,7 @@ plAnimStage * plAvatarSDLModifier::IGetStageFrom(plArmatureMod *avMod, const plS // ***!!! need to capture "advanceTo" and "regressTo" values!!! bool hackAdvanceToWrong = false, hackRegressToWrong = false; - plAnimStage *newStage = TRACKED_NEW plAnimStage(name, + plAnimStage *newStage = new plAnimStage(name, (uint8_t)notifyFlags, static_cast(fwd), static_cast(bwd), diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp index 68e16514..c614f849 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp @@ -132,7 +132,7 @@ void plAvTask::ILimitPlayersInput(plArmatureMod *avatar) { plInputInterfaceMgr::GetInstance()->ForceCursorHidden(true); // tell the KI to be disabled while we are busy - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kTempDisableKIandBB); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kTempDisableKIandBB); plgDispatch::MsgSend( msg ); } } @@ -144,7 +144,7 @@ void plAvTask::IUndoLimitPlayersInput(plArmatureMod *avatar) { plInputInterfaceMgr::GetInstance()->ForceCursorHidden(false); // tell the KI to be re-enabled - pfKIMsg* msg = TRACKED_NEW pfKIMsg(pfKIMsg::kTempEnableKIandBB); + pfKIMsg* msg = new pfKIMsg(pfKIMsg::kTempEnableKIandBB); plgDispatch::MsgSend( msg ); } } @@ -597,7 +597,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou { // Must do the physics re-enable through a callback so that it happens before the "done" callback and we don't // step over some script's attempt to disable physics again. - plAvatarPhysicsEnableCallbackMsg *epMsg = TRACKED_NEW plAvatarPhysicsEnableCallbackMsg(avatar->GetKey(), kStop, 0, 0, 0, 0); + plAvatarPhysicsEnableCallbackMsg *epMsg = new plAvatarPhysicsEnableCallbackMsg(avatar->GetKey(), kStop, 0, 0, 0, 0); fAnimInstance->GetTimeConvert()->AddCallback(epMsg); hsRefCnt_SafeUnRef(epMsg); } @@ -633,7 +633,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar()) { // create message - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderSetThirdPerson); @@ -701,9 +701,9 @@ hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, d avatar->GetPhysical()->CheckValidPosition(&overlaps); if (overlaps) { - char *buffy = TRACKED_NEW char[64 + strlen(overlaps)]; + char *buffy = new char[64 + strlen(overlaps)]; sprintf(buffy, "Oneshot ends overlapping %s", overlaps); - plConsoleMsg *showLine = TRACKED_NEW plConsoleMsg( plConsoleMsg::kAddLine, buffy ); + plConsoleMsg *showLine = new plConsoleMsg( plConsoleMsg::kAddLine, buffy ); showLine->Send(); delete[] overlaps; delete[] buffy; @@ -719,7 +719,7 @@ hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, d if (plAvOneShotTask::fForce3rdPerson && avatar->IsLocalAvatar()) { // create message - plCameraMsg* pMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pMsg = new plCameraMsg; pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, false); pMsg->SetCmd(plCameraMsg::kResponderUndoThirdPerson); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h index 47583eb9..b1a9bf24 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h @@ -90,36 +90,36 @@ public: static void GetElements(hsTArray &out) { /* - out.Append(TRACKED_NEW plClothingElement("shirt-chest", 768, 0, 256, 512)); - out.Append(TRACKED_NEW plClothingElement("shirt-sleeve", 512, 192, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("face", 0, 0, 512, 512)); - out.Append(TRACKED_NEW plClothingElement("eyeball", 64, 512, 64, 64)); - out.Append(TRACKED_NEW plClothingElement("shoe-top", 0, 832, 128, 128)); - out.Append(TRACKED_NEW plClothingElement("shoe-bottom", 0, 768, 128, 64)); - out.Append(TRACKED_NEW plClothingElement("pants", 512, 512, 512, 512)); - out.Append(TRACKED_NEW plClothingElement("hand-LOD", 64, 576, 64, 64)); - out.Append(TRACKED_NEW plClothingElement("hand-square", 128, 512, 128, 128)); - out.Append(TRACKED_NEW plClothingElement("hand-wide", 0, 640, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("playerbook", 512, 0, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("backpack", 512, 256, 256, 256)); - out.Append(TRACKED_NEW plClothingElement("glasses-front", 256, 512, 256, 64)); - out.Append(TRACKED_NEW plClothingElement("glasses-side", 256, 576, 256, 32)); - out.Append(TRACKED_NEW plClothingElement("KI", 256, 640, 256, 128)); + out.Append(new plClothingElement("shirt-chest", 768, 0, 256, 512)); + out.Append(new plClothingElement("shirt-sleeve", 512, 192, 256, 128)); + out.Append(new plClothingElement("face", 0, 0, 512, 512)); + out.Append(new plClothingElement("eyeball", 64, 512, 64, 64)); + out.Append(new plClothingElement("shoe-top", 0, 832, 128, 128)); + out.Append(new plClothingElement("shoe-bottom", 0, 768, 128, 64)); + out.Append(new plClothingElement("pants", 512, 512, 512, 512)); + out.Append(new plClothingElement("hand-LOD", 64, 576, 64, 64)); + out.Append(new plClothingElement("hand-square", 128, 512, 128, 128)); + out.Append(new plClothingElement("hand-wide", 0, 640, 256, 128)); + out.Append(new plClothingElement("playerbook", 512, 0, 256, 128)); + out.Append(new plClothingElement("backpack", 512, 256, 256, 256)); + out.Append(new plClothingElement("glasses-front", 256, 512, 256, 64)); + out.Append(new plClothingElement("glasses-side", 256, 576, 256, 32)); + out.Append(new plClothingElement("KI", 256, 640, 256, 128)); */ - out.Append(TRACKED_NEW plClothingElement("Chest", 768, 0, 256, 512)); - out.Append(TRACKED_NEW plClothingElement("Arm", 512, 192, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("Face", 0, 256, 512, 256)); - out.Append(TRACKED_NEW plClothingElement("Eye", 64, 704, 64, 64)); - out.Append(TRACKED_NEW plClothingElement("Extra Hair", 256, 0, 256, 256)); - out.Append(TRACKED_NEW plClothingElement("Hat", 0, 0, 256, 256)); - out.Append(TRACKED_NEW plClothingElement("Foot", 0, 768, 256, 256)); - out.Append(TRACKED_NEW plClothingElement("Legs", 512, 512, 512, 512)); - out.Append(TRACKED_NEW plClothingElement("LOD", 64, 640, 64, 64)); - out.Append(TRACKED_NEW plClothingElement("Finger", 128, 640, 128, 128)); - out.Append(TRACKED_NEW plClothingElement("Palm", 0, 512, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("Player Book", 256, 512, 256, 128)); - out.Append(TRACKED_NEW plClothingElement("Glasses", 384, 640, 128, 128)); - out.Append(TRACKED_NEW plClothingElement("KI", 256, 640, 128, 128)); + out.Append(new plClothingElement("Chest", 768, 0, 256, 512)); + out.Append(new plClothingElement("Arm", 512, 192, 256, 128)); + out.Append(new plClothingElement("Face", 0, 256, 512, 256)); + out.Append(new plClothingElement("Eye", 64, 704, 64, 64)); + out.Append(new plClothingElement("Extra Hair", 256, 0, 256, 256)); + out.Append(new plClothingElement("Hat", 0, 0, 256, 256)); + out.Append(new plClothingElement("Foot", 0, 768, 256, 256)); + out.Append(new plClothingElement("Legs", 512, 512, 512, 512)); + out.Append(new plClothingElement("LOD", 64, 640, 64, 64)); + out.Append(new plClothingElement("Finger", 128, 640, 128, 128)); + out.Append(new plClothingElement("Palm", 0, 512, 256, 128)); + out.Append(new plClothingElement("Player Book", 256, 512, 256, 128)); + out.Append(new plClothingElement("Glasses", 384, 640, 128, 128)); + out.Append(new plClothingElement("KI", 256, 640, 128, 128)); } }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp index 84f04a4f..78dd7106 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp @@ -117,7 +117,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest, int len = strlen(hostName) + strlen(guestName) + 3 /* serial num */ + 1; - char *newName = TRACKED_NEW char[len]; + char *newName = new char[len]; serial = serial % 999; @@ -136,7 +136,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest, // disable our clickability here if we are the guest if (plNetClientMgr::GetInstance()->GetLocalPlayerKey() == guest) { - plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable); + plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable); pMsg->SetAvKey(guest); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); @@ -253,7 +253,7 @@ hsBool plCoopCoordinator::MsgReceive(plMessage *msg) DebugMsg("COOP: Received avatar seek finished msg: aborted = %d", seekDone->fAborted ? 1 : 0); if ( seekDone->fAborted ) { - plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestSeekAbort,fInitiatorID,(uint16_t)fInitiatorSerial); + plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestSeekAbort,fInitiatorID,(uint16_t)fInitiatorSerial); coopM->SetBCastFlag(plMessage::kNetPropagate); coopM->SetBCastFlag(plMessage::kNetForce); coopM->AddReceiver(GetKey()); @@ -262,7 +262,7 @@ hsBool plCoopCoordinator::MsgReceive(plMessage *msg) } else { - plAvCoopMsg *coopM = TRACKED_NEW plAvCoopMsg(plAvCoopMsg::kGuestSeeked,fInitiatorID,(uint16_t)fInitiatorSerial); + plAvCoopMsg *coopM = new plAvCoopMsg(plAvCoopMsg::kGuestSeeked,fInitiatorID,(uint16_t)fInitiatorSerial); coopM->SetBCastFlag(plMessage::kNetPropagate); coopM->SetBCastFlag(plMessage::kNetForce); coopM->AddReceiver(GetKey()); @@ -313,7 +313,7 @@ void plCoopCoordinator::IStartHost() plArmatureMod *hostAv = plAvatarMgr::FindAvatar(fHostKey); if (guestAv && hostAv) { - plAvSeekMsg *msg = TRACKED_NEW plAvSeekMsg(nil, hostAv->GetKey(), nil, 1.f, true); + plAvSeekMsg *msg = new plAvSeekMsg(nil, hostAv->GetKey(), nil, 1.f, true); hsClearBits(msg->fFlags, plAvSeekMsg::kSeekFlagForce3rdPersonOnStart); guestAv->GetPositionAndRotationSim(&msg->fTargetLookAt, nil); hostAv->GetPositionAndRotationSim(&msg->fTargetPos, nil); @@ -321,8 +321,8 @@ void plCoopCoordinator::IStartHost() } // now tell the host to initiate the thing. - plAvTaskBrain *brainT = TRACKED_NEW plAvTaskBrain(fHostBrain); - plAvTaskMsg *brainM = TRACKED_NEW plAvTaskMsg(GetKey(), fHostKey, brainT); + plAvTaskBrain *brainT = new plAvTaskBrain(fHostBrain); + plAvTaskMsg *brainM = new plAvTaskMsg(GetKey(), fHostKey, brainT); brainM->SetBCastFlag(plMessage::kPropagateToModifiers); brainM->Send(); } @@ -342,9 +342,9 @@ void plCoopCoordinator::IStartGuest() const plSceneObject *targetBone = hostAv->FindBone(fSynchBone); if(targetBone) { - plAvSeekMsg *seekMsg = TRACKED_NEW plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey()); - plAvTaskSeek *seekT = TRACKED_NEW plAvTaskSeek(seekMsg); - plAvTaskMsg *seekM = TRACKED_NEW plAvTaskMsg(GetKey(), fGuestKey, seekT); + plAvSeekMsg *seekMsg = new plAvSeekMsg( nil, nil,targetBone->GetKey(), 0, true, kAlignHandle, nil, false, plAvSeekMsg::kSeekFlagNoWarpOnTimeout, GetKey()); + plAvTaskSeek *seekT = new plAvTaskSeek(seekMsg); + plAvTaskMsg *seekM = new plAvTaskMsg(GetKey(), fGuestKey, seekT); seekM->SetBCastFlag(plMessage::kPropagateToModifiers); seekM->Send(); } @@ -356,8 +356,8 @@ void plCoopCoordinator::IStartGuest() void plCoopCoordinator::IContinueGuest() { DebugMsg("COOP: IContinueGuest()"); - plAvTaskBrain *brainT = TRACKED_NEW plAvTaskBrain(fGuestBrain); - plAvTaskMsg *brainM = TRACKED_NEW plAvTaskMsg(GetKey(), fGuestKey, brainT); + plAvTaskBrain *brainT = new plAvTaskBrain(fGuestBrain); + plAvTaskMsg *brainM = new plAvTaskMsg(GetKey(), fGuestKey, brainT); brainM->SetBCastFlag(plMessage::kPropagateToModifiers); brainM->Send(); fGuestBrain = nil; // the armature will destroy the brain when done. @@ -370,7 +370,7 @@ void plCoopCoordinator::IAdvanceParticipant(bool host) DebugMsg("COOP: IAdvanceParticipant(%d)", host ? 1 : 0); plKey &who = host ? fHostKey : fGuestKey; - plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg(nil, who, + plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg(nil, who, plAvBrainGenericMsg::kNextStage, 0, false, 0.0, false, false, 0.0); @@ -383,7 +383,7 @@ void plCoopCoordinator::IAdvanceParticipant(bool host) // -------------- void plCoopCoordinator::IStartTimeout() { - plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey(), kAbortTimer); + plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey(), kAbortTimer); plgTimerCallbackMgr::NewTimer(kAbortTimerDuration, timerMsg); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp index 533532f8..e01d7457 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp @@ -142,7 +142,7 @@ plAGChannel * plMatrixChannel::MakeBlend(plAGChannel * channelB, if (matChanB) { - result = TRACKED_NEW plMatrixBlend(this, matChanB, channelBias, blendPriority); + result = new plMatrixBlend(this, matChanB, channelBias, blendPriority); } return result; } @@ -151,14 +151,14 @@ plAGChannel * plMatrixChannel::MakeBlend(plAGChannel * channelB, // -------------- plAGChannel * plMatrixChannel::MakeZeroState() { - return TRACKED_NEW plMatrixConstant(Value(0)); + return new plMatrixConstant(Value(0)); } // MakeTimeScale -------------------------------------------------------- // -------------- plAGChannel * plMatrixChannel::MakeTimeScale(plScalarChannel *timeSource) { - return TRACKED_NEW plMatrixTimeScale(this, timeSource); + return new plMatrixTimeScale(this, timeSource); } // Dump ------------------------------------------- @@ -559,7 +559,7 @@ plAGChannel *plMatrixControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc) { plControllerCacheInfo *cache = fController->CreateCache(); cache->SetATC(atc); - return TRACKED_NEW plMatrixControllerCacheChannel(this, cache); + return new plMatrixControllerCacheChannel(this, cache); } void plMatrixControllerChannel::Dump(int indent, bool optimized, double time) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp index 2b93cf46..f45f4943 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp @@ -136,14 +136,14 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg) if(avObj) { // Create a copy of our reference anim stages to give to the brain - plAnimStageVec* stages = TRACKED_NEW plAnimStageVec; + plAnimStageVec* stages = new plAnimStageVec; int numStages = fStages->size(); stages->reserve(numStages); // hack hack hack hsBool ladder = false; for (int i = 0; i < numStages; i++) { - plAnimStage* stage = TRACKED_NEW plAnimStage; + plAnimStage* stage = new plAnimStage; *stage = *((*fStages)[i]); stages->push_back(stage); if (strstr(stage->GetAnimName(),"adder") != nil) @@ -164,14 +164,14 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg) sprintf(sbuf,"plMultistageModMsg - starting multistage from %s",sender->GetName()); plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf); #endif - plAvSeekMsg *seeker = TRACKED_NEW plAvSeekMsg(nil, avModKey, seekKey, 1.0f, fSmartSeek); + plAvSeekMsg *seeker = new plAvSeekMsg(nil, avModKey, seekKey, 1.0f, fSmartSeek); seeker->Send(); // these (currently unused) callbacks are for the brain itself, not any of the stages plMessage *exitCallback = nil, *enterCallback = nil; uint32_t exitFlags = plAvBrainGeneric::kExitNormal; - plAvBrainGeneric *brain = TRACKED_NEW plAvBrainGeneric(stages, exitCallback, enterCallback, sender, exitFlags, + plAvBrainGeneric *brain = new plAvBrainGeneric(stages, exitCallback, enterCallback, sender, exitFlags, plAvBrainGeneric::kDefaultFadeIn, plAvBrainGeneric::kDefaultFadeOut, plAvBrainGeneric::kMoveRelative); if (ladder) @@ -179,7 +179,7 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg) brain->SetType(plAvBrainGeneric::kLadder); } brain->SetReverseFBControlsOnRelease(fReverseFBControlsOnRelease); - plAvPushBrainMsg* pushBrain = TRACKED_NEW plAvPushBrainMsg(GetKey(), avModKey, brain); + plAvPushBrainMsg* pushBrain = new plAvPushBrainMsg(GetKey(), avModKey, brain); pushBrain->Send(); } } @@ -210,14 +210,14 @@ void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr) fReverseFBControlsOnRelease = stream->Readbool(); IDeleteStageVec(); - fStages = TRACKED_NEW plAnimStageVec; + fStages = new plAnimStageVec; int numStages = stream->ReadLE32(); fStages->reserve(numStages); int i; for (i = 0; i < numStages; i++) { - plAnimStage* stage = TRACKED_NEW plAnimStage; + plAnimStage* stage = new plAnimStage; stage->Read(stream, mgr); stage->SetMod(this); fStages->push_back(stage); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp index 1a09c72a..6c7da6a6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp @@ -185,7 +185,7 @@ void plNPCSpawnMod::ISendNotify(plKey &avatarKey) { if(fNotify) { - proSpawnedEventData * event = TRACKED_NEW proSpawnedEventData; + proSpawnedEventData * event = new proSpawnedEventData; event->fSpawner = GetKey(); event->fSpawnee = avatarKey; fNotify->ClearEvents(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp index 4efe5672..16a398b6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp @@ -132,7 +132,7 @@ hsBool plOneShotMod::MsgReceive(plMessage* msg) { char *animName = avMod->MakeAnimationName(fAnimName); - plAvOneShotMsg *avOSmsg = TRACKED_NEW plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey, + plAvOneShotMsg *avOSmsg = new plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey, fSeekDuration, (hsBool)fSmartSeek, animName, fDrivable, fReversable); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp index f830a2c0..8fcbc8c7 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp @@ -111,7 +111,7 @@ void plPhysicalControllerCore::Update(float delSecs) void plPhysicalControllerCore::SendCorrectionMessages() { plSceneObject* so = plSceneObject::ConvertNoRef(fOwner->ObjectIsLoaded()); - plCorrectionMsg* corrMsg = TRACKED_NEW plCorrectionMsg; + plCorrectionMsg* corrMsg = new plCorrectionMsg; corrMsg->fLocalToWorld = fLastGlobalLoc; corrMsg->fLocalToWorld.GetInverse(&corrMsg->fWorldToLocal); corrMsg->fDirtySynch = true; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp index 3832b197..58b409d8 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp @@ -88,19 +88,19 @@ plAGChannel * plPointChannel::MakeCombine(plAGChannel *channelA) // MAKEBLEND plAGChannel * plPointChannel::MakeBlend(plAGChannel * channelB, plScalarChannel * channelBias, int blendPriority) { - return TRACKED_NEW plPointBlend(this, (plPointChannel *)channelB, channelBias); + return new plPointBlend(this, (plPointChannel *)channelB, channelBias); } // MAKEZEROSTATE plAGChannel * plPointChannel::MakeZeroState() { - return TRACKED_NEW plPointConstant(Value(0)); + return new plPointConstant(Value(0)); } // MAKETIMESCALE plAGChannel * plPointChannel::MakeTimeScale(plScalarChannel *timeSource) { - return TRACKED_NEW plPointTimeScale(this, timeSource); + return new plPointTimeScale(this, timeSource); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -368,7 +368,7 @@ plAGChannel *plPointControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc) { plControllerCacheInfo *cache = fController->CreateCache(); cache->SetATC(atc); - return TRACKED_NEW plPointControllerCacheChannel(this, cache); + return new plPointControllerCacheChannel(this, cache); } // WRITE(stream, mgr) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp index 41848534..929e70e3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp @@ -96,7 +96,7 @@ plAGChannel * plQuatChannel::MakeCombine(plAGChannel *channelA) { if(plPointChannel::ConvertNoRef(channelA)) { - return TRACKED_NEW plQuatPointCombine(this, (plPointChannel *)channelA); + return new plQuatPointCombine(this, (plPointChannel *)channelA); } else { return nil; } @@ -109,7 +109,7 @@ plAGChannel *plQuatChannel::MakeBlend(plAGChannel *channelB, plScalarChannel *ch plScalarChannel *chanBias = plScalarChannel::ConvertNoRef(channelBias); if(chanB && chanBias) { - return TRACKED_NEW plQuatBlend(this, chanB, chanBias); + return new plQuatBlend(this, chanB, chanBias); } else { hsStatusMessageF("Blend operation failed."); return this; @@ -119,13 +119,13 @@ plAGChannel *plQuatChannel::MakeBlend(plAGChannel *channelB, plScalarChannel *ch // MAKEZEROSTATE plAGChannel * plQuatChannel::MakeZeroState() { - return TRACKED_NEW plQuatConstant(Value(0)); + return new plQuatConstant(Value(0)); } // MAKETIMESCALE plAGChannel * plQuatChannel::MakeTimeScale(plScalarChannel *timeSource) { - return TRACKED_NEW plQuatTimeScale(this, timeSource); + return new plQuatTimeScale(this, timeSource); } ///////////////// diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp index 6afa799f..83c82e74 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp @@ -111,7 +111,7 @@ plAGChannel * plScalarChannel::MakeBlend(plAGChannel * channelB, if (chanB) { - result = TRACKED_NEW plScalarBlend(this, chanB, chanBias); + result = new plScalarBlend(this, chanB, chanBias); } else { hsStatusMessage("Blend operation failed."); } @@ -122,14 +122,14 @@ plAGChannel * plScalarChannel::MakeBlend(plAGChannel * channelB, // -------------- plAGChannel * plScalarChannel::MakeZeroState() { - return TRACKED_NEW plScalarConstant(Value(0)); + return new plScalarConstant(Value(0)); } // MakeTimeScale -------------------------------------------------------- // -------------- plAGChannel * plScalarChannel::MakeTimeScale(plScalarChannel *timeSource) { - return TRACKED_NEW plScalarTimeScale(this, timeSource); + return new plScalarTimeScale(this, timeSource); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -373,7 +373,7 @@ plAGChannel *plScalarControllerChannel::MakeCacheChannel(plAnimTimeConvert *atc) { plControllerCacheInfo *cache = fController->CreateCache(); cache->SetATC(atc); - return TRACKED_NEW plScalarControllerCacheChannel(this, cache); + return new plScalarControllerCacheChannel(this, cache); } // Write ------------------------------------------------------------- diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp index bc2bd205..086245ba 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp @@ -90,7 +90,7 @@ void plSeekPointMod::Read(hsStream *stream, hsResMgr *mgr) int length = stream->ReadLE32(); if(length > 0) { - fName = TRACKED_NEW char[length + 1]; + fName = new char[length + 1]; stream->Read(length, fName); fName[length] = 0; } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp index 3803be05..8fa88342 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp @@ -160,14 +160,14 @@ hsBool plSittingModifier::MsgReceive(plMessage *msg) plAvBrainHuman *brain = (avMod ? plAvBrainHuman::ConvertNoRef(avMod->GetCurrentBrain()) : nil); if (brain && !brain->IsRunningTask()) { - plNotifyMsg *notifyEnter = TRACKED_NEW plNotifyMsg(); // a message to send back when the brain starts + plNotifyMsg *notifyEnter = new plNotifyMsg(); // a message to send back when the brain starts notifyEnter->fState = 1.0f; // it's an "on" event ISetupNotify(notifyEnter, notifyMsg); // copy events and address to sender plNotifyMsg *notifyExit = nil; if (avatarKey == plNetClientApp::GetInstance()->GetLocalPlayerKey()) { - notifyExit = TRACKED_NEW plNotifyMsg(); // a new message to send back when the brain's done + notifyExit = new plNotifyMsg(); // a new message to send back when the brain's done notifyExit->fState = 0.0f; // it's an "off" event ISetupNotify(notifyExit, notifyMsg); // copy events and address to sender notifyExit->AddReceiver(GetKey()); // have this message come back to us as well @@ -226,27 +226,27 @@ void plSittingModifier::Trigger(const plArmatureMod *avMod, plNotifyMsg *enterNo plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify); if(brain) { - plAvSeekMsg *seekMsg = TRACKED_NEW plAvSeekMsg(ourKey, avModKey, seekKey, 0.0f, true, kAlignHandleAnimEnd, animName); + plAvSeekMsg *seekMsg = new plAvSeekMsg(ourKey, avModKey, seekKey, 0.0f, true, kAlignHandleAnimEnd, animName); seekMsg->Send(); - plAvTaskBrain *brainTask = TRACKED_NEW plAvTaskBrain(brain); - plAvTaskMsg *brainMsg = TRACKED_NEW plAvTaskMsg(ourKey, avModKey, brainTask); + plAvTaskBrain *brainTask = new plAvTaskBrain(brain); + plAvTaskMsg *brainMsg = new plAvTaskMsg(ourKey, avModKey, brainTask); brainMsg->Send(); if (avModKey == plAvatarMgr::GetInstance()->GetLocalAvatarKey()) { - plCameraMsg* pCam = TRACKED_NEW plCameraMsg; + plCameraMsg* pCam = new plCameraMsg; pCam->SetBCastFlag(plMessage::kBCastByExactType); pCam->SetCmd(plCameraMsg::kResetPanning); pCam->Send(); - plCameraMsg* pCam2 = TRACKED_NEW plCameraMsg; + plCameraMsg* pCam2 = new plCameraMsg; pCam2->SetBCastFlag(plMessage::kBCastByExactType); pCam2->SetCmd(plCameraMsg::kPythonSetFirstPersonOverrideEnable); pCam2->SetActivated(false); pCam2->Send(); - plCameraMsg* pCam3 = TRACKED_NEW plCameraMsg; + plCameraMsg* pCam3 = new plCameraMsg; pCam3->SetBCastFlag(plMessage::kBCastByExactType); pCam3->SetCmd(plCameraMsg::kPythonUndoFirstPerson); pCam3->Send(); @@ -342,14 +342,14 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe if(sitAnimName) { uint32_t exitFlags = plAvBrainGeneric::kExitNormal; // SOME stages can be interrupted, but not the brain itself - brain = TRACKED_NEW plAvBrainGeneric(nil, enterNotify, exitNotify, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn, + brain = new plAvBrainGeneric(nil, enterNotify, exitNotify, nil, exitFlags, plAvBrainGeneric::kDefaultFadeIn, plAvBrainGeneric::kDefaultFadeOut, plAvBrainGeneric::kMoveRelative); - plAnimStage *sitStage = TRACKED_NEW plAnimStage(sitAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, + plAnimStage *sitStage = new plAnimStage(sitAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); - plAnimStage *idleStage = TRACKED_NEW plAnimStage("SitIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, + plAnimStage *idleStage = new plAnimStage("SitIdle", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceOnMove, plAnimStage::kRegressNone, -1); - plAnimStage *standStage = TRACKED_NEW plAnimStage(standAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, + plAnimStage *standStage = new plAnimStage(standAnimName, 0, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressNone, 0); brain->AddStage(sitStage); @@ -370,12 +370,12 @@ void plSittingModifier::UnTrigger() { if (fTriggeredAvatarKey == plAvatarMgr::GetInstance()->GetLocalAvatarKey()) { - plCameraMsg* pCam = TRACKED_NEW plCameraMsg; + plCameraMsg* pCam = new plCameraMsg; pCam->SetBCastFlag(plMessage::kBCastByExactType); pCam->SetCmd(plCameraMsg::kResetPanning); pCam->Send(); - plCameraMsg* pCam2 = TRACKED_NEW plCameraMsg; + plCameraMsg* pCam2 = new plCameraMsg; pCam2->SetBCastFlag(plMessage::kBCastByExactType); pCam2->SetCmd(plCameraMsg::kPythonSetFirstPersonOverrideEnable); pCam2->SetActivated(true); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp index 4ed6ad27..30dd34df 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp @@ -91,7 +91,7 @@ void plSwimCircularCurrentRegion::Read(hsStream* stream, hsResMgr* mgr) fPullNearVel = stream->ReadLEScalar(); fPullFarDistSq = stream->ReadLEScalar(); fPullFarVel = stream->ReadLEScalar(); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO } void plSwimCircularCurrentRegion::Write(hsStream* stream, hsResMgr* mgr) @@ -208,7 +208,7 @@ void plSwimStraightCurrentRegion::Read(hsStream* stream, hsResMgr* mgr) fNearVel = stream->ReadLEScalar(); fFarDist = stream->ReadLEScalar(); fFarVel = stream->ReadLEScalar(); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // currentSO } void plSwimStraightCurrentRegion::Write(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp b/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp index cec44327..681fbbb9 100644 --- a/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp @@ -61,7 +61,7 @@ plClientResMgr& plClientResMgr::Instance(void) plClientResMgr::plClientResMgr() { - this->ClientResources = TRACKED_NEW std::map; + this->ClientResources = new std::map; } plClientResMgr::~plClientResMgr() diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp index 85c3f3b4..b39823bc 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp @@ -70,7 +70,7 @@ hsBool plZlibCompress::ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* b if (ok) { *bufLenIn = bufLenOut+offset; - uint8_t* newBuf = TRACKED_NEW uint8_t[*bufLenIn]; // alloc new buffer + uint8_t* newBuf = new uint8_t[*bufLenIn]; // alloc new buffer HSMemory::BlockMove(*bufIn, newBuf, offset); // copy offset (uncompressed) part delete [] *bufIn; // delete original buffer @@ -94,7 +94,7 @@ hsBool plZlibCompress::Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset) // according to compress doc, the bufOut buffer should be at least .1% larger than source buffer, plus 12 bytes. uint32_t bufLenOut = (int)(adjBufLenIn*1.1+12); - char* bufOut = TRACKED_NEW char[bufLenOut]; + char* bufOut = new char[bufLenOut]; bool ok=(Compress((uint8_t*)bufOut, &bufLenOut, (uint8_t*)adjBufIn, adjBufLenIn) && bufLenOut < adjBufLenIn); @@ -109,7 +109,7 @@ hsBool plZlibCompress::Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t uint32_t adjBufLenIn = *bufLenIn - offset; uint8_t* adjBufIn = *bufIn + offset; - char* bufOut = TRACKED_NEW char[bufLenOut]; + char* bufOut = new char[bufLenOut]; bool ok=Uncompress((uint8_t*)bufOut, &bufLenOut, (uint8_t*)adjBufIn, adjBufLenIn) ? true : false; return ICopyBuffers(bufIn, bufLenIn, bufOut, bufLenOut, offset, ok); diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp index b88ec047..f8fcbb35 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp @@ -76,7 +76,7 @@ hsBool plZlibStream::Open(const wchar_t* filename, const wchar_t* mode) fFilename = filename; fMode = mode; - fOutput = NEW(hsUNIXStream); + fOutput = new hsUNIXStream; return fOutput->Open(filename, L"wb"); } @@ -251,7 +251,7 @@ int plZlibStream::IValidateGzHeader(uint32_t byteCount, const void* buffer) uint32_t clipBuffer = headerSize - initCacheSize; // Initialize the zlib stream - z_streamp zstream = NEW(z_stream_s); + z_streamp zstream = new z_stream_s; memset(zstream, 0, sizeof(z_stream_s)); zstream->zalloc = ZlibAlloc; zstream->zfree = ZlibFree; diff --git a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp index 5fb86eb5..586bd057 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp +++ b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp @@ -195,7 +195,7 @@ hsStringTable::Node* hsStringTable::FindLeafRecur(Node* root, char* str, int32_t // hsStringTable::Node* hsStringTable::AddRecur(Node* root, const char* str) { - Node* node = TRACKED_NEW Node(*str); + Node* node = new Node(*str); node->sib = root->kid; root->kid = node; if (*(str+1)) return AddRecur(node,str+1); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccMeshSmooth.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plAccMeshSmooth.cpp index 4c034af1..ac96e9bb 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccMeshSmooth.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccMeshSmooth.cpp @@ -60,7 +60,7 @@ public: void plAccMeshSmooth::FindEdges(uint32_t maxVtxIdx, uint32_t nTris, uint16_t* idxList, hsTArray& edgeVerts) { - hsTArray* bins = TRACKED_NEW hsTArray[maxVtxIdx+1]; + hsTArray* bins = new hsTArray[maxVtxIdx+1]; hsBitVector edgeVertBits; // For each vert pair (edge) in idxList @@ -161,8 +161,8 @@ void plAccMeshSmooth::FindEdges(hsTArray& spans, hsTArray& spans) { - hsTArray* shareVtx = TRACKED_NEW hsTArray[spans.GetCount()]; - hsTArray* edgeVerts = TRACKED_NEW hsTArray[spans.GetCount()]; + hsTArray* shareVtx = new hsTArray[spans.GetCount()]; + hsTArray* edgeVerts = new hsTArray[spans.GetCount()]; FindEdges(spans, edgeVerts); int i; @@ -354,4 +354,4 @@ void plAccMeshSmooth::SetDistTol(float dist) float plAccMeshSmooth::GetDistTol() const { return sqrt(fDistTolSq); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp index 27927954..22eb711b 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp @@ -104,7 +104,7 @@ void plAccessGeometry::Init(plPipeline* pipe) { plAccessGeometry* oldAcc = fInstance; - fInstance = NEW(plAccessGeometry)(pipe); + fInstance = new plAccessGeometry(pipe); hsRefCnt_SafeUnRef(oldAcc); } @@ -326,7 +326,7 @@ void plAccessGeometry::TakeSnapShot(plDrawable* drawable, uint32_t spanIdx, uint const plSpan* span = ds->GetSpan(spanIdx); if( !span->fSnapShot ) - span->fSnapShot = NEW(plAccessSnapShot); + span->fSnapShot = new plAccessSnapShot; plAccessSpan tmp; OpenRO(drawable, spanIdx, tmp, false); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessSnapShot.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plAccessSnapShot.cpp index 4794eaf0..a86dcd5f 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessSnapShot.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessSnapShot.cpp @@ -154,7 +154,7 @@ void plAccessSnapShot::ICopyOldData(uint8_t* data, const uint16_t* const oldSize void plAccessSnapShot::ISetupPointers(uint16_t newStride) { - fData = TRACKED_NEW uint8_t[fNumVerts * newStride]; + fData = new uint8_t[fNumVerts * newStride]; int size = 0; int chan; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp index 453bf861..1d57ed1e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp @@ -125,6 +125,6 @@ hsBool plActivePrintShape::INotify() plRippleShapeMsg* plActivePrintShape::ISetupShapeMsg() { - fShapeMsg = TRACKED_NEW plRippleShapeMsg(nil, this); + fShapeMsg = new plRippleShapeMsg(nil, this); return fShapeMsg; } \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAvMeshSmooth.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plAvMeshSmooth.cpp index c1997876..9a53b44f 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAvMeshSmooth.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAvMeshSmooth.cpp @@ -60,7 +60,7 @@ public: void plAvMeshSmooth::FindEdges(uint32_t maxVtxIdx, uint32_t nTris, uint16_t* idxList, hsTArray& edgeVerts) { - hsTArray* bins = TRACKED_NEW hsTArray[maxVtxIdx+1]; + hsTArray* bins = new hsTArray[maxVtxIdx+1]; hsBitVector edgeVertBits; // For each vert pair (edge) in idxList @@ -171,10 +171,10 @@ void plAvMeshSmooth::FindEdges(hsTArray& spans, hsTArray* edg // morph target mesh's local space. Whatever. void plAvMeshSmooth::Smooth(hsTArray& srcSpans, hsTArray& dstSpans) { - hsTArray* dstEdgeVerts = TRACKED_NEW hsTArray[dstSpans.GetCount()]; + hsTArray* dstEdgeVerts = new hsTArray[dstSpans.GetCount()]; FindEdges(dstSpans, dstEdgeVerts); - hsTArray* srcEdgeVerts = TRACKED_NEW hsTArray[srcSpans.GetCount()]; + hsTArray* srcEdgeVerts = new hsTArray[srcSpans.GetCount()]; FindEdges(srcSpans, srcEdgeVerts); int i; @@ -283,4 +283,4 @@ void plAvMeshSmooth::SetDistTol(float dist) float plAvMeshSmooth::GetDistTol() const { return sqrt(fDistTolSq); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plCluster.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plCluster.cpp index dffed008..a1e98c67 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plCluster.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plCluster.cpp @@ -74,7 +74,7 @@ void plCluster::Read(hsStream* s, plClusterGroup* grp) int i; for( i = 0; i < numInst; i++ ) { - fInsts[i] = TRACKED_NEW plSpanInstance; + fInsts[i] = new plSpanInstance; fInsts[i]->Read(s, fEncoding, numVerts); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp index 03cad350..893aef5e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp @@ -86,7 +86,7 @@ plClusterGroup::~plClusterGroup() plCluster* plClusterGroup::IAddCluster() { - plCluster* cluster = TRACKED_NEW plCluster; + plCluster* cluster = new plCluster; // Set the cluster's group. cluster->SetGroup(this); fClusters.Append(cluster); @@ -109,26 +109,26 @@ void plClusterGroup::Read(hsStream* stream, hsResMgr* mgr) int i; - fTemplate = TRACKED_NEW plSpanTemplate; + fTemplate = new plSpanTemplate; fTemplate->Read(stream); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefMaterial), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefMaterial), plRefFlags::kActiveRef); const int numClust = stream->ReadLE32(); fClusters.SetCount(numClust); for( i = 0; i < numClust; i++ ) { - fClusters[i] = TRACKED_NEW plCluster; + fClusters[i] = new plCluster; fClusters[i]->Read(stream, this); } const int numRegions = stream->ReadLE32(); for( i = 0; i < numRegions; i++ ) - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRegion), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRegion), plRefFlags::kActiveRef); const int numLights = stream->ReadLE32(); for( i = 0; i < numLights; i++ ) - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefLight), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefLight), plRefFlags::kActiveRef); fLOD.Read(stream); @@ -172,7 +172,7 @@ void plClusterGroup::Write(hsStream* stream, hsResMgr* mgr) void plClusterGroup::ISendToSelf(RefType t, hsKeyedObject* ref) { hsAssert(ref, "Sending self a nil object"); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, t); + plGenRefMsg* refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, t); hsgResMgr::ResMgr()->SendRef(ref->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -299,7 +299,7 @@ hsBool plClusterGroup::MsgReceive(plMessage* msg) void plClusterGroup::UnPack() { - plDrawableSpans* drawable = TRACKED_NEW plDrawableSpans; + plDrawableSpans* drawable = new plDrawableSpans; fDrawable = hsgResMgr::ResMgr()->NewKey(GetKey()->GetName(), drawable, GetKey()->GetUoid().GetLocation()); drawable->UnPackCluster(this); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp index ed2ad923..ce63a3a9 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp @@ -250,7 +250,7 @@ plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPo newDraw = toAddTo; else { - newDraw = TRACKED_NEW plDrawableSpans; + newDraw = new plDrawableSpans; // newDraw->SetNativeProperty( plDrawable::kPropVolatile, true ); if( blended ) { @@ -266,7 +266,7 @@ plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPo // Create a temp plGeometrySpan spanArray.SetCount( 1 ); - span = spanArray[ 0 ] = TRACKED_NEW plGeometrySpan; + span = spanArray[ 0 ] = new plGeometrySpan; IFillSpan( vertCount, positions, normals, uvws, uvwsPerVtx, diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp index 520c2836..3bd648b3 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp @@ -204,7 +204,7 @@ void plDrawableSpans::SetSceneNode( plKey newNode ) return; if( newNode ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kDrawable); + plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kDrawable); hsgResMgr::ResMgr()->SendRef(GetKey(), refMsg, plRefFlags::kActiveRef); } if( curNode ) @@ -943,7 +943,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) fMaterials.SetCountAndZero( count ); for( i = 0; i < count; i++ ) { - refMsg = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kMsgMaterial ); + refMsg = new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kMsgMaterial ); mgr->ReadKeyNotifyMe( s, refMsg, plRefFlags::kActiveRef ); } @@ -991,7 +991,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) for( i = 0; i < count; i++ ) { // Ref message for the fog environment - refMsg = TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kMsgFogEnviron ); + refMsg = new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kMsgFogEnviron ); mgr->ReadKeyNotifyMe( s, refMsg, plRefFlags::kActiveRef ); } @@ -1017,7 +1017,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) int j; for( j = 0; j < lcnt; j++ ) { - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kMsgPermaLight), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kMsgPermaLight), plRefFlags::kPassiveRef); } } if( fSpans[i]->fProps & plSpan::kPropHasPermaProjs ) @@ -1026,7 +1026,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) int j; for( j = 0; j < lcnt; j++ ) { - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kMsgPermaProj), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, i, kMsgPermaProj), plRefFlags::kPassiveRef); } } } @@ -1038,7 +1038,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) fSourceSpans.SetCount( count ); for( i = 0; i < count; i++ ) { - fSourceSpans[ i ] = TRACKED_NEW plGeometrySpan; + fSourceSpans[ i ] = new plGeometrySpan; fSourceSpans[ i ]->Read( s ); fSourceSpans[ i ]->fMaterial = GetMaterial( fSpans[ i ]->fMaterialIdx ); fSourceSpans[ i ]->fFogEnviron = fSpans[ i ]->fFogEnvironment; @@ -1068,7 +1068,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) fDIIndices.SetCountAndZero( count ); for( i = 0; i < count; i++ ) { - fDIIndices[ i ] = TRACKED_NEW plDISpanIndex; + fDIIndices[ i ] = new plDISpanIndex; fDIIndices[ i ]->fFlags = (uint8_t)(s->ReadLE32()); count2 = s->ReadLE32(); @@ -1081,7 +1081,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) count = s->ReadLE32(); while( count-- ) { - group = TRACKED_NEW plGBufferGroup(0, fProps & kPropVolatile, fProps & kPropSortFaces); + group = new plGBufferGroup(0, fProps & kPropVolatile, fProps & kPropSortFaces); group->Read( s ); fGroups.Append( group ); @@ -1098,7 +1098,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) fSpaceTree = plSpaceTree::ConvertNoRef(mgr->ReadCreatable(s)); fSceneNode = mgr->ReadKey(s); - plNodeRefMsg* nRefMsg = TRACKED_NEW plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kDrawable); + plNodeRefMsg* nRefMsg = new plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kDrawable); mgr->AddViaNotify(GetKey(), nRefMsg, plRefFlags::kActiveRef); if( GetNativeProperty(plDrawable::kPropCharacter) ) @@ -2297,7 +2297,7 @@ uint32_t plDrawableSpans::NewDIMatrixIndex() break; } if( index == fDIIndices.GetCount() ) - fDIIndices.Append( TRACKED_NEW plDISpanIndex ); + fDIIndices.Append( new plDISpanIndex ); fDIIndices[index]->Reset(); fDIIndices[index]->fFlags = plDISpanIndex::kMatrixOnly; @@ -2323,7 +2323,7 @@ plDISpanIndex *plDrawableSpans::IFindDIIndices( uint32_t &index ) break; } if( index == fDIIndices.GetCount() ) - fDIIndices.Append( TRACKED_NEW plDISpanIndex ); + fDIIndices.Append( new plDISpanIndex ); spanLookup = fDIIndices[ index ]; spanLookup->fFlags = plDISpanIndex::kNone; @@ -2503,7 +2503,7 @@ uint32_t plDrawableSpans::IRefMaterial( uint32_t index ) hsGMaterial *material = fMaterials[ index ]; if( GetKey() && material != nil && material->GetKey() != nil ) - hsgResMgr::ResMgr()->AddViaNotify( material->GetKey(), TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); + hsgResMgr::ResMgr()->AddViaNotify( material->GetKey(), new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, index, 0 ), plRefFlags::kActiveRef ); return index; } @@ -2947,14 +2947,14 @@ void plDrawableSpans::IRemoveGarbage( void ) for( i = 0; i < fGroups.GetCount(); i++ ) { hsAssert( fGroups[ i ]->GetNumVertexBuffers() == 1, "Cannot clean garbage on a non-volatile buffer group!" ); - usedFlags[ i ] = TRACKED_NEW hsTArray; + usedFlags[ i ] = new hsTArray; usedFlags[ i ]->SetCountAndZero( fGroups[ i ]->GetVertBufferCount( 0 ) ); - usedIdxFlags[ i ] = TRACKED_NEW hsTArray *>; + usedIdxFlags[ i ] = new hsTArray *>; usedIdxFlags[ i ]->SetCount( fGroups[ i ]->GetNumIndexBuffers() ); for( j = 0; j < fGroups[ i ]->GetNumIndexBuffers(); j++ ) { - (*usedIdxFlags[ i ])[ j ] = TRACKED_NEW hsTArray; + (*usedIdxFlags[ i ])[ j ] = new hsTArray; (*usedIdxFlags[ i ])[ j ]->SetCountAndZero( fGroups[ i ]->GetIndexBufferCount( j ) ); } } @@ -3327,7 +3327,7 @@ void plDrawableSpans::UnPackCluster(plClusterGroup* cluster) iStart = iEnd; } fMaterials.SetCountAndZero(1); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kMsgMaterial); + plGenRefMsg* refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kMsgMaterial); hsgResMgr::ResMgr()->SendRef(cluster->GetMaterial()->GetKey(), refMsg, plRefFlags::kActiveRef); fRenderLevel = cluster->GetRenderLevel(); @@ -3361,7 +3361,7 @@ uint8_t plDrawableSpans::IFindBufferGroup(uint8_t vtxFormat, uint32_t numVerts } // Add a new one of the right format - fGroups.Append( TRACKED_NEW plGBufferGroup(vtxFormat, vertVolatile, idxVolatile, lod) ); + fGroups.Append( new plGBufferGroup(vtxFormat, vertVolatile, idxVolatile, lod) ); return i; } @@ -3444,7 +3444,7 @@ uint32_t plDrawableSpans::CreateParticleSystem( uint32_t maxNumSpans, uint3 // Make a shiny new set - set = TRACKED_NEW plParticleSet; + set = new plParticleSet; set->fRefCount = 0; /// Fill out info @@ -3666,7 +3666,7 @@ void plDrawableSpans::AssignEmitterToParticleSystem( uint32_t setIndex, plPar if( icicle->fSortData == nil || icicle->fSortCount < ( numParticles << 1 ) ) { delete [] icicle->fSortData; - icicle->fSortData = sortArray = TRACKED_NEW plGBufferTriangle[ numParticles << 1 ]; + icicle->fSortData = sortArray = new plGBufferTriangle[ numParticles << 1 ]; icicle->fSortCount = numParticles << 1; } else diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp index 5a57b0ff..c4aaab0c 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp @@ -232,7 +232,7 @@ uint32_t plDrawableSpans::AddDISpans( hsTArray &spans, uint32 { /// Create a lookup entry index = fDIIndices.GetCount(); - fDIIndices.Append( TRACKED_NEW plDISpanIndex ); + fDIIndices.Append( new plDISpanIndex ); fDIIndices[ index ]->fFlags = plDISpanIndex::kNone; } plDISpanIndex *spanLookup = fDIIndices[ index ]; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp index 881411ac..dd0a39bf 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp @@ -65,7 +65,7 @@ static plRandom sRand; int plDynaBulletMgr::INewDecal() { int idx = fDecals.GetCount(); - fDecals.Append(TRACKED_NEW plDynaSplot()); + fDecals.Append(new plDynaSplot()); return idx; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp index a4d072f6..c10c9c3c 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp @@ -153,7 +153,7 @@ plDynaDecalMgr::plDynaDecalMgr() fScale(1.f, 1.f, 1.f), fPartyTime(1.f) { - fCutter = TRACKED_NEW plCutter; + fCutter = new plCutter; } plDynaDecalMgr::~plDynaDecalMgr() @@ -194,21 +194,21 @@ void plDynaDecalMgr::Read(hsStream* stream, hsResMgr* mgr) { plSynchedObject::Read(stream, mgr); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatPreShade), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatPreShade), plRefFlags::kActiveRef); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatRTShade), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatRTShade), plRefFlags::kActiveRef); int n = stream->ReadLE32(); int i; for( i = 0; i < n; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefTarget), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefTarget), plRefFlags::kPassiveRef); } // Associated slave particle systems. We read in the scene objects now, and find the associated systems on loaded message. n = stream->ReadLE32(); for( i = 0; i < n; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefPartyObject), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefPartyObject), plRefFlags::kPassiveRef); } fMaxNumVerts = (uint16_t)(stream->ReadLE32()); @@ -502,7 +502,7 @@ void plDynaDecalMgr::INotifyActive(plDynaDecalInfo& info, const plKey& armKey, u int i; for( i = 0; i < fNotifies.GetCount(); i++ ) { - plDynaDecalEnableMsg* enaMsg = TRACKED_NEW plDynaDecalEnableMsg(fNotifies[i], armKey, secs, fWetLength, false, id); + plDynaDecalEnableMsg* enaMsg = new plDynaDecalEnableMsg(fNotifies[i], armKey, secs, fWetLength, false, id); enaMsg->Send(); } info.fFlags |= plDynaDecalInfo::kActive; @@ -517,7 +517,7 @@ void plDynaDecalMgr::INotifyInactive(plDynaDecalInfo& info, const plKey& armKey, int i; for( i = 0; i < fNotifies.GetCount(); i++ ) { - plDynaDecalEnableMsg* enaMsg = TRACKED_NEW plDynaDecalEnableMsg(fNotifies[i], armKey, secs, fWetLength, true, id); + plDynaDecalEnableMsg* enaMsg = new plDynaDecalEnableMsg(fNotifies[i], armKey, secs, fWetLength, true, id); enaMsg->Send(); } info.fFlags &= ~plDynaDecalInfo::kActive; @@ -544,7 +544,7 @@ plDynaDecalInfo& plDynaDecalMgr::IGetDecalInfo(uintptr_t id, const plKey& key) { plDynaDecalInfo decalInfo; decalInfo.Init(key); - plGenRefMsg* refMsg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefAvatar); + plGenRefMsg* refMsg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefAvatar); hsgResMgr::ResMgr()->AddViaNotify(plKey(key), refMsg, plRefFlags::kPassiveRef); pair iterPair; @@ -688,7 +688,7 @@ plAuxSpan* plDynaDecalMgr::IGetAuxSpan(plDrawableSpans* targ, int iSpan, hsGMate #ifdef MF_NEVER_RUN_OUT // Okay, nothing there. Let's get a new one. - plAuxSpan* aux = TRACKED_NEW plAuxSpan; + plAuxSpan* aux = new plAuxSpan; fAuxSpans.Append(aux); IAllocAuxSpan(aux, numVerts, numIdx); @@ -712,7 +712,7 @@ void plDynaDecalMgr::InitAuxSpans() int i; for( i = 0; i < kInitAuxSpans; i++ ) { - plAuxSpan* aux = TRACKED_NEW plAuxSpan; + plAuxSpan* aux = new plAuxSpan; fAuxSpans.Append(aux); IAllocAuxSpan(aux, fMaxNumVerts, fMaxNumIdx); } @@ -721,7 +721,7 @@ void plDynaDecalMgr::InitAuxSpans() void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_t maxNumIdx) { int iGrp = fGroups.GetCount(); - plGBufferGroup* grp = TRACKED_NEW plGBufferGroup(kDecalVtxFormat, true, false); + plGBufferGroup* grp = new plGBufferGroup(kDecalVtxFormat, true, false); fGroups.Append(grp); grp->ReserveVertStorage(maxNumVerts, @@ -1577,7 +1577,7 @@ hsGMaterial* plDynaDecalMgr::IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap return mat; oldMip->SetCurrLevel(0); - hsGMaterial* newMat = TRACKED_NEW hsGMaterial; + hsGMaterial* newMat = new hsGMaterial; char buff[256]; sprintf(buff, "%s_%s", GetKey()->GetName(), "EnvMat"); hsgResMgr::ResMgr()->NewKey(buff, newMat, GetKey()->GetUoid().GetLocation()); @@ -1591,7 +1591,7 @@ hsGMaterial* plDynaDecalMgr::IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap bumpMap->SetFlags(bumpMap->GetFlags() | plMipmap::kBumpEnvMap | plMipmap::kForceNonCompressed); - plLayer* bumpLay = TRACKED_NEW plLayer; + plLayer* bumpLay = new plLayer; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), "BumpMap", 0); hsgResMgr::ResMgr()->NewKey(buff, bumpLay, GetKey()->GetUoid().GetLocation()); @@ -1608,12 +1608,12 @@ hsGMaterial* plDynaDecalMgr::IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap bumpLay->SetRuntimeColor(oldLay->GetRuntimeColor()); bumpLay->SetOpacity(1.f); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(bumpLay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(bumpLay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(bumpMap->GetKey(), refMsg, plRefFlags::kActiveRef); newMat->AddLayerViaNotify(bumpLay); - plLayer* envLay = TRACKED_NEW plLayer; + plLayer* envLay = new plLayer; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), "EnvMap", 0); hsgResMgr::ResMgr()->NewKey(buff, envLay, GetKey()->GetUoid().GetLocation()); @@ -1628,7 +1628,7 @@ hsGMaterial* plDynaDecalMgr::IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap envLay->SetRuntimeColor(oldLay->GetRuntimeColor()); envLay->SetOpacity(1.f); - refMsg = TRACKED_NEW plLayRefMsg(envLay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + refMsg = new plLayRefMsg(envLay->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(envMap->GetKey(), refMsg, plRefFlags::kActiveRef); newMat->AddLayerViaNotify(envLay); @@ -1640,11 +1640,11 @@ void plDynaDecalMgr::ConvertToEnvMap(plBitmap* envMap) { hsGMaterial* newPreShade = IConvertToEnvMap(fMatPreShade, envMap); if( newPreShade && (newPreShade != fMatPreShade) ) - hsgResMgr::ResMgr()->SendRef(newPreShade->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatPreShade), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(newPreShade->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatPreShade), plRefFlags::kActiveRef); hsGMaterial* newRTShade = IConvertToEnvMap(fMatRTShade, envMap); if( newRTShade && (newRTShade != fMatRTShade) ) - hsgResMgr::ResMgr()->SendRef(newRTShade->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatRTShade), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(newRTShade->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefMatRTShade), plRefFlags::kActiveRef); } const plMipmap* plDynaDecalMgr::GetMipmap() const @@ -1796,7 +1796,7 @@ void plDynaDecalMgr::IGetParticles() // const_cast here is just to see if it's in our list, make Find happy. if( sys && (fParticles.kMissingIndex == fParticles.Find(const_cast(sys))) ) { - hsgResMgr::ResMgr()->AddViaNotify(sys->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParticles), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(sys->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParticles), plRefFlags::kPassiveRef); } } } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp index eb1a06e7..776f6a10 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp @@ -74,7 +74,7 @@ static const uint32_t kPrintIDs[kNumPrintIDs] = int plDynaFootMgr::INewDecal() { int idx = fDecals.GetCount(); - fDecals.Append(TRACKED_NEW plDynaSplot()); + fDecals.Append(new plDynaSplot()); return idx; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp index 4e08d62b..1f41a0d9 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp @@ -82,7 +82,7 @@ int plDynaRippleMgr::INewDecal() int idx = fDecals.GetCount(); #if 1 - plDynaRipple* rip = TRACKED_NEW plDynaRipple(); + plDynaRipple* rip = new plDynaRipple(); rip->fC1U = fInitUVW.fX; rip->fC2U = (fInitUVW.fX - fFinalUVW.fX) / (fLifeSpan * fFinalUVW.fX); @@ -91,7 +91,7 @@ int plDynaRippleMgr::INewDecal() fDecals.Append(rip); #else - plDynaWave* wave = TRACKED_NEW plDynaWave(); + plDynaWave* wave = new plDynaWave(); static float kDefScrollRate = 0.1f; wave->fScrollRate = kDefScrollRate; fDecals.Append(wave); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp index e3096997..a2bf1374 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp @@ -77,7 +77,7 @@ int plDynaRippleVSMgr::INewDecal() { int idx = fDecals.GetCount(); - plDynaRippleVS* rip = TRACKED_NEW plDynaRippleVS(); + plDynaRippleVS* rip = new plDynaRippleVS(); rip->fC1U = fInitUVW.fX; rip->fC2U = (fInitUVW.fX - fFinalUVW.fX) / (fLifeSpan * fFinalUVW.fX); @@ -103,7 +103,7 @@ void plDynaRippleVSMgr::Read(hsStream* stream, hsResMgr* mgr) { plDynaRippleMgr::Read(stream, mgr); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefWaveSetBase), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefWaveSetBase), plRefFlags::kPassiveRef); } void plDynaRippleVSMgr::Write(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp index d5a52ccb..ad8d35fb 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp @@ -68,7 +68,7 @@ int plDynaTorpedoVSMgr::INewDecal() { int idx = fDecals.GetCount(); - plDynaRippleVS* rip = TRACKED_NEW plDynaRippleVS(); + plDynaRippleVS* rip = new plDynaRippleVS(); rip->fC1U = fInitUVW.fX; rip->fC2U = (fInitUVW.fX - fFinalUVW.fX) / (fLifeSpan * fFinalUVW.fX); @@ -148,7 +148,7 @@ void plDynaTorpedoVSMgr::Read(hsStream* stream, hsResMgr* mgr) { plDynaTorpedoMgr::Read(stream, mgr); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefWaveSetBase), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefWaveSetBase), plRefFlags::kPassiveRef); } void plDynaTorpedoVSMgr::Write(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp index d8a0f9d7..9751aa80 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp @@ -72,7 +72,7 @@ int plDynaWakeMgr::INewDecal() { int idx = fDecals.GetCount(); - plDynaWake* wake = TRACKED_NEW plDynaWake(); + plDynaWake* wake = new plDynaWake(); wake->fC1U = fInitUVW.fX; wake->fC2U = (fInitUVW.fX - fFinalUVW.fX) / (fLifeSpan * fFinalUVW.fX); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp index 6d2f1f20..0eaa4ab7 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp @@ -299,7 +299,7 @@ plGeometrySpan* plGeoSpanDice::IExtractTris(plGeometrySpan* src, hsTArrayGetVertexSize(src->fFormat); dst->fNumIndices = numTris * 3; - dst->fIndexData = TRACKED_NEW uint16_t[dst->fNumIndices]; + dst->fIndexData = new uint16_t[dst->fNumIndices]; dst->fNumVerts = numVerts; - dst->fVertexData = TRACKED_NEW uint8_t[numVerts * stride]; + dst->fVertexData = new uint8_t[numVerts * stride]; if( src->fMultColor ) { - dst->fMultColor = TRACKED_NEW hsColorRGBA[numVerts]; + dst->fMultColor = new hsColorRGBA[numVerts]; } if( src->fAddColor ) { - dst->fAddColor = TRACKED_NEW hsColorRGBA[numVerts]; + dst->fAddColor = new hsColorRGBA[numVerts]; } if( src->fDiffuseRGBA ) { - dst->fDiffuseRGBA = TRACKED_NEW uint32_t[numVerts]; + dst->fDiffuseRGBA = new uint32_t[numVerts]; } if( src->fSpecularRGBA ) { - dst->fSpecularRGBA = TRACKED_NEW uint32_t[numVerts]; + dst->fSpecularRGBA = new uint32_t[numVerts]; } return dst; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.cpp index 307d396f..b321337a 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.cpp @@ -193,7 +193,7 @@ void plGeometrySpan::MakeInstanceOf( const plGeometrySpan *instance ) // Go find a new groupID instance->fInstanceGroupID = IAllocateNewGroupID(); - instance->fInstanceRefs = array = TRACKED_NEW hsTArray; + instance->fInstanceRefs = array = new hsTArray; // Go figure, it won't append the const version to the array...this is a cheat, // but then, so is making fInstanceRefs mutable :) array->Append( (plGeometrySpan *)instance ); @@ -220,7 +220,7 @@ void plGeometrySpan::IUnShareData() uint32_t size = GetVertexSize( fFormat ); - fVertexData = TRACKED_NEW uint8_t[ size * fNumVerts ]; + fVertexData = new uint8_t[ size * fNumVerts ]; memcpy( fVertexData, oldVtxData, size * fNumVerts ); } @@ -228,7 +228,7 @@ void plGeometrySpan::IUnShareData() { hsColorRGBA* oldMult = fMultColor; - fMultColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fMultColor = new hsColorRGBA[ fNumVerts ]; memcpy( fMultColor, oldMult, sizeof(hsColorRGBA) * fNumVerts ); } @@ -236,7 +236,7 @@ void plGeometrySpan::IUnShareData() { hsColorRGBA* oldAdd = fAddColor; - fAddColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fAddColor = new hsColorRGBA[ fNumVerts ]; memcpy( fAddColor, oldAdd, sizeof(hsColorRGBA) * fNumVerts ); } } @@ -250,7 +250,7 @@ void plGeometrySpan::BreakInstance() hsAssert(fInstanceRefs->GetCount(), "Don't BreakInstance if I'm the last one, use UnInstance instead"); fInstanceGroupID = IAllocateNewGroupID(); - fInstanceRefs = TRACKED_NEW hsTArray; + fInstanceRefs = new hsTArray; fInstanceRefs->Append(this); IUnShareData(); @@ -350,7 +350,7 @@ hsTArray *plGeometrySpan::IGetInstanceGroup( uint32_t groupID if( fInstanceGroups.GetCount() <= groupID || fInstanceGroups[ groupID ] == nil ) { // Not yet in the list--make a new hsTArray - array = TRACKED_NEW hsTArray; + array = new hsTArray; fInstanceGroupIDFlags.SetBit( groupID, true ); if( expectedCount > 1 ) @@ -416,7 +416,7 @@ void plGeometrySpan::IDuplicateUniqueData( const plGeometrySpan *source ) if( source->fIndexData != nil ) { - fIndexData = TRACKED_NEW uint16_t[ fNumIndices ]; + fIndexData = new uint16_t[ fNumIndices ]; memcpy( fIndexData, source->fIndexData, sizeof( uint16_t ) * fNumIndices ); } else @@ -424,7 +424,7 @@ void plGeometrySpan::IDuplicateUniqueData( const plGeometrySpan *source ) if( source->fDiffuseRGBA ) { - fDiffuseRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; + fDiffuseRGBA = new uint32_t[ fNumVerts ]; memcpy( fDiffuseRGBA, source->fDiffuseRGBA, sizeof( uint32_t ) * fNumVerts ); } else @@ -432,7 +432,7 @@ void plGeometrySpan::IDuplicateUniqueData( const plGeometrySpan *source ) if( source->fSpecularRGBA ) { - fSpecularRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; + fSpecularRGBA = new uint32_t[ fNumVerts ]; memcpy( fSpecularRGBA, source->fSpecularRGBA, sizeof( uint32_t ) * fNumVerts ); } else @@ -462,7 +462,7 @@ void plGeometrySpan::CopyFrom( const plGeometrySpan *source ) { size = GetVertexSize( fFormat ); - fVertexData = TRACKED_NEW uint8_t[ size * fNumVerts ]; + fVertexData = new uint8_t[ size * fNumVerts ]; memcpy( fVertexData, source->fVertexData, size * fNumVerts ); } else @@ -470,7 +470,7 @@ void plGeometrySpan::CopyFrom( const plGeometrySpan *source ) if( source->fMultColor ) { - fMultColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fMultColor = new hsColorRGBA[ fNumVerts ]; memcpy( fMultColor, source->fMultColor, sizeof(hsColorRGBA) * fNumVerts ); } else @@ -480,7 +480,7 @@ void plGeometrySpan::CopyFrom( const plGeometrySpan *source ) if( source->fAddColor ) { - fAddColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fAddColor = new hsColorRGBA[ fNumVerts ]; memcpy( fAddColor, source->fAddColor, sizeof(hsColorRGBA) * fNumVerts ); } else @@ -543,19 +543,19 @@ void plGeometrySpan::Read( hsStream *stream ) { size = GetVertexSize( fFormat ); - fVertexData = TRACKED_NEW uint8_t[ size * fNumVerts ]; + fVertexData = new uint8_t[ size * fNumVerts ]; stream->Read( size * fNumVerts, fVertexData ); - fMultColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; - fAddColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fMultColor = new hsColorRGBA[ fNumVerts ]; + fAddColor = new hsColorRGBA[ fNumVerts ]; for( i = 0; i < fNumVerts; i++ ) { fMultColor[ i ].Read( stream ); fAddColor[ i ].Read( stream ); } - fDiffuseRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; - fSpecularRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; + fDiffuseRGBA = new uint32_t[ fNumVerts ]; + fSpecularRGBA = new uint32_t[ fNumVerts ]; stream->ReadLE32( fNumVerts, fDiffuseRGBA ); stream->ReadLE32( fNumVerts, fSpecularRGBA ); } @@ -570,7 +570,7 @@ void plGeometrySpan::Read( hsStream *stream ) if( fNumIndices > 0 ) { - fIndexData = TRACKED_NEW uint16_t[ fNumIndices ]; + fIndexData = new uint16_t[ fNumIndices ]; stream->ReadLE16( fNumIndices, fIndexData ); } else @@ -918,18 +918,18 @@ void plGeometrySpan::EndCreate( void ) delete [] fVertexData; fNumVerts = fVertAccum.GetCount(); - fVertexData = TRACKED_NEW uint8_t[ size * fNumVerts ]; + fVertexData = new uint8_t[ size * fNumVerts ]; delete [] fMultColor; - fMultColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fMultColor = new hsColorRGBA[ fNumVerts ]; delete [] fAddColor; - fAddColor = TRACKED_NEW hsColorRGBA[ fNumVerts ]; + fAddColor = new hsColorRGBA[ fNumVerts ]; delete [] fDiffuseRGBA; delete [] fSpecularRGBA; - fDiffuseRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; - fSpecularRGBA = TRACKED_NEW uint32_t[ fNumVerts ]; + fDiffuseRGBA = new uint32_t[ fNumVerts ]; + fSpecularRGBA = new uint32_t[ fNumVerts ]; } else fNumVerts = fVertAccum.GetCount(); @@ -1000,7 +1000,7 @@ void plGeometrySpan::EndCreate( void ) delete [] fIndexData; fNumIndices = fIndexAccum.GetCount(); - fIndexData = TRACKED_NEW uint16_t[ fNumIndices ]; + fIndexData = new uint16_t[ fNumIndices ]; } else fNumIndices = fIndexAccum.GetCount(); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp index e9b03374..3c66d133 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp @@ -58,7 +58,7 @@ void plInstanceDrawInterface::Read(hsStream* stream, hsResMgr* mgr) plDrawInterface::Read(stream, mgr); fTargetID = stream->ReadLE32(); - plSwapSpansRefMsg *sMsg = TRACKED_NEW plSwapSpansRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); + plSwapSpansRefMsg *sMsg = new plSwapSpansRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); mgr->ReadKeyNotifyMe(stream, sMsg, plRefFlags::kActiveRef); } @@ -148,12 +148,12 @@ void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat fDrawables[iDraw]->SetProperty(fDrawableIndices[iDraw], kDisable, true); #ifdef HS_DEBUGGING - plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(fDrawable->GetKey(), plDISpansMsg::kAddingSpan, index, plDISpansMsg::kLeaveEmptyDrawable); + plDISpansMsg* diMsg = new plDISpansMsg(fDrawable->GetKey(), plDISpansMsg::kAddingSpan, index, plDISpansMsg::kLeaveEmptyDrawable); diMsg->SetSender(GetKey()); diMsg->Send(); #endif - plSharedMeshBCMsg *smMsg = TRACKED_NEW plSharedMeshBCMsg; + plSharedMeshBCMsg *smMsg = new plSharedMeshBCMsg; smMsg->SetSender(GetKey()); smMsg->fDraw = fDrawable; smMsg->fMesh = mesh; @@ -165,7 +165,7 @@ void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat plMorphSequence *morph = const_cast(plMorphSequence::ConvertNoRef(fOwner->GetModifierByType(plMorphSequence::Index()))); if (morph) { - //hsgResMgr::ResMgr()->AddViaNotify(mesh->GetKey(), TRACKED_NEW plGenRefMsg(morph->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kPassiveRef); + //hsgResMgr::ResMgr()->AddViaNotify(mesh->GetKey(), new plGenRefMsg(morph->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kPassiveRef); morph->AddSharedMesh(mesh); } } @@ -178,7 +178,7 @@ void plInstanceDrawInterface::RemoveSharedMesh(plSharedMesh *mesh) { IClearIndex((uint8_t)geoIndex); - plSharedMeshBCMsg *smMsg = TRACKED_NEW plSharedMeshBCMsg; + plSharedMeshBCMsg *smMsg = new plSharedMeshBCMsg; smMsg->SetSender(GetKey()); smMsg->fDraw = fDrawable; smMsg->fMesh = mesh; @@ -225,7 +225,7 @@ void plInstanceDrawInterface::IClearIndex(uint8_t which) plDrawableSpans *drawable = plDrawableSpans::ConvertNoRef(fDrawables[which]); if (drawable != nil) { - plDISpansMsg* diMsg = TRACKED_NEW plDISpansMsg(fDrawable->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[which], plDISpansMsg::kLeaveEmptyDrawable); + plDISpansMsg* diMsg = new plDISpansMsg(fDrawable->GetKey(), plDISpansMsg::kRemovingSpan, fDrawableIndices[which], plDISpansMsg::kLeaveEmptyDrawable); diMsg->SetSender(GetKey()); diMsg->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plInterMeshSmooth.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plInterMeshSmooth.cpp index de238710..722a19f2 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plInterMeshSmooth.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plInterMeshSmooth.cpp @@ -56,7 +56,7 @@ public: void plInterMeshSmooth::FindEdges(uint32_t maxVtxIdx, uint32_t nTris, uint16_t* idxList, hsTArray& edgeVerts) { - hsTArray* bins = TRACKED_NEW hsTArray[maxVtxIdx+1]; + hsTArray* bins = new hsTArray[maxVtxIdx+1]; hsBitVector edgeVertBits; // For each vert pair (edge) in idxList @@ -153,8 +153,8 @@ void plInterMeshSmooth::FindEdges(hsTArray& sets, hsTArray& sets) { - hsTArray* shareVtx = TRACKED_NEW hsTArray[sets.GetCount()]; - hsTArray* edgeVerts = TRACKED_NEW hsTArray[sets.GetCount()]; + hsTArray* shareVtx = new hsTArray[sets.GetCount()]; + hsTArray* edgeVerts = new hsTArray[sets.GetCount()]; FindEdges(sets, edgeVerts); int i; @@ -245,4 +245,4 @@ void plInterMeshSmooth::SetAngle(float degs) float plInterMeshSmooth::GetAngle() const { return hsRadiansToDegrees(acos(fMinNormDot)); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp index 6d9ec6c7..61a4ab88 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp @@ -282,7 +282,7 @@ void plMorphDelta::AllocDeltas(int iSpan, int nDel, int nUVW) int uvwCnt = nDel * nUVW; if( uvwCnt ) - fSpans[iSpan].fUVWs = TRACKED_NEW hsPoint3[uvwCnt]; + fSpans[iSpan].fUVWs = new hsPoint3[uvwCnt]; else fSpans[iSpan].fUVWs = nil; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp index a215e78e..2edd72fb 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp @@ -462,7 +462,7 @@ void plMorphSequence::AddTarget(plSceneObject* so) if (!fMorphSDLMod) { - fMorphSDLMod = TRACKED_NEW plMorphSequenceSDLMod; + fMorphSDLMod = new plMorphSequenceSDLMod; so->AddModifier(fMorphSDLMod); } } @@ -493,7 +493,7 @@ void plMorphSequence::Read(hsStream* s, hsResMgr* mgr) n = s->ReadLE32(); for( i = 0; i < n; i++) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); } void plMorphSequence::Write(hsStream* s, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp index e9554ccd..41ae8c3f 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp @@ -159,7 +159,7 @@ void plMorphSequenceSDLMod::ISetCurrentStateFrom(const plStateDataRecord* srcSta // meshKey will be nil when dealing with non-sharedMesh data if (meshKey) - hsgResMgr::ResMgr()->AddViaNotify(meshKey, TRACKED_NEW plGenRefMsg(morphMod->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->AddViaNotify(meshKey, new plGenRefMsg(morphMod->GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kPassiveRef); plSimpleStateVariable *weights = morphSD->GetStateDataRecord(i)->FindVar(kStrWeights); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp index 1e1b88f4..f14431a3 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp @@ -155,7 +155,7 @@ hsGMaterial* plProxyGen::IMakeProxyMaterial() const const hsColorRGBA& dif = fColor; float opac = fAmbient.a; - hsGMaterial* retVal = TRACKED_NEW hsGMaterial(); + hsGMaterial* retVal = new hsGMaterial(); char buff[256]; if( GetKey()->GetName() ) @@ -247,11 +247,11 @@ void plProxyGen::IGenerateProxy() IApplyProxy(idx); - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, idx, 0); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, idx, 0); hsgResMgr::ResMgr()->AddViaNotify(mat->GetKey(), msg, plRefFlags::kActiveRef); fProxyMat = mat; - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg( GetKey(), plNodeRefMsg::kOnRequest, (int8_t)idx, plNodeRefMsg::kDrawable ); + plNodeRefMsg* refMsg = new plNodeRefMsg( GetKey(), plNodeRefMsg::kOnRequest, (int8_t)idx, plNodeRefMsg::kDrawable ); hsgResMgr::ResMgr()->AddViaNotify(fProxyDrawables[idx]->GetKey(), refMsg, plRefFlags::kActiveRef); fProxyDraw = fProxyDrawables[idx]; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp index 4ba6c30d..42502009 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp @@ -111,11 +111,11 @@ void plSharedMesh::Read(hsStream* s, hsResMgr* mgr) fSpans.SetCount(s->ReadLE32()); for (i = 0; i < fSpans.GetCount(); i++) { - fSpans[i] = TRACKED_NEW plGeometrySpan; + fSpans[i] = new plGeometrySpan; fSpans[i]->Read(s); } - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); fFlags = s->ReadByte(); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp index 22c9a588..c5d8c47c 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp @@ -212,7 +212,7 @@ plSpacePrepNode* plSpaceTreeMaker::IMakeFatTreeRecur(hsTArray& StartTimer(kMakeFatTree); - plSpacePrepNode* subRoot = TRACKED_NEW plSpacePrepNode; + plSpacePrepNode* subRoot = new plSpacePrepNode; fTreeSize++; if( nodes.GetCount() == 1 ) @@ -310,7 +310,7 @@ void plSpaceTreeMaker::IFindBigList(hsTArray& nodes, float len plSpacePrepNode* plSpaceTreeMaker::INewSubRoot(const hsBounds3Ext& bnd) { - plSpacePrepNode* subRoot = TRACKED_NEW plSpacePrepNode; + plSpacePrepNode* subRoot = new plSpacePrepNode; subRoot->fDataIndex = int16_t(-1); fTreeSize++; @@ -372,7 +372,7 @@ plSpacePrepNode* plSpaceTreeMaker::IMakeTreeRecur(hsTArray& no void plSpaceTreeMaker::IMakeTree() { - fSortScratch = TRACKED_NEW hsRadixSort::Elem[fLeaves.GetCount()]; + fSortScratch = new hsRadixSort::Elem[fLeaves.GetCount()]; fPrepTree = IMakeTreeRecur(fLeaves); @@ -413,7 +413,7 @@ void plSpaceTreeMaker::Cleanup() int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable) { - plSpacePrepNode* leaf = TRACKED_NEW plSpacePrepNode; + plSpacePrepNode* leaf = new plSpacePrepNode; fLeaves.Append(leaf); leaf->fDataIndex = fLeaves.GetCount()-1; leaf->fChildren[0] = nil; @@ -548,7 +548,7 @@ plSpaceTree* plSpaceTreeMaker::MakeTree() plSpaceTree* plSpaceTreeMaker::IMakeEmptyTree() { - plSpaceTree* tree = TRACKED_NEW plSpaceTree; + plSpaceTree* tree = new plSpaceTree; tree->fTree.SetCount(1); hsPoint3 zero(0, 0, 0); @@ -564,7 +564,7 @@ plSpaceTree* plSpaceTreeMaker::IMakeEmptyTree() plSpaceTree* plSpaceTreeMaker::IMakeDegenerateTree() { - plSpaceTree* tree = TRACKED_NEW plSpaceTree; + plSpaceTree* tree = new plSpaceTree; tree->fTree.Push(); @@ -600,7 +600,7 @@ plSpaceTree* plSpaceTreeMaker::IMakeSpaceTree() { StartTimer(kMakeSpaceTree); - plSpaceTree* tree = TRACKED_NEW plSpaceTree; + plSpaceTree* tree = new plSpaceTree; plSpacePrepNode* head = fPrepTree; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.cpp index a68c7a49..b372f148 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.cpp @@ -87,11 +87,11 @@ void plSpanInstance::Alloc(const plSpanEncoding& encoding, uint32_t numVerts) DeAlloc(); uint32_t posStride = PosStrideFromEncoding(encoding); if( posStride ) - fPosDelta = TRACKED_NEW uint8_t[numVerts * posStride]; + fPosDelta = new uint8_t[numVerts * posStride]; uint32_t colStride = ColStrideFromEncoding(encoding); if( colStride ) - fCol = TRACKED_NEW uint8_t[numVerts * colStride]; + fCol = new uint8_t[numVerts * colStride]; } void plSpanInstance::Read(hsStream* stream, const plSpanEncoding& encoding, uint32_t numVerts) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.cpp index d85ed045..6c1f0963 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.cpp @@ -88,9 +88,9 @@ void plSpanTemplate::Alloc(uint16_t format, uint32_t numVerts, uint32_t numTris) fNumTris = (uint16_t)numTris; - fData = TRACKED_NEW uint8_t[VertSize()]; + fData = new uint8_t[VertSize()]; - fIndices = TRACKED_NEW uint16_t[NumIndices()]; + fIndices = new uint16_t[NumIndices()]; } void plSpanTemplate::DeAlloc() @@ -139,8 +139,8 @@ void plSpanTemplateB::ComputeBounds() void plSpanTemplateB::AllocColors() { - fMultColors = TRACKED_NEW hsColorRGBA[NumVerts()]; - fAddColors = TRACKED_NEW hsColorRGBA[NumVerts()]; + fMultColors = new hsColorRGBA[NumVerts()]; + fAddColors = new hsColorRGBA[NumVerts()]; } void plSpanTemplateB::DeAllocColors() diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp index 45649642..7d628af0 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp @@ -432,7 +432,7 @@ void plIcicle::Read( hsStream *stream ) int i; - fSortData = TRACKED_NEW plGBufferTriangle[ fILength / 3 ]; + fSortData = new plGBufferTriangle[ fILength / 3 ]; for( i = 0; i < fILength / 3; i++ ) fSortData[ i ].Read( stream ); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp index 24992d48..e42a2761 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp @@ -375,18 +375,18 @@ void plWaveSet7::Read(hsStream* stream, hsResMgr* mgr) int i; for( i = 0; i < n; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefShore), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefShore), plRefFlags::kPassiveRef); } n = stream->ReadLE32(); for( i = 0; i < n; i++ ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDecal), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefDecal), plRefFlags::kPassiveRef); } - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefEnvMap), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefEnvMap), plRefFlags::kActiveRef); if( HasFlag(kHasRefObject) ) { - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRefObj), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefRefObj), plRefFlags::kPassiveRef); } ISetupTextureWaves(); @@ -1076,7 +1076,7 @@ void plWaveSet7::IFloatBuoy(float dt, plSceneObject* so) plKey physKey = so->GetSimulationInterface()->GetPhysical()->GetKey(); -// plImpulseMsg* iMsg = TRACKED_NEW plImpulseMsg(GetKey(), physKey, hsVector3(0, 0, 1.f) * forceMag * dt); +// plImpulseMsg* iMsg = new plImpulseMsg(GetKey(), physKey, hsVector3(0, 0, 1.f) * forceMag * dt); // iMsg->Send(); #if 0 @@ -1084,7 +1084,7 @@ void plWaveSet7::IFloatBuoy(float dt, plSceneObject* so) hsVector3 rotAx = hsVector3(0, 0, 1.f) % surfNorm; rotAx *= kRotScale * dt * volume; - plAngularImpulseMsg* aMsg = TRACKED_NEW plAngularImpulseMsg(GetKey(), physKey, rotAx); + plAngularImpulseMsg* aMsg = new plAngularImpulseMsg(GetKey(), physKey, rotAx); aMsg->Send(); #endif @@ -1097,7 +1097,7 @@ void plWaveSet7::IFloatBuoy(float dt, plSceneObject* so) damp *= kDampener; damp += kBaseDamp; -// plDampMsg* dMsg = TRACKED_NEW plDampMsg(GetKey(), physKey, damp); +// plDampMsg* dMsg = new plDampMsg(GetKey(), physKey, damp); // dMsg->Send(); } } @@ -1122,7 +1122,7 @@ void plWaveSet7::IShiftCenter(plSceneObject* so) const hsPoint3 center = so->GetDrawInterface()->GetWorldBounds().GetCenter(); hsPoint3 pos = so->GetLocalToWorld().GetTranslate(); hsVector3 offset(&pos, ¢er); -// plShiftMassMsg* msg = TRACKED_NEW plShiftMassMsg(GetKey(), so->GetSimulationInterface()->GetPhysical()->GetKey(), offset); +// plShiftMassMsg* msg = new plShiftMassMsg(GetKey(), so->GetSimulationInterface()->GetPhysical()->GetKey(), offset); // msg->Send(); } } @@ -1186,13 +1186,13 @@ void plWaveSet7::ICheckTargetMaterials() void plWaveSet7::IAddTarget(const plKey& key) { - plObjRefMsg* refMsg = TRACKED_NEW plObjRefMsg(key, plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); + plObjRefMsg* refMsg = new plObjRefMsg(key, plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); hsgResMgr::ResMgr()->AddViaNotify( GetKey(), refMsg, plRefFlags::kActiveRef); } void plWaveSet7::IRemoveTarget(const plKey& key) { - plObjRefMsg* refMsg = TRACKED_NEW plObjRefMsg(key, plRefMsg::kOnRemove, -1, plObjRefMsg::kModifier); + plObjRefMsg* refMsg = new plObjRefMsg(key, plRefMsg::kOnRemove, -1, plObjRefMsg::kModifier); refMsg->SetRef(this); refMsg->Send(); } @@ -1211,19 +1211,19 @@ void plWaveSet7::SetRefObject(plSceneObject* refObj) { fFlags.SetBit(kHasRefObject, refObj != nil); - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRefObj); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRefObj); hsgResMgr::ResMgr()->SendRef(refObj, msg, plRefFlags::kPassiveRef); } void plWaveSet7::AddBuoy(plKey soKey) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBuoy); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBuoy); hsgResMgr::ResMgr()->AddViaNotify(soKey, msg, plRefFlags::kPassiveRef); } void plWaveSet7::RemoveBuoy(plKey soKey) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefBuoy); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefBuoy); msg->SetRef(soKey->ObjectIsLoaded()); msg->Send(); } @@ -1448,20 +1448,20 @@ void plWaveSet7::SetSceneNode(const plKey& key) void plWaveSet7::AddDynaDecalMgr(plKey& key) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefDynaDecalMgr); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefDynaDecalMgr); hsgResMgr::ResMgr()->AddViaNotify(key, msg, plRefFlags::kPassiveRef); - msg = TRACKED_NEW plGenRefMsg(key, plRefMsg::kOnRequest, 0, plDynaRippleVSMgr::kRefWaveSetBase); + msg = new plGenRefMsg(key, plRefMsg::kOnRequest, 0, plDynaRippleVSMgr::kRefWaveSetBase); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), msg, plRefFlags::kPassiveRef); } void plWaveSet7::RemoveDynaDecalMgr(plKey& key) { - plGenRefMsg* msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefDynaDecalMgr); + plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefDynaDecalMgr); msg->SetRef(key->ObjectIsLoaded()); msg->Send(); - msg = TRACKED_NEW plGenRefMsg(key, plRefMsg::kOnRemove, 0, plDynaRippleVSMgr::kRefWaveSetBase); + msg = new plGenRefMsg(key, plRefMsg::kOnRemove, 0, plDynaRippleVSMgr::kRefWaveSetBase); msg->SetRef(this); msg->Send(); } @@ -1610,7 +1610,7 @@ hsGMaterial* plWaveSet7::ICreateBumpLayersFFP() plMipmap* plWaveSet7::ICreateBiasNoiseMap() { const int size = kCompositeSize >> 2; - plMipmap* mipMap = TRACKED_NEW plMipmap( + plMipmap* mipMap = new plMipmap( size, size, plMipmap::kARGB32Config, 1, @@ -1656,7 +1656,7 @@ plMipmap* plWaveSet7::ICreateBumpMipmapPS() if( !fCosineLUT ) { - plMipmap* mipMap = TRACKED_NEW plMipmap( + plMipmap* mipMap = new plMipmap( kCompositeSize, sizeV, plMipmap::kARGB32Config, kNumLevels, @@ -1667,7 +1667,7 @@ plMipmap* plWaveSet7::ICreateBumpMipmapPS() sprintf(buff, "%s_%s", GetKey()->GetName(), "BumpBitPS"); hsgResMgr::ResMgr()->NewKey(buff, mipMap, GetKey()->GetUoid().GetLocation()); - hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefCosineLUT), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefCosineLUT), plRefFlags::kActiveRef); } hsAssert(fCosineLUT, "Failed to make cosine lookup table"); @@ -1715,7 +1715,7 @@ void plWaveSet7::IAddBumpBiasLayer(hsGMaterial* mat) int i; for( i = 0; i < 2; i++ ) { - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; char buff[256]; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), "Bias", i); hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); @@ -1735,7 +1735,7 @@ void plWaveSet7::IAddBumpBiasLayer(hsGMaterial* mat) layer->SetUVWSrc(0); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), refMsg, plRefFlags::kActiveRef); IAddBumpBiasShaders(layer); @@ -1751,7 +1751,7 @@ void plWaveSet7::IAddBumpBiasLayer(hsGMaterial* mat) plLayer* plWaveSet7::ICreateBumpLayerPS(plMipmap* mipMap, hsGMaterial* bumpMat, int which) { - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; char buff[256]; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), "BumpLayerPS", which); hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); @@ -1786,7 +1786,7 @@ plLayer* plWaveSet7::ICreateBumpLayerPS(plMipmap* mipMap, hsGMaterial* bumpMat, bumpMat->AddLayerViaNotify(layer); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), refMsg, plRefFlags::kActiveRef); return layer; @@ -1809,7 +1809,7 @@ hsGMaterial* plWaveSet7::ICreateBumpLayersPS() // // Create a blank material - hsGMaterial* bumpMat = TRACKED_NEW hsGMaterial; + hsGMaterial* bumpMat = new hsGMaterial; char buff[256]; sprintf(buff, "%s_%s", GetKey()->GetName(), "BumpMatPS"); hsgResMgr::ResMgr()->NewKey(buff, bumpMat, GetKey()->GetUoid().GetLocation()); @@ -1839,7 +1839,7 @@ hsGMaterial* plWaveSet7::ICreateBumpLayersPS() // Need to add this via notify to ourselves. - hsgResMgr::ResMgr()->SendRef(bumpMat->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBumpMat), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(bumpMat->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBumpMat), plRefFlags::kActiveRef); ICreateBumpDrawable(); @@ -1850,7 +1850,7 @@ void plWaveSet7::IAddBumpBiasShaders(plLayer* layer) { if( !fBiasVShader ) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_BiasVS", GetKey()->GetName()); @@ -1902,19 +1902,19 @@ void plWaveSet7::IAddBumpBiasShaders(plLayer* layer) // vShader->SetDecl(&vDecl); vShader->SetDecl(plShaderTable::Decl(vs_BiasNormals)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBiasVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBiasVShader), plRefFlags::kActiveRef); fBiasVShader = vShader; } - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); hsgResMgr::ResMgr()->SendRef(fBiasVShader->GetKey(), refMsg, plRefFlags::kActiveRef); if( !fBiasPShader ) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_BiasPS", GetKey()->GetName()); @@ -1930,12 +1930,12 @@ void plWaveSet7::IAddBumpBiasShaders(plLayer* layer) // pShader->SetDecl(&pDecl); pShader->SetDecl(plShaderTable::Decl(ps_BiasNormals)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBiasPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBiasPShader), plRefFlags::kActiveRef); fBiasPShader = pShader; } - refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); + refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); hsgResMgr::ResMgr()->SendRef(fBiasPShader->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -1949,7 +1949,7 @@ void plWaveSet7::IAddBumpVertexShader(hsGMaterial* mat, int iShader, int iFirst, { int iShader = iBase / kBumpPerPass; - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_BumpVS_%d", GetKey()->GetName(), iShader); hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation()); @@ -1975,7 +1975,7 @@ void plWaveSet7::IAddBumpVertexShader(hsGMaterial* mat, int iShader, int iFirst, vShader->SetDecl(plShaderTable::Decl(vs_CompCosines)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iShader, kRefBumpVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iShader, kRefBumpVShader), plRefFlags::kActiveRef); fBumpVShader[iShader] = vShader; @@ -1995,7 +1995,7 @@ void plWaveSet7::IAddBumpPixelShader(hsGMaterial* mat, int iShader, int iFirst, { int iShader = iBase / kBumpPerPass; - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_BumpPS_%d", GetKey()->GetName(), iShader); hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation()); @@ -2025,7 +2025,7 @@ void plWaveSet7::IAddBumpPixelShader(hsGMaterial* mat, int iShader, int iFirst, pShader->SetVector(plBumpPS::kHalfOne, 0.25f, 0.25f, 0.25f, 1.f); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iShader, kRefBumpPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iShader, kRefBumpPShader), plRefFlags::kActiveRef); fBumpPShader[iShader] = pShader; @@ -2038,14 +2038,14 @@ void plWaveSet7::IAddBumpPixelShader(hsGMaterial* mat, int iShader, int iFirst, plDrawableSpans* plWaveSet7::ICreateBumpDrawable() { - fBumpDraw = TRACKED_NEW plDrawableSpans; + fBumpDraw = new plDrawableSpans; char buff[256]; sprintf(buff, "%s_BumpDraw", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, fBumpDraw, GetKey()->GetUoid().GetLocation()); ICreateClearDrawable(fBumpDraw, fBumpMat); - hsgResMgr::ResMgr()->SendRef(fBumpDraw->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBumpDraw), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(fBumpDraw->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefBumpDraw), plRefFlags::kActiveRef); return fBumpDraw; } @@ -2122,7 +2122,7 @@ plDrawableSpans* plWaveSet7::ICreateClearDrawable(plDrawableSpans* drawable, hsG plRenderRequest* plWaveSet7::ICreateRenderRequest(plRenderTarget* rt, plDrawableSpans* draw, float pri) { - plRenderRequest* req = TRACKED_NEW plRenderRequest; + plRenderRequest* req = new plRenderRequest; static plPageTreeMgr emptyMgr; req->SetPageTreeMgr(&emptyMgr); @@ -2153,7 +2153,7 @@ plRenderTarget* plWaveSet7::ICreateTransferRenderTarget(const char* name, int si uint8_t zDepth = 0; uint8_t stencilDepth = 0; - plRenderTarget* rt = TRACKED_NEW plRenderTarget(flags, size, size, bitDepth, zDepth, stencilDepth); + plRenderTarget* rt = new plRenderTarget(flags, size, size, bitDepth, zDepth, stencilDepth); char buff[256]; sprintf(buff, "%s_%s", GetKey()->GetName(), name); @@ -2167,7 +2167,7 @@ plLayer* plWaveSet7::ICreateTotalLayer(plBitmap* bm, hsGMaterial* mat, int which plLayer* layer = mat->GetNumLayers() > which ? plLayer::ConvertNoRef(mat->GetLayer(which)->BottomOfStack()) : nil; if( !layer ) { - layer = TRACKED_NEW plLayer; + layer = new plLayer; char buff[256]; sprintf(buff, "%s_%sLayerPS_%d", GetKey()->GetName(), suff, which); hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); @@ -2194,7 +2194,7 @@ plLayer* plWaveSet7::ICreateTotalLayer(plBitmap* bm, hsGMaterial* mat, int which layer->SetTransform(xfm); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(bm->GetKey(), refMsg, plRefFlags::kActiveRef); return layer; @@ -2202,7 +2202,7 @@ plLayer* plWaveSet7::ICreateTotalLayer(plBitmap* bm, hsGMaterial* mat, int which plLayer* plWaveSet7::ICreateTotalEnvLayer(plBitmap* envMap, hsGMaterial* mat, int which, const char* pref) { - plLayer* layer = TRACKED_NEW plLayer; + plLayer* layer = new plLayer; char buff[256]; sprintf(buff, "%s_%s_%s_%d", GetKey()->GetName(), pref, "EnvLayerPS", which); hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); @@ -2226,7 +2226,7 @@ plLayer* plWaveSet7::ICreateTotalEnvLayer(plBitmap* envMap, hsGMaterial* mat, in layer->SetTransform(xfm); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(envMap->GetKey(), refMsg, plRefFlags::kActiveRef); mat->AddLayerViaNotify(layer); @@ -2248,7 +2248,7 @@ hsGMaterial* plWaveSet7::ICreateFixedMatPS(hsGMaterial* mat, const int numUVWs) int i; for( i = mat->GetNumLayers()-1; i > 0; i-- ) { - plMatRefMsg* refMsg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); + plMatRefMsg* refMsg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); hsgResMgr::ResMgr()->SendRef(mat->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -2266,7 +2266,7 @@ hsGMaterial* plWaveSet7::ICreateFixedMatPS(hsGMaterial* mat, const int numUVWs) fBumpReq = ICreateRenderRequest(rt, fBumpDraw, -100.f); - fBumpReqMsg = TRACKED_NEW plRenderRequestMsg(GetKey(), fBumpReq); + fBumpReqMsg = new plRenderRequestMsg(GetKey(), fBumpReq); IAddFixedVertexShader(mat, numUVWs); IAddFixedPixelShader(mat); @@ -2281,7 +2281,7 @@ void plWaveSet7::ICreateFixedMat(hsGMaterial* mat, const int numUVWs) if( !fEnvMap ) { - plDynamicEnvMap* env = TRACKED_NEW plDynamicEnvMap((uint16_t)fEnvSize, (uint16_t)fEnvSize, 32); + plDynamicEnvMap* env = new plDynamicEnvMap((uint16_t)fEnvSize, (uint16_t)fEnvSize, 32); hsgResMgr::ResMgr()->NewKey(GetKey()->GetName(), env, GetKey()->GetUoid().GetLocation()); fEnvMap = env; env->SetPosition(hsPoint3(0, 0, 50.f)); @@ -2302,7 +2302,7 @@ void plWaveSet7::IAddShoreVertexShader(hsGMaterial* mat) if( !fShoreVShader ) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_ShoreVS", GetKey()->GetName()); @@ -2342,7 +2342,7 @@ void plWaveSet7::IAddShoreVertexShader(hsGMaterial* mat) // vShader->SetDecl(&decl); vShader->SetDecl(plShaderTable::Decl(vs_ShoreLeave7)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefShoreVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefShoreVShader), plRefFlags::kActiveRef); fShoreVShader = vShader; @@ -2356,7 +2356,7 @@ void plWaveSet7::IAddShorePixelShader(hsGMaterial* mat) { if( !fShorePShader ) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_ShorePS", GetKey()->GetName()); @@ -2367,7 +2367,7 @@ void plWaveSet7::IAddShorePixelShader(hsGMaterial* mat) // pShader->SetShaderFileName("sha/ps_ShoreLeave6.inl"); pShader->SetDecl(plShaderTable::Decl(ps_ShoreLeave6)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefShorePShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefShorePShader), plRefFlags::kActiveRef); fShorePShader = pShader; } @@ -2380,7 +2380,7 @@ void plWaveSet7::IAddFixedVertexShader(hsGMaterial* mat, const int numUVWs) if( !fFixedVShader ) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_FixedVS", GetKey()->GetName()); @@ -2414,7 +2414,7 @@ void plWaveSet7::IAddFixedVertexShader(hsGMaterial* mat, const int numUVWs) // vShader->SetShaderFileName("sha/vs_WaveFixedFin.inl"); // vShader->SetShaderFileName("sha/vs_TestPos.inl"); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFixedVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFixedVShader), plRefFlags::kActiveRef); fFixedVShader = vShader; @@ -2439,7 +2439,7 @@ void plWaveSet7::IAddShaderToLayers(hsGMaterial* mat, int iFirst, int iLast, uin && (layer->GetVertexShader() != shader) && (layer->GetPixelShader() != shader) ) { - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, type); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, type); hsgResMgr::ResMgr()->SendRef(shader->GetKey(), refMsg, plRefFlags::kActiveRef); // layer->SetShadeFlags(layer->GetShadeFlags() | hsGMatState::kShadeReallyNoFog); @@ -2451,7 +2451,7 @@ void plWaveSet7::IAddFixedPixelShader(hsGMaterial* mat) { if( !fFixedPShader ) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_FixedPS", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation()); @@ -2467,7 +2467,7 @@ void plWaveSet7::IAddFixedPixelShader(hsGMaterial* mat) // pShader->SetShaderFileName("sha/ps_TestPos.inl"); pShader->SetDecl(plShaderTable::Decl(ps_WaveFixed)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFixedPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFixedPShader), plRefFlags::kActiveRef); fFixedPShader = pShader; } @@ -2480,7 +2480,7 @@ void plWaveSet7::IAddRipVertexShader(hsGMaterial* mat, const plRipVSConsts& ripC { if( !fRipVShader ) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_RipVS", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation()); @@ -2553,7 +2553,7 @@ void plWaveSet7::IAddRipVertexShader(hsGMaterial* mat, const plRipVSConsts& ripC // vShader->SetDecl(&decl); vShader->SetDecl(plShaderTable::Decl(vs_WaveRip7)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRipVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRipVShader), plRefFlags::kActiveRef); hsAssert(vShader == fRipVShader, "Should have been set by SendRef"); } @@ -2566,7 +2566,7 @@ void plWaveSet7::IAddRipPixelShader(hsGMaterial* mat, const plRipVSConsts& ripCo { if( !fRipPShader ) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_RipPS", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation()); @@ -2580,7 +2580,7 @@ void plWaveSet7::IAddRipPixelShader(hsGMaterial* mat, const plRipVSConsts& ripCo // pShader->SetShaderFileName("sha/ps_WaveRip.inl"); pShader->SetDecl(plShaderTable::Decl(ps_WaveRip)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRipPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefRipPShader), plRefFlags::kActiveRef); hsAssert(pShader == fRipPShader, "Should have been set by SendRef"); } @@ -2626,7 +2626,7 @@ plShader* plWaveSet7::ICreateDecalVShader(DecalVType t) }; - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_%s", GetKey()->GetName(), fname[t]); hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation()); @@ -2688,7 +2688,7 @@ plShader* plWaveSet7::ICreateDecalVShader(DecalVType t) // vShader->SetDecl(&shaderDecls[t]); vShader->SetDecl(plShaderTable::Decl(shaderIDs[t])); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, t, kRefDecVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, t, kRefDecVShader), plRefFlags::kActiveRef); hsAssert(vShader == fDecalVShaders[t], "Should have been set by SendRef"); } @@ -2754,7 +2754,7 @@ plShader* plWaveSet7::ICreateDecalPShader(DecalPType t) ps_WaveDecEnv }; - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_%s", GetKey()->GetName(), fname[t]); @@ -2765,7 +2765,7 @@ plShader* plWaveSet7::ICreateDecalPShader(DecalPType t) // pShader->SetShaderFileName(buff); pShader->SetDecl(plShaderTable::Decl(shaderIDs[t])); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, t, kRefDecPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, t, kRefDecPShader), plRefFlags::kActiveRef); hsAssert(fDecalPShaders[t] == pShader, "Should have been set by SendRef"); } @@ -3532,14 +3532,14 @@ void plWaveSet7::ICheckDecalEnvLayers(hsGMaterial* mat) } else { - refMsg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+1, plMatRefMsg::kLayer | plMatRefMsg::kInsert); + refMsg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+1, plMatRefMsg::kLayer | plMatRefMsg::kInsert); hsgResMgr::ResMgr()->SendRef(lay3->GetKey(), refMsg, plRefFlags::kActiveRef); } - refMsg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+2, plMatRefMsg::kLayer | plMatRefMsg::kInsert); + refMsg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+2, plMatRefMsg::kLayer | plMatRefMsg::kInsert); hsgResMgr::ResMgr()->SendRef(lay3->GetKey(), refMsg, plRefFlags::kActiveRef); - refMsg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+3, plMatRefMsg::kLayer | plMatRefMsg::kInsert); + refMsg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnRequest, i+3, plMatRefMsg::kLayer | plMatRefMsg::kInsert); hsgResMgr::ResMgr()->SendRef(lay3->GetKey(), refMsg, plRefFlags::kActiveRef); } } @@ -3577,7 +3577,7 @@ void plWaveSet7::ISetupDecal(hsGMaterial* mat) void plWaveSet7::AddShoreTest(plKey& key) { - hsgResMgr::ResMgr()->SendRef(key, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefShore), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefShore), plRefFlags::kPassiveRef); plSceneObject* so = plSceneObject::ConvertNoRef(key->ObjectIsLoaded()); ICheckShoreMaterial(so); @@ -3697,32 +3697,32 @@ plDrawableSpans* plWaveSet7::ICreateGraphDrawable(plDrawableSpans* drawable, hsG plDrawableSpans* plWaveSet7::ICreateEmptyGraphDrawable(const char* name, uint32_t ref, int which) { - plDrawableSpans* drawable = TRACKED_NEW plDrawableSpans; + plDrawableSpans* drawable = new plDrawableSpans; char buff[256]; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), name, which); hsgResMgr::ResMgr()->NewKey(buff, drawable, GetKey()->GetUoid().GetLocation()); - hsgResMgr::ResMgr()->SendRef(drawable->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, (int8_t)ref), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(drawable->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, (int8_t)ref), plRefFlags::kActiveRef); return drawable; } hsGMaterial* plWaveSet7::ICreateEmptyMaterial(const char* name, uint32_t ref, int which) { - hsGMaterial* mat = TRACKED_NEW hsGMaterial; + hsGMaterial* mat = new hsGMaterial; char buff[256]; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), name, which); hsgResMgr::ResMgr()->NewKey(buff, mat, GetKey()->GetUoid().GetLocation()); - hsgResMgr::ResMgr()->SendRef(mat->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, (int8_t)ref), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(mat->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, (int8_t)ref), plRefFlags::kActiveRef); return mat; } plLayer* plWaveSet7::ICreateBlankLayer(const char* name, int suff) { - plLayer* lay = TRACKED_NEW plLayer; + plLayer* lay = new plLayer; char buff[256]; sprintf(buff, "%s_%s_%d", GetKey()->GetName(), name, suff); hsgResMgr::ResMgr()->NewKey(buff, lay, GetKey()->GetUoid().GetLocation()); @@ -3732,7 +3732,7 @@ plLayer* plWaveSet7::ICreateBlankLayer(const char* name, int suff) plMipmap* plWaveSet7::ICreateBlankTex(const char* name, int width, int height, uint32_t ref) { - plMipmap* mipMap = TRACKED_NEW plMipmap( + plMipmap* mipMap = new plMipmap( width, height, plMipmap::kARGB32Config, 1, @@ -3743,7 +3743,7 @@ plMipmap* plWaveSet7::ICreateBlankTex(const char* name, int width, int height, u sprintf(buff, "%s_%s", GetKey()->GetName(), name); hsgResMgr::ResMgr()->NewKey(buff, mipMap, GetKey()->GetUoid().GetLocation()); - hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, (int8_t)ref), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(mipMap->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, (int8_t)ref), plRefFlags::kActiveRef); return mipMap; } @@ -3996,7 +3996,7 @@ plMipmap* plWaveSet7::ICreateEdgeShoreTex(int width, int height) void plWaveSet7::ISetAsTexture(plLayer* lay, plBitmap* tex) { hsAssert(lay && tex, "Trying to set nil texture or nil layer"); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(lay->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(lay->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture); hsgResMgr::ResMgr()->SendRef(tex->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -4145,7 +4145,7 @@ void plWaveSet7::IAddGraphVShader(hsGMaterial* mat, int iPass) { if( !fGraphVShader[iPass] ) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_GraphVS_%d", GetKey()->GetName(), iPass); hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation()); @@ -4168,7 +4168,7 @@ void plWaveSet7::IAddGraphVShader(hsGMaterial* mat, int iPass) // vShader->SetShaderFileName("sha/vs_WaveGraph2.inl"); vShader->SetDecl(plShaderTable::Decl(vs_WaveGraph2)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iPass, kRefGraphVShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iPass, kRefGraphVShader), plRefFlags::kActiveRef); hsAssert(fGraphVShader[iPass] == vShader, "SendRef should have set shader"); } @@ -4180,7 +4180,7 @@ void plWaveSet7::IAddGraphPShader(hsGMaterial* mat, int iPass) { if( !fGraphPShader[iPass] ) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_GraphPS_%d", GetKey()->GetName(), iPass); hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation()); @@ -4194,7 +4194,7 @@ void plWaveSet7::IAddGraphPShader(hsGMaterial* mat, int iPass) // pShader->SetShaderFileName("sha/ps_WaveGraph.inl"); pShader->SetDecl(plShaderTable::Decl(ps_WaveGraph)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iPass, kRefGraphPShader), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, iPass, kRefGraphPShader), plRefFlags::kActiveRef); hsAssert(fGraphPShader[iPass] == pShader, "SendRef should have set shader"); } @@ -4209,10 +4209,10 @@ plRenderTarget* plWaveSet7::ISetupGraphShoreRenderReq(int which) sprintf(name, "Graph_%d", which); plRenderTarget* rt = ICreateTransferRenderTarget(name, kGraphSize); - hsgResMgr::ResMgr()->SendRef(rt->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, kRefGraphShoreRT), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(rt->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, which, kRefGraphShoreRT), plRefFlags::kActiveRef); fGraphReq[which] = ICreateRenderRequest(rt, fGraphShoreDraw[which], -100.f); - fGraphReqMsg[which] = TRACKED_NEW plRenderRequestMsg(GetKey(), fGraphReq[which]); + fGraphReqMsg[which] = new plRenderRequestMsg(GetKey(), fGraphReq[which]); return rt; } @@ -4255,7 +4255,7 @@ void plWaveSet7::IMakeShoreLayer(hsGMaterial* mat, int which) char name[512]; if( which >= mat->GetNumLayers() ) { - plLayer* lay = TRACKED_NEW plLayer; + plLayer* lay = new plLayer; sprintf(name, "%s_lay_%d", mat->GetKey()->GetName(), which); hsgResMgr::ResMgr()->NewKey(name, lay, GetKey()->GetUoid().GetLocation()); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.cpp index 36fc4846..42ab3cc0 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.cpp @@ -56,11 +56,11 @@ plWaveSetBase::~plWaveSetBase() void plWaveSetBase::AddShore(plKey key) { - hsgResMgr::ResMgr()->SendRef(key, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, IShoreRef()), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, IShoreRef()), plRefFlags::kPassiveRef); } void plWaveSetBase::AddDecal(plKey key) { - hsgResMgr::ResMgr()->SendRef(key, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, IDecalRef()), plRefFlags::kPassiveRef); + hsgResMgr::ResMgr()->SendRef(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, IDecalRef()), plRefFlags::kPassiveRef); } diff --git a/Sources/Plasma/PubUtilLib/plEncryption/plChecksum.cpp b/Sources/Plasma/PubUtilLib/plEncryption/plChecksum.cpp index 3fcf55cb..81db5419 100644 --- a/Sources/Plasma/PubUtilLib/plEncryption/plChecksum.cpp +++ b/Sources/Plasma/PubUtilLib/plEncryption/plChecksum.cpp @@ -120,7 +120,7 @@ void plMD5Checksum::CalcFromStream( hsStream* stream ) unsigned loadLen = 1024 * 1024; Start(); - uint8_t *buf = TRACKED_NEW uint8_t[loadLen]; + uint8_t *buf = new uint8_t[loadLen]; while(int read = stream->Read(loadLen, buf)) AddTo( read, buf ); diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp index 501c65ef..d7b7e1e9 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp @@ -121,7 +121,7 @@ hsStream* hsFile::OpenStream(const char mode[], hsBool throwIfFailure) FILE* file = this->OpenFILE(mode, throwIfFailure); if (file) - { hsUNIXStream* stream = TRACKED_NEW hsUNIXStream; + { hsUNIXStream* stream = new hsUNIXStream; stream->SetFILE(file); return stream; } diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp index dfce94b6..7ba0689c 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp @@ -185,7 +185,7 @@ hsStream* hsMacFile::OpenStream(const char mode[], hsBool throwIfFailure) perm |= fsWrPerm; if (this->OpenDataFork(perm, &refnum)) - { hsFileStream* stream = TRACKED_NEW hsFileStream; + { hsFileStream* stream = new hsFileStream; stream->SetFileRef(refnum); return stream; } @@ -218,7 +218,7 @@ struct hsFolderIterator_Data { hsFolderIterator::hsFolderIterator(const char path[]) { - fData = TRACKED_NEW hsFolderIterator_Data; + fData = new hsFolderIterator_Data; fData->fCurrIndex = 0; fData->fValid = false; @@ -231,7 +231,7 @@ hsFolderIterator::hsFolderIterator(const char path[]) hsFolderIterator::hsFolderIterator(const struct FSSpec* spec) // Alt Constructor - pass in FSSpec from OpenDlg() { - fData = TRACKED_NEW hsFolderIterator_Data; + fData = new hsFolderIterator_Data; fData->fCurrIndex = 0; fData->fValid = false; diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp index b16307c8..9564eec3 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp @@ -64,7 +64,7 @@ struct hsFolderIterator_Data { hsFolderIterator::hsFolderIterator(const char path[], bool) { - fData = TRACKED_NEW hsFolderIterator_Data; + fData = new hsFolderIterator_Data; this->SetPath(path); } diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp index 350a279a..5d1be0fe 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp @@ -56,7 +56,7 @@ hsFolderIterator::hsFolderIterator(const char path[], bool useCustomFilter) { fCustomFilter = useCustomFilter; - fData = TRACKED_NEW hsFolderIterator_Data; + fData = new hsFolderIterator_Data; fData->fSearchHandle = nil; fData->fValid = true; @@ -191,7 +191,7 @@ hsWFolderIterator::hsWFolderIterator(const wchar_t path[], bool useCustomFilter) { fCustomFilter = useCustomFilter; - fData = TRACKED_NEW hsWFolderIterator_Data; + fData = new hsWFolderIterator_Data; fData->fSearchHandle = nil; fData->fValid = true; diff --git a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp index f54ae98b..8350bc87 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp @@ -157,8 +157,8 @@ hsBool plEncryptedStream::Open(const wchar_t* name, const wchar_t* mode) } else if (wcscmp(mode, L"wb") == 0) { - fRAMStream = TRACKED_NEW hsVectorStream; - fWriteFileName = TRACKED_NEW wchar_t[wcslen(name) + 1]; + fRAMStream = new hsVectorStream; + fWriteFileName = new wchar_t[wcslen(name) + 1]; wcscpy(fWriteFileName, name); fPosition = 0; @@ -232,7 +232,7 @@ uint32_t plEncryptedStream::IRead(uint32_t bytes, void* buffer) void plEncryptedStream::IBufferFile() { - fRAMStream = TRACKED_NEW hsVectorStream; + fRAMStream = new hsVectorStream; char buf[1024]; while (!AtEnd()) { @@ -560,11 +560,11 @@ hsStream* plEncryptedStream::OpenEncryptedFile(const wchar_t* fileName, bool req hsStream* s = nil; if (isEncrypted) - s = TRACKED_NEW plEncryptedStream(cryptKey); + s = new plEncryptedStream(cryptKey); // If this isn't an external release, let them use unencrypted data else if (!requireEncrypted) - s = TRACKED_NEW hsUNIXStream; + s = new hsUNIXStream; if (s) s->Open(fileName, L"rb"); @@ -583,9 +583,9 @@ hsStream* plEncryptedStream::OpenEncryptedFileWrite(const wchar_t* fileName, uin { hsStream* s = nil; #ifdef PLASMA_EXTERNAL_RELEASE - s = TRACKED_NEW plEncryptedStream(cryptKey); + s = new plEncryptedStream(cryptKey); #else - s = TRACKED_NEW hsUNIXStream; + s = new hsUNIXStream; #endif s->Open(fileName, L"wb"); diff --git a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp index 3bd03985..55fc6e1a 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp @@ -156,7 +156,7 @@ hsBool plInitFileReader::Parse( uint32_t userData ) hsAssert( fStream != nil, "Nil stream in initFileReader::Parse(); file not yet open?" ); if( fCurrLine == nil ) - fCurrLine = TRACKED_NEW char[ fLineSize + 1 ]; + fCurrLine = new char[ fLineSize + 1 ]; // Start parsing lines while( fStream->ReadLn( fCurrLine, fLineSize ) ) diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp index e2494658..dabb390c 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp @@ -230,8 +230,8 @@ hsBool plSecureStream::Open(const wchar_t* name, const wchar_t* mode) } else if (wcscmp(mode, L"wb") == 0) { - fRAMStream = TRACKED_NEW hsVectorStream; - fWriteFileName = TRACKED_NEW wchar_t[wcslen(name) + 1]; + fRAMStream = new hsVectorStream; + fWriteFileName = new wchar_t[wcslen(name) + 1]; wcscpy(fWriteFileName, name); fPosition = 0; @@ -351,7 +351,7 @@ uint32_t plSecureStream::IRead(uint32_t bytes, void* buffer) void plSecureStream::IBufferFile() { - fRAMStream = TRACKED_NEW hsVectorStream; + fRAMStream = new hsVectorStream; char buf[1024]; while (!AtEnd()) { @@ -728,9 +728,9 @@ hsStream* plSecureStream::OpenSecureFile(const wchar_t* fileName, const uint32_t hsStream* s = nil; if (isEncrypted) - s = TRACKED_NEW plSecureStream(deleteOnExit, key); + s = new plSecureStream(deleteOnExit, key); else if (!requireEncryption) // If this isn't an external release, let them use unencrypted data - s = TRACKED_NEW hsUNIXStream; + s = new hsUNIXStream; if (s) s->Open(fileName, L"rb"); @@ -749,9 +749,9 @@ hsStream* plSecureStream::OpenSecureFileWrite(const wchar_t* fileName, uint32_t* { hsStream* s = nil; #ifdef PLASMA_EXTERNAL_RELEASE - s = TRACKED_NEW plSecureStream(false, key); + s = new plSecureStream(false, key); #else - s = TRACKED_NEW hsUNIXStream; + s = new hsUNIXStream; #endif s->Open(fileName, L"wb"); diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp index 71926fc9..5f0afd1c 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp @@ -257,7 +257,7 @@ plMipmap *hsDXTDirectXCodec::CreateCompressedMipmap( plMipmap *uncompressed ) /// Now set up the data structures - compressed = TRACKED_NEW plMipmap( uncompressed->GetWidth(), uncompressed->GetHeight(), plMipmap::kARGB32Config, + compressed = new plMipmap( uncompressed->GetWidth(), uncompressed->GetHeight(), plMipmap::kARGB32Config, uncompressed->GetNumLevels(), plMipmap::kDirectXCompression, ( compFormat == D3DTEXTURE_FMT_FOURCC_DXT1 ) ? plMipmap::DirectXInfo::kDXT1 : plMipmap::DirectXInfo::kDXT5 ); @@ -364,12 +364,12 @@ plMipmap *hsDXTDirectXCodec::CreateUncompressedMipmap( plMipmap *compressed, /// Set up the uncompressed data structure if( compressed->fFlags & hsGMipmap::kMipMap ) { - mmUncompressed = TRACKED_NEW hsGMipmapClass; + mmUncompressed = new hsGMipmapClass; uncompressed = mmUncompressed; } else { - uncompressed = TRACKED_NEW plMipmap; + uncompressed = new plMipmap; mmUncompressed = nil; } diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp index 68a6a667..07967fb1 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp @@ -94,7 +94,7 @@ plMipmap *hsDXTSoftwareCodec::CreateCompressedMipmap( plMipmap *uncompressed ) /// Set up structure - compressed = TRACKED_NEW plMipmap( uncompressed->GetWidth(), uncompressed->GetHeight(), plMipmap::kARGB32Config, + compressed = new plMipmap( uncompressed->GetWidth(), uncompressed->GetHeight(), plMipmap::kARGB32Config, uncompressed->GetNumLevels(), plMipmap::kDirectXCompression, format ); { @@ -342,7 +342,7 @@ plMipmap *hsDXTSoftwareCodec::ICreateUncompressedMipmap( plMipmap *compressed type = plMipmap::UncompressedInfo::kRGB1555; } - newMap = TRACKED_NEW plMipmap( compressed->GetWidth(), compressed->GetHeight(), bitDepth, + newMap = new plMipmap( compressed->GetWidth(), compressed->GetHeight(), bitDepth, compressed->GetNumLevels(), plMipmap::kUncompressed, type ); newMap->SetFlags( compressed->GetFlags() ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plBumpMapGen.cpp b/Sources/Plasma/PubUtilLib/plGImage/plBumpMapGen.cpp index c84c4b94..43d416c6 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plBumpMapGen.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plBumpMapGen.cpp @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plMipmap* plBumpMapGen::MakeCompatibleBlank(const plMipmap* src) { - return TRACKED_NEW plMipmap(src->GetWidth(), src->GetHeight(), plMipmap::kARGB32Config, 1, plMipmap::kUncompressed, plMipmap::UncompressedInfo::kRGB8888); + return new plMipmap(src->GetWidth(), src->GetHeight(), plMipmap::kARGB32Config, 1, plMipmap::kUncompressed, plMipmap::UncompressedInfo::kRGB8888); } plMipmap* plBumpMapGen::TwosCompToBias(plMipmap* dst) diff --git a/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.cpp index 2df8b6e7..422674ab 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.cpp @@ -64,7 +64,7 @@ plCubicEnvironmap::plCubicEnvironmap() int i; for( i = 0; i < 6; i++ ) - fFaces[ i ] = TRACKED_NEW plMipmap; + fFaces[ i ] = new plMipmap; fInitialized = false; } diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp index a023f5a2..95cf5311 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp @@ -111,9 +111,9 @@ void plDynSurfaceWriter::plWinSurface::Allocate( uint16_t w, uint16_t h ) /// Initialize a bitmap info struct to describe our surface if( IBitsPerPixel() == 8 ) - bmi = (BITMAPINFO *)( TRACKED_NEW uint8_t[ sizeof( BITMAPINFOHEADER ) + sizeof( RGBQUAD ) * 256 ] ); + bmi = (BITMAPINFO *)( new uint8_t[ sizeof( BITMAPINFOHEADER ) + sizeof( RGBQUAD ) * 256 ] ); else - bmi = TRACKED_NEW BITMAPINFO; + bmi = new BITMAPINFO; memset( &bmi->bmiHeader, 0, sizeof( BITMAPINFOHEADER ) ); bmi->bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp index c7b54d22..9d2010bd 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp @@ -237,7 +237,7 @@ void plDynamicTextMap::PurgeImage() uint32_t* plDynamicTextMap::IAllocateOSSurface( uint16_t width, uint16_t height ) { - uint32_t* pixels = TRACKED_NEW uint32_t[ width * height ]; + uint32_t* pixels = new uint32_t[ width * height ]; return pixels; } @@ -281,7 +281,7 @@ uint32_t plDynamicTextMap::Read( hsStream *s ) totalRead += 4; if( initSize > 0 ) { - fInitBuffer = TRACKED_NEW uint32_t[ initSize ]; + fInitBuffer = new uint32_t[ initSize ]; s->ReadLE32( initSize, fInitBuffer ); totalRead += initSize * 4; @@ -334,7 +334,7 @@ void plDynamicTextMap::SetInitBuffer( uint32_t *buffer ) return; } - fInitBuffer = TRACKED_NEW uint32_t[ fVisWidth * fVisHeight ]; + fInitBuffer = new uint32_t[ fVisWidth * fVisHeight ]; memcpy( fInitBuffer, buffer, fVisWidth * fVisHeight * sizeof( uint32_t ) ); } diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp index a2a72bcd..99a90f23 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp @@ -1186,7 +1186,7 @@ hsBool plFont::LoadFromFNTStream( hsStream *stream ) } *charEntries; int i, count = fntInfo.lastChar - fntInfo.firstChar + 2; - charEntries = TRACKED_NEW charEntry[ count ]; + charEntries = new charEntry[ count ]; for( i = 0; i < count; i++ ) { charEntries[ i ].width = stream->ReadLE16(); @@ -1239,7 +1239,7 @@ hsBool plFont::LoadFromFNTStream( hsStream *stream ) // Allocate our bitmap now uint32_t size = widthInBytes * fHeight; - fBMapData = TRACKED_NEW uint8_t[ size ]; + fBMapData = new uint8_t[ size ]; memset( fBMapData, 0, size ); fFirstChar = fntInfo.firstChar; @@ -1542,7 +1542,7 @@ class plBDFCharsParser : public plBDFSectParser if( ch == -1 ) { // Nonstandard encoding, skip the character entirely - return TRACKED_NEW plBDFLookForEndCharParser( fFont, fCallback ); + return new plBDFLookForEndCharParser( fFont, fCallback ); } else { @@ -1633,7 +1633,7 @@ plBDFSectParser *plBDFLookForEndCharParser::ParseKeyword( const char *keyword, p if( strcmp( keyword, "ENDCHAR" ) == 0 ) { // Horray! - return TRACKED_NEW plBDFCharsParser( fFont, fCallback ); + return new plBDFCharsParser( fFont, fCallback ); } // Just gobble lines until we find the endchar section return this; @@ -1649,7 +1649,7 @@ class plBDFLookForCharParser : public plBDFSectParser if( strcmp( keyword, "CHARS" ) == 0 ) { // Horray! - return TRACKED_NEW plBDFCharsParser( fFont, fCallback ); + return new plBDFCharsParser( fFont, fCallback ); } // Just gobble lines until we find the chars section return this; @@ -1677,7 +1677,7 @@ class plBDFPropertiesParser : public plBDFSectParser else if( strcmp( keyword, "ENDPROPERTIES" ) == 0 ) { // Switch to waiting for the chars section - return TRACKED_NEW plBDFLookForCharParser( fFont, fCallback ); + return new plBDFLookForCharParser( fFont, fCallback ); } // All tokens are technically valid, even if we don't recognize them return this; @@ -1743,7 +1743,7 @@ class plBDFHeaderParser : public plBDFSectParser fFont.fWidth = ( ( fFont.fWidth + 7 ) >> 3 ) << 3; // Allocate our data now - fFont.fBMapData = TRACKED_NEW uint8_t[ ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ]; + fFont.fBMapData = new uint8_t[ ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ]; memset( fFont.fBMapData, 0, ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ); fFont.fMaxCharHeight = line.GetInt(); @@ -1755,7 +1755,7 @@ class plBDFHeaderParser : public plBDFSectParser else if( strcmp( keyword, "STARTPROPERTIES" ) == 0 ) { // Start of the properties section, switch to that - return TRACKED_NEW plBDFPropertiesParser( fFont, fCallback ); + return new plBDFPropertiesParser( fFont, fCallback ); } else if( strcmp( keyword, "CHARS" ) == 0 ) { @@ -1767,12 +1767,12 @@ class plBDFHeaderParser : public plBDFSectParser fFont.fWidth = ( ( fFont.fWidth + 7 ) >> 3 ) << 3; // Allocate our data now - fFont.fBMapData = TRACKED_NEW uint8_t[ ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ]; + fFont.fBMapData = new uint8_t[ ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ]; memset( fFont.fBMapData, 0, ( fFont.fWidth * fFont.fHeight * fFont.fBPP ) >> 3 ); } // Start of the char section - return TRACKED_NEW plBDFCharsParser( fFont, fCallback ); + return new plBDFCharsParser( fFont, fCallback ); } else { @@ -1888,7 +1888,7 @@ hsBool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) fseek( fp, 0, SEEK_SET ); // Start with the header parser - plBDFSectParser *currParser = TRACKED_NEW plBDFHeaderParser( *this, callback ); + plBDFSectParser *currParser = new plBDFHeaderParser( *this, callback ); // Read from the stream one line at a time (don't want comments, and char #1 should be invalid for a BDF) while( fgets( line, sizeof( line ), fp ) && currParser != nil ) @@ -1937,7 +1937,7 @@ hsBool plFont::ReadRaw( hsStream *s ) uint32_t size = ( fWidth * fHeight * fBPP ) >> 3; if( size > 0 ) { - fBMapData = TRACKED_NEW uint8_t[ size ]; + fBMapData = new uint8_t[ size ]; s->Read( size, fBMapData ); } else diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp index 4c161ebb..bbc18b9b 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp @@ -174,7 +174,7 @@ void plFontCache::ILoadCustomFonts( void ) { iter2.GetPathAndName( fileName ); - plFont *font = TRACKED_NEW plFont; + plFont *font = new plFont; if( !font->LoadFromP2FFile( fileName ) ) delete font; else @@ -187,7 +187,7 @@ void plFontCache::ILoadCustomFonts( void ) } hsgResMgr::ResMgr()->AddViaNotify( font->GetKey(), - TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, -1 ), + new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, -1 ), plRefFlags::kActiveRef ); //plStatusLog::AddLineS( "pipeline.log", "FontCache: Added custom font %s", keyName ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp index 97e50f58..7c7809ac 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp @@ -72,11 +72,11 @@ plLODMipmap::plLODMipmap(plMipmap* mip) // Need some kind of reffing assignment for the mipmap here fBase = mip; - fLevelSizes = TRACKED_NEW uint32_t[fBase->GetNumLevels()]; + fLevelSizes = new uint32_t[fBase->GetNumLevels()]; ISetup(); - hsgResMgr::ResMgr()->AddViaNotify(mip->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefBase), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->AddViaNotify(mip->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefBase), plRefFlags::kActiveRef); } @@ -152,7 +152,7 @@ void plLODMipmap::ISetup() fRowBytes = fBase->GetRowBytes(); if( !fLevelSizes ) - fLevelSizes = TRACKED_NEW uint32_t[fBase->GetNumLevels()]; + fLevelSizes = new uint32_t[fBase->GetNumLevels()]; fNumLevels = fBase->GetNumLevels() - GetLOD(); fNumLevels = 1; @@ -290,7 +290,7 @@ void plLODMipmap::Read(hsStream *s, hsResMgr *mgr) { INilify(); hsKeyedObject::Read(s, mgr); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefBase), plRefFlags::kActiveRef); // fBase + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefBase), plRefFlags::kActiveRef); // fBase } void plLODMipmap::Write(hsStream *s, hsResMgr *mgr) diff --git a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp index b5a08d22..0db6ed19 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp @@ -156,7 +156,7 @@ void plMipmap::Create( uint32_t width, uint32_t height, unsigned config, uint for( i = 0; i < fNumLevels; i++ ) fTotalSize += fLevelSizes[ i ]; - fImage = (void *)TRACKED_NEW uint8_t[ fTotalSize ]; + fImage = (void *)new uint8_t[ fTotalSize ]; memset(fImage, 0, fTotalSize); SetCurrLevel( 0 ); @@ -249,7 +249,7 @@ uint32_t plMipmap::Read( hsStream *s ) } } - fImage = (void *)TRACKED_NEW uint8_t[ fTotalSize ]; + fImage = (void *)new uint8_t[ fTotalSize ]; #ifdef MEMORY_LEAK_TRACER IAddToMemRecord( this, plRecord::kViaRead ); #endif @@ -389,7 +389,7 @@ void plMipmap::IWriteRawImage( hsStream *stream ) plMipmap *plMipmap::ISplitAlpha() { - plMipmap *retVal = TRACKED_NEW plMipmap(); + plMipmap *retVal = new plMipmap(); retVal->CopyFrom(this); memset( retVal->fImage, 0, fTotalSize ); @@ -451,7 +451,7 @@ plMipmap *plMipmap::IReadRLEImage( hsStream *stream ) uint32_t count,color; bool done = false; - plMipmap *retVal = TRACKED_NEW plMipmap(fWidth,fHeight,plMipmap::kARGB32Config,1); + plMipmap *retVal = new plMipmap(fWidth,fHeight,plMipmap::kARGB32Config,1); uint32_t *curPos = (uint32_t*)retVal->fImage; uint32_t curLoc = 0; @@ -548,12 +548,12 @@ void plMipmap::IWriteJPEGImage( hsStream *stream ) plMipmap *alpha = ISplitAlpha(); uint8_t flags = 0; - hsNullStream *nullStream = TRACKED_NEW hsNullStream(); + hsNullStream *nullStream = new hsNullStream(); IWriteRLEImage(nullStream,this); if (nullStream->GetBytesWritten() < 5120) // we use RLE if it can get the image size under 5k, otherwise we use JPEG flags |= kColorDataRLE; delete nullStream; - nullStream = TRACKED_NEW hsNullStream(); + nullStream = new hsNullStream(); IWriteRLEImage(nullStream,alpha); if (nullStream->GetBytesWritten() < 5120) flags |= kAlphaDataRLE; @@ -598,7 +598,7 @@ void plMipmap::IBuildLevelSizes() delete [] fLevelSizes; - fLevelSizes = TRACKED_NEW uint32_t[ fNumLevels ]; + fLevelSizes = new uint32_t[ fNumLevels ]; memset( fLevelSizes, 0, sizeof( uint32_t ) * fNumLevels ); for( level = 0, width = fWidth, height = fHeight, rowBytes = fRowBytes; level < fNumLevels; level++ ) @@ -752,7 +752,7 @@ void plMipmap::ClipToMaxSize( uint32_t maxDimension ) return; /// Create a new image pointer - destData = TRACKED_NEW uint8_t[ newSize ]; + destData = new uint8_t[ newSize ]; hsAssert( destData != nil, "Out of memory in ClipToMaxSize()" ); memcpy( destData, srcData, newSize ); @@ -783,7 +783,7 @@ void plMipmap::RemoveMipping() /// Create a new image pointer - destData = TRACKED_NEW uint8_t[ fLevelSizes[ 0 ] ]; + destData = new uint8_t[ fLevelSizes[ 0 ] ]; hsAssert( destData != nil, "Out of memory in ClipToMaxSize()" ); memcpy( destData, fImage, fLevelSizes[ 0 ] ); @@ -862,14 +862,14 @@ plFilterMask::plFilterMask( float sig ) if( fExt < 1 ) fExt = 1; - float **m = TRACKED_NEW float *[ ( fExt << 1 ) + 1 ]; + float **m = new float *[ ( fExt << 1 ) + 1 ]; m += fExt; int i, j; float ooSigSq = 1.f / ( sig * sig ); for( i = -fExt; i <= fExt; i++ ) { - m[ i ] = ( TRACKED_NEW float[ ( fExt << 1 ) + 1] ) + fExt; + m[ i ] = ( new float[ ( fExt << 1 ) + 1] ) + fExt; for( j = -fExt; j <= fExt; j++ ) { m[ i ][ j ] = expf( -( i*i + j*j ) * ooSigSq ); @@ -923,7 +923,7 @@ plMipmap::plMipmap( plMipmap *bm, float sig, uint32_t createFlags, fTotalSize += fLevelSizes[ i ]; fCurrLevel = 0; - fImage = (void *)TRACKED_NEW uint8_t[ fTotalSize ]; + fImage = (void *)new uint8_t[ fTotalSize ]; memset(fImage, 0, fTotalSize); memcpy( fImage, bm->fImage, bm->GetLevelSize( 0 ) ); #ifdef MEMORY_LEAK_TRACER @@ -1568,7 +1568,7 @@ void plMipmap::CopyFrom( const plMipmap *source ) fCompressionType = source->fCompressionType; fTotalSize = source->fTotalSize; - fImage = (void *)TRACKED_NEW uint8_t[ fTotalSize ]; + fImage = (void *)new uint8_t[ fTotalSize ]; memcpy( fImage, source->fImage, fTotalSize ); #ifdef MEMORY_LEAK_TRACER IAddToMemRecord( this, plRecord::kViaCopyFrom ); @@ -1606,7 +1606,7 @@ void plMipmap::CopyFrom( const plMipmap *source ) plMipmap *plMipmap::Clone() const { - plMipmap *newMap = TRACKED_NEW plMipmap; + plMipmap *newMap = new plMipmap; newMap->CopyFrom( this ); @@ -2090,7 +2090,7 @@ void plMipmap::ScaleNicely( uint32_t *destPtr, uint16_t destWidth, uint16_t d hsBool plMipmap::ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter ) { // Make a temp buffer - uint32_t *newData = TRACKED_NEW uint32_t[ newWidth * newHeight ]; + uint32_t *newData = new uint32_t[ newWidth * newHeight ]; if( newData == nil ) return false; @@ -2125,7 +2125,7 @@ uint32_t plMipmap::fNumMipmaps = 0; void plMipmap::IAddToMemRecord( plMipmap *mip, plRecord::Method method ) { - plRecord *newRecord = TRACKED_NEW plRecord; + plRecord *newRecord = new plRecord; newRecord->fCompressionType = mip->fCompressionType; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp b/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp index 2fa23ea8..d0746ecb 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp @@ -152,9 +152,9 @@ plMipmap* plPNG::IRead(hsStream* inStream) // Invert color byte-order as used by plMipmap for DirectX png_set_bgr(png_ptr); /// Construct a new mipmap to hold everything - newMipmap = TRACKED_NEW plMipmap(imgWidth, imgHeight, plMipmap::kARGB32Config, 1, plMipmap::kUncompressed); + newMipmap = new plMipmap(imgWidth, imgHeight, plMipmap::kARGB32Config, 1, plMipmap::kUncompressed); char* destp = (char*)newMipmap->GetImage(); - png_bytep* row_ptrs = TRACKED_NEW png_bytep[imgHeight]; + png_bytep* row_ptrs = new png_bytep[imgHeight]; const unsigned int stride = imgWidth * bitdepth * channels / 8; // Assign row pointers to the appropriate locations in the newly-created Mipmap @@ -228,7 +228,7 @@ hsBool plPNG::IWrite(plMipmap* source, hsStream* outStream) // Write out the image metadata png_write_info(png_ptr, info_ptr); char* srcp = (char*)source->GetImage(); - png_bytep* row_ptrs = TRACKED_NEW png_bytep[source->GetHeight()]; + png_bytep* row_ptrs = new png_bytep[source->GetHeight()]; const unsigned int stride = source->GetWidth() * source->GetPixelSize() / 8; // Assign row pointers to the appropriate locations in the newly-created Mipmap diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp index 1a7db1b9..f64acfc7 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp @@ -287,7 +287,7 @@ void plWinFontCache::ILoadCustomFonts( void ) if( numAdded > 0 ) { plStatusLog::AddLineS( "pipeline.log", "WinFontCache: Added custom font %s, %d fonts", fileName, numAdded ); - fCustFonts.Append( TRACKED_NEW plCustFont( fileName ) ); + fCustFonts.Append( new plCustFont( fileName ) ); } else { diff --git a/Sources/Plasma/PubUtilLib/plGLight/plDirectShadowMaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plDirectShadowMaster.cpp index c46dc964..fb46fd45 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plDirectShadowMaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plDirectShadowMaster.cpp @@ -73,9 +73,9 @@ plDirectShadowMaster::~plDirectShadowMaster() plShadowSlave* plDirectShadowMaster::INewSlave(const plShadowCaster* caster) { if( caster->GetPerspective() ) - return TRACKED_NEW plPerspDirSlave; + return new plPerspDirSlave; - return TRACKED_NEW plDirectShadowSlave; + return new plDirectShadowSlave; } plShadowSlave* plDirectShadowMaster::INextSlave(const plShadowCaster* caster) @@ -172,7 +172,7 @@ void plDirectShadowMaster::IComputeISect(const hsBounds3Ext& casterBnd, plShadow fIsectPool.ExpandAndZero(iIsect+1); if( !fIsectPool[iIsect] ) { - fIsectPool[iIsect] = TRACKED_NEW plBoundsIsect; + fIsectPool[iIsect] = new plBoundsIsect; } plBoundsIsect* isect = fIsectPool[iIsect]; diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp index 88a8bf20..fd436149 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp @@ -102,7 +102,7 @@ plLightInfo::plLightInfo() fNextDevPtr = nil; fPrevDevPtr = nil; - fProxyGen = TRACKED_NEW plLightProxy; + fProxyGen = new plLightProxy; fProxyGen->Init(this); fRegisteredForRenderMsg = false; @@ -469,9 +469,9 @@ void plLightInfo::Read(hsStream* s, hsResMgr* mgr) fLocalToWorld = fLightToWorld * fLocalToLight; fWorldToLocal = fLightToLocal * fWorldToLight; - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kProjection), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kProjection), plRefFlags::kActiveRef); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSoftVolume), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSoftVolume), plRefFlags::kActiveRef); // Let our sceneNode know we're here. plKey nodeKey = mgr->ReadKey(s); @@ -481,7 +481,7 @@ void plLightInfo::Read(hsStream* s, hsResMgr* mgr) fVisRegions.SetCountAndZero(n); int i; for( i = 0; i < n; i++ ) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kVisRegion), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kVisRegion), plRefFlags::kActiveRef); SetDirty(true); } @@ -519,7 +519,7 @@ void plLightInfo::ISetSceneNode(plKey node) { if( node ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kLight); + plNodeRefMsg* refMsg = new plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kLight); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef); } if( fSceneNode ) @@ -685,7 +685,7 @@ void plLimitedDirLightInfo::Write(hsStream* s, hsResMgr* mgr) void plLimitedDirLightInfo::IMakeIsect() { if( !fParPlanes ) - fParPlanes = TRACKED_NEW plParallelIsect; + fParPlanes = new plParallelIsect; fParPlanes->SetNumPlanes(3); @@ -752,7 +752,7 @@ plOmniLightInfo::~plOmniLightInfo() void plOmniLightInfo::IMakeIsect() { - fSphere = TRACKED_NEW plSphereIsect; + fSphere = new plSphereIsect; fSphere->SetTransform(fLightToWorld, fWorldToLight); } @@ -925,7 +925,7 @@ void plSpotLightInfo::GetStrengthAndScale(const hsBounds3Ext& bnd, float& streng void plSpotLightInfo::IMakeIsect() { - fCone = TRACKED_NEW plConeIsect; + fCone = new plConeIsect; fCone->SetTransform(fLightToWorld, fWorldToLight); } diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp index 39093cb2..e9a38a1e 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp @@ -59,7 +59,7 @@ hsBool plLightSpace::MsgReceive(plMessage* msg) plKey otherKey = nil; hsBool enter = true; uint8_t ctx = enter ? plRefMsg::kOnRequest : plRefMsg::kOnRemove; - plLightRefMsg* liMsg = TRACKED_NEW plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx); + plLightRefMsg* liMsg = new plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx); plgDispatch::MsgSend(liMsg); return true; } @@ -80,7 +80,7 @@ void plLightSpace::Read(hsStream* s, hsResMgr* mgr) { plMultiModifier::Read(s, mgr); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plLightRefMsg(nil, GetKey(), nil, plRefMsg::kOnCreate), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe(s, new plLightRefMsg(nil, GetKey(), nil, plRefMsg::kOnCreate), plRefFlags::kPassiveRef); } void plLightSpace::Write(hsStream* s, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plGLight/plPointShadowMaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plPointShadowMaster.cpp index e40b2b9e..fae5b86d 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plPointShadowMaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plPointShadowMaster.cpp @@ -107,7 +107,7 @@ plPointShadowMaster::~plPointShadowMaster() plShadowSlave* plPointShadowMaster::INewSlave(const plShadowCaster* caster) { - return TRACKED_NEW plPointShadowSlave; + return new plPointShadowSlave; } void plPointShadowMaster::IBeginRender() @@ -175,7 +175,7 @@ void plPointShadowMaster::IComputeISect(const hsBounds3Ext& bnd, plShadowSlave* fIsectPool.ExpandAndZero(iIsect+1); if( !fIsectPool[iIsect] ) { - fIsectPool[iIsect] = TRACKED_NEW plBoundsIsect; + fIsectPool[iIsect] = new plBoundsIsect; } plBoundsIsect* isect = fIsectPool[iIsect]; diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp index a829b147..910c99f5 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp @@ -198,7 +198,7 @@ hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg) if( fMaxOpacity > 0 ) { - plShadowCastMsg* cast = TRACKED_NEW plShadowCastMsg(GetKey(), this, msg->Pipeline()); + plShadowCastMsg* cast = new plShadowCastMsg(GetKey(), this, msg->Pipeline()); cast->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp index 58ac432e..c62531ee 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp @@ -860,7 +860,7 @@ public: plShadowSlave* slave = fSlavePool[iSlave]; if( !slave ) { - fSlavePool[iSlave] = slave = TRACKED_NEW plShadowSlave; + fSlavePool[iSlave] = slave = new plShadowSlave; fISectPool[iSlave] = INewISect(); } diff --git a/Sources/Plasma/PubUtilLib/plGRenderProcs/hsSfxDistShade.cpp b/Sources/Plasma/PubUtilLib/plGRenderProcs/hsSfxDistShade.cpp index a40af5ce..3e70ec80 100644 --- a/Sources/Plasma/PubUtilLib/plGRenderProcs/hsSfxDistShade.cpp +++ b/Sources/Plasma/PubUtilLib/plGRenderProcs/hsSfxDistShade.cpp @@ -262,7 +262,7 @@ void hsSfxDistShade::Read(hsStream* s) if( cnt ) { - hsSfxDfTableEntry* arr = TRACKED_NEW hsSfxDfTableEntry[cnt]; + hsSfxDfTableEntry* arr = new hsSfxDfTableEntry[cnt]; int i; for( i = 0; i < cnt; i++ ) { diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp index 94bf77c2..37aceddd 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp @@ -207,7 +207,7 @@ void plAvatarInputInterface::IDeactivateCommand(plMouseInfo *info) if (IHasControlFlag(info->fCode) && !(info->fControlFlags & (kControlFlagNoDeactivate | kControlFlagToggle))) { // The mapping is currently on, it's ok to deactivate, and it's not a toggle command - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fNetPropagateToPlayers = info->fControlFlags & kControlFlagNetPropagate; pCmd->fControlActivated = false; pCmd->fControlCode = info->fCode; @@ -240,26 +240,26 @@ void plAvatarInputInterface::IChangeInputMaps( plAvatarInputMap *newMap ) void plAvatarInputInterface::ISetSuspendMovementMode() { - IChangeInputMaps(TRACKED_NEW plSuspendedMovementMap()); + IChangeInputMaps(new plSuspendedMovementMap()); fCurrentCursor = kCursorUp; } void plAvatarInputInterface::ISetLadderMap() { - IChangeInputMaps(TRACKED_NEW plLadderControlMap()); + IChangeInputMaps(new plLadderControlMap()); fCurrentCursor = kCursorUp; } void plAvatarInputInterface::ISetPreLadderMap() { - IChangeInputMaps(TRACKED_NEW plLadderMountMap()); + IChangeInputMaps(new plLadderMountMap()); fCurrentCursor = kCursorUp; } void plAvatarInputInterface::ISetPostLadderMap() { - IChangeInputMaps(TRACKED_NEW plLadderDismountMap()); + IChangeInputMaps(new plLadderDismountMap()); fCurrentCursor = kCursorUp; } @@ -267,9 +267,9 @@ void plAvatarInputInterface::ISetBasicMode() { plAvatarInputMap *map; if (!f3rdPerson) - map = TRACKED_NEW plBasicFirstPersonControlMap(); + map = new plBasicFirstPersonControlMap(); else - map = TRACKED_NEW plBasicThirdPersonControlMap(); + map = new plBasicThirdPersonControlMap(); IChangeInputMaps(map); fCurrentCursor = kCursorUp; @@ -278,11 +278,11 @@ void plAvatarInputInterface::ISetBasicMode() void plAvatarInputInterface::ISetMouseWalkMode(ControlEventCode code) { if (code == S_SET_WALK_BACK_MODE) - IChangeInputMaps(TRACKED_NEW pl3rdWalkBackwardMap()); + IChangeInputMaps(new pl3rdWalkBackwardMap()); else if (code == S_SET_WALK_BACK_LB_MODE) - IChangeInputMaps(TRACKED_NEW pl3rdWalkBackwardLBMap()); + IChangeInputMaps(new pl3rdWalkBackwardLBMap()); else - IChangeInputMaps(TRACKED_NEW pl3rdWalkForwardMap()); + IChangeInputMaps(new pl3rdWalkForwardMap()); fCurrentCursor = kCursorHidden; } @@ -413,7 +413,7 @@ void plAvatarInputInterface::EnableControl(hsBool val, ControlEventCode code) void plAvatarInputInterface::ForceAlwaysRun(hsBool val) { - plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd *pCmd = new plCtrlCmd( this ); pCmd->fControlCode = B_CONTROL_ALWAYS_RUN; pCmd->fControlActivated = val; pCmd->fNetPropagateToPlayers = false; @@ -478,7 +478,7 @@ hsBool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) #if 0 case S_SET_FIRST_PERSON_MODE: if( cmd->fControlActivated ) - IChangeInputMaps( TRACKED_NEW plFirstPersonControlMap() ); + IChangeInputMaps( new plFirstPersonControlMap() ); return true; #endif case S_SET_BASIC_MODE: @@ -486,7 +486,7 @@ hsBool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) { ISetBasicMode(); #if 0 -plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); +plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); plgDispatch::MsgSend(Dmsg); plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy); #endif @@ -506,7 +506,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta abort = true; #if 0 - plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); + plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); plgDispatch::MsgSend(Dmsg); plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy); #endif @@ -531,7 +531,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta abort = true; #if 0 - plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); + plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); plgDispatch::MsgSend(Dmsg); plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy); #endif @@ -556,7 +556,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta abort = true; #if 0 - plProxyDrawMsg* Dmsg = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); + plProxyDrawMsg* Dmsg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | plProxyDrawMsg::kDestroy); plgDispatch::MsgSend(Dmsg); plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Instance()->GetPipeline()->GetDrawableTypeMask() & ~plDrawableSpans::kCameraProxy); #endif @@ -582,14 +582,14 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta if (fMessageQueue[i]->fControlActivated) { // send a 'picked' message to the picked object - plPickedMsg* pPickedMsg = TRACKED_NEW plPickedMsg; + plPickedMsg* pPickedMsg = new plPickedMsg; pPickedMsg->AddReceiver(fCurrentClickable); plgDispatch::MsgSend(pPickedMsg); } else { // send an 'unpicked message' - plPickedMsg* pPickedMsg = TRACKED_NEW plPickedMsg; + plPickedMsg* pPickedMsg = new plPickedMsg; pPickedMsg->AddReceiver(fCurrentClickable); pPickedMsg->fPicked = false; plgDispatch::MsgSend(pPickedMsg); @@ -668,7 +668,7 @@ void plAvatarInputInterface::MissedInputEvent( plInputEventMsg *pMsg ) if( IHasKeyControlFlag( binding.GetCode() ) && binding.GetCode() != B_CONTROL_ALWAYS_RUN ) { - plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd *pCmd = new plCtrlCmd( this ); pCmd->fControlCode = binding.GetCode(); pCmd->fControlActivated = false; pCmd->SetCmdString( binding.GetExtendedString() ); @@ -842,7 +842,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if ((mouseMap->fMap[i]->fControlFlags & kControlFlagRangePos) || (mouseMap->fMap[i]->fControlFlags & kControlFlagRangeNeg)) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = true; pCmd->fControlCode = mouseMap->fMap[i]->fCode; float pct = 0.0f; @@ -872,7 +872,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) } if (mouseMap->fMap[i]->fControlFlags & kControlFlagDelta) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = true; pCmd->fControlCode = mouseMap->fMap[i]->fCode; float pct = 0.0f; @@ -896,7 +896,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) else // if it is an 'always if in box' command see if it's not in the box if ( (mouseMap->fMap[i]->fControlFlags & kControlFlagInBox) && (!CursorInBox(pMouseMsg, mouseMap->fMap[i]->fBox)) ) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = false; pCmd->fControlCode = mouseMap->fMap[i]->fCode; pCmd->fNetPropagateToPlayers = mouseMap->fMap[i]->fControlFlags & kControlFlagNetPropagate; @@ -950,7 +950,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if (!(mouseMap->fMap[i]->fControlFlags & kControlFlagInBox)) SetControlFlag(mouseMap->fMap[i]->fCode); // issue the command - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = true; pCmd->fControlCode = mouseMap->fMap[i]->fCode; pCmd->fNetPropagateToPlayers = mouseMap->fMap[i]->fControlFlags & kControlFlagNetPropagate; @@ -1019,7 +1019,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) plAvatarInputMap::plAvatarInputMap() { - fMouseMap = TRACKED_NEW plMouseMap; + fMouseMap = new plMouseMap; fButtonState = 0; fInterface = plAvatarInputInterface::GetInstance(); @@ -1032,50 +1032,50 @@ plAvatarInputMap::~plAvatarInputMap() plSuspendedMovementMap::plSuspendedMovementMap() : plAvatarInputMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ACTION_MOUSE, kControlFlagLeftButtonEx, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_PICK, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ACTION_MOUSE, kControlFlagLeftButtonEx, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_PICK, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "The Picked key") ); } plBasicControlMap::plBasicControlMap() : plSuspendedMovementMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ROTATE_RIGHT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.95f, 1.0f, 0.0f, 1.0f, "Rotate Player Right") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_ROTATE_LEFT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 0.05f, 0.0f, 1.0f, "Rotate Player Left") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ROTATE_RIGHT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.95f, 1.0f, 0.0f, 1.0f, "Rotate Player Right") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_ROTATE_LEFT, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 0.05f, 0.0f, 1.0f, "Rotate Player Left") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_TURN_TO, kControlFlagLeftButtonEx, 0.05f, 0.95f, 0.0f, 0.95f, "Turn to") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Walk Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_BACK_LB_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.95f, 1.0f, "Set Walk Back LB Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_WALK_BACK_MODE, kControlFlagMiddleButton, 0.05f, 0.95f, 0.0f, 1.0f, "Set Walk Back Mode") ); - - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_UP, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.0f, 0.95f, "set cursor up") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.95f, 1.0f, "set cursor down") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_RIGHT, kControlFlagNormal | kControlFlagInBox, 0.95f, 1.0f, 0.0f, 1.0f, "set cursor right") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_LEFT, kControlFlagNormal | kControlFlagInBox, 0.0f, 0.05f, 0.0f, 1.0f, "set cursor left") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_TURN_TO, kControlFlagLeftButtonEx, 0.05f, 0.95f, 0.0f, 0.95f, "Turn to") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Walk Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_BACK_LB_MODE, kControlFlagLeftButton, 0.05f, 0.95f, 0.95f, 1.0f, "Set Walk Back LB Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_WALK_BACK_MODE, kControlFlagMiddleButton, 0.05f, 0.95f, 0.0f, 1.0f, "Set Walk Back Mode") ); + + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_UP, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.0f, 0.95f, "set cursor up") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.05f, 0.95f, 0.95f, 1.0f, "set cursor down") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_RIGHT, kControlFlagNormal | kControlFlagInBox, 0.95f, 1.0f, 0.0f, 1.0f, "set cursor right") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_LEFT, kControlFlagNormal | kControlFlagInBox, 0.0f, 0.05f, 0.0f, 1.0f, "set cursor left") ); } plLadderControlMap::plLadderControlMap() : plSuspendedMovementMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.0f, 0.5f, "Set Walk Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.5f, 1.0f, "Set Walk Back LB Mode") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.0f, 0.5f, "Set Walk Mode") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton | kControlFlagBoxDisable, 0.0f, 1.0f, 0.5f, 1.0f, "Set Walk Back LB Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_UPWARD, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.0f, 0.5f, "set cursor up") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.5f, 1.0f, "set cursor down") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_UPWARD, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.0f, 0.5f, "set cursor up") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_CURSOR_DOWN, kControlFlagNormal | kControlFlagInBox, 0.0f, 1.0f, 0.5f, 1.0f, "set cursor down") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); } plLadderMountMap::plLadderMountMap() : plSuspendedMovementMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_LADDER_CONTROL, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Ladder Mode") ); } plLadderDismountMap::plLadderDismountMap() : plSuspendedMovementMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagRightButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Set Basic Mode") ); } @@ -1083,22 +1083,22 @@ plLadderDismountMap::plLadderDismountMap() : plSuspendedMovementMap() plBasicThirdPersonControlMap::plBasicThirdPersonControlMap() : plBasicControlMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Freelook Mode") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Freelook Mode") ); } plBasicFirstPersonControlMap::plBasicFirstPersonControlMap() : plBasicControlMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(A_CONTROL_TURN, kControlFlagRightButtonRepeat | kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(A_CONTROL_TURN, kControlFlagRightButtonRepeat | kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_FREELOOK, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagRightButton, 0.05f, 0.95f, 0.0f, 0.95f, "Set Camera first-person z-axis panning") ); } // also used in 1st person walk mode pl3rdWalkMap::pl3rdWalkMap() : plAvatarInputMap() { // control special to this mode. - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MODIFIER_FAST, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Run Modifier" ) ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(A_CONTROL_TURN, kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MODIFIER_FAST, kControlFlagRightButton, 0.0f, 1.0f, 0.0f, 1.0f, "Run Modifier" ) ); + fMouseMap->AddMapping( new plMouseInfo(A_CONTROL_TURN, kControlFlagXAxisEvent | kControlFlagDelta, 0.0f, 1.0f, 0.0f, 1.0f, "Rotate Player") ); plInputManager::SetRecenterMouse(true); plMouseDevice::HideCursor(); @@ -1114,22 +1114,22 @@ pl3rdWalkMap::~pl3rdWalkMap() pl3rdWalkForwardMap::pl3rdWalkForwardMap() : pl3rdWalkMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk forward") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_FORWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk forward") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); } pl3rdWalkBackwardMap::pl3rdWalkBackwardMap() : pl3rdWalkMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagMiddleButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagMiddleButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); } // same as the other backward walk map, but this one is triggered by the left mouse button. pl3rdWalkBackwardLBMap::pl3rdWalkBackwardLBMap() : pl3rdWalkMap() { - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") ); - fMouseMap->AddMapping( TRACKED_NEW plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); + fMouseMap->AddMapping( new plMouseInfo(S_SET_BASIC_MODE, kControlFlagLeftButtonUp, 0.0f, 1.0f, 0.0f, 1.0f, "Third Person") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_MOVE_BACKWARD, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Walk backward") ); + fMouseMap->AddMapping( new plMouseInfo(B_CONTROL_CAMERA_WALK_PAN, kControlFlagLeftButton, 0.0f, 1.0f, 0.0f, 1.0f, "Set Camera first-person z-axis panning") ); } \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plDInputDevice.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plDInputDevice.cpp index 3e48b671..2940a387 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plDInputDevice.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plDInputDevice.cpp @@ -74,7 +74,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) int i = (int)(js->dwData); if (i <= -1) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MOVE_FORWARD ); pMsg->SetControlActivated( true ); plgDispatch::MsgSend( pMsg ); @@ -82,7 +82,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) else if (i >= 1) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD ); pMsg->SetControlActivated( true ); plgDispatch::MsgSend( pMsg ); @@ -90,11 +90,11 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) else if (i == 0) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD ); pMsg->SetControlActivated( false ); plgDispatch::MsgSend( pMsg ); - plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg2 = new plControlEventMsg; pMsg2->SetControlCode( B_CONTROL_MOVE_FORWARD ); pMsg2->SetControlActivated( false ); plgDispatch::MsgSend( pMsg2 ); @@ -106,7 +106,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) { int i = (int)(js->dwData); float f = ((float)i) * 0.001f; - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( A_CONTROL_TURN ); if (f <= 0.02 && f >= -0.02) pMsg->SetControlActivated( false ); @@ -118,7 +118,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_ACTION: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_ACTION ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -126,7 +126,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_MODIFIER_FAST: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MODIFIER_FAST ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -134,7 +134,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_JUMP: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_JUMP ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -142,7 +142,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_STRAFE_LEFT: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_STRAFE_LEFT ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -150,7 +150,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_STRAFE_RIGHT: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_STRAFE_RIGHT); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -158,7 +158,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_EQUIP: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_EQUIP ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -166,7 +166,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_DROP: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_DROP ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -174,7 +174,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_MOVE_FORWARD: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MOVE_FORWARD ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -182,7 +182,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_MOVE_BACKWARD: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_MOVE_BACKWARD ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -190,7 +190,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_ROTATE_RIGHT: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_ROTATE_RIGHT); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -198,7 +198,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_ROTATE_LEFT: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_ROTATE_LEFT ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -206,7 +206,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CONTROL_TURN_TO: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CONTROL_TURN_TO ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -214,7 +214,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) break; case B_CAMERA_RECENTER: { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlCode( B_CAMERA_RECENTER ); pMsg->SetControlActivated(js->dwData & 0x80); plgDispatch::MsgSend(pMsg); @@ -227,12 +227,12 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) float f = ((float)i) * 0.001f; if (f <= 0.02 && f >= -0.02) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlActivated( false ); pMsg->SetControlCode(B_CAMERA_ROTATE_DOWN); pMsg->SetControlPct(0); plgDispatch::MsgSend( pMsg ); - plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg2 = new plControlEventMsg; pMsg2->SetControlActivated( false ); pMsg2->SetControlCode(B_CAMERA_ROTATE_UP); pMsg2->SetControlPct(0); @@ -240,7 +240,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) } else { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlActivated( true ); if (f < 0) pMsg->SetControlCode(B_CAMERA_ROTATE_DOWN); @@ -258,12 +258,12 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) float f = ((float)i) * 0.001f; if (f <= 0.02 && f >= -0.02) { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlActivated( false ); pMsg->SetControlCode(B_CAMERA_ROTATE_RIGHT); pMsg->SetControlPct(0); plgDispatch::MsgSend( pMsg ); - plControlEventMsg* pMsg2 = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg2 = new plControlEventMsg; pMsg2->SetControlActivated( false ); pMsg2->SetControlCode(B_CAMERA_ROTATE_LEFT); pMsg2->SetControlPct(0); @@ -271,7 +271,7 @@ void plDInputDevice::Update(DIDEVICEOBJECTDATA* js) } else { - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; pMsg->SetControlActivated( true ); if (f < 0) pMsg->SetControlCode(B_CAMERA_ROTATE_RIGHT); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp index 900e8e05..c5e73d95 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp @@ -225,7 +225,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if (disable) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate; pCmd->fControlActivated = false; pCmd->fControlCode = fMouseMap.fMap[i]->fCode; @@ -238,7 +238,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if ((fMouseMap.fMap[i]->fControlFlags & kControlFlagRangePos) || (fMouseMap.fMap[i]->fControlFlags & kControlFlagRangeNeg)) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = true; pCmd->fControlCode = fMouseMap.fMap[i]->fCode; float pct = 0.0f; @@ -270,7 +270,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) else // if it is an 'always if in box' command see if it's not in the box if ( (fMouseMap.fMap[i]->fControlFlags & kControlFlagInBox) && (!CursorInBox(pMouseMsg, fMouseMap.fMap[i]->fBox)) ) { - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = false; pCmd->fControlCode = fMouseMap.fMap[i]->fCode; pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate; @@ -310,7 +310,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if (!(fMouseMap.fMap[i]->fControlFlags & kControlFlagInBox)) fControlFlags.SetBit(fMouseMap.fMap[i]->fCode); // issue the command - plCtrlCmd* pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd* pCmd = new plCtrlCmd( this ); pCmd->fControlActivated = true; pCmd->fControlCode = fMouseMap.fMap[i]->fCode; pCmd->fNetPropagateToPlayers = fMouseMap.fMap[i]->fControlFlags & kControlFlagNetPropagate; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp index 90bf9e7a..a5a96fd3 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp @@ -108,7 +108,7 @@ void plKeyboardDevice::ReleaseAllKeys() fKeyboardState[i] = false; // fake a key-up command - plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg; + plKeyEventMsg* pMsg = new plKeyEventMsg; pMsg->SetKeyCode( (plKeyDef)i ); pMsg->SetKeyDown( false ); pMsg->SetShiftKeyDown( fShiftKeyDown ); @@ -128,7 +128,7 @@ void plKeyboardDevice::ReleaseAllKeys() fKeyboardState[KEY_SHIFT] = false; fShiftKeyDown = false; - plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg; + plKeyEventMsg* pMsg = new plKeyEventMsg; pMsg->SetKeyCode( KEY_SHIFT ); pMsg->SetKeyDown( false ); pMsg->SetShiftKeyDown( false ); @@ -142,7 +142,7 @@ void plKeyboardDevice::ReleaseAllKeys() fKeyboardState[KEY_CTRL] = false; fCtrlKeyDown = false; - plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg; + plKeyEventMsg* pMsg = new plKeyEventMsg; pMsg->SetKeyCode( KEY_CTRL ); pMsg->SetKeyDown( false ); pMsg->SetShiftKeyDown( false ); @@ -187,7 +187,7 @@ void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDo } // send a key event... - plKeyEventMsg* pMsg = TRACKED_NEW plKeyEventMsg; + plKeyEventMsg* pMsg = new plKeyEventMsg; pMsg->SetKeyChar( c ); pMsg->SetKeyCode( key ); pMsg->SetKeyDown( bKeyDown ); @@ -405,7 +405,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) } else { - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; pMsg->SetXPos( fXPos ); pMsg->SetYPos( fYPos ); pMsg->SetDX(0); @@ -420,7 +420,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) } else { - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; pMsg->SetXPos( fXPos ); pMsg->SetYPos( fYPos ); pMsg->SetDX(0); @@ -466,7 +466,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) if (pXMsg) { // send a mouse event - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; if (pXMsg->fX == 999) pMsg->SetXPos( fXPos + 0.001f ); else @@ -504,7 +504,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) if (pYMsg) { // send a mouse event - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; pMsg->SetXPos( fXPos ); if (pYMsg->fY == 999) pMsg->SetYPos( fYPos + 0.01f ); @@ -543,7 +543,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) { // send a mouse event - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; pMsg->SetXPos( fXPos ); pMsg->SetYPos( fYPos ); pMsg->SetDX(0); @@ -603,7 +603,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) if (pBMsg->fButton & kRightButtonDblClk) { // right button dbl clicked, send TWO messages - plMouseEventMsg* pMsg2 = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg2 = new plMouseEventMsg; pMsg2->SetXPos( fXPos ); pMsg2->SetYPos( fYPos ); pMsg2->SetDX(0); @@ -621,7 +621,7 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg) if (pBMsg->fButton & kLeftButtonDblClk) { // left button dbl clicked, send TWO messages - plMouseEventMsg* pMsg2 = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg2 = new plMouseEventMsg; pMsg2->SetXPos( fXPos ); pMsg2->SetYPos( fYPos ); pMsg2->SetDX(0); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp index e8ec5adc..bc96cfe9 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp @@ -65,7 +65,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plInputInterface::plInputInterface() { fEnabled = false; - fControlMap = TRACKED_NEW plKeyMap; + fControlMap = new plKeyMap; } plInputInterface::~plInputInterface() @@ -123,7 +123,7 @@ void plInputInterface::IDeactivateBinding(const plKeyBinding *binding) { if( !(binding->GetCodeFlags() & kControlFlagNoDeactivate) && !(binding->GetCodeFlags() & kControlFlagToggle) ) { - plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd *pCmd = new plCtrlCmd( this ); pCmd->fControlCode = binding->GetCode(); pCmd->fControlActivated = false; pCmd->SetCmdString( binding->GetExtendedString() ); @@ -293,7 +293,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) return true; /// OK, generate the message to send - plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this ); + plCtrlCmd *pCmd = new plCtrlCmd( this ); pCmd->fControlCode = binding->GetCode(); pCmd->fControlActivated = activate; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp index dd70e2f4..ee9af82e 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp @@ -158,15 +158,15 @@ void plInputInterfaceMgr::Init( void ) plgDispatch::Dispatch()->RegisterForExactType( plClientMsg::Index(), GetKey() ); /// Hacks (?) for now - plAvatarInputInterface *avatar = TRACKED_NEW plAvatarInputInterface(); + plAvatarInputInterface *avatar = new plAvatarInputInterface(); IAddInterface( avatar ); hsRefCnt_SafeUnRef( avatar ); - plSceneInputInterface *scene = TRACKED_NEW plSceneInputInterface(); + plSceneInputInterface *scene = new plSceneInputInterface(); IAddInterface( scene ); hsRefCnt_SafeUnRef( scene ); - plDebugInputInterface *camDrive = TRACKED_NEW plDebugInputInterface(); + plDebugInputInterface *camDrive = new plDebugInputInterface(); IAddInterface( camDrive ); hsRefCnt_SafeUnRef( camDrive ); @@ -313,7 +313,7 @@ hsBool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty ) if( !fMessageQueue[ i ]->GetSource()->IHandleCtrlCmd( fMessageQueue[ i ] ) ) { // Nope, just dispatch it like normal - plControlEventMsg* pMsg = TRACKED_NEW plControlEventMsg; + plControlEventMsg* pMsg = new plControlEventMsg; for (int j = 0; j < fReceivers.Count(); j++) pMsg->AddReceiver( fReceivers[ j ] ); pMsg->SetControlActivated( fMessageQueue[i]->fControlActivated ); @@ -330,7 +330,7 @@ hsBool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty ) if (fMessageQueue[i]->fNetPropagateToPlayers) { - pMsg = TRACKED_NEW plControlEventMsg; + pMsg = new plControlEventMsg; for (int j = 0; j < fReceivers.Count(); j++) if (fReceivers[j] == plNetClientApp::GetInstance()->GetLocalPlayerKey()) pMsg->AddReceiver( fReceivers[j] ); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp index 14a0b4b5..35145eaa 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp @@ -174,7 +174,7 @@ void plInputManager::RecenterCursor() } void plInputManager::CreateInterfaceMod(plPipeline* p) { - fInterfaceMgr = TRACKED_NEW plInputInterfaceMgr(); + fInterfaceMgr = new plInputInterfaceMgr(); fInterfaceMgr->Init(); } @@ -182,7 +182,7 @@ void plInputManager::InitDInput(HINSTANCE hInst, HWND hWnd) { if (fUseDInput) { - fDInputMgr = TRACKED_NEW plDInputMgr; + fDInputMgr = new plDInputMgr; fDInputMgr->Init(hInst, hWnd); } } @@ -309,7 +309,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM break; case MOUSEWHEEL: { - plMouseEventMsg* pMsg = TRACKED_NEW plMouseEventMsg; + plMouseEventMsg* pMsg = new plMouseEventMsg; int zDelta = GET_WHEEL_DELTA_WPARAM(Wparam); pMsg->SetWheelDelta((float)zDelta); if (zDelta < 0) @@ -339,9 +339,9 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM RECT rect; GetClientRect(hWnd, &rect); - plIMouseXEventMsg* pXMsg = TRACKED_NEW plIMouseXEventMsg; - plIMouseYEventMsg* pYMsg = TRACKED_NEW plIMouseYEventMsg; - plIMouseBEventMsg* pBMsg = TRACKED_NEW plIMouseBEventMsg; + plIMouseXEventMsg* pXMsg = new plIMouseXEventMsg; + plIMouseYEventMsg* pYMsg = new plIMouseYEventMsg; + plIMouseBEventMsg* pBMsg = new plIMouseBEventMsg; pXMsg->fWx = LOWORD(Lparam); pXMsg->fX = (float)LOWORD(Lparam) / (float)rect.right; @@ -466,7 +466,7 @@ void plInputManager::AddInputDevice( plInputDevice *pDev ) plDInputMgr::plDInputMgr() : fDI(nil) { - fDI = TRACKED_NEW plDInput; + fDI = new plDInput; } plDInputMgr::~plDInputMgr() @@ -503,7 +503,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd) // set up the action mapping - fDI->fActionFormat = TRACKED_NEW DIACTIONFORMAT; + fDI->fActionFormat = new DIACTIONFORMAT; fDI->fActionFormat->dwSize = sizeof(DIACTIONFORMAT); fDI->fActionFormat->dwActionSize = sizeof(DIACTION); fDI->fActionFormat->dwDataSize = NUM_ACTIONS * sizeof(DWORD); @@ -527,7 +527,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd) for (i = 0; i < fDI->fSticks.Count(); i++) { - fDI->fSticks[i]->fCaps = TRACKED_NEW DIDEVCAPS; + fDI->fSticks[i]->fCaps = new DIDEVCAPS; fDI->fSticks[i]->fCaps->dwSize = sizeof(DIDEVCAPS); hr = fDI->fSticks[i]->fDevice->GetCapabilities(fDI->fSticks[i]->fCaps); hsAssert(!hr, "Unable to acquire devcaps in DInput Device!"); @@ -538,7 +538,7 @@ void plDInputMgr::Init(HINSTANCE hInst, HWND hWnd) fhWnd = hWnd; for (i = 0; i < fDI->fSticks.Count(); i++) - fInputDevice.Append( TRACKED_NEW plDInputDevice ); + fInputDevice.Append( new plDInputDevice ); } void plDInputMgr::Update() @@ -632,7 +632,7 @@ int __stdcall plDInputMgr::EnumGamepadCallback(const DIDEVICEINSTANCE* device, v if(!FAILED(hr)) { - pDI->fSticks.Append(TRACKED_NEW plDIDevice(fStick)); + pDI->fSticks.Append(new plDIDevice(fStick)); // the following code pertaining to the action map shouldn't be here. // in fact this shouldn't work at all according to MS, but this is diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp index a00e6f3c..25605709 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp @@ -149,7 +149,7 @@ void plSceneInputInterface::Init( plInputInterfaceMgr *manager ) fPendingLink = false; // register for control messages - plCmdIfaceModMsg* pModMsg = TRACKED_NEW plCmdIfaceModMsg; + plCmdIfaceModMsg* pModMsg = new plCmdIfaceModMsg; pModMsg->SetBCastFlag(plMessage::kBCastByExactType); pModMsg->SetSender(fManager->GetKey()); pModMsg->SetCmd(plCmdIfaceModMsg::kAdd); @@ -179,7 +179,7 @@ void plSceneInputInterface::ClearClickableMap() void plSceneInputInterface::IHalfFadeAvatar(hsBool out) { - plIfaceFadeAvatarMsg* pMsg = TRACKED_NEW plIfaceFadeAvatarMsg(); + plIfaceFadeAvatarMsg* pMsg = new plIfaceFadeAvatarMsg(); pMsg->SetSubjectKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); pMsg->SetBCastFlag(plMessage::kBCastByExactType); pMsg->SetBCastFlag(plMessage::kNetPropagate, FALSE); @@ -224,7 +224,7 @@ hsBool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty ) int i; for (i=0; i < fClickableMap.Count(); i++) { - plFakeOutMsg *pMsg = TRACKED_NEW plFakeOutMsg; + plFakeOutMsg *pMsg = new plFakeOutMsg; pMsg->SetSender( fManager->GetKey() ); pMsg->AddReceiver( fClickableMap[i]->key ); plgDispatch::MsgSend( pMsg ); @@ -295,7 +295,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) fCurrentClickableLogicMod = pLogicMod->GetKey(); fCurrentClickPoint = pLOSMsg->fHitPoint; for (int x = 0; x < pMod->GetNumReferencedKeys(); x++) - fClickableMap.Append( TRACKED_NEW clickableTest(pMod->GetReferencedKey(x))); + fClickableMap.Append( new clickableTest(pMod->GetReferencedKey(x))); } else { @@ -626,7 +626,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) { // tell them to ignore us - plInputIfaceMgrMsg* pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); + plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); @@ -636,7 +636,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) // and tell them to ignore our victim - //plInputIfaceMgrMsg* pMsg2 = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); + //plInputIfaceMgrMsg* pMsg2 = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); //pMsg2->SetAvKey(fOffereeKey); //pMsg2->SetBCastFlag(plMessage::kNetPropagate); //pMsg2->SetBCastFlag(plMessage::kNetForce); @@ -650,7 +650,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) { if (fGUIIgnoredAvatars[x] == plNetClientMgr::GetInstance()->GetLocalPlayerKey()) { - plInputIfaceMgrMsg* pMsg3 = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable); + plInputIfaceMgrMsg* pMsg3 = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable); pMsg3->SetAvKey(fGUIIgnoredAvatars[x]); pMsg3->SetBCastFlag(plMessage::kNetPropagate); pMsg3->SetBCastFlag(plMessage::kNetForce); @@ -916,14 +916,14 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint ) // Send an "un-picked" message to it if( !fLastClickIsAvatar ) { - plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg; + plPickedMsg *pPickedMsg = new plPickedMsg; pPickedMsg->AddReceiver( fLastClicked ); pPickedMsg->fPicked = false; plgDispatch::MsgSend( pPickedMsg ); } else { - plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg; + plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg; pMsg->SetAvatarKey( nil ); plgDispatch::MsgSend( pMsg ); } @@ -936,7 +936,7 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint ) { #ifdef MATT_WAS_HERE // now we send pick messages to avatars as well... - plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg; + plPickedMsg *pPickedMsg = new plPickedMsg; pPickedMsg->AddReceiver( fLastClicked ); pPickedMsg->fHitPoint = hitPoint; plgDispatch::MsgSend( pPickedMsg ); @@ -944,7 +944,7 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint ) // if it's an avatar, we also send this thing if(fLastClickIsAvatar) { - plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg; + plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg; pMsg->SetAvatarKey( fLastClicked ); plgDispatch::MsgSend( pMsg ); } @@ -952,14 +952,14 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint ) // Send a "picked" message to it if( !fLastClickIsAvatar ) { - plPickedMsg *pPickedMsg = TRACKED_NEW plPickedMsg; + plPickedMsg *pPickedMsg = new plPickedMsg; pPickedMsg->AddReceiver( fLastClicked ); pPickedMsg->fHitPoint = hitPoint; plgDispatch::MsgSend( pPickedMsg ); } else { - plRemoteAvatarInfoMsg *pMsg = TRACKED_NEW plRemoteAvatarInfoMsg; + plRemoteAvatarInfoMsg *pMsg = new plRemoteAvatarInfoMsg; pMsg->SetAvatarKey( fLastClicked ); plgDispatch::MsgSend( pMsg ); } @@ -1074,9 +1074,9 @@ void plSceneInputInterface::IManageIgnoredAvatars(plKey& offeree, hsBool add) // tell everyone else to be able to / not to be able to select this avatar plInputIfaceMgrMsg* pMsg = 0; if (!add) - pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable); + pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable); else - pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); + pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); pMsg->SetAvKey(offeree); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); @@ -1112,7 +1112,7 @@ void plSceneInputInterface::ISendOfferNotification(plKey& offeree, int ID, hsBoo delete [] members; } - plNotifyMsg* pMsg = TRACKED_NEW plNotifyMsg; + plNotifyMsg* pMsg = new plNotifyMsg; pMsg->AddOfferBookEvent(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), ID, offereeID); pMsg->AddReceiver(fBookKey); if (net) @@ -1135,9 +1135,9 @@ void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled) { plInputIfaceMgrMsg* pMsg = 0; if (enabled) - pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable); + pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable); else - pMsg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); + pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); @@ -1170,12 +1170,12 @@ void plSceneInputInterface::IRequestLOSCheck( float xPos, float yPos, int ID plLOSRequestMsg* pMsg; if(ID == ID_FIND_CLICKABLE) { - pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest ); + pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBUIItems, plLOSRequestMsg::kTestClosest ); pMsg->SetCullDB(plSimDefs::kLOSDBUIBlockers); } else if(ID == ID_FIND_WALKABLE_GROUND) { - pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBAvatarWalkable, plLOSRequestMsg::kTestClosest); + pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBAvatarWalkable, plLOSRequestMsg::kTestClosest); } else - pMsg = TRACKED_NEW plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBLocalAvatar, plLOSRequestMsg::kTestClosest); + pMsg = new plLOSRequestMsg( fManager->GetKey(), startPos, endPos, plSimDefs::kLOSDBLocalAvatar, plLOSRequestMsg::kTestClosest); pMsg->SetReportType( plLOSRequestMsg::kReportHitOrMiss ); diff --git a/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp b/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp index 820f80aa..b87b8e45 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp @@ -48,9 +48,9 @@ plATCEaseCurve *plATCEaseCurve::CreateEaseCurve(uint8_t type, float minLength, f float startSpeed, float goalSpeed) { if (type == plAnimEaseTypes::kConstAccel) - return TRACKED_NEW plConstAccelEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed); + return new plConstAccelEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed); if (type == plAnimEaseTypes::kSpline) - return TRACKED_NEW plSplineEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed); + return new plSplineEaseCurve(minLength, maxLength, length, startSpeed, goalSpeed); return nil; } @@ -162,7 +162,7 @@ plConstAccelEaseCurve::plConstAccelEaseCurve(float minLength, float maxLength, f plATCEaseCurve *plConstAccelEaseCurve::Clone() const { - plConstAccelEaseCurve *curve = TRACKED_NEW plConstAccelEaseCurve; + plConstAccelEaseCurve *curve = new plConstAccelEaseCurve; curve->fStartSpeed = fStartSpeed; curve->fMinLength = fMinLength; curve->fMaxLength = fMaxLength; @@ -217,7 +217,7 @@ plSplineEaseCurve::plSplineEaseCurve(float minLength, float maxLength, float len plATCEaseCurve *plSplineEaseCurve::Clone() const { - plSplineEaseCurve *curve = TRACKED_NEW plSplineEaseCurve; + plSplineEaseCurve *curve = new plSplineEaseCurve; curve->fStartSpeed = fStartSpeed; curve->fMinLength = fMinLength; curve->fMaxLength = fMaxLength; diff --git a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp index ae6be40f..ccf20b3b 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp @@ -97,15 +97,15 @@ void plAnimTimeConvert::Init(plATCAnim *anim, plAGAnimInstance *instance, plAGMa { // Set up our eval callbacks plAGInstanceCallbackMsg *instMsg; - instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kStart); + instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kStart); instMsg->fInstance = instance; AddCallback(instMsg); hsRefCnt_SafeUnRef(instMsg); - instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kStop); + instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kStop); instMsg->fInstance = instance; AddCallback(instMsg); hsRefCnt_SafeUnRef(instMsg); - instMsg = TRACKED_NEW plAGInstanceCallbackMsg(master->GetKey(), kSingleFrameAdjust); + instMsg = new plAGInstanceCallbackMsg(master->GetKey(), kSingleFrameAdjust); instMsg->fInstance = instance; AddCallback(instMsg); hsRefCnt_SafeUnRef(instMsg); @@ -197,7 +197,7 @@ void plAnimTimeConvert::ResizeStates(int cnt) while (cnt>fStates.size()) { - fStates.push_back(TRACKED_NEW plATCState); + fStates.push_back(new plATCState); } hsAssert(fStates.size()==cnt, "state resize mismatch"); @@ -358,7 +358,7 @@ plAnimTimeConvert& plAnimTimeConvert::IProcessStateChange(double worldTime, floa return *this; // Sorry... state saves only work in the forward direction fLastStateChange = worldTime; - plATCState *state = TRACKED_NEW plATCState; + plATCState *state = new plATCState; state->fStartWorldTime = fLastStateChange; state->fStartAnimTime = (animTime < 0 ? WorldToAnimTimeNoUpdate(fLastStateChange) : animTime); diff --git a/Sources/Plasma/PubUtilLib/plInterp/plController.cpp b/Sources/Plasma/PubUtilLib/plInterp/plController.cpp index 439a790a..94aa1ca6 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plController.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plController.cpp @@ -224,7 +224,7 @@ void plLeafController::Interp(float time, hsColorRGBA* result, plControllerCache plControllerCacheInfo *plLeafController::CreateCache() const { - plControllerCacheInfo *cache = TRACKED_NEW plControllerCacheInfo; + plControllerCacheInfo *cache = new plControllerCacheInfo; cache->fNumSubControllers = 0; return cache; } @@ -413,51 +413,51 @@ void plLeafController::AllocKeys(uint32_t numKeys, uint8_t type) switch (fType) { case hsKeyFrame::kPoint3KeyFrame: - fKeys = TRACKED_NEW hsPoint3Key[fNumKeys]; + fKeys = new hsPoint3Key[fNumKeys]; break; case hsKeyFrame::kBezPoint3KeyFrame: - fKeys = TRACKED_NEW hsBezPoint3Key[fNumKeys]; + fKeys = new hsBezPoint3Key[fNumKeys]; break; case hsKeyFrame::kScalarKeyFrame: - fKeys = TRACKED_NEW hsScalarKey[fNumKeys]; + fKeys = new hsScalarKey[fNumKeys]; break; case hsKeyFrame::kBezScalarKeyFrame: - fKeys = TRACKED_NEW hsBezScalarKey[fNumKeys]; + fKeys = new hsBezScalarKey[fNumKeys]; break; case hsKeyFrame::kScaleKeyFrame: - fKeys = TRACKED_NEW hsScaleKey[fNumKeys]; + fKeys = new hsScaleKey[fNumKeys]; break; case hsKeyFrame::kBezScaleKeyFrame: - fKeys = TRACKED_NEW hsBezScaleKey[fNumKeys]; + fKeys = new hsBezScaleKey[fNumKeys]; break; case hsKeyFrame::kQuatKeyFrame: - fKeys = TRACKED_NEW hsQuatKey[fNumKeys]; + fKeys = new hsQuatKey[fNumKeys]; break; case hsKeyFrame::kCompressedQuatKeyFrame32: - fKeys = TRACKED_NEW hsCompressedQuatKey32[fNumKeys]; + fKeys = new hsCompressedQuatKey32[fNumKeys]; break; case hsKeyFrame::kCompressedQuatKeyFrame64: - fKeys = TRACKED_NEW hsCompressedQuatKey64[fNumKeys]; + fKeys = new hsCompressedQuatKey64[fNumKeys]; break; case hsKeyFrame::k3dsMaxKeyFrame: - fKeys = TRACKED_NEW hsG3DSMaxKeyFrame[fNumKeys]; + fKeys = new hsG3DSMaxKeyFrame[fNumKeys]; break; case hsKeyFrame::kMatrix33KeyFrame: - fKeys = TRACKED_NEW hsMatrix33Key[fNumKeys]; + fKeys = new hsMatrix33Key[fNumKeys]; break; case hsKeyFrame::kMatrix44KeyFrame: - fKeys = TRACKED_NEW hsMatrix44Key[fNumKeys]; + fKeys = new hsMatrix44Key[fNumKeys]; break; case hsKeyFrame::kUnknownKeyFrame: @@ -879,9 +879,9 @@ hsBool plCompoundController::PurgeRedundantSubcontrollers() plControllerCacheInfo* plCompoundController::CreateCache() const { - plControllerCacheInfo* cache = TRACKED_NEW plControllerCacheInfo; + plControllerCacheInfo* cache = new plControllerCacheInfo; cache->fNumSubControllers = 3; - cache->fSubControllers = TRACKED_NEW plControllerCacheInfo*[cache->fNumSubControllers]; + cache->fSubControllers = new plControllerCacheInfo*[cache->fNumSubControllers]; int i; for (i = 0; i < cache->fNumSubControllers; i++) cache->fSubControllers[i] = (GetController(i) ? GetController(i)->CreateCache() : nil); diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp index 2a4e60be..84fd9931 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp @@ -65,7 +65,7 @@ void plHardRegionComplex::Read(hsStream* s, hsResMgr* mgr) int n = s->ReadLE32(); int i; for( i = 0; i < n; i++ ) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSubRegion), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSubRegion), plRefFlags::kActiveRef); } void plHardRegionComplex::Write(hsStream* s, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp index 9a221f78..5734fdd4 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp @@ -129,7 +129,7 @@ void plSoftVolumeComplex::Read(hsStream* s, hsResMgr* mgr) int n = s->ReadLE32(); int i; for( i = 0; i < n; i++ ) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSubVolume), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kSubVolume), plRefFlags::kActiveRef); } void plSoftVolumeComplex::Write(hsStream* s, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp index b5b4a309..0daea115 100644 --- a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp +++ b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp @@ -143,7 +143,7 @@ plMipmap *plJPEG::IRead( hsStream *inStream ) /// JPEG stream into a separate buffer before we can decode it. Which means we ALSO /// have to write/read a length of said buffer. Such is life, I guess... jpegSourceSize = inStream->ReadLE32(); - jpegSourceBuffer = TRACKED_NEW uint8_t[ jpegSourceSize ]; + jpegSourceBuffer = new uint8_t[ jpegSourceSize ]; if( jpegSourceBuffer == nil ) { // waah. @@ -183,7 +183,7 @@ plMipmap *plJPEG::IRead( hsStream *inStream ) (void) jpeg_start_decompress( &cinfo ); /// Construct a new mipmap to hold everything - newMipmap = TRACKED_NEW plMipmap( cinfo.output_width, cinfo.output_height, plMipmap::kRGB32Config, 1, plMipmap::kJPEGCompression ); + newMipmap = new plMipmap( cinfo.output_width, cinfo.output_height, plMipmap::kRGB32Config, 1, plMipmap::kJPEGCompression ); if( newMipmap == nil || newMipmap->GetImage() == nil ) { @@ -194,7 +194,7 @@ plMipmap *plJPEG::IRead( hsStream *inStream ) JSAMPROW jbuffer; int row_stride = cinfo.output_width * cinfo.output_components; int out_stride = cinfo.output_width * 4; // Decompress to RGBA - jbuffer = TRACKED_NEW JSAMPLE[row_stride]; + jbuffer = new JSAMPLE[row_stride]; uint8_t *destp = (uint8_t *)newMipmap->GetImage(); while( cinfo.output_scanline < cinfo.output_height ) @@ -255,7 +255,7 @@ plMipmap* plJPEG::ReadFromFile( const wchar_t *fileName ) // so insert that into the stream before passing it on in.FastFwd(); uint32_t fsize = in.GetPosition(); - uint8_t *tempbuffer = TRACKED_NEW uint8_t[fsize]; + uint8_t *tempbuffer = new uint8_t[fsize]; in.Rewind(); in.Read(fsize, tempbuffer); tempstream.WriteLE32(fsize); @@ -292,7 +292,7 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream ) // Create a buffer to hold the data jpgBufferSize = source->GetWidth() * source->GetHeight() * 3; - jpgBuffer = TRACKED_NEW uint8_t[ jpgBufferSize ]; + jpgBuffer = new uint8_t[ jpgBufferSize ]; if( jpgBuffer == nil ) { ERREXIT1( &cinfo, JERR_OUT_OF_MEMORY, 0 ); @@ -325,7 +325,7 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream ) JSAMPROW jbuffer; int in_stride = cinfo.image_width * 4; // Input is always RGBA int row_stride = cinfo.image_width * cinfo.input_components; - jbuffer = TRACKED_NEW JSAMPLE[row_stride]; + jbuffer = new JSAMPLE[row_stride]; uint8_t *srcp = (uint8_t *)source->GetImage(); while( cinfo.next_scanline < cinfo.image_height ) @@ -385,7 +385,7 @@ hsBool plJPEG::WriteToFile( const wchar_t *fileName, plMipmap *sourceData ) // so remove that from the stream before saving to a file tempstream.Rewind(); uint32_t fsize = tempstream.ReadLE32(); - uint8_t *tempbuffer = TRACKED_NEW uint8_t[fsize]; + uint8_t *tempbuffer = new uint8_t[fsize]; tempstream.Read(fsize, tempbuffer); out.Write(fsize, tempbuffer); diff --git a/Sources/Plasma/PubUtilLib/plMath/hsNoiseFunc.cpp b/Sources/Plasma/PubUtilLib/plMath/hsNoiseFunc.cpp index 2dfe5c02..7e3a43dc 100644 --- a/Sources/Plasma/PubUtilLib/plMath/hsNoiseFunc.cpp +++ b/Sources/Plasma/PubUtilLib/plMath/hsNoiseFunc.cpp @@ -78,7 +78,7 @@ void hsTableNoise::SetTable(int len, float* arr) return; } - fTable = TRACKED_NEW float[len+2]; + fTable = new float[len+2]; int i; for( i = 0; i < len; i++ ) diff --git a/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h b/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h index 4ce78586..b5e36315 100644 --- a/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h +++ b/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h @@ -123,9 +123,9 @@ template hsSearchVersion::hsSearchVersion(uint32_t len, uint32_t in { fIncIndex = inc ? inc : len; fLength = len; - fArray = TRACKED_NEW hsVersionNode*[fLength]; + fArray = new hsVersionNode*[fLength]; HSMemory::Clear(fArray, fLength*sizeof(*fArray)); - fBackArray = TRACKED_NEW T*[fNumIndex = fLength]; + fBackArray = new T*[fNumIndex = fLength]; } template hsSearchVersion::~hsSearchVersion() @@ -141,7 +141,7 @@ template void hsSearchVersion::ICheckBackArray() { if( fNextIndex >= fNumIndex ) { - T** newBackArray = TRACKED_NEW T*[fNumIndex + fIncIndex]; + T** newBackArray = new T*[fNumIndex + fIncIndex]; HSMemory::BlockMove(fBackArray, newBackArray, fNextIndex*sizeof(T*)); delete [] fBackArray; fBackArray = newBackArray; @@ -157,7 +157,7 @@ template int32_t hsSearchVersion::Find(int where, const T&what, hsB if( !curr ) { - hsVersionNode* next = TRACKED_NEW hsVersionNode(fNextIndex, what); + hsVersionNode* next = new hsVersionNode(fNextIndex, what); fArray[where] = next; fBackArray[fNextIndex] = &next->GetData(); return fNextIndex++; @@ -172,7 +172,7 @@ template int32_t hsSearchVersion::Find(int where, const T&what, hsB if( curr->Next() ) return curr->Next()->Index(); - hsVersionNode* next = TRACKED_NEW hsVersionNode(fNextIndex, what); + hsVersionNode* next = new hsVersionNode(fNextIndex, what); curr->Append(next); fBackArray[fNextIndex] = &next->GetData(); return fNextIndex++; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h index 3517248e..e4e6b451 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h @@ -301,7 +301,7 @@ public: \param type The "verb" for the command - next stage, previous stage, goto stage \param stage The stage we're going to, if this is a goto command \param setTime Do we want to manually set the time on the target stage? - \param newTime If setTime is true, this is the TRACKED_NEW (local) time used in the target stage + \param newTime If setTime is true, this is the new (local) time used in the target stage \param setDirection Do we want to set the overall brain direction? \param isForward If setDirection is true, then true = forward, false = backward \param transitionTime Time in seconds to transition between stages. diff --git a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp index 28514c4d..a2112896 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp @@ -123,7 +123,7 @@ void plDynamicTextMsg::DrawString( int16_t x, int16_t y, const wchar_t *text fCmd &= ~( kStringCmds | kPosCmds ); fCmd |= kDrawString; - fString = TRACKED_NEW wchar_t[wcslen(text)+1]; + fString = new wchar_t[wcslen(text)+1]; wcscpy( fString, text ); fString[wcslen(text)] = L'\0'; fX = x; @@ -143,7 +143,7 @@ void plDynamicTextMsg::DrawClippedString( int16_t x, int16_t y, uint16_t clip fCmd &= ~( kStringCmds | kPosCmds | kRectCmds ); fCmd |= kDrawClippedString; - fString = TRACKED_NEW wchar_t[wcslen(text)+1]; + fString = new wchar_t[wcslen(text)+1]; wcscpy( fString, text ); fString[wcslen(text)] = L'\0'; fX = x; @@ -168,7 +168,7 @@ void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrap fCmd &= ~( kStringCmds | kPosCmds | kRectCmds ); fCmd |= kDrawWrappedString; - fString = TRACKED_NEW wchar_t[wcslen(text)+1]; + fString = new wchar_t[wcslen(text)+1]; wcscpy( fString, text ); fString[wcslen(text)] = L'\0'; fX = x; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp index 1f337eea..3d51511b 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp @@ -56,7 +56,7 @@ void plLoadAgeMsg::Read(hsStream* stream, hsResMgr* mgr) stream->ReadLE(&len); if (len) { - fAgeFilename=TRACKED_NEW char[len+1]; + fAgeFilename=new char[len+1]; stream->Read(len, fAgeFilename); fAgeFilename[len]=0; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp index c4848012..30a1b5f5 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp @@ -226,7 +226,7 @@ void plLoadAvatarMsg::SetUserStr(const char *userStr) return; } - fUserStr = TRACKED_NEW char[strlen(userStr) + 1]; + fUserStr = new char[strlen(userStr) + 1]; strcpy(fUserStr, userStr); fUserStr[strlen(userStr)] = '\0'; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plOneShotMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plOneShotMsg.cpp index c839df16..240bfe1e 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plOneShotMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plOneShotMsg.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plOneShotMsg::plOneShotMsg() { - fCallbacks = TRACKED_NEW plOneShotCallbacks; + fCallbacks = new plOneShotCallbacks; } plOneShotMsg::~plOneShotMsg() diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp index 7b1cdc5e..41d7c554 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp @@ -77,7 +77,7 @@ void plAnimEventModifier::Read(hsStream* stream, hsResMgr* mgr) // plKey animKey = fCallback->GetReceiver(0); hsgResMgr::ResMgr()->AddViaNotify(animKey, - TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), + new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kPassiveRef); } @@ -128,7 +128,7 @@ void plAnimEventModifier::ISendNotify(bool triggered) { if (fDisabled) return; - plNotifyMsg* notify = TRACKED_NEW plNotifyMsg; + plNotifyMsg* notify = new plNotifyMsg; // Setup the event data in case this is a OneShot responder that needs it plKey playerKey = plNetClientApp::GetInstance()->GetLocalPlayerKey(); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp index 33e1fc1b..19dfd491 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp @@ -88,7 +88,7 @@ class plAxisInputInterface : public plInputInterface if( pMMsg->GetButton() == kLeftButtonUp ) { // Remove ourselves from the stack - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( this ); plgDispatch::MsgSend( msg ); return true; @@ -112,8 +112,8 @@ fYPos(0.0f), fIface(0), fAllOrNothing(false) { - fNotify = TRACKED_NEW plNotifyMsg; - fInputIface = TRACKED_NEW plAxisInputInterface( this ); + fNotify = new plNotifyMsg; + fInputIface = new plAxisInputInterface( this ); } plAxisAnimModifier::~plAxisAnimModifier() { @@ -172,7 +172,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fYPos = plMouseDevice::Instance()->GetCursorY(); // Insert our input interface onto the input stack - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); msg->SetIFace( fInputIface ); plgDispatch::MsgSend( msg ); } @@ -183,7 +183,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fActive = false; // Remove our input interface from the input stack - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( fInputIface ); plgDispatch::MsgSend( msg ); } @@ -201,7 +201,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) { if (pMMsg->GetDX() > 0.05f) return true; - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->AddReceiver(fXAnim); pMsg->SetAnimName(fAnimLabel.c_str()); // pMsg->SetAnimName() @@ -221,7 +221,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) if (pMMsg->GetDY() > 0.05f) return true; - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->AddReceiver(fYAnim); pMsg->SetAnimName(fAnimLabel.c_str()); if (fYPos > pMMsg->GetYPos()) @@ -233,7 +233,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fActive = false; // Remove our input interface from the input stack - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( fInputIface ); plgDispatch::MsgSend( msg ); plInputManager::SetRecenterMouse(false); @@ -252,7 +252,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fActive = false; // Remove our input interface from the input stack - plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); msg->SetIFace( fInputIface ); plgDispatch::MsgSend( msg ); @@ -287,17 +287,17 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fXAnim = pRefMsg->GetRef()->GetKey(); // add callbacks for beginning and end of animation - plEventCallbackMsg* pCall1 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall1 = new plEventCallbackMsg; pCall1->fEvent = kBegin; pCall1->fRepeats = -1; pCall1->AddReceiver(GetKey()); - plEventCallbackMsg* pCall2 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall2 = new plEventCallbackMsg; pCall2->fEvent = kEnd; pCall2->fRepeats = -1; pCall2->AddReceiver(GetKey()); - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); pMsg->AddCallback(pCall1); pMsg->AddCallback(pCall2); @@ -315,17 +315,17 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) fYAnim = pRefMsg->GetRef()->GetKey(); // add callbacks for beginning and end of animation - plEventCallbackMsg* pCall1 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall1 = new plEventCallbackMsg; pCall1->fEvent = kBegin; pCall1->fRepeats = -1; pCall1->AddReceiver(GetKey()); - plEventCallbackMsg* pCall2 = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg* pCall2 = new plEventCallbackMsg; pCall2->fEvent = kEnd; pCall2->fRepeats = -1; pCall2->AddReceiver(GetKey()); - plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* pMsg = new plAnimCmdMsg; pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); pMsg->AddCallback(pCall1); pMsg->AddCallback(pCall2); @@ -365,9 +365,9 @@ void plAxisAnimModifier::Read(hsStream* s, hsResMgr* mgr) { plSingleModifier::Read(s, mgr); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeX), plRefFlags::kPassiveRef); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeY), plRefFlags::kPassiveRef); - mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeLogic), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeX), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeY), plRefFlags::kPassiveRef); + mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeLogic), plRefFlags::kPassiveRef); fAllOrNothing = s->ReadBool(); plNotifyMsg* pMsg = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(s)); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp index c75c616b..47102826 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp @@ -111,18 +111,18 @@ plKey plCloneSpawnModifier::SpawnClone(const char* cloneName, const char* cloneA if (key) { - plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(objUoid, requestor, 0); + plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(objUoid, requestor, 0); cloneMsg->SetBCastFlag(plMessage::kMsgWatch); plKey cloneKey = cloneMsg->GetCloneKey();//resMgr->CloneKey(key); cloneMsg->Send(); // Put the clone into the clone room, which also forces it to load. plKey cloneNodeKey = resMgr->FindKey(kNetClientCloneRoom_KEY); - plNodeRefMsg* nodeRefCloneMsg = TRACKED_NEW plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); + plNodeRefMsg* nodeRefCloneMsg = new plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); resMgr->AddViaNotify(cloneKey, nodeRefCloneMsg, plRefFlags::kActiveRef); // Warp it into position - plWarpMsg *warpMsg = TRACKED_NEW plWarpMsg; + plWarpMsg *warpMsg = new plWarpMsg; warpMsg->AddReceiver(cloneKey); warpMsg->SetTransform(pos); plgDispatch::MsgSend(warpMsg); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp index 338451b8..9799fba4 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp @@ -79,7 +79,7 @@ hsBool plDecalEnableMod::MsgReceive(plMessage* msg) int i; for( i = 0; i < fDecalMgrs.GetCount(); i++ ) { - plDynaDecalEnableMsg* ena = TRACKED_NEW plDynaDecalEnableMsg(fDecalMgrs[i], armKey, hsTimer::GetSysSeconds(), fWetLength, !coll->fEntering); + plDynaDecalEnableMsg* ena = new plDynaDecalEnableMsg(fDecalMgrs[i], armKey, hsTimer::GetSysSeconds(), fWetLength, !coll->fEntering); ena->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp index 8f4cb483..37298b40 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp @@ -189,7 +189,7 @@ void plExcludeRegionModifier::AddTarget(plSceneObject* so) if (so) { delete fSDLModifier; - fSDLModifier = TRACKED_NEW plExcludeRegionSDLModifier(this); + fSDLModifier = new plExcludeRegionSDLModifier(this); so->AddModifier(fSDLModifier); } plSingleModifier::SetTarget(so); @@ -285,7 +285,7 @@ void plExcludeRegionModifier::IMoveAvatars() if (closestIdx != -1) { - plAvSeekMsg* msg = TRACKED_NEW plAvSeekMsg; + plAvSeekMsg* msg = new plAvSeekMsg; msg->SetBCastFlag(plMessage::kPropagateToModifiers); msg->AddReceiver(fContainedAvatars[i]); msg->fSmartSeek = fSeek; @@ -305,7 +305,7 @@ void plExcludeRegionModifier::IMoveAvatars() int numControllers = plPXPhysicalControllerCore::GetNumberOfControllersInThisSubWorld(phys->GetWorldKey()); if (numControllers > 0) { - plPXPhysicalControllerCore** controllers = TRACKED_NEW plPXPhysicalControllerCore*[numControllers]; + plPXPhysicalControllerCore** controllers = new plPXPhysicalControllerCore*[numControllers]; int actualCount = plPXPhysicalControllerCore::GetControllersInThisSubWorld(phys->GetWorldKey(), numControllers, controllers); @@ -323,7 +323,7 @@ void plExcludeRegionModifier::IMoveAvatars() // *** warning; if there's more than one generic brain active, this will only look at the first if (curGenBrain && curGenBrain->GetType() == plAvBrainGeneric::kLadder) { - plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg( + plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg( nil, constAvMod->GetKey(), plAvBrainGenericMsg::kGotoStage, @@ -341,7 +341,7 @@ void plExcludeRegionModifier::IMoveAvatars() int closestIdx = IFindClosestSafePoint(controllers[i]->GetOwner()); if (closestIdx != -1) { - plAvSeekMsg* msg = TRACKED_NEW plAvSeekMsg; + plAvSeekMsg* msg = new plAvSeekMsg; msg->SetBCastFlag(plMessage::kPropagateToModifiers); msg->AddReceiver(controllers[i]->GetOwner()); msg->fSmartSeek = fSeek; diff --git a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp index 247b612f..5b2c4c2e 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp @@ -52,7 +52,7 @@ hsBool plGameMarkerModifier::MsgReceive(plMessage* msg) { if (collideMsg->fEntering) { - plNotifyMsg* notify = TRACKED_NEW plNotifyMsg; + plNotifyMsg* notify = new plNotifyMsg; notify->AddCollisionEvent(true, collideMsg->fOtherKey, GetTarget()->GetKey()); notify->Send(hsgResMgr::ResMgr()->FindKey(kMarkerMgr_KEY)); } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp index 29314750..03b1c72c 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp @@ -88,7 +88,7 @@ void plImageLibMod::Read(hsStream* stream, hsResMgr* mgr) uint32_t i, count = stream->ReadLE32(); fImages.SetCountAndZero( count ); for( i = 0; i < count; i++ ) - mgr->ReadKeyNotifyMe( stream, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefImage ), plRefFlags::kActiveRef ); + mgr->ReadKeyNotifyMe( stream, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefImage ), plRefFlags::kActiveRef ); } void plImageLibMod::Write(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp index d97e4e34..6c24e203 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp @@ -162,7 +162,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg) { plCursorChangeMsg* pMsg = 0; if ((VerifyConditions(pFakeMsg) && fMyCursor) && !Disabled()) - pMsg = TRACKED_NEW plCursorChangeMsg(fMyCursor, 1); + pMsg = new plCursorChangeMsg(fMyCursor, 1); else { #ifndef PLASMA_EXTERNAL_RELEASE @@ -190,7 +190,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg) } } #endif // PLASMA_EXTERNAL_RELEASE - pMsg = TRACKED_NEW plCursorChangeMsg(plCursorChangeMsg::kNullCursor, 1); + pMsg = new plCursorChangeMsg(plCursorChangeMsg::kNullCursor, 1); } pMsg->AddReceiver( pFakeMsg->GetSender() ); @@ -221,7 +221,7 @@ void plLogicModifier::PreTrigger(hsBool netRequest) if (fTimer) { - plgTimerCallbackMgr::NewTimer( fTimer, TRACKED_NEW plTimerCallbackMsg( GetKey() ) ); + plgTimerCallbackMgr::NewTimer( fTimer, new plTimerCallbackMsg( GetKey() ) ); return; } plLogicModBase::PreTrigger(netRequest); @@ -244,7 +244,7 @@ void plLogicModifier::Read(hsStream* stream, hsResMgr* mgr) int i; for(i = 0; i < n; i++ ) { - refMsg = TRACKED_NEW plCondRefMsg(GetKey(), i); + refMsg = new plCondRefMsg(GetKey(), i); mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef); } fMyCursor = stream->ReadLE32(); @@ -261,7 +261,7 @@ void plLogicModifier::Write(hsStream* stream, hsResMgr* mgr) void plLogicModifier::AddCondition(plConditionalObject* c) { - plGenRefMsg *msg= TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg= new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(c->GetKey(), msg, plRefFlags::kActiveRef); fConditionList.Append(c); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp index c3bc6c34..3bcd21f0 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp @@ -457,14 +457,14 @@ void plResponderModifier::Restore() if (plAnimCmdMsg* animMsg = plAnimCmdMsg::ConvertNoRef(callbackMsg)) { - plAnimCmdMsg* newAnimMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* newAnimMsg = new plAnimCmdMsg; newAnimMsg->SetCmd(plAnimCmdMsg::kAddCallbacks); newCallbackMsg = newAnimMsg; ResponderLog(ILog(plStatusLog::kGreen, "Restoring anim callback")); } else if (plSoundMsg* soundMsg = plSoundMsg::ConvertNoRef(callbackMsg)) { - plSoundMsg* newSoundMsg = TRACKED_NEW plSoundMsg; + plSoundMsg* newSoundMsg = new plSoundMsg; newSoundMsg->SetCmd(plSoundMsg::kAddCallbacks); newCallbackMsg = newSoundMsg; ResponderLog(ILog(plStatusLog::kGreen, "Restoring sound callback")); @@ -502,7 +502,7 @@ plMessage* plResponderModifier::IGetFastForwardMsg(plMessage* msg, bool python) if (animMsg->Cmd(plAnimCmdMsg::kContinue) || animMsg->Cmd(plAnimCmdMsg::kAddCallbacks)) { - plAnimCmdMsg* newAnimMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* newAnimMsg = new plAnimCmdMsg; newAnimMsg->fCmd = animMsg->fCmd; newAnimMsg->fBegin = animMsg->fBegin; newAnimMsg->fEnd = animMsg->fEnd; @@ -544,7 +544,7 @@ plMessage* plResponderModifier::IGetFastForwardMsg(plMessage* msg, bool python) soundMsg->Cmd(plSoundMsg::kToggleState) || soundMsg->Cmd(plAnimCmdMsg::kAddCallbacks)) { - plSoundMsg *newSoundMsg = TRACKED_NEW plSoundMsg; + plSoundMsg *newSoundMsg = new plSoundMsg; newSoundMsg->fCmd = soundMsg->fCmd; newSoundMsg->fBegin = soundMsg->fBegin; newSoundMsg->fEnd = soundMsg->fEnd; @@ -677,7 +677,7 @@ void plResponderModifier::Read(hsStream* stream, hsResMgr* mgr) // attach responderSDLMod delete fResponderSDLMod; - fResponderSDLMod = TRACKED_NEW plResponderSDLModifier; + fResponderSDLMod = new plResponderSDLModifier; fResponderSDLMod->SetResponder(this); } @@ -740,7 +740,7 @@ void plResponderModifier::IDebugAnimBox(bool start) void plResponderModifier::IDebugPlayMsg(plAnimCmdMsg* msg) { // Create a stop callback so we can do a cue for that too - plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg; + plEventCallbackMsg *eventMsg = new plEventCallbackMsg; eventMsg->AddReceiver(GetKey()); eventMsg->fRepeats = 0; eventMsg->fUser = -1; diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp index 73b2c78f..e1477e31 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp @@ -70,7 +70,7 @@ void plSDLModifier::AddTarget(plSceneObject* so) if (so) plSingleModifier::AddTarget(so); if (!fStateCache) - fStateCache = TRACKED_NEW plStateDataRecord(GetSDLName()); + fStateCache = new plStateDataRecord(GetSDLName()); } uint32_t plSDLModifier::IApplyModFlags(uint32_t sendFlags) @@ -161,7 +161,7 @@ void plSDLModifier::SendState(uint32_t sendFlags) bool broadcast = (sendFlags & plSynchedObject::kBCastToClients) != 0; // record current state - plStateDataRecord* curState = TRACKED_NEW plStateDataRecord(GetSDLName()); + plStateDataRecord* curState = new plStateDataRecord(GetSDLName()); IPutCurrentStateIn(curState); // return sdl record which reflects current state of sceneObj, dirties curState if (!force) { diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp index 37248fda..54e9e110 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // fTargets.GetCount(); // for (int i=0; i < GetNumTargets(); i++) // { -// plSpawnModMsg* pMsg = NEW(plSpawnModMsg); +// plSpawnModMsg* pMsg = new plSpawnModMsg; // pMsg->AddReceiver( pSpawnMsg->GetSender() ); // //pMsg->fPos= GetTarget(i)->GetDrawInterface()->GetWorldBounds().GetCenter(); // pMsg->fPos= GetTarget(i)->GetCoordinateInterface()->GetLocalToWorld().GetTranslate(); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp index 860904ba..843a1fe1 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp @@ -203,7 +203,7 @@ void plLinkEffectsMgr::ISendAllReadyCallbacks() { if (fLinks[i]->GetLinkKey() == plNetClientApp::GetInstance()->GetLocalPlayerKey()) { - plLinkOutUnloadMsg* lam = TRACKED_NEW plLinkOutUnloadMsg; // derived from LoadAgeMsg + plLinkOutUnloadMsg* lam = new plLinkOutUnloadMsg; // derived from LoadAgeMsg lam->SetAgeFilename( NetCommGetAge()->ageDatasetName ); lam->AddReceiver(plNetClientMgr::GetInstance()->GetKey()); lam->SetPlayerID(plNetClientMgr::GetInstance()->GetPlayerID()); @@ -212,14 +212,14 @@ void plLinkEffectsMgr::ISendAllReadyCallbacks() } else { - plLinkInDoneMsg* lid = TRACKED_NEW plLinkInDoneMsg; + plLinkInDoneMsg* lid = new plLinkInDoneMsg; lid->AddReceiver(fLinks[i]->GetLinkKey()); lid->SetBCastFlag(plMessage::kPropagateToModifiers); lid->Send(); if (fLinks[i]->GetLinkKey() == plNetClientApp::GetInstance()->GetLocalPlayerKey()) { - plLinkInDoneMsg* lid = TRACKED_NEW plLinkInDoneMsg; + plLinkInDoneMsg* lid = new plLinkInDoneMsg; lid->AddReceiver(plNetClientMgr::GetInstance()->GetKey()); lid->Send(); } @@ -251,7 +251,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) if (!plNetClientMgr::GetInstance()->IsAPlayerKey(pSeudoMsg->fAvatarKey)) return true; // send the trigger message to the avatar... - plPseudoLinkAnimTriggerMsg* pMsg = TRACKED_NEW plPseudoLinkAnimTriggerMsg(true, pSeudoMsg->fAvatarKey); + plPseudoLinkAnimTriggerMsg* pMsg = new plPseudoLinkAnimTriggerMsg(true, pSeudoMsg->fAvatarKey); pMsg->SetSender(GetKey()); pMsg->Send(); IAddPsuedo(pSeudoMsg); @@ -269,7 +269,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) { hsMatrix44 mat = pObj->GetCoordinateInterface()->GetLocalToWorld(); // create message - plWarpMsg* pMsg = TRACKED_NEW plWarpMsg(mat); + plWarpMsg* pMsg = new plWarpMsg(mat); pMsg->SetWarpFlags(plWarpMsg::kFlushTransform); pMsg->AddReceiver(pSeudoCallback->fAvatarKey); plUoid U(kVirtualCamera1_KEY); @@ -280,7 +280,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) } plgDispatch::MsgSend( pMsg ); // whoosh... off it goes // now make him re-appear - plPseudoLinkAnimTriggerMsg* pTrigMsg = TRACKED_NEW plPseudoLinkAnimTriggerMsg(false, pSeudoCallback->fAvatarKey); + plPseudoLinkAnimTriggerMsg* pTrigMsg = new plPseudoLinkAnimTriggerMsg(false, pSeudoCallback->fAvatarKey); pTrigMsg->SetSender(GetKey()); pTrigMsg->Send(); IRemovePseudo(pSeudoCallback->fAvatarKey); @@ -293,7 +293,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) { plNetApp::GetInstance()->DebugMsg("Received LinkEffectsTriggerPREPMsg\n"); IAddWait(tpMsg->GetTrigger()); - plLinkEffectPrepBCMsg *bcpMsg = TRACKED_NEW plLinkEffectPrepBCMsg; + plLinkEffectPrepBCMsg *bcpMsg = new plLinkEffectPrepBCMsg; bcpMsg->fLeavingAge = tpMsg->fLeavingAge; bcpMsg->fLinkKey = tpMsg->fLinkKey; bcpMsg->Send(); @@ -361,7 +361,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) else hsStatusMessage("Starting LinkIn FX\n"); - plLinkEffectBCMsg *BCMsg = TRACKED_NEW plLinkEffectBCMsg(); + plLinkEffectBCMsg *BCMsg = new plLinkEffectBCMsg(); BCMsg->fLinkKey = linkKey; BCMsg->SetLinkFlag(plLinkEffectBCMsg::kLeavingAge, pTriggerMsg->IsLeavingAge()); BCMsg->SetLinkFlag(plLinkEffectBCMsg::kSendCallback, true); @@ -424,11 +424,11 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) if (avMod && linkInAnim) { - plAvOneShotTask *task = TRACKED_NEW plAvOneShotTask(linkInAnim->GetName(), false, false, nil); + plAvOneShotTask *task = new plAvOneShotTask(linkInAnim->GetName(), false, false, nil); task->fBackwards = true; task->fDisableLooping = true; task->fDisablePhysics = false; - (TRACKED_NEW plAvTaskMsg(GetKey(), avMod->GetKey(), task))->Send(); + (new plAvTaskMsg(GetKey(), avMod->GetKey(), task))->Send(); } } @@ -439,7 +439,7 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) // link, plus we know any effect broadcast messages will have processed before this (and therefore // have told us to wait for them.) pTriggerMsg->fEffects++; - plLinkCallbackMsg *dummyMsg = TRACKED_NEW plLinkCallbackMsg(); + plLinkCallbackMsg *dummyMsg = new plLinkCallbackMsg(); dummyMsg->AddReceiver(GetKey()); dummyMsg->fLinkKey = linkKey; plgDispatch::MsgSend(dummyMsg); @@ -505,12 +505,12 @@ hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) if (!plNetClientApp::GetInstance()->IsLoadingInitialAgeState() && (pageMsg->fPlayer != nc->GetLocalPlayerKey())) { - plLinkEffectsTriggerMsg *trigMsg = TRACKED_NEW plLinkEffectsTriggerMsg; + plLinkEffectsTriggerMsg *trigMsg = new plLinkEffectsTriggerMsg; trigMsg->SetLeavingAge(false); trigMsg->SetLinkKey(pageMsg->fPlayer); // Send off the prep message right away - plLinkEffectsTriggerPrepMsg *trigPrepMsg = TRACKED_NEW plLinkEffectsTriggerPrepMsg; + plLinkEffectsTriggerPrepMsg *trigPrepMsg = new plLinkEffectsTriggerPrepMsg; trigPrepMsg->fLinkKey = pageMsg->fPlayer; trigPrepMsg->SetTrigger(trigMsg); trigPrepMsg->Send(GetKey()); @@ -539,7 +539,7 @@ void plLinkEffectsMgr::WaitForEffect(plKey linkKey, float time) } msg->fEffects++; - plLinkCallbackMsg *callback = TRACKED_NEW plLinkCallbackMsg(); + plLinkCallbackMsg *callback = new plLinkCallbackMsg(); callback->fEvent = kStop; callback->fRepeats = 0; callback->fLinkKey = linkKey; @@ -559,7 +559,7 @@ plMessage *plLinkEffectsMgr::WaitForEffect(plKey linkKey) msg->fEffects++; - plLinkCallbackMsg *callback = TRACKED_NEW plLinkCallbackMsg(); + plLinkCallbackMsg *callback = new plLinkCallbackMsg(); callback->fEvent = kStop; callback->fRepeats = 0; callback->fLinkKey = linkKey; @@ -576,7 +576,7 @@ void plLinkEffectsMgr::WaitForPseudoEffect(plKey linkKey, float time) return; } - plPseudoLinkAnimCallbackMsg* callback = TRACKED_NEW plPseudoLinkAnimCallbackMsg(); + plPseudoLinkAnimCallbackMsg* callback = new plPseudoLinkAnimCallbackMsg(); callback->fAvatarKey = linkKey; double timeToDeliver = hsTimer::GetSysSeconds() + time; callback->SetTimeStamp( timeToDeliver ); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp index 18dbfafc..660b9c05 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp @@ -340,7 +340,7 @@ void plNCAgeJoiner::ExecNextOp () { case kEnableClickables: { LogMsg(kLogPerf, L"AgeJoiner: Exec:kEnableClickables"); // Enable scene clickables - (void)(TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables))->Send(); + (void)(new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables))->Send(); LogMsg(kLogPerf, L"AgeJoiner: Next:kNotifyAgeLoaded"); nextOp = kNotifyAgeLoaded; diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp index c498cd83..46869a21 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp @@ -193,7 +193,7 @@ void plNCAgeLeaver::ExecNextOp () { //==================================================================== case kDisableClickables: { - (TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables))->Send(); + (new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables))->Send(); nextOp = kLinkOutFX; } break; diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index f7f8769e..2bd48065 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -223,10 +223,10 @@ void plNetClientMgr::IClearPendingLoads() // void plNetClientMgr::IAddCloneRoom() { - plSceneNode *cloneRoom = TRACKED_NEW plSceneNode(); + plSceneNode *cloneRoom = new plSceneNode(); cloneRoom->RegisterAs(kNetClientCloneRoom_KEY); plKey clientKey=hsgResMgr::ResMgr()->FindKey(kClient_KEY); - plClientRefMsg *pMsg1 = TRACKED_NEW plClientRefMsg(clientKey, plRefMsg::kOnCreate, -1, plClientRefMsg::kManualRoom); + plClientRefMsg *pMsg1 = new plClientRefMsg(clientKey, plRefMsg::kOnCreate, -1, plClientRefMsg::kManualRoom); hsgResMgr::ResMgr()->AddViaNotify(cloneRoom->GetKey(), pMsg1, plRefFlags::kPassiveRef); } @@ -439,7 +439,7 @@ void plNetClientMgr::StartLinkOutFX() { plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance(); - plLinkEffectsTriggerMsg* lem = TRACKED_NEW plLinkEffectsTriggerMsg(); + plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg(); lem->SetLeavingAge(true); lem->SetLinkKey(fLocalPlayerKey); lem->SetBCastFlag(plMessage::kNetPropagate); @@ -458,7 +458,7 @@ void plNetClientMgr::StartLinkInFX() { const plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar(); - plLinkEffectsTriggerMsg* lem = TRACKED_NEW plLinkEffectsTriggerMsg(); + plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg(); lem->SetLeavingAge(false); // linking in lem->SetLinkKey(fLocalPlayerKey); lem->SetLinkInAnimKey(avMod->GetLinkInAnimKey()); @@ -635,7 +635,7 @@ void plNetClientMgr::ICheckPendingStateLoad(double secs) plSynchedObject*so = pl->fKey ? plSynchedObject::ConvertNoRef(pl->fKey->ObjectIsLoaded()) : nil; if (so && so->IsFinal()) { - plSDLModifierMsg* sdlMsg = TRACKED_NEW plSDLModifierMsg(pl->fSDRec->GetDescriptor()->GetName(), + plSDLModifierMsg* sdlMsg = new plSDLModifierMsg(pl->fSDRec->GetDescriptor()->GetName(), plSDLModifierMsg::kRecv); sdlMsg->SetState( pl->fSDRec, true/*delete pl->fSDRec for us*/ ); sdlMsg->SetPlayerID( pl->fPlayerID ); @@ -917,7 +917,7 @@ hsBool plNetClientMgr::MsgReceive( plMessage* msg ) if ( GetFlagsBit( kNeedToSendInitialAgeStateLoadedMsg ) ) { SetFlagsBit(kNeedToSendInitialAgeStateLoadedMsg, false); - plInitialAgeStateLoadedMsg* m = TRACKED_NEW plInitialAgeStateLoadedMsg; + plInitialAgeStateLoadedMsg* m = new plInitialAgeStateLoadedMsg; m->Send(); } @@ -1111,7 +1111,7 @@ void plNetClientMgr::IncNumInitialSDLStates() void plNetClientMgr::NotifyRcvdAllSDLStates() { DebugMsg( "Got all initial SDL states" ); - plNetClientMgrMsg * msg = TRACKED_NEW plNetClientMgrMsg(); + plNetClientMgrMsg * msg = new plNetClientMgrMsg(); msg->type = plNetClientMgrMsg::kNotifyRcvdAllSDLStates; msg->SetBCastFlag(plMessage::kBCastByType); msg->Send(); @@ -1246,7 +1246,7 @@ void plNetClientMgr::MakeCCRInvisible(plKey avKey, int level) return; } - plAvatarStealthModeMsg *msg = TRACKED_NEW plAvatarStealthModeMsg(); + plAvatarStealthModeMsg *msg = new plAvatarStealthModeMsg(); msg->SetSender(avKey); msg->fLevel = level; @@ -1308,12 +1308,12 @@ void plNetClientMgr::IDisableNet () { char title[256]; StrPrintf(title, arrsize(title), "%S Error", ProductCoreName()); hsMessageBox(fDisableMsg->str, title, hsMessageBoxNormal, hsMessageBoxIconError ); - plClientMsg *quitMsg = NEW(plClientMsg)(plClientMsg::kQuit); + plClientMsg *quitMsg = new plClientMsg(plClientMsg::kQuit); quitMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY)); } else { - pfKIMsg *msg = TRACKED_NEW pfKIMsg(pfKIMsg::kKIOKDialog); + pfKIMsg *msg = new pfKIMsg(pfKIMsg::kKIOKDialog); msg->SetString(fDisableMsg->str); msg->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp index f90666b1..b4eeb4e3 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp @@ -126,7 +126,7 @@ plKey plNetClientMgr::ILoadClone(plLoadCloneMsg *pCloneMsg) plKey cloneNodeKey = hsgResMgr::ResMgr()->FindKey(kNetClientCloneRoom_KEY); // Put the clone into the room, which also forces it to load. - plNodeRefMsg* nodeRefCloneMsg = TRACKED_NEW plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); + plNodeRefMsg* nodeRefCloneMsg = new plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject); hsgResMgr::ResMgr()->AddViaNotify(cloneKey, nodeRefCloneMsg, plRefFlags::kActiveRef); // Finally, pump the dispatch system so all the new refs get delivered. ? @@ -146,7 +146,7 @@ plKey plNetClientMgr::ILoadClone(plLoadCloneMsg *pCloneMsg) GetKey()->Release(cloneKey); // undo the active ref we took in ILoadClone // send message to scene object to remove him from the room - plNodeChangeMsg* nodeChange = TRACKED_NEW plNodeChangeMsg(GetKey(), cloneKey, nil); + plNodeChangeMsg* nodeChange = new plNodeChangeMsg(GetKey(), cloneKey, nil); plgDispatch::MsgSend(nodeChange); } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrRecord.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrRecord.cpp index 5415a149..66ef1477 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrRecord.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrRecord.cpp @@ -55,15 +55,15 @@ bool plNetClientMgr::RecordMsgs(const char* recType, const char* recName) if (!fMsgRecorder) { if (stricmp(recType,"stream") == 0) - fMsgRecorder = TRACKED_NEW plNetClientStreamRecorder; + fMsgRecorder = new plNetClientStreamRecorder; if (stricmp(recType,"stressstream") == 0) - fMsgRecorder = TRACKED_NEW plNetClientStressStreamRecorder; + fMsgRecorder = new plNetClientStressStreamRecorder; if (stricmp(recType,"stats") == 0) - fMsgRecorder = TRACKED_NEW plNetClientStatsRecorder; + fMsgRecorder = new plNetClientStatsRecorder; if (stricmp(recType,"streamandstats") == 0) - fMsgRecorder = TRACKED_NEW plNetClientStreamAndStatsRecorder(TRACKED_NEW plNetClientStreamRecorder(), TRACKED_NEW plNetClientStatsRecorder()); + fMsgRecorder = new plNetClientStreamAndStatsRecorder(new plNetClientStreamRecorder(), new plNetClientStatsRecorder()); if (stricmp(recType,"stressstreamandstats") == 0) - fMsgRecorder = TRACKED_NEW plNetClientStreamAndStatsRecorder(TRACKED_NEW plNetClientStressStreamRecorder(), TRACKED_NEW plNetClientStatsRecorder()); + fMsgRecorder = new plNetClientStreamAndStatsRecorder(new plNetClientStressStreamRecorder(), new plNetClientStatsRecorder()); if (!fMsgRecorder || !fMsgRecorder->BeginRecording(recName)) { @@ -85,7 +85,7 @@ bool plNetClientMgr::PlaybackMsgs(const char* recName) { hsLogEntry(DebugMsg("DEMO: Beginning Playback")); - plNetClientRecorder* player = TRACKED_NEW plNetClientStreamRecorder; + plNetClientRecorder* player = new plNetClientStreamRecorder; if (player->BeginPlayback(recName)) { diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp index d8ccaf07..f9950354 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp @@ -180,7 +180,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg) // void plNetClientMgr::ISendCameraReset(hsBool bEnteringAge) { - plCameraMsg* pCamMsg = TRACKED_NEW plCameraMsg; + plCameraMsg* pCamMsg = new plCameraMsg; if (bEnteringAge) pCamMsg->SetCmd(plCameraMsg::kResetOnEnter); else @@ -272,7 +272,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) { plLoadAvatarMsg* lam=plLoadAvatarMsg::ConvertNoRef(msg); - netMsgWrap = TRACKED_NEW plNetMsgLoadClone; + netMsgWrap = new plNetMsgLoadClone; plNetMsgLoadClone* netLoadClone=plNetMsgLoadClone::ConvertNoRef(netMsgWrap); netLoadClone->SetIsPlayer(lam && lam->GetIsPlayer()); @@ -282,7 +282,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) else if (dstIDs) { - netMsgWrap = TRACKED_NEW plNetMsgGameMessageDirected; + netMsgWrap = new plNetMsgGameMessageDirected; int i; for(i=0;isize();i++) { @@ -294,7 +294,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) } } else - netMsgWrap = TRACKED_NEW plNetMsgGameMessage; + netMsgWrap = new plNetMsgGameMessage; // check delivery timestamp if (msg->GetTimeStamp()<=hsTimer::GetSysSeconds()) diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp index d49948c1..c4f1fffc 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp @@ -337,7 +337,7 @@ hsBool plNetClientMgr::IUpdateListenList(double secs) SynchTalkList(); #endif // notify KI, member distances have been updated - plMemberUpdateMsg* mu = TRACKED_NEW plMemberUpdateMsg; + plMemberUpdateMsg* mu = new plMemberUpdateMsg; mu->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMsgHandler.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMsgHandler.cpp index e1f7d824..2420ec2f 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMsgHandler.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMsgHandler.cpp @@ -176,7 +176,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgGroupOwner) */ /* - plNetOwnershipMsg* netOwnMsg = TRACKED_NEW plNetOwnershipMsg; + plNetOwnershipMsg* netOwnMsg = new plNetOwnershipMsg; int i; for(i=0;iGetNumGroups();i++) @@ -247,7 +247,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState) // // ERROR CHECK SDL FILE // - plStateDataRecord* sdRec = des ? TRACKED_NEW plStateDataRecord(des) : nil; + plStateDataRecord* sdRec = des ? new plStateDataRecord(des) : nil; if (!sdRec || sdRec->GetDescriptor()->GetVersion()!=ver) { std::string err; @@ -269,7 +269,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState) plStateDataRecord* stateRec = nil; if (m->IsInitialState()) { - stateRec = TRACKED_NEW plStateDataRecord(des); + stateRec = new plStateDataRecord(des); stateRec->SetFromDefaults(false); stateRec->UpdateFrom(*sdRec, rwFlags); @@ -278,7 +278,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState) else stateRec = sdRec; - plNetClientMgr::PendingLoad* pl = TRACKED_NEW plNetClientMgr::PendingLoad(); + plNetClientMgr::PendingLoad* pl = new plNetClientMgr::PendingLoad(); pl->fSDRec = stateRec; // will be deleted when PendingLoad is processed if (m->GetHasPlayerID()) pl->fPlayerID = m->GetPlayerID(); // copy originating playerID if we have it @@ -334,7 +334,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgGameMessage) plLoadAvatarMsg* unloadClone = plLoadAvatarMsg::ConvertNoRef(gameMsg); if (unloadClone) { - plLoadAvatarMsg* unloadMsg = TRACKED_NEW plLoadAvatarMsg(unloadClone->GetCloneKey(), unloadClone->GetRequestorKey(), unloadClone->GetUserData(), unloadClone->GetIsPlayer(), false); + plLoadAvatarMsg* unloadMsg = new plLoadAvatarMsg(unloadClone->GetCloneKey(), unloadClone->GetRequestorKey(), unloadClone->GetUserData(), unloadClone->GetIsPlayer(), false); unloadMsg->SetOriginatingPlayerID(unloadClone->GetOriginatingPlayerID()); gameMsg = unloadMsg; } @@ -485,7 +485,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgMembersList) // this app is not one of the members in the msg for( i=0 ;iMemberListInfo()->GetNumMembers() ;i++ ) { - plNetTransportMember* mbr = TRACKED_NEW plNetTransportMember(nc); + plNetTransportMember* mbr = new plNetTransportMember(nc); IFillInTransportMember(m->MemberListInfo()->GetMember(i), mbr); hsLogEntry(nc->DebugMsg("\tAdding transport member, name=%s, p2p=%d, plrID=%d\n", mbr->AsStdString().c_str(), mbr->IsPeerToPeer(), mbr->GetPlayerID())); int idx=nc->fTransport.AddMember(mbr); @@ -494,7 +494,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgMembersList) } // for // new player has been aded send local MembersUpdate msg - plMemberUpdateMsg* mu = TRACKED_NEW plMemberUpdateMsg; + plMemberUpdateMsg* mu = new plMemberUpdateMsg; mu->Send(); return hsOK; @@ -518,7 +518,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgMemberUpdate) if ( idx>=0 ) mbr = nc->fTransport.GetMember(idx); else - mbr = TRACKED_NEW plNetTransportMember(nc); + mbr = new plNetTransportMember(nc); hsAssert(mbr, "nil xport member"); IFillInTransportMember(m->MemberInfo(), mbr); @@ -542,7 +542,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgMemberUpdate) } // new player has been aded send local MembersUpdate msg - plMemberUpdateMsg* mu = TRACKED_NEW plMemberUpdateMsg; + plMemberUpdateMsg* mu = new plMemberUpdateMsg; mu->Send(); return hsOK; @@ -564,7 +564,7 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgListenListUpdate) if(!tm) { #if 0 - tm = TRACKED_NEW plNetTransportMember(nc); + tm = new plNetTransportMember(nc); tm->SetClientNum(m->GetSenderClientNum()); int idx=nc->fTransport.AddMember(tm); hsAssert(idx>=0, "Failed adding member?"); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp index 9daa5c15..ea092f92 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp @@ -461,7 +461,7 @@ bool plNetLinkingMgr::IProcessLinkingMgrMsg( plLinkingMgrMsg * msg ) case kOfferLinkToPlayer: { // // Notify the KI that we received an offer. -// plVaultNotifyMsg * notify = TRACKED_NEW plVaultNotifyMsg(); +// plVaultNotifyMsg * notify = new plVaultNotifyMsg(); // notify->SetType( plVaultNotifyMsg::kPlayerOfferedLink ); // notify->GetArgs()->AddItem( 0, msg->GetArgs()->GetItem( 0 ), true ); // add to notify and have notify take over memory management of the item. // msg->GetArgs()->RemoveItem( 0, true ); // msg to stop memory managing item, notify msg will delete it. @@ -563,7 +563,7 @@ void plNetLinkingMgr::LinkToAge( plAgeLinkStruct * link, const char* linkAnim, u return; } - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( link ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( link ); if (linkAnim) pMsg->SetLinkInAnimName(linkAnim); IDispatchMsg( pMsg, playerID ); @@ -580,7 +580,7 @@ void plNetLinkingMgr::LinkToPrevAge( uint32_t playerID ) if (GetPrevAgeLink()->GetAgeInfo()->HasAgeFilename()) { - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( GetPrevAgeLink() ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( GetPrevAgeLink() ); IDispatchMsg( pMsg, playerID ); } else @@ -606,7 +606,7 @@ void plNetLinkingMgr::LinkToMyPersonalAge( uint32_t playerID ) hutSpawnPoint.SetName(kPersonalAgeLinkInPointCloset); link.SetSpawnPoint(hutSpawnPoint); - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( &link ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( &link ); IDispatchMsg( pMsg, playerID ); } @@ -625,7 +625,7 @@ void plNetLinkingMgr::LinkToMyNeighborhoodAge( uint32_t playerID ) link.SetLinkingRules( plNetCommon::LinkingRules::kOwnedBook ); - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( &link ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( &link ); IDispatchMsg( pMsg, playerID ); } @@ -655,7 +655,7 @@ void plNetLinkingMgr::LinkPlayerToAge( plAgeLinkStruct * link, uint32_t playerID // send the player the age link so they can link there. link->SetLinkingRules( plNetCommon::LinkingRules::kBasicLink ); - plLinkToAgeMsg* pMsg = TRACKED_NEW plLinkToAgeMsg( link ); + plLinkToAgeMsg* pMsg = new plLinkToAgeMsg( link ); IDispatchMsg( pMsg, playerID ); } @@ -673,7 +673,7 @@ void plNetLinkingMgr::LinkPlayerToPrevAge( uint32_t playerID ) // Send the player a msg telling them to link to their last age plNetClientMgr * nc = plNetClientMgr::GetInstance(); - plLinkingMgrMsg* pMsg = TRACKED_NEW plLinkingMgrMsg(); + plLinkingMgrMsg* pMsg = new plLinkingMgrMsg(); pMsg->SetCmd( kLinkPlayerToPrevAge); IDispatchMsg( pMsg, playerID ); } @@ -688,7 +688,7 @@ void plNetLinkingMgr::LinkToPlayersAge( uint32_t playerID ) // Send the player a msg telling them to send us a msg to link to them. isn't that fun? :) plNetClientMgr * nc = plNetClientMgr::GetInstance(); - plLinkingMgrMsg* pMsg = TRACKED_NEW plLinkingMgrMsg(); + plLinkingMgrMsg* pMsg = new plLinkingMgrMsg(); pMsg->SetCmd( kLinkPlayerHere ); pMsg->GetArgs()->AddInt( 0, NetCommGetPlayer()->playerInt ); // send them our id. IDispatchMsg( pMsg, playerID ); @@ -701,7 +701,7 @@ void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_ { plNetClientMgr *mgr = plNetClientMgr::GetInstance(); - plLinkToAgeMsg * linkM = TRACKED_NEW plLinkToAgeMsg(inInfo); + plLinkToAgeMsg * linkM = new plLinkToAgeMsg(inInfo); linkM->AddReceiver(mgr->GetKey()); plKey host = mgr->GetLocalPlayerKey(); @@ -720,7 +720,7 @@ void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_ { plNetClientMgr *mgr = plNetClientMgr::GetInstance(); - plLinkToAgeMsg * linkM = TRACKED_NEW plLinkToAgeMsg(inInfo); + plLinkToAgeMsg * linkM = new plLinkToAgeMsg(inInfo); linkM->AddReceiver(mgr->GetKey()); plKey host = mgr->GetLocalPlayerKey(); @@ -738,7 +738,7 @@ void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_ // for backwards compatibility void plNetLinkingMgr::OfferLinkToPlayer( const plAgeInfoStruct * inInfo, uint32_t playerID ) { - plAgeLinkStruct *ageLink = TRACKED_NEW plAgeLinkStruct; + plAgeLinkStruct *ageLink = new plAgeLinkStruct; ageLink->GetAgeInfo()->CopyFrom(inInfo); ageLink->SetLinkingRules(plNetCommon::LinkingRules::kBasicLink); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp index 8d1f1c07..3335ad31 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp @@ -224,7 +224,7 @@ bool plNetObjectDebugger::AddDebugObject(const char* objName, const char* pageNa flags |= kPageMatch; } - fDebugObjects.push_back(TRACKED_NEW DebugObject(tmpObjName, loc, flags)); + fDebugObjects.push_back(new DebugObject(tmpObjName, loc, flags)); ICreateStatusLog(); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.cpp index a254ccc3..86d0078f 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.cpp @@ -128,7 +128,7 @@ void plNetListenList::AddMember(plNetTransportMember* e) #if 0 // call the new member's win audible and set talk icon parameters - plSoundMsg* pMsg = TRACKED_NEW plSoundMsg; + plSoundMsg* pMsg = new plSoundMsg; plArmatureMod* pMod = plArmatureMod::ConvertNoRef(e->GetAvatarKey()->GetObjectPtr()); if (pMod) pMsg->AddReceiver(pMod->GetTarget(0)->GetKey()); @@ -150,7 +150,7 @@ void plNetListenList::RemoveMember(plNetTransportMember* e) #if 0 // call the new member's win audible and set talk icon parameters - plSoundMsg* pMsg = TRACKED_NEW plSoundMsg; + plSoundMsg* pMsg = new plSoundMsg; plArmatureMod* pMod = plArmatureMod::ConvertNoRef(e->GetAvatarKey()->GetObjectPtr()); if (pMod) pMsg->AddReceiver(pMod->GetTarget(0)->GetKey()); diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index 7154116b..8cc3e22a 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp @@ -253,7 +253,7 @@ static void INotifyNewBuildCallback () { if (!NetCommGetAge()->ageInstId) return; - pfKIMsg * msg = NEW(pfKIMsg)(pfKIMsg::kHACKChatMsg); + pfKIMsg * msg = new pfKIMsg(pfKIMsg::kHACKChatMsg); msg->SetString("Uru has been updated. Please quit the game and log back in."); msg->SetUser("Updater Service", plNetClientApp::GetInstance()->GetPlayerID()); msg->SetFlags(pfKIMsg::kAdminMsg); @@ -293,12 +293,12 @@ static void PlayerInitCallback ( VaultProcessPlayerInbox(); } - plNetCommActivePlayerMsg * msg = NEW(plNetCommActivePlayerMsg); + plNetCommActivePlayerMsg * msg = new plNetCommActivePlayerMsg; msg->result = result; msg->param = param; msg->Send(); - plAccountUpdateMsg * updateMsg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kActivePlayer); + plAccountUpdateMsg * updateMsg = new plAccountUpdateMsg(plAccountUpdateMsg::kActivePlayer); updateMsg->SetPlayerInt(NetCommGetPlayer()->playerInt); updateMsg->SetResult((unsigned)result); updateMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -342,19 +342,19 @@ static void LoginPlayerInitCallback ( VaultProcessPlayerInbox(); { - plNetCommAuthMsg * msg = NEW(plNetCommAuthMsg); + plNetCommAuthMsg * msg = new plNetCommAuthMsg; msg->result = result; msg->param = param; msg->Send(); } { - plNetCommActivePlayerMsg * msg = NEW(plNetCommActivePlayerMsg); + plNetCommActivePlayerMsg * msg = new plNetCommActivePlayerMsg; msg->result = result; msg->param = param; msg->Send(); } { - plAccountUpdateMsg * msg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kActivePlayer); + plAccountUpdateMsg * msg = new plAccountUpdateMsg(plAccountUpdateMsg::kActivePlayer); msg->SetPlayerInt(NetCommGetPlayer()->playerInt); msg->SetResult((unsigned)result); msg->SetBCastFlag(plMessage::kBCastByExactType); @@ -370,7 +370,7 @@ static void INetCliAuthLoginSetPlayerRequestCallback ( if (IS_NET_ERROR(result) && (result != kNetErrVaultNodeNotFound)) { s_player = nil; - plNetCommAuthMsg * msg = NEW(plNetCommAuthMsg); + plNetCommAuthMsg * msg = new plNetCommAuthMsg; msg->result = result; msg->param = param; msg->Send(); @@ -473,7 +473,7 @@ static void INetCliAuthCreatePlayerRequestCallback ( }} } - plAccountUpdateMsg* updateMsg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kCreatePlayer); + plAccountUpdateMsg* updateMsg = new plAccountUpdateMsg(plAccountUpdateMsg::kCreatePlayer); updateMsg->SetPlayerInt(playerInfo.playerInt); updateMsg->SetResult((unsigned)result); updateMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -510,7 +510,7 @@ static void INetCliAuthDeletePlayerCallback ( }} } - plAccountUpdateMsg* updateMsg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kDeletePlayer); + plAccountUpdateMsg* updateMsg = new plAccountUpdateMsg(plAccountUpdateMsg::kDeletePlayer); updateMsg->SetPlayerInt(playerInt); updateMsg->SetResult((unsigned)result); updateMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -529,7 +529,7 @@ static void INetCliAuthChangePasswordCallback ( LogMsg(kLogDebug, L"Password changed!"); } - plAccountUpdateMsg* updateMsg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kChangePassword); + plAccountUpdateMsg* updateMsg = new plAccountUpdateMsg(plAccountUpdateMsg::kChangePassword); updateMsg->SetPlayerInt(0); updateMsg->SetResult((unsigned)result); updateMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -561,7 +561,7 @@ static void INetAuthFileListRequestCallback ( const NetCliAuthFileInfo infoArr[], unsigned infoCount ) { - plNetCommFileListMsg * msg = NEW(plNetCommFileListMsg); + plNetCommFileListMsg * msg = new plNetCommFileListMsg; msg->result = result; msg->param = param; msg->fileInfoArr.Set(infoArr, infoCount); @@ -575,7 +575,7 @@ static void INetCliAuthFileRequestCallback ( const wchar_t filename[], hsStream * writer ) { - plNetCommFileDownloadMsg * msg = NEW(plNetCommFileDownloadMsg); + plNetCommFileDownloadMsg * msg = new plNetCommFileDownloadMsg; msg->result = result; msg->writer = writer; StrCopy(msg->filename, filename, arrsize(filename)); @@ -587,7 +587,7 @@ static void INetCliGameJoinAgeRequestCallback ( ENetError result, void * param ) { - plNetCommLinkToAgeMsg * msg = NEW(plNetCommLinkToAgeMsg); + plNetCommLinkToAgeMsg * msg = new plNetCommLinkToAgeMsg; msg->result = result; msg->param = param; msg->Send(); @@ -654,7 +654,7 @@ static void INetCliAuthUpgradeVisitorRequestCallback ( }} } - plAccountUpdateMsg* updateMsg = TRACKED_NEW plAccountUpdateMsg(plAccountUpdateMsg::kUpgradePlayer); + plAccountUpdateMsg* updateMsg = new plAccountUpdateMsg(plAccountUpdateMsg::kUpgradePlayer); updateMsg->SetPlayerInt(playerInt); updateMsg->SetResult((unsigned)result); updateMsg->SetBCastFlag(plMessage::kBCastByExactType); @@ -666,7 +666,7 @@ static void INetCliAuthSendFriendInviteCallback ( ENetError result, void * param ) { - pfKIMsg* kiMsg = TRACKED_NEW pfKIMsg(pfKIMsg::kFriendInviteSent); + pfKIMsg* kiMsg = new pfKIMsg(pfKIMsg::kFriendInviteSent); kiMsg->SetIntValue((int32_t)result); kiMsg->Send(); } @@ -834,7 +834,7 @@ static void IReadNetIni() { #endif // Set startup age info - ZERO(s_startupAge); + memset(&s_startupAge, 0, sizeof(s_startupAge)); if (StrLen(s_iniStartupAgeName) == 0) StrCopy(s_startupAge.ageDatasetName, "StartUp", arrsize(s_startupAge.ageDatasetName)); @@ -1157,7 +1157,7 @@ void NetCommAddMsgHandlerForExactType ( ASSERT(!state || (state && state != kNetCommAllUserStates)); NetCommRemoveMsgHandler(msgClassIdx, proc, state); - NetCommMsgHandler * handler = NEW(NetCommMsgHandler)(msgClassIdx, proc, state); + NetCommMsgHandler * handler = new NetCommMsgHandler(msgClassIdx, proc, state); s_handlers.Add(handler); } @@ -1272,7 +1272,7 @@ void NetCommLinkToAge ( // --> plNetCommLinkToAgeMsg s_age = age; if (plNetClientMgr::GetInstance()->GetFlagsBit(plNetClientApp::kLinkingToOfflineAge)) { - plNetCommLinkToAgeMsg * msg = NEW(plNetCommLinkToAgeMsg); + plNetCommLinkToAgeMsg * msg = new plNetCommLinkToAgeMsg; msg->result = kNetSuccess; msg->param = nil; msg->Send(); @@ -1399,7 +1399,7 @@ void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg void * param, plNetCommReplyMsg::EParamType ptype ) { - NetCommParam * cp = NEW(NetCommParam); + NetCommParam * cp = new NetCommParam; cp->param = param; cp->type = ptype; diff --git a/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientStreamRecorder.cpp b/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientStreamRecorder.cpp index ea88f772..86a5c46f 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientStreamRecorder.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientStreamRecorder.cpp @@ -98,7 +98,7 @@ bool plNetClientStreamRecorder::BeginRecording(const char* recName) { if (!fRecordStream) { - fRecordStream = TRACKED_NEW hsUNIXStream; + fRecordStream = new hsUNIXStream; char path[256]; IMakeFilename(recName, path); @@ -125,7 +125,7 @@ bool plNetClientStreamRecorder::BeginPlayback(const char* recName) { if (!fRecordStream) { - fRecordStream = TRACKED_NEW hsUNIXStream; + fRecordStream = new hsUNIXStream; char path[256]; IMakeFilename(recName, path); diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp index ce545e96..27df21a1 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp @@ -173,7 +173,7 @@ bool plCreatableListHelper::ItemExists( uint16_t id ) const void plCreatableListHelper::AddString(uint16_t id, const char * value) { - plCreatableGenericValue * V = TRACKED_NEW plCreatableGenericValue(); + plCreatableGenericValue * V = new plCreatableGenericValue(); V->Value().SetString( (char*)value ); AddItem( id, V, true ); } @@ -185,14 +185,14 @@ void plCreatableListHelper::AddString( uint16_t id, std::string & value ) void plCreatableListHelper::AddInt( uint16_t id, int32_t value ) { - plCreatableGenericValue * V = TRACKED_NEW plCreatableGenericValue(); + plCreatableGenericValue * V = new plCreatableGenericValue(); V->Value().SetInt(value); AddItem( id, V, true ); } void plCreatableListHelper::AddDouble( uint16_t id, double value ) { - plCreatableGenericValue * V = TRACKED_NEW plCreatableGenericValue(); + plCreatableGenericValue * V = new plCreatableGenericValue(); V->Value().SetDouble(value); AddItem( id, V, true ); } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 21a7fafd..4690c196 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp @@ -1333,7 +1333,7 @@ static bool ConnEncrypt (ENetError error, void * param) { if (!s_perf[kPingDisabled]) conn->AutoPing(); - AuthConnectedNotifyTrans * trans = NEW(AuthConnectedNotifyTrans); + AuthConnectedNotifyTrans * trans = new AuthConnectedNotifyTrans; NetTransSend(trans); } @@ -2055,7 +2055,7 @@ static bool Recv_VaultNodeChanged ( ) { const Auth2Cli_VaultNodeChanged & notify = *(const Auth2Cli_VaultNodeChanged *)msg; - VaultNodeChangedTrans * trans = NEW(VaultNodeChangedTrans); + VaultNodeChangedTrans * trans = new VaultNodeChangedTrans; trans->m_nodeId = notify.nodeId; trans->m_revId = notify.revisionId; NetTransSend(trans); @@ -2071,7 +2071,7 @@ static bool Recv_VaultNodeAdded ( ) { const Auth2Cli_VaultNodeAdded & notify = *(const Auth2Cli_VaultNodeAdded *)msg; - VaultNodeAddedTrans * trans = NEW(VaultNodeAddedTrans); + VaultNodeAddedTrans * trans = new VaultNodeAddedTrans; trans->m_parentId = notify.parentId; trans->m_childId = notify.childId; trans->m_ownerId = notify.ownerId; @@ -2088,7 +2088,7 @@ static bool Recv_VaultNodeRemoved ( ) { const Auth2Cli_VaultNodeRemoved & notify = *(const Auth2Cli_VaultNodeRemoved *)msg; - VaultNodeRemovedTrans * trans = NEW(VaultNodeRemovedTrans); + VaultNodeRemovedTrans * trans = new VaultNodeRemovedTrans; trans->m_parentId = notify.parentId; trans->m_childId = notify.childId; NetTransSend(trans); @@ -2104,7 +2104,7 @@ static bool Recv_VaultNodeDeleted ( ) { const Auth2Cli_VaultNodeDeleted & notify = *(const Auth2Cli_VaultNodeDeleted *)msg; - VaultNodeDeletedTrans * trans = NEW(VaultNodeDeletedTrans); + VaultNodeDeletedTrans * trans = new VaultNodeDeletedTrans; trans->m_nodeId = notify.nodeId; NetTransSend(trans); @@ -2229,7 +2229,7 @@ static bool Recv_NotifyNewBuild ( unsigned , void * ) { - NotifyNewBuildTrans * trans = NEW(NotifyNewBuildTrans); + NotifyNewBuildTrans * trans = new NotifyNewBuildTrans; NetTransSend(trans); return true; @@ -2618,7 +2618,7 @@ LoginRequestTrans::LoginRequestTrans ( , m_accountFlags(0) , m_playerCount(0) { - ZERO(m_players); + memset(&m_players, 0, sizeof(m_players)); } //============================================================================ @@ -2960,7 +2960,7 @@ PlayerCreateRequestTrans::PlayerCreateRequestTrans ( StrCopy(m_friendInvite, friendInvite, arrsize(m_friendInvite)); else m_friendInvite[0] = 0; - ZERO(m_playerInfo); + memset(&m_playerInfo, 0, sizeof(m_playerInfo)); } //============================================================================ @@ -3630,7 +3630,7 @@ bool FileDownloadRequestTrans::Recv ( // we have data to write, so queue it for write in the main thread (we're // currently in a net recv thread) if (reply.chunkSize) { - RcvdFileDownloadChunkTrans * writeTrans = NEW(RcvdFileDownloadChunkTrans); + RcvdFileDownloadChunkTrans * writeTrans = new RcvdFileDownloadChunkTrans; writeTrans->writer = m_writer; writeTrans->bytes = reply.chunkSize; writeTrans->offset = reply.chunkOffset; @@ -4695,7 +4695,7 @@ bool ScoreGetScoresTrans::Recv ( if (reply.scoreCount > 0) { m_scoreCount = reply.scoreCount; - m_scores = TRACKED_NEW NetGameScore[m_scoreCount]; + m_scores = new NetGameScore[m_scoreCount]; uint8_t* bufferPos = const_cast(reply.buffer); unsigned bufferLength = reply.byteCount; @@ -4971,7 +4971,7 @@ bool ScoreGetRanksTrans::Recv ( if (reply.rankCount > 0) { m_rankCount = reply.rankCount; - m_ranks = TRACKED_NEW NetGameRank[m_rankCount]; + m_ranks = new NetGameRank[m_rankCount]; uint8_t* bufferPos = const_cast(reply.buffer); unsigned bufferLength = reply.byteCount; @@ -5216,7 +5216,7 @@ void NetCliAuthPingRequest ( FNetCliAuthPingRequestCallback callback, void * param ) { - PingRequestTrans * trans = NEW(PingRequestTrans)( + PingRequestTrans * trans = new PingRequestTrans( callback, param, pingTimeMs, @@ -5232,7 +5232,7 @@ void NetCliAuthAccountExistsRequest ( FNetCliAuthAccountExistsRequestCallback callback, void * param ) { - AccountExistsRequestTrans * trans = NEW(AccountExistsRequestTrans)( + AccountExistsRequestTrans * trans = new AccountExistsRequestTrans( callback, param, accountName @@ -5259,7 +5259,7 @@ void NetCliAuthLoginRequest ( if (os) StrCopy(s_os, os, arrsize(s_os)); - LoginRequestTrans * trans = NEW(LoginRequestTrans)(callback, param); + LoginRequestTrans * trans = new LoginRequestTrans(callback, param); NetTransSend(trans); } @@ -5270,7 +5270,7 @@ void NetCliAuthAgeRequest ( FNetCliAuthAgeRequestCallback callback, void * param ) { - AgeRequestTrans * trans = NEW(AgeRequestTrans)( + AgeRequestTrans * trans = new AgeRequestTrans( ageName, ageInstId, callback, @@ -5298,7 +5298,7 @@ void NetCliAuthAccountCreateRequest ( FNetCliAuthAccountCreateRequestCallback callback, void * param ) { - AccountCreateRequestTrans * trans = NEW(AccountCreateRequestTrans)( + AccountCreateRequestTrans * trans = new AccountCreateRequestTrans( accountName, password, accountFlags, @@ -5318,7 +5318,7 @@ void NetCliAuthAccountCreateFromKeyRequest ( FNetCliAuthAccountCreateFromKeyRequestCallback callback, void * param ) { - AccountCreateFromKeyRequestTrans * trans = NEW(AccountCreateFromKeyRequestTrans)( + AccountCreateFromKeyRequestTrans * trans = new AccountCreateFromKeyRequestTrans( accountName, password, key, @@ -5345,7 +5345,7 @@ void NetCliAuthPlayerCreateRequest ( callback(error, param, playerInfo); } else { - PlayerCreateRequestTrans * trans = NEW(PlayerCreateRequestTrans)( + PlayerCreateRequestTrans * trans = new PlayerCreateRequestTrans( name, avatarShape, friendInvite, @@ -5362,7 +5362,7 @@ void NetCliAuthPlayerDeleteRequest ( FNetCliAuthPlayerDeleteRequestCallback callback, void * param ) { - PlayerDeleteRequestTrans * trans = NEW(PlayerDeleteRequestTrans)( + PlayerDeleteRequestTrans * trans = new PlayerDeleteRequestTrans( playerId, callback, param @@ -5376,7 +5376,7 @@ void NetCliAuthUpgradeVisitorRequest ( FNetCliAuthUpgradeVisitorRequestCallback callback, void * param ) { - UpgradeVisitorRequestTrans * trans = NEW(UpgradeVisitorRequestTrans)( + UpgradeVisitorRequestTrans * trans = new UpgradeVisitorRequestTrans( playerId, callback, param @@ -5407,7 +5407,7 @@ void NetCliAuthSetPlayerRequest ( FNetCliAuthSetPlayerRequestCallback callback, void * param ) { - SetPlayerRequestTrans * trans = NEW(SetPlayerRequestTrans)( + SetPlayerRequestTrans * trans = new SetPlayerRequestTrans( playerInt, callback, param @@ -5441,7 +5441,7 @@ void NetCliAuthGetPublicAgeList ( FNetCliAuthGetPublicAgeListCallback callback, void * param ) { - GetPublicAgeListTrans * trans = NEW(GetPublicAgeListTrans)( + GetPublicAgeListTrans * trans = new GetPublicAgeListTrans( ageName, callback, param @@ -5456,7 +5456,7 @@ void NetCliAuthAccountChangePasswordRequest ( FNetCliAuthAccountChangePasswordRequestCallback callback, void * param ) { - AccountChangePasswordRequestTrans * trans = NEW(AccountChangePasswordRequestTrans)( + AccountChangePasswordRequestTrans * trans = new AccountChangePasswordRequestTrans( accountName, password, callback, @@ -5472,7 +5472,7 @@ void NetCliAuthAccountSetRolesRequest ( FNetCliAuthAccountSetRolesRequestCallback callback, void * param ) { - AccountSetRolesRequestTrans * trans = NEW(AccountSetRolesRequestTrans)( + AccountSetRolesRequestTrans * trans = new AccountSetRolesRequestTrans( accountName, accountFlags, callback, @@ -5488,7 +5488,7 @@ void NetCliAuthAccountSetBillingTypeRequest ( FNetCliAuthAccountSetBillingTypeRequestCallback callback, void * param ) { - AccountSetBillingTypeRequestTrans * trans = NEW(AccountSetBillingTypeRequestTrans)( + AccountSetBillingTypeRequestTrans * trans = new AccountSetBillingTypeRequestTrans( accountName, billingType, callback, @@ -5503,7 +5503,7 @@ void NetCliAuthAccountActivateRequest ( FNetCliAuthAccountActivateRequestCallback callback, void * param ) { - AccountActivateRequestTrans * trans = NEW(AccountActivateRequestTrans)( + AccountActivateRequestTrans * trans = new AccountActivateRequestTrans( activationKey, callback, param @@ -5518,7 +5518,7 @@ void NetCliAuthFileListRequest ( FNetCliAuthFileListRequestCallback callback, void * param ) { - FileListRequestTrans * trans = NEW(FileListRequestTrans)( + FileListRequestTrans * trans = new FileListRequestTrans( callback, param, dir, @@ -5534,7 +5534,7 @@ void NetCliAuthFileRequest ( FNetCliAuthFileRequestCallback callback, void * param ) { - FileDownloadRequestTrans * trans = NEW(FileDownloadRequestTrans)( + FileDownloadRequestTrans * trans = new FileDownloadRequestTrans( callback, param, filename, @@ -5884,7 +5884,7 @@ void NetCliAuthSetPlayerBanStatusRequest ( FNetCliAuthSetPlayerBanStatusRequestCallback callback, void * param ) { - SetPlayerBanStatusRequestTrans * trans = NEW(SetPlayerBanStatusRequestTrans)( + SetPlayerBanStatusRequestTrans * trans = new SetPlayerBanStatusRequestTrans( playerId, banned, callback, @@ -5917,7 +5917,7 @@ void NetCliAuthChangePlayerNameRequest ( FNetCliAuthChangePlayerNameRequestCallback callback, void * param ) { - ChangePlayerNameRequestTrans * trans = NEW(ChangePlayerNameRequestTrans)( + ChangePlayerNameRequestTrans * trans = new ChangePlayerNameRequestTrans( playerId, newName, callback, @@ -5934,7 +5934,7 @@ void NetCliAuthSendFriendInvite ( FNetCliAuthSendFriendInviteCallback callback, void * param ) { - SendFriendInviteTrans * trans = NEW(SendFriendInviteTrans)( + SendFriendInviteTrans * trans = new SendFriendInviteTrans( emailAddress, toName, inviteUuid, @@ -5953,7 +5953,7 @@ void NetCliAuthScoreCreate ( FNetCliAuthCreateScoreCallback callback, void * param ) { - ScoreCreateTrans * trans = NEW(ScoreCreateTrans)( + ScoreCreateTrans * trans = new ScoreCreateTrans( ownerId, gameName, gameType, @@ -5970,7 +5970,7 @@ void NetCliAuthScoreDelete( FNetCliAuthScoreUpdateCallback callback, void * param ) { - ScoreDeleteTrans * trans = NEW(ScoreDeleteTrans)( + ScoreDeleteTrans * trans = new ScoreDeleteTrans( scoreId, callback, param @@ -5985,7 +5985,7 @@ void NetCliAuthScoreGetScores( FNetCliAuthGetScoresCallback callback, void * param ) { - ScoreGetScoresTrans * trans = NEW(ScoreGetScoresTrans)( + ScoreGetScoresTrans * trans = new ScoreGetScoresTrans( ownerId, gameName, callback, @@ -6001,7 +6001,7 @@ void NetCliAuthScoreAddPoints( FNetCliAuthScoreUpdateCallback callback, void * param ) { - ScoreAddPointsTrans * trans = NEW(ScoreAddPointsTrans)( + ScoreAddPointsTrans * trans = new ScoreAddPointsTrans( scoreId, numPoints, callback, @@ -6018,7 +6018,7 @@ void NetCliAuthScoreTransferPoints( FNetCliAuthScoreUpdateCallback callback, void * param ) { - ScoreTransferPointsTrans * trans = NEW(ScoreTransferPointsTrans)( + ScoreTransferPointsTrans * trans = new ScoreTransferPointsTrans( srcScoreId, destScoreId, numPoints, @@ -6035,7 +6035,7 @@ void NetCliAuthScoreSetPoints( FNetCliAuthScoreUpdateCallback callback, void * param ) { - ScoreSetPointsTrans * trans = NEW(ScoreSetPointsTrans)( + ScoreSetPointsTrans * trans = new ScoreSetPointsTrans( scoreId, numPoints, callback, @@ -6057,7 +6057,7 @@ void NetCliAuthScoreGetRankList( FNetCliAuthGetRanksCallback callback, void * param ) { - ScoreGetRanksTrans * trans = NEW(ScoreGetRanksTrans)( + ScoreGetRanksTrans * trans = new ScoreGetRanksTrans( ownerId, scoreGroup, parentFolderId, diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCore.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCore.cpp index ac35cfba..0e294e77 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCore.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCore.cpp @@ -127,7 +127,7 @@ void ReportNetErrorTrans::Post () { //============================================================================ void ReportNetError (ENetProtocol protocol, ENetError error) { - ReportNetErrorTrans * trans = NEW(ReportNetErrorTrans)(protocol, error); + ReportNetErrorTrans * trans = new ReportNetErrorTrans(protocol, error); NetTransSend(trans); } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp index 4d0e28ec..cdd753f3 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp @@ -461,7 +461,7 @@ static bool Recv_RegisterReply ( conn->serverChallenge = reply.serverChallenge; conn->latestBuildId = reply.csrBuildId; - ConnectedNotifyTrans * trans = NEW(ConnectedNotifyTrans)( + ConnectedNotifyTrans * trans = new ConnectedNotifyTrans( conn->connectParam, conn->latestBuildId ); @@ -842,7 +842,7 @@ void NetCliCsrStartConnect ( while (unsigned ch = *name) { ++name; if (!(isdigit(ch) || ch == L'.' || ch == L':')) { - ConnectParam * cp = NEW(ConnectParam); + ConnectParam * cp = new ConnectParam; cp->callback = callback; cp->param = param; @@ -861,7 +861,7 @@ void NetCliCsrStartConnect ( NetAddress addr; NetAddressFromString(&addr, addrList[i], kNetDefaultClientPort); - ConnectParam * cp = NEW(ConnectParam); + ConnectParam * cp = new ConnectParam; cp->callback = callback; cp->param = param; @@ -889,7 +889,7 @@ void NetCliCsrLoginRequest ( FNetCliCsrLoginCallback callback, void * param ) { - LoginRequestTrans * trans = NEW(LoginRequestTrans)( + LoginRequestTrans * trans = new LoginRequestTrans( csrName, namePassHash, callback, diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp index e8d00ff0..63df9428 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp @@ -1192,7 +1192,7 @@ bool DownloadRequestTrans::Recv ( // we have data to write, so queue it for write in the main thread (we're // currently in a net recv thread) if (byteCount > 0) { - RcvdFileDownloadChunkTrans * writeTrans = NEW(RcvdFileDownloadChunkTrans); + RcvdFileDownloadChunkTrans * writeTrans = new RcvdFileDownloadChunkTrans; writeTrans->writer = m_writer; writeTrans->bytes = byteCount; writeTrans->data = (uint8_t *)malloc(byteCount); @@ -1423,7 +1423,7 @@ void NetCliFileBuildIdRequest ( FNetCliFileBuildIdRequestCallback callback, void * param ) { - BuildIdRequestTrans * trans = NEW(BuildIdRequestTrans)( + BuildIdRequestTrans * trans = new BuildIdRequestTrans( callback, param ); @@ -1442,7 +1442,7 @@ void NetCliFileManifestRequest ( const wchar_t group[], unsigned buildId /* = 0 */ ) { - ManifestRequestTrans * trans = NEW(ManifestRequestTrans)( + ManifestRequestTrans * trans = new ManifestRequestTrans( callback, param, group, @@ -1459,7 +1459,7 @@ void NetCliFileDownloadRequest ( void * param, unsigned buildId /* = 0 */ ) { - DownloadRequestTrans * trans = NEW(DownloadRequestTrans)( + DownloadRequestTrans * trans = new DownloadRequestTrans( callback, param, filename, diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp index f5e223df..b6e8d06a 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp @@ -453,7 +453,7 @@ static bool Recv_PropagateBuffer ( ) { const Game2Cli_PropagateBuffer & reply = *(const Game2Cli_PropagateBuffer *)msg; - RcvdPropagatedBufferTrans * trans = NEW(RcvdPropagatedBufferTrans); + RcvdPropagatedBufferTrans * trans = new RcvdPropagatedBufferTrans; trans->bufferType = reply.type; trans->bufferBytes = reply.bytes; trans->bufferData = (uint8_t *)malloc(reply.bytes); @@ -471,7 +471,7 @@ static bool Recv_GameMgrMsg ( ) { const Game2Cli_GameMgrMsg & reply = *(const Game2Cli_GameMgrMsg *)msg; - RcvdGameMgrMsgTrans * trans = NEW(RcvdGameMgrMsgTrans); + RcvdGameMgrMsgTrans * trans = new RcvdGameMgrMsgTrans; trans->bufferBytes = reply.bytes; trans->bufferData = (uint8_t *)malloc(reply.bytes); MemCopy(trans->bufferData, reply.buffer, reply.bytes); diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp index 8ea52912..7334aa41 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp @@ -271,7 +271,7 @@ static bool ConnEncrypt (ENetError error, void * param) { } s_critsect.Leave(); - // AuthConnectedNotifyTrans * trans = NEW(AuthConnectedNotifyTrans); + // AuthConnectedNotifyTrans * trans = new AuthConnectedNotifyTrans; // NetTransSend(trans); } @@ -1114,7 +1114,7 @@ void NetCliGateKeeperPingRequest ( FNetCliGateKeeperPingRequestCallback callback, void * param ) { - PingRequestTrans * trans = NEW(PingRequestTrans)( + PingRequestTrans * trans = new PingRequestTrans( callback, param, pingTimeMs, @@ -1130,7 +1130,7 @@ void NetCliGateKeeperFileSrvIpAddressRequest ( void * param, bool isPatcher ) { - FileSrvIpAddressRequestTrans * trans = NEW(FileSrvIpAddressRequestTrans)(callback, param, isPatcher); + FileSrvIpAddressRequestTrans * trans = new FileSrvIpAddressRequestTrans(callback, param, isPatcher); NetTransSend(trans); } @@ -1139,6 +1139,6 @@ void NetCliGateKeeperAuthSrvIpAddressRequest ( FNetCliGateKeeperAuthSrvIpAddressRequestCallback callback, void * param ) { - AuthSrvIpAddressRequestTrans * trans = NEW(AuthSrvIpAddressRequestTrans)(callback, param); + AuthSrvIpAddressRequestTrans * trans = new AuthSrvIpAddressRequestTrans(callback, param); NetTransSend(trans); } diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetCommonMessage.h b/Sources/Plasma/PubUtilLib/plNetMessage/plNetCommonMessage.h index 0db17ccb..5b2b7b71 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetCommonMessage.h +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetCommonMessage.h @@ -80,7 +80,7 @@ public: // setters void SetData(char *d) { - plNetCommonMessageData* n = d ? TRACKED_NEW plNetCommonMessageData(d) : nil; + plNetCommonMessageData* n = d ? new plNetCommonMessageData(d) : nil; hsRefCnt_SafeAssign(fMsgData, n); hsRefCnt_SafeUnRef(n); } diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp index c3be83a9..74651810 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp @@ -765,7 +765,7 @@ void plNetMsgSDLState::ReadVersion(hsStream* s, hsResMgr* mgr) { uint32_t len; s->LogReadLE(&len,"SDLState StreamLen"); - uint8_t* buf = TRACKED_NEW uint8_t[len]; + uint8_t* buf = new uint8_t[len]; s->LogRead(len, buf,"SDLState StreamData"); StreamInfo()->SetStreamLen(len); diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp index 2280419c..efe0d77c 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp @@ -239,7 +239,7 @@ void plNetMsgStreamHelper::IAllocStream(uint32_t len) fStreamBuf=nil; fStreamLen=len; if (len) - fStreamBuf = TRACKED_NEW uint8_t[len]; + fStreamBuf = new uint8_t[len]; } void plNetMsgStreamHelper::CopyStream(hsStream* ssStream) @@ -435,7 +435,7 @@ int plNetMsgObjectListHelper::Peek(hsStream* stream, const uint32_t peekOptions) int i; for( i=0 ;iPeek(stream, peekOptions); } // for stream->LogSubStreamEnd(); @@ -489,7 +489,7 @@ int plNetMsgMemberListHelper::Peek(hsStream* stream, const uint32_t peekOptions) int i; for(i=0;iPeek(stream, peekOptions); AddMember(addr); } diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h index 61977cfc..28bd1f5b 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h @@ -241,7 +241,7 @@ public: void Reset(); int GetNumObjects() const { return fObjects.size(); } plNetMsgObjectHelper* GetObject(int i) { return fObjects[i]; } - void AddObject(plKey key) { fObjects.push_back(TRACKED_NEW plNetMsgObjectHelper(key)); } + void AddObject(plKey key) { fObjects.push_back(new plNetMsgObjectHelper(key)); } }; // diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp index 2075c0c5..9fdbfaa9 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp @@ -361,7 +361,7 @@ int compare( const void* arg1, const void *arg2 ) void plNetTransport::GetMemberListDistSorted(plNetTransportMember**& listIn) const { // copy members list - listIn = TRACKED_NEW plNetTransportMember* [fMembers.size()]; + listIn = new plNetTransportMember* [fMembers.size()]; int i; for (i=0; iReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); fBounds = nil; } @@ -812,8 +812,8 @@ void plParticleFlockEffect::SetMaxParticles(const uint16_t num) if (num > 0) { - fDistSq = TRACKED_NEW float[num * num]; - fInfluences = TRACKED_NEW plParticleInfluenceInfo[num]; + fDistSq = new float[num * num]; + fInfluences = new plParticleInfluenceInfo[num]; } } diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp index 36f53207..37c6ac05 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp @@ -131,8 +131,8 @@ void plParticleEmitter::ISetupParticleMem() { fNumValidParticles = 0; - fParticleCores = TRACKED_NEW plParticleCore[fMaxParticles]; - fParticleExts = TRACKED_NEW plParticleExt[fMaxParticles]; + fParticleCores = new plParticleCore[fMaxParticles]; + fParticleExts = new plParticleExt[fMaxParticles]; fTargetInfo.fPos = (uint8_t *)fParticleCores; fTargetInfo.fColor = (uint8_t *)fParticleCores + sizeof(hsPoint3); diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp index 08d756d7..501d30a3 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp @@ -301,9 +301,9 @@ void plSimpleParticleGenerator::Read(hsStream* s, hsResMgr *mgr) float partLifeMax = s->ReadLEScalar(); float pps = s->ReadLEScalar(); uint32_t numSources = s->ReadLE32(); - hsPoint3 *pos = TRACKED_NEW hsPoint3[numSources]; - float *pitch = TRACKED_NEW float[numSources]; - float *yaw = TRACKED_NEW float[numSources]; + hsPoint3 *pos = new hsPoint3[numSources]; + float *pitch = new float[numSources]; + float *yaw = new float[numSources]; int i; for (i = 0; i < numSources; i++) { @@ -424,8 +424,8 @@ void plOneTimeParticleGenerator::Read(hsStream* s, hsResMgr *mgr) float scaleMax = s->ReadLEScalar(); float radsPerSecRange = s->ReadLEScalar(); - hsPoint3 *pos = TRACKED_NEW hsPoint3[count]; - hsVector3 *dir = TRACKED_NEW hsVector3[count]; + hsPoint3 *pos = new hsPoint3[count]; + hsVector3 *dir = new hsVector3[count]; int i; for (i = 0; i < count; i++) diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp index 61183138..6d524f90 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp @@ -113,7 +113,7 @@ void plParticleSystem::Init(uint32_t xTiles, uint32_t yTiles, uint32_t maxTotalP fMaxTotalParticles = fMaxTotalParticlesLeft = maxTotalParticles; fMaxEmitters = maxEmitters; - fEmitters = TRACKED_NEW plParticleEmitter *[fMaxEmitters]; + fEmitters = new plParticleEmitter *[fMaxEmitters]; int i; for (i = 0; i < maxEmitters; i++) fEmitters[i] = nil; @@ -164,7 +164,7 @@ plParticleEmitter* plParticleSystem::GetAvailEmitter() { minTTL = 0; iMinTTL = fNumValidEmitters++; - fEmitters[iMinTTL] = TRACKED_NEW plParticleEmitter(); + fEmitters[iMinTTL] = new plParticleEmitter(); fEmitters[iMinTTL]->Clone(fEmitters[0], iMinTTL); fMaxTotalParticlesLeft -= fEmitters[iMinTTL]->fMaxParticles; @@ -207,7 +207,7 @@ uint32_t plParticleSystem::AddEmitter(uint32_t maxParticles, plParticleGenerator if (maxParticles < 0) maxParticles = 0; - fEmitters[currEmitter] = TRACKED_NEW plParticleEmitter(); + fEmitters[currEmitter] = new plParticleEmitter(); fEmitters[currEmitter]->Init(this, maxParticles, fNextEmitterToGo, emitterFlags, gen); fMaxTotalParticlesLeft -= fEmitters[currEmitter]->fMaxParticles; @@ -554,7 +554,7 @@ void plParticleSystem::AddTarget(plSceneObject *so) plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey()); delete fParticleSDLMod; - fParticleSDLMod = TRACKED_NEW plParticleSDLMod; + fParticleSDLMod = new plParticleSDLMod; fParticleSDLMod->SetAttachedToAvatar(fAttachedToAvatar); so->AddModifier(fParticleSDLMod); } @@ -601,7 +601,7 @@ void plParticleSystem::IReadEffectsArray(hsTArray &effects, int i; for (i = 0; i < count; i++) { - msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, (int8_t)type); + msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, (int8_t)type); mgr->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); } } @@ -611,7 +611,7 @@ void plParticleSystem::Read(hsStream *s, hsResMgr *mgr) plModifier::Read(s, mgr); plGenRefMsg* msg; - msg = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); // Material + msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); // Material mgr->ReadKeyNotifyMe(s, msg, plRefFlags::kActiveRef); fAmbientCtl = plController::ConvertNoRef(mgr->ReadCreatable(s)); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp index 9dd9ac82..44de0732 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp @@ -290,7 +290,7 @@ plMessage* plLOSDispatch::ICreateHitMsg(plLOSRequestMsg* requestMsg, hsMatrix44& { plKey ourKey = GetKey(); plKey rcvKey = requestMsg->GetSender(); - plLOSHitMsg* hitMsg = TRACKED_NEW plLOSHitMsg(ourKey, rcvKey, nil); + plLOSHitMsg* hitMsg = new plLOSHitMsg(ourKey, rcvKey, nil); hitMsg->fNoHit = false; hitMsg->fObj = gMyReport.GetObj(); hitMsg->fDistance = gMyReport.GetDistance(); @@ -304,7 +304,7 @@ plMessage* plLOSDispatch::ICreateMissMsg(plLOSRequestMsg* requestMsg) { plKey ourKey = GetKey(); plKey rcvKey = requestMsg->GetSender(); - plLOSHitMsg* missMsg = TRACKED_NEW plLOSHitMsg(ourKey, rcvKey, nil); + plLOSHitMsg* missMsg = new plLOSHitMsg(ourKey, rcvKey, nil); missMsg->fNoHit = true; missMsg->fObj = nil; missMsg->fRequestID = requestMsg->GetRequestID(); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp index 05489d9d..37fb721f 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp @@ -265,7 +265,7 @@ void plPXPhysical::IMakeHull(NxConvexMesh* convexMesh, hsMatrix44 l2w) delete [] fSaveTriangles; fHullNumberPlanes = desc.numTriangles; - fSaveTriangles = TRACKED_NEW hsPoint3[fHullNumberPlanes*3]; + fSaveTriangles = new hsPoint3[fHullNumberPlanes*3]; for (int i = 0; i < desc.numTriangles; i++) { @@ -288,7 +288,7 @@ void plPXPhysical::ISetHullToWorldWTriangles() // if we have a detector hull and the world hasn't been updated if (fWorldHull == nil) { - fWorldHull = TRACKED_NEW hsPlane3[fHullNumberPlanes]; + fWorldHull = new hsPlane3[fHullNumberPlanes]; // use the local2world from the physics engine so that it matches the transform of the positions from the triggerees hsMatrix44 l2w; plPXConvert::Matrix(fActor->getGlobalPose(), l2w); @@ -546,12 +546,12 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe) if (GetProperty(plSimulationInterface::kSuppressed_DEAD)) IEnable(false); - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kPhysical); + plNodeRefMsg* refMsg = new plNodeRefMsg(fSceneNode, plRefMsg::kOnCreate, -1, plNodeRefMsg::kPhysical); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kActiveRef); if (fWorldKey) { - plGenRefMsg* ref = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefWorld); + plGenRefMsg* ref = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefWorld); hsgResMgr::ResMgr()->AddViaNotify(fWorldKey, ref, plRefFlags::kActiveRef); } @@ -563,7 +563,7 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe) hsAssert(sceneObj, "nil sceneObject, failed to create and attach SDL modifier"); delete fSDLMod; - fSDLMod = TRACKED_NEW plPhysicalSDLModifier; + fSDLMod = new plPhysicalSDLModifier; sceneObj->AddModifier(fSDLMod); } @@ -804,7 +804,7 @@ void plPXPhysical::SendNewLocation(hsBool synchTransform, hsBool isSynchUpdate) hsMatrix44 w2l; fCachedLocal2World.GetInverse(&w2l); - plCorrectionMsg *pCorrMsg = TRACKED_NEW plCorrectionMsg(GetObjectKey(), fCachedLocal2World, w2l, synchTransform); + plCorrectionMsg *pCorrMsg = new plCorrectionMsg(GetObjectKey(), fCachedLocal2World, w2l, synchTransform); pCorrMsg->Send(); if (fProxyGen) fProxyGen->SetTransform(fCachedLocal2World, w2l); @@ -1035,7 +1035,7 @@ void plPXPhysical::Read(hsStream* stream, hsResMgr* mgr) recipe.sceneNode = mgr->ReadKey(stream); recipe.worldKey = mgr->ReadKey(stream); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefSndGroup), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPhysRefSndGroup), plRefFlags::kActiveRef); hsPoint3 pos; hsQuat rot; @@ -1117,7 +1117,7 @@ void plPXPhysical::Read(hsStream* stream, hsResMgr* mgr) physColor.Set(0.6f,0.6f,0.6f,1.f); } - fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); + fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); fProxyGen->Init(this); } diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp index 8ad0a57e..40c4c495 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.cpp @@ -91,7 +91,7 @@ plPhysicalController* plPhysicalController::Create(plKey ownerSO, hsScalar heigh hsScalar radius = width / 2.f; //hsScalar realHeight = height - width; hsScalar realHeight = height - radius + kPhysicalHeightFudge; - return TRACKED_NEW plPXPhysicalController(ownerSO, radius, realHeight); + return new plPXPhysicalController(ownerSO, radius, realHeight); } ////////////////////////////////////////////////////////////////////////// @@ -247,7 +247,7 @@ void plPXPhysicalController::IInformDetectors(bool entering) plPXPhysical* physical = (plPXPhysical*)myactor->userData; if (physical) { - plCollideMsg* msg = TRACKED_NEW plCollideMsg; + plCollideMsg* msg = new plCollideMsg; msg->fOtherKey = fOwner; msg->fEntering = entering; @@ -321,7 +321,7 @@ public: obj->SetNetGroupConstant(plNetGroup::kNetGroupLocalPhysicals); // Tell all the other clients that we own this physical - plSetNetGroupIDMsg* setNetGroupID = TRACKED_NEW plSetNetGroupIDMsg; + plSetNetGroupIDMsg* setNetGroupID = new plSetNetGroupIDMsg; setNetGroupID->fId = plNetGroup::kNetGroupRemotePhysicals; setNetGroupID->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce); setNetGroupID->SetBCastFlag(plMessage::kLocalPropagate, false); @@ -1039,7 +1039,7 @@ void plPXPhysicalController::ISendUpdates(hsScalar delSecs) fLastGlobalLoc = l2w * fLastGlobalLoc; } - plCorrectionMsg* corrMsg = TRACKED_NEW plCorrectionMsg; + plCorrectionMsg* corrMsg = new plCorrectionMsg; corrMsg->fLocalToWorld = fLastGlobalLoc; corrMsg->fLocalToWorld.GetInverse(&corrMsg->fWorldToLocal); corrMsg->fDirtySynch = true; @@ -1197,7 +1197,7 @@ void plPXPhysicalController::ICreateController() opac = 0.8f; // the avatar proxy doesn't seem to work... not sure why? - fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); + fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); fProxyGen->Init(this); } diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp index 963ff982..233040eb 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp @@ -154,7 +154,7 @@ public: plSynchedObject* obj = plSynchedObject::ConvertNoRef(phys->GetObjectKey()->ObjectIsLoaded()); obj->SetNetGroupConstant(plNetGroup::kNetGroupLocalPhysicals); // Tell all the other clients that we own this physical - plSetNetGroupIDMsg* setNetGroupID = TRACKED_NEW plSetNetGroupIDMsg; + plSetNetGroupIDMsg* setNetGroupID = new plSetNetGroupIDMsg; setNetGroupID->fId = plNetGroup::kNetGroupRemotePhysicals; setNetGroupID->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce); setNetGroupID->SetBCastFlag(plMessage::kLocalPropagate, false); @@ -230,7 +230,7 @@ plPhysicalControllerCore* plPhysicalControllerCore::Create(plKey ownerSO, float { float radius = width / 2.f; float realHeight = height - width + kPhysicalHeightFudge; - return TRACKED_NEW plPXPhysicalControllerCore(ownerSO, realHeight,radius); + return new plPXPhysicalControllerCore(ownerSO, realHeight,radius); } return nil; } @@ -576,7 +576,7 @@ NxScene* scene = plSimulationMgr::GetInstance()->GetScene(fWorldKey); /* // the avatar proxy doesn't seem to work... not sure why? - fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); + fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); fProxyGen->Init(this); */ } @@ -646,7 +646,7 @@ void plPXPhysicalControllerCore::ICreateController(const hsPoint3& pos) /* // the avatar proxy doesn't seem to work... not sure why? - fProxyGen = TRACKED_NEW plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); + fProxyGen = new plPhysicalProxy(hsColorRGBA().Set(0,0,0,1.f), physColor, opac); fProxyGen->Init(this); */ @@ -694,7 +694,7 @@ void plPXPhysicalControllerCore::IInformDetectors(bool entering,bool deferUntilN bool doReport = physical->DoReportOn(plSimDefs::kGroupAvatar); if(doReport) { - plCollideMsg* msg = TRACKED_NEW plCollideMsg; + plCollideMsg* msg = new plCollideMsg; msg->fOtherKey = fOwner; msg->fEntering = entering; msg->AddReceiver(physical->GetObjectKey()); @@ -990,7 +990,7 @@ void plPXPhysicalControllerCore::IHandleResize() collideFlags|=(1<GetScene(this->fWorldKey); -// NxShape** response=TRACKED_NEW NxShape*[2]; +// NxShape** response=new NxShape*[2]; NxVec3 center(fLocalPosition.fX,fLocalPosition.fY,fLocalPosition.fZ+fPreferedRadius); NxSegment Seg(center,center); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp index 4a0b012b..7f1970b3 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp @@ -209,7 +209,7 @@ class SensorReport : public NxUserTriggerReport { DetectorLogYellow("Collision: %s was triggered by %s. Sending an %s msg", receiver->GetName(), hitter ? hitter->GetName() : "(nil)" , entering ? "'enter'" : "'exit'"); - plCollideMsg* msg = TRACKED_NEW plCollideMsg; + plCollideMsg* msg = new plCollideMsg; msg->fOtherKey = hitter; msg->fEntering = entering; msg->AddReceiver(receiver); @@ -370,7 +370,7 @@ bool plSimulationMgr::fDoClampingOnStep=true; void plSimulationMgr::Init() { hsAssert(!gTheInstance, "Initializing the sim when it's already been done"); - gTheInstance = TRACKED_NEW plSimulationMgr(); + gTheInstance = new plSimulationMgr(); if (gTheInstance->InitSimulation()) { gTheInstance->RegisterAs(kSimulationMgr_KEY); @@ -410,7 +410,7 @@ plSimulationMgr::plSimulationMgr() : fSuspended(true) , fMaxDelta(kDefaultMaxDelta) , fStepSize(kDefaultStepSize) - , fLOSDispatch(TRACKED_NEW plLOSDispatch()) + , fLOSDispatch(new plLOSDispatch()) , fSoundMgr(new plPhysicsSoundMgr) , fLog(nil) { @@ -539,7 +539,7 @@ void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, hsBool ent { DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName() : "(nil)", receiver->GetName(), entering ? "'enter'" : "'exit'"); - plCollideMsg* msg = TRACKED_NEW plCollideMsg; + plCollideMsg* msg = new plCollideMsg; msg->fOtherKey = hitter; msg->fEntering = entering; msg->AddReceiver(receiver); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp index 58173b98..b0891d65 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp @@ -114,7 +114,7 @@ hsBool plCollisionDetector::MsgReceive(plMessage* msg) { for (int i = 0; i < fReceivers.Count(); i++) { - plActivatorMsg* pMsg = TRACKED_NEW plActivatorMsg; + plActivatorMsg* pMsg = new plActivatorMsg; pMsg->AddReceiver( fReceivers[i] ); if (fProxyKey) @@ -141,7 +141,7 @@ hsBool plCollisionDetector::MsgReceive(plMessage* msg) for (int i = 0; i < fReceivers.Count(); i++) { - plActivatorMsg* pMsg = TRACKED_NEW plActivatorMsg; + plActivatorMsg* pMsg = new plActivatorMsg; pMsg->AddReceiver( fReceivers[i] ); if (fProxyKey) pMsg->fHiteeObj = fProxyKey; @@ -194,7 +194,7 @@ hsBool plCollisionDetector::MsgReceive(plMessage* msg) plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey()); for (int i = 0; i < fReceivers.Count(); i++) { - plActivatorMsg* pMsg = TRACKED_NEW plActivatorMsg; + plActivatorMsg* pMsg = new plActivatorMsg; pMsg->AddReceiver( fReceivers[i] ); if (fProxyKey) pMsg->fHiteeObj = fProxyKey; @@ -491,7 +491,7 @@ void plObjectInVolumeDetector::ITrigger(plKey hitter, bool entering, bool immedi else initialState =false; - plCollisionBookKeepingInfo* BookKeeper=TRACKED_NEW plCollisionBookKeepingInfo(hitter); + plCollisionBookKeepingInfo* BookKeeper=new plCollisionBookKeepingInfo(hitter); if(entering) { BookKeeper->enters++; @@ -509,7 +509,7 @@ void plObjectInVolumeDetector::ITrigger(plKey hitter, bool entering, bool immedi } else { - plActivatorMsg* ActivatorMsg = TRACKED_NEW plActivatorMsg; + plActivatorMsg* ActivatorMsg = new plActivatorMsg; ActivatorMsg->AddReceivers(fReceivers); if (fProxyKey) ActivatorMsg->fHiteeObj = fProxyKey; @@ -533,7 +533,7 @@ void plObjectInVolumeDetector::ITrigger(plKey hitter, bool entering, bool immedi } #endif // USE_PHYSX_COLLISION_FLUTTER_WORKAROUND -/* fSavedActivatorMsg = TRACKED_NEW plActivatorMsg; +/* fSavedActivatorMsg = new plActivatorMsg; fSavedActivatorMsg->AddReceivers(fReceivers); @@ -647,7 +647,7 @@ void plObjectInVolumeDetector::IHandleEval(plEvalMsg* pEval) HitIt = fCurrentResidents.find((*it)->hitter); if(HitIt != fCurrentResidents.end()) alreadyInside = true; else alreadyInside=false; - plActivatorMsg* actout=TRACKED_NEW plActivatorMsg; + plActivatorMsg* actout=new plActivatorMsg; actout->fHitterObj=((*it)->hitter); actout->SetSender(GetKey()); if (fProxyKey) @@ -890,14 +890,14 @@ hsBool plSubworldRegionDetector::MsgReceive(plMessage* msg) DetectorLogSpecial("Switching to subworld %s", fSub->GetName()); plKey nilKey; - plSubWorldMsg* msg = TRACKED_NEW plSubWorldMsg(GetKey(), avMod->GetKey(), fSub); + plSubWorldMsg* msg = new plSubWorldMsg(GetKey(), avMod->GetKey(), fSub); msg->Send(); } } else { DetectorLogSpecial("Switching to main subworld"); - plSubWorldMsg* msg = TRACKED_NEW plSubWorldMsg(GetKey(), avMod->GetKey(), nil); + plSubWorldMsg* msg = new plSubWorldMsg(GetKey(), avMod->GetKey(), nil); msg->Send(); } } diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h b/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h index 849af880..d2cab1be 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h +++ b/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h @@ -81,7 +81,7 @@ public: { fReceivers.Append(mgr->ReadKey(stream)); } - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plObjRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plObjRefMsg::kModifier), plRefFlags::kActiveRef); fProxyKey = mgr->ReadKey(stream); } diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp index 771d0efe..6e115f89 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp @@ -146,7 +146,7 @@ void plPhysicalSndGroup::PlaySlideSound(uint32_t against) { if(against >= fSlideSounds.Count()) return; - plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kContinue); animMsg->Send(fSlideSounds[against]); fPlayingSlideSound = true; @@ -156,7 +156,7 @@ void plPhysicalSndGroup::StopSlideSound(uint32_t against) { if(against >= fSlideSounds.Count()) return; - plAnimCmdMsg *animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg *animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kStop); animMsg->Send(fSlideSounds[against]); fPlayingSlideSound = false; @@ -166,7 +166,7 @@ void plPhysicalSndGroup::PlayImpactSound(uint32_t against) { if(against >= fImpactSounds.Count()) return; - plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kContinue); animMsg->Send(fImpactSounds[against]); } @@ -175,7 +175,7 @@ void plPhysicalSndGroup::SetSlideSoundVolume(uint32_t against, float volume) { if(against >= fSlideSounds.Count()) return; - plAnimCmdMsg* animMsg = TRACKED_NEW plAnimCmdMsg; + plAnimCmdMsg* animMsg = new plAnimCmdMsg; animMsg->SetCmd(plAnimCmdMsg::kSetSpeed); animMsg->fSpeed = volume; animMsg->Send(fSlideSounds[against]); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp index 7fb919e7..471cbee0 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp @@ -78,7 +78,7 @@ hsBool plPickingDetector::MsgReceive(plMessage* msg) { for (int i = 0; i < fReceivers.Count(); i++) { - plActivatorMsg* pMsg = TRACKED_NEW plActivatorMsg; + plActivatorMsg* pMsg = new plActivatorMsg; pMsg->AddReceiver( fReceivers[i] ); if (pPMsg->fPicked) pMsg->SetTriggerType( plActivatorMsg::kPickedTrigger ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index c3ad4c4f..c053443d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -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; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp index ac68c3b3..be4df113 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp @@ -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(); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTarget.h b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTarget.h index bb3b3e3a..168febbc 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTarget.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTarget.h @@ -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(); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp index e7652664..3e192a5d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp @@ -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 ); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp index 86683db2..016d8175 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp @@ -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; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp index dd102407..caf714a5 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp @@ -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++) { diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp index 7ff0043d..20aafd23 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp @@ -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 ) diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp index 0fa031ca..5b5d9d4b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp @@ -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(); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp index 85eb9666..a3461832 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp @@ -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 ); + fCells.Append( new hsTArray ); 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 ); + fCells.Append( new hsTArray ); } *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 ]; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp index cf9d80f0..ee796dd7 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp @@ -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 ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp index dc23f1e0..313c9728 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp @@ -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 ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp index e9fc83ed..7f1dea0d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp @@ -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++ ) { diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp index 18f26f6f..430d644a 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp @@ -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! } diff --git a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp index 89934bb7..d874a55c 100644 --- a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.cpp @@ -87,7 +87,7 @@ plProgressMgr::plProgressMgr() // Fill array with pre-computed loading frame IDs for (int i=0; i < LOADING_RES_COUNT; i++) { - char* frameID = TRACKED_NEW char[128]; + char* frameID = new char[128]; sprintf(frameID, LOADING_RES, i); fImageRotation[i] = frameID; } @@ -125,7 +125,7 @@ plOperationProgress* plProgressMgr::IRegisterOperation(float length, const char Activate(); } - plOperationProgress *op = TRACKED_NEW plOperationProgress( length ); + plOperationProgress *op = new plOperationProgress( length ); op->SetTitle( title ); diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.cpp index f724f045..c006c56c 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.cpp @@ -91,7 +91,7 @@ plBSDiffBuffer::plBSDiffBuffer( void *buffer, uint32_t length ) if (!buffer || length < 32) hsAssert(false, "Corrupt Patch Buffer!"); - if((fPatchBuffer=TRACKED_NEW unsigned char[length+1])!=nil) + if((fPatchBuffer=new unsigned char[length+1])!=nil) { fPatchLength = length; memcpy(fPatchBuffer, buffer, fPatchLength); @@ -142,8 +142,8 @@ uint32_t plBSDiffBuffer::Diff( uint32_t oldLength, void *oldBuffer, uint32_t new oldbuf = (unsigned char *)oldBuffer; newbuf = (unsigned char *)newBuffer; - if(((I=TRACKED_NEW int32_t[oldLength+1])==nil) || - ((V=TRACKED_NEW int32_t[oldLength+1])==nil)) + if(((I=new int32_t[oldLength+1])==nil) || + ((V=new int32_t[oldLength+1])==nil)) { delete[] I; delete[] V; @@ -157,9 +157,9 @@ uint32_t plBSDiffBuffer::Diff( uint32_t oldLength, void *oldBuffer, uint32_t new /* * These could probably be smaller, especially cb. */ - if(((cb=TRACKED_NEW unsigned char[newLength+1])==nil) || - ((db=TRACKED_NEW unsigned char[newLength+1])==nil) || - ((eb=TRACKED_NEW unsigned char[newLength+1])==nil)) + if(((cb=new unsigned char[newLength+1])==nil) || + ((db=new unsigned char[newLength+1])==nil) || + ((eb=new unsigned char[newLength+1])==nil)) { delete[] I; delete[] cb; @@ -263,7 +263,7 @@ uint32_t plBSDiffBuffer::Diff( uint32_t oldLength, void *oldBuffer, uint32_t new fPatchLength = 32 + cblen + dblen + eblen; fPatchBuffer = nil; - if((fPatchBuffer=TRACKED_NEW unsigned char[fPatchLength])!=nil) + if((fPatchBuffer=new unsigned char[fPatchLength])!=nil) { memcpy(fPatchBuffer,header,32); memcpy(fPatchBuffer+32,cb,cblen); @@ -390,7 +390,7 @@ uint32_t plBSDiffBuffer::Patch( uint32_t oldLength, void *oldBuffer, uint32_t &n extrapipe=diffpipe+datalen; }; - if((newBuffer=(void *)TRACKED_NEW unsigned char[newLength+1])==nil) return(-1); + if((newBuffer=(void *)new unsigned char[newLength+1])==nil) return(-1); newpos = (unsigned char *)newBuffer; newend = (unsigned char *)newBuffer + newLength; oldpos = (unsigned char *)oldBuffer; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.cpp index 4a11dae4..1506045c 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.cpp @@ -86,7 +86,7 @@ plDiffBuffer::plDiffBuffer( uint32_t newLength, uint32_t oldLength ) f16BitMode = false; fNewLength = newLength; - fStream = TRACKED_NEW hsRAMStream(); + fStream = new hsRAMStream(); fStream->WriteLE32( fNewLength ); fStream->WriteBool( f16BitMode ); fWriting = true; @@ -109,12 +109,12 @@ plDiffBuffer::plDiffBuffer( void *buffer, uint32_t length ) memcmp(buffer,"BSDIFF40",8)==0 ) { // This is a bsdiff buffer. Use plBSDiffBuffer to handle it. - fBSDiffBuffer = TRACKED_NEW plBSDiffBuffer(buffer, length); + fBSDiffBuffer = new plBSDiffBuffer(buffer, length); fIsBSDiff = true; } else { - fStream = TRACKED_NEW hsRAMStream(); + fStream = new hsRAMStream(); fStream->Write( length, buffer ); fStream->Rewind(); @@ -187,7 +187,7 @@ void plDiffBuffer::GetBuffer( uint32_t &length, void *&bufferPtr ) hsAssert( fWriting, "Trying to GetBuffer() on a difference buffer that's reading" ); length = fStream->GetPosition(); - bufferPtr = (void *)TRACKED_NEW uint8_t[ length ]; + bufferPtr = (void *)new uint8_t[ length ]; fStream->Rewind(); fStream->Read( length, bufferPtr ); @@ -218,7 +218,7 @@ void plDiffBuffer::Apply( uint32_t oldLength, void *oldBuffer, uint32_t &newL /// Step 1: Allocate the new buffer newLength = fNewLength; - uint8_t *new8Buffer = TRACKED_NEW uint8_t[ newLength ]; + uint8_t *new8Buffer = new uint8_t[ newLength ]; uint8_t *old8Buffer = (uint8_t *)oldBuffer; newBuffer = (void *)new8Buffer; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp index 107662b1..93f9783e 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp @@ -332,7 +332,7 @@ void plRegistryKeyList::Read(hsStream* s) for (int i = 0; i < numKeys; i++) { - plKeyImp* newKey = TRACKED_NEW plKeyImp; + plKeyImp* newKey = new plKeyImp; newKey->Read(s); fStaticKeys[i] = newKey; } diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp index 7648ba70..713ae73a 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp @@ -186,7 +186,7 @@ void plRegistryPageNode::LoadKeys() plRegistryKeyList* keyList = IGetKeyList(classType); if (!keyList) { - keyList = TRACKED_NEW plRegistryKeyList(classType); + keyList = new plRegistryKeyList(classType); fKeyLists[classType] = keyList; } keyList->Read(stream); @@ -333,7 +333,7 @@ void plRegistryPageNode::AddKey(plKeyImp* key) plRegistryKeyList* keys = fKeyLists[classType]; if (keys == nil) { - keys = TRACKED_NEW plRegistryKeyList(classType); + keys = new plRegistryKeyList(classType); fKeyLists[classType] = keys; } diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index 08cce85a..fd69ff88 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -139,7 +139,7 @@ hsBool plResManager::IInit() char fileName[kFolderIterator_MaxPath]; pathIterator.GetPathAndName(fileName); - plRegistryPageNode* node = TRACKED_NEW plRegistryPageNode(fileName); + plRegistryPageNode* node = new plRegistryPageNode(fileName); fAllPages.insert(node); } } @@ -148,12 +148,12 @@ hsBool plResManager::IInit() CreatePage(plLocation::kGlobalFixedLoc, "Global", "FixedKeys"); hsAssert(!fDispatch, "Dispatch already set"); - fDispatch = TRACKED_NEW plDispatch; + fDispatch = new plDispatch; plgTimerCallbackMgr::Init(); // Init our helper - fMyHelper = TRACKED_NEW plResManagerHelper(this); + fMyHelper = new plResManagerHelper(this); fMyHelper->Init(); hsAssert(fMyHelper->GetKey() != nil, "ResManager helper didn't init properly!" ); @@ -234,7 +234,7 @@ void plResManager::IShutdown() void plResManager::AddSinglePage(const char* pagePath) { - plRegistryPageNode* node = TRACKED_NEW plRegistryPageNode(pagePath); + plRegistryPageNode* node = new plRegistryPageNode(pagePath); AddPage(node); } @@ -573,7 +573,7 @@ plKey plResManager::FindOriginalKey(const plUoid& uoid) // Note: startPos of -1 means we didn't read it from disk, but 0 length // is our special key that we're a passively created key - foundKey = TRACKED_NEW plKeyImp(uoid, uint32_t(-1), uint32_t(0)); + foundKey = new plKeyImp(uoid, uint32_t(-1), uint32_t(0)); key = plKey::Make(foundKey); } @@ -755,7 +755,7 @@ plKey plResManager::NewKey(plUoid& newUoid, hsKeyedObject* object) { hsAssert(fInited, "Attempting to create a new key before we're inited!"); - plKeyImp* newKey = TRACKED_NEW plKeyImp; + plKeyImp* newKey = new plKeyImp; newKey->SetUoid(newUoid); AddKey(newKey); @@ -816,7 +816,7 @@ plKey plResManager::ReRegister(const char* nm, const plUoid& oid) } } - plKeyImp* pKey = TRACKED_NEW plKeyImp; + plKeyImp* pKey = new plKeyImp; if (canClone && pOrigKey) { pKey->CopyForClone((plKeyImp*)pOrigKey, fCurClonePlayerID, fCurCloneID); @@ -926,7 +926,7 @@ plKey plResManager::ICloneKey(const plUoid& objUoid, uint32_t playerID, uint32_t fCurCloneID = 0; // Then notify NetClientMgr when object loads - plObjRefMsg* refMsg = TRACKED_NEW plObjRefMsg(plNetClientApp::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, 0); + plObjRefMsg* refMsg = new plObjRefMsg(plNetClientApp::GetInstance()->GetKey(), plRefMsg::kOnCreate, 0, 0); AddViaNotify(cloneKey, refMsg, plRefFlags::kPassiveRef); return cloneKey; @@ -1064,7 +1064,7 @@ void plResManager::LoadAgeKeys(const char* age) kResMgrLog(1, ILog(1, "Loading age keys for age %s", age)); hsStatusMessageF("*** Loading age keys for age %s ***\n", age); - plResAgeHolder* holder = TRACKED_NEW plResAgeHolder(age); + plResAgeHolder* holder = new plResAgeHolder(age); fHeldAgeKeys[age] = holder; // Go find pages that match this age, load the keys, and ref them all plResHolderIterator iter(age, holder->fKeys, this); @@ -1260,7 +1260,7 @@ public: plPageInAgeIter(plKey destKey, const char *ageName) : fDestKey(destKey), fAgeName(ageName) {} ~plPageInAgeIter() { - plClientMsg* pMsg1 = TRACKED_NEW plClientMsg(plClientMsg::kLoadRoomHold); + plClientMsg* pMsg1 = new plClientMsg(plClientMsg::kLoadRoomHold); for (int i = 0; i < fLocations.size(); i++) { pMsg1->AddRoomLoc(fLocations[i]); @@ -1287,7 +1287,7 @@ void plResManager::PageInAge(const char *age) plKey clientKey = hsgResMgr::ResMgr()->FindKey(lu); // Tell the client to load all the keys for this age, to make the loading process work better - plClientMsg *loadAgeKeysMsg = TRACKED_NEW plClientMsg(plClientMsg::kLoadAgeKeys); + plClientMsg *loadAgeKeysMsg = new plClientMsg(plClientMsg::kLoadAgeKeys); loadAgeKeysMsg->SetAgeName(age); loadAgeKeysMsg->Send(clientKey); @@ -1511,7 +1511,7 @@ void plResManager::DumpUnusedKeys(plRegistryPageNode* page) const plRegistryPageNode* plResManager::CreatePage(const plLocation& location, const char* age, const char* page) { - plRegistryPageNode* pageNode = TRACKED_NEW plRegistryPageNode(location, age, page, fDataPath.c_str()); + plRegistryPageNode* pageNode = new plRegistryPageNode(location, age, page, fDataPath.c_str()); fAllPages.insert(pageNode); return pageNode; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp index 988795ca..eb21d56f 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp @@ -174,8 +174,8 @@ void plResManagerHelper::LoadAndHoldPageKeys( plRegistryPageNode *page ) hsAssert( GetKey() != nil, "Can't load and hold keys when we don't have a key for the helper" ); // Create our msg - plResMgrHelperMsg *refferMsg = TRACKED_NEW plResMgrHelperMsg( plResMgrHelperMsg::kKeyRefList ); - refferMsg->fKeyList = TRACKED_NEW plResPageKeyRefList; + plResMgrHelperMsg *refferMsg = new plResMgrHelperMsg( plResMgrHelperMsg::kKeyRefList ); + refferMsg->fKeyList = new plResPageKeyRefList; fResManager->LoadPageKeys(page); page->IterateKeys( refferMsg->fKeyList ); @@ -240,7 +240,7 @@ class plResMgrDebugInterface : public plInputInterface } else if( pKeyMsg->GetKeyCode() == KEY_ESCAPE ) { - plResMgrHelperMsg *msg = TRACKED_NEW plResMgrHelperMsg( plResMgrHelperMsg::kDisableDebugScreen ); + plResMgrHelperMsg *msg = new plResMgrHelperMsg( plResMgrHelperMsg::kDisableDebugScreen ); msg->Send( fParent->GetKey() ); return true; } @@ -286,12 +286,12 @@ void plResManagerHelper::EnableDebugScreen( hsBool enable ) fDebugScreen = plStatusLogMgr::GetInstance().CreateStatusLog( kLogSize, "ResManager Status", plStatusLog::kFilledBackground | plStatusLog::kDontWriteFile ); fRefreshing = true; - plResMgrHelperMsg *msg = TRACKED_NEW plResMgrHelperMsg( plResMgrHelperMsg::kUpdateDebugScreen ); + plResMgrHelperMsg *msg = new plResMgrHelperMsg( plResMgrHelperMsg::kUpdateDebugScreen ); // msg->SetTimeStamp( hsTimer::GetSysSeconds() + kUpdateDelay ); msg->Send( GetKey() ); - fDebugInput = TRACKED_NEW plResMgrDebugInterface( this ); - plInputIfaceMgrMsg *imsg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); + fDebugInput = new plResMgrDebugInterface( this ); + plInputIfaceMgrMsg *imsg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface ); imsg->SetIFace( fDebugInput ); imsg->Send(); } @@ -304,7 +304,7 @@ void plResManagerHelper::EnableDebugScreen( hsBool enable ) delete fDebugScreen; fDebugScreen = nil; - plInputIfaceMgrMsg *imsg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); + plInputIfaceMgrMsg *imsg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface ); imsg->SetIFace( fDebugInput ); imsg->Send(); @@ -507,7 +507,7 @@ void plResManagerHelper::IUpdateDebugScreen( hsBool force ) // Repump our update if( !force ) { - plResMgrHelperMsg *msg = TRACKED_NEW plResMgrHelperMsg( plResMgrHelperMsg::kUpdateDebugScreen ); + plResMgrHelperMsg *msg = new plResMgrHelperMsg( plResMgrHelperMsg::kUpdateDebugScreen ); msg->SetTimeStamp( hsTimer::GetSysSeconds() + kUpdateDelay ); msg->Send( GetKey() ); } diff --git a/Sources/Plasma/PubUtilLib/plSDL/plSDLMgr.cpp b/Sources/Plasma/PubUtilLib/plSDL/plSDLMgr.cpp index 90fead57..a95f30b9 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plSDLMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plSDLMgr.cpp @@ -183,7 +183,7 @@ int plSDLMgr::Read(hsStream* s, plSDL::DescriptorList* dl) int i; for(i=0;iRead(s)) dl->push_back(sd); } diff --git a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp index db14aa5b..ca30812c 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp @@ -90,7 +90,7 @@ bool plSDLParser::IParseStateDesc(const char* fileName, hsStream* stream, char t // curDesc=plSDLMgr::GetInstance()->FindDescriptor(token, plSDL::kLatestVersion); // if (!curDesc) { - curDesc = TRACKED_NEW plStateDescriptor; + curDesc = new plStateDescriptor; curDesc->SetName(token); DebugMsg("SDL: DESC name=%s", token); @@ -182,10 +182,10 @@ bool plSDLParser::IParseVarDesc(const char* fileName, hsStream* stream, char tok plStateDescriptor* stateDesc = plSDLMgr::GetInstance()->FindDescriptor(sdlName, plSDL::kLatestVersion); hsAssert(stateDesc, xtl::format("can't find nested state desc reference %s, fileName=%s", sdlName, fileName).c_str()); - curVar = TRACKED_NEW plSDVarDescriptor(stateDesc); + curVar = new plSDVarDescriptor(stateDesc); } else - curVar = TRACKED_NEW plSimpleVarDescriptor; + curVar = new plSimpleVarDescriptor; curDesc->AddVar(curVar); bool ok=curVar->SetType(token); diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateChangeNotifier.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateChangeNotifier.cpp index 5a1bec67..fdbf6e39 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateChangeNotifier.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateChangeNotifier.cpp @@ -123,7 +123,7 @@ bool plStateChangeNotifier::operator==(const plStateChangeNotifier &other) const void plStateChangeNotifier::SendNotificationMsg(const plSimpleStateVariable* srcVar, const plSimpleStateVariable* dstVar, const char* sdlName) { - plSDLNotificationMsg* m = TRACKED_NEW plSDLNotificationMsg; + plSDLNotificationMsg* m = new plSDLNotificationMsg; // add receivers KeyList::iterator kit=fKeys.begin(); diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp index d6cfa618..df6a2513 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp @@ -155,12 +155,12 @@ void plStateDataRecord::IInitDescriptor(const plStateDescriptor* sd) { if (vd->GetAsSDVarDescriptor()) { // it's a var which references another state descriptor. - fSDVarsList.push_back(TRACKED_NEW plSDStateVariable(vd->GetAsSDVarDescriptor())); + fSDVarsList.push_back(new plSDStateVariable(vd->GetAsSDVarDescriptor())); } else { hsAssert(vd->GetAsSimpleVarDescriptor(), "var class problem"); - fVarsList.push_back(TRACKED_NEW plSimpleStateVariable(vd->GetAsSimpleVarDescriptor())); + fVarsList.push_back(new plSimpleStateVariable(vd->GetAsSimpleVarDescriptor())); } } } @@ -453,9 +453,9 @@ plNetMsgSDLState* plStateDataRecord::PrepNetMsg(float timeConvert, uint32_t writ // fill in net msg plNetMsgSDLState* msg; if (writeOptions & plSDL::kBroadcast) - msg = TRACKED_NEW plNetMsgSDLStateBCast; + msg = new plNetMsgSDLStateBCast; else - msg = TRACKED_NEW plNetMsgSDLState; + msg = new plNetMsgSDLState; msg->StreamInfo()->CopyStream(&stream); return msg; diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp index 13be0b44..f2d74fe8 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp @@ -110,9 +110,9 @@ bool plStateDescriptor::Read(hsStream* s) uint8_t SDVar=s->ReadByte(); plVarDescriptor* var = nil; if (SDVar) - var = TRACKED_NEW plSDVarDescriptor; + var = new plSDVarDescriptor; else - var = TRACKED_NEW plSimpleVarDescriptor; + var = new plSimpleVarDescriptor; if (var->Read(s)) fVarsList.push_back(var); else diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index 9e782ca4..19d3fbae 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp @@ -225,7 +225,7 @@ void plSimpleStateVariable::IDeAlloc() #define SDLALLOC(typeName, type, var) \ case typeName: \ - var = TRACKED_NEW type[cnt]; \ + var = new type[cnt]; \ break; void plSimpleStateVariable::Alloc(int listSize) @@ -251,13 +251,13 @@ void plSimpleStateVariable::Alloc(int listSize) SDLALLOC(plVarDescriptor::kBool, bool, fB) SDLALLOC(plVarDescriptor::kCreatable, plCreatable*, fC) case plVarDescriptor::kTime: - fT = TRACKED_NEW plClientUnifiedTime[cnt]; + fT = new plClientUnifiedTime[cnt]; break; case plVarDescriptor::kKey: - fU = TRACKED_NEW plUoid[cnt]; + fU = new plUoid[cnt]; break; case plVarDescriptor::kString32: - fS32 = TRACKED_NEW plVarDescriptor::String32[cnt]; + fS32 = new plVarDescriptor::String32[cnt]; break; default: hsAssert(false, "undefined atomic type"); @@ -538,7 +538,7 @@ bool plSimpleStateVariable::IConvertFromRGB(plVarDescriptor::Type newType) { // rgb to rgba int i,j; - float* newF = TRACKED_NEW float[fVar.GetCount()*4]; // make more space + float* newF = new float[fVar.GetCount()*4]; // make more space for(j=0;jRead(s, hsgResMgr::ResMgr()); // data @@ -2419,7 +2419,7 @@ void plSDStateVariable::Resize(int cnt) { int i; for(i=origCnt;iGetStateDescriptor()); + fDataRecList[i] = new plStateDataRecord(fVarDescriptor->GetStateDescriptor()); } SetDirty(true); @@ -2445,7 +2445,7 @@ void plSDStateVariable::Alloc(plSDVarDescriptor* sdvd, int listSize) { if (fVarDescriptor==nil) { - fVarDescriptor = TRACKED_NEW plSDVarDescriptor; + fVarDescriptor = new plSDVarDescriptor; fVarDescriptor->CopyFrom(sdvd); } @@ -2453,7 +2453,7 @@ void plSDStateVariable::Alloc(plSDVarDescriptor* sdvd, int listSize) fDataRecList.resize(cnt); int j; for (j=0;jGetStateDescriptor()), j); + InsertStateDataRecord(new plStateDataRecord(sdvd->GetStateDescriptor()), j); } } diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp b/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp index 5f11d35f..669e1362 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plOccluder::plOccluder() : fSceneNode(nil) { - fProxyGen = TRACKED_NEW plOccluderProxy; + fProxyGen = new plOccluderProxy; fProxyGen->Init(this); fVisSet.SetBit(0); @@ -271,7 +271,7 @@ void plOccluder::ISetSceneNode(plKey node) { if( node ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kOccluder); + plNodeRefMsg* refMsg = new plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kOccluder); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef); } if( fSceneNode ) @@ -302,7 +302,7 @@ void plOccluder::Read(hsStream* s, hsResMgr* mgr) n = s->ReadLE16(); fVisRegions.SetCountAndZero(n); for( i = 0; i < n; i++ ) - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisRegion), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisRegion), plRefFlags::kActiveRef); } void plOccluder::Write(hsStream* s, hsResMgr* mgr) diff --git a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp index 0b1b9cdf..eabc49b9 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp @@ -93,7 +93,7 @@ void plPostEffectMod::ISetupRenderRequest() uint32_t zDepth = 0; uint32_t stencilDepth = 0; - fRenderRequest = TRACKED_NEW plRenderRequest; + fRenderRequest = new plRenderRequest; uint32_t renderState = plPipeline::kRenderNormal | plPipeline::kRenderNoProjection | plPipeline::kRenderNoLights @@ -107,7 +107,7 @@ void plPostEffectMod::ISetupRenderRequest() fRenderRequest->SetRenderTarget(fRenderTarget); - fPageMgr = TRACKED_NEW plPageTreeMgr; + fPageMgr = new plPageTreeMgr; fRenderRequest->SetPageTreeMgr(fPageMgr); @@ -223,7 +223,7 @@ void plPostEffectMod::ISubmitRequest() IUpdateRenderRequest(); - plRenderRequestMsg* req = TRACKED_NEW plRenderRequestMsg(GetKey(), fRenderRequest); + plRenderRequestMsg* req = new plRenderRequestMsg(GetKey(), fRenderRequest); plgDispatch::MsgSend(req); } @@ -305,7 +305,7 @@ void plPostEffectMod::Read(hsStream* s, hsResMgr* mgr) fFovX = s->ReadLEScalar(); fFovY = s->ReadLEScalar(); - fNodeKey = mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kNodeRef), plRefFlags::kPassiveRef); + fNodeKey = mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kNodeRef), plRefFlags::kPassiveRef); fDefaultW2C.Read( s ); fDefaultC2W.Read( s ); @@ -334,4 +334,4 @@ const plViewTransform& plPostEffectMod::GetViewTransform() { IUpdateRenderRequest(); return fRenderRequest->GetViewTransform(); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp index 5a09b914..4063ed73 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp @@ -53,7 +53,7 @@ plRelevanceMgr::plRelevanceMgr() : fEnabled(true) void plRelevanceMgr::Init() { - fInstance = TRACKED_NEW plRelevanceMgr; + fInstance = new plRelevanceMgr; fInstance->RegisterAs(kRelevanceMgr_KEY); } @@ -219,7 +219,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s) if (strcmp(buff, "") == 0) continue; // ignore the initial blank one - plRegionInfo *info = TRACKED_NEW plRegionInfo; + plRegionInfo *info = new plRegionInfo; regions.Append(info); info->fName = hsStrcpy(buff); info->fIndex = GetIndex(buff); diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp index 5310bbe6..72401654 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp @@ -48,13 +48,13 @@ void plRelevanceRegion::Read(hsStream* s, hsResMgr* mgr) { plObjInterface::Read(s, mgr); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef); // Added to the manager when read in. // Removed when paged out, due to passive ref. if (plRelevanceMgr::Instance()) { - plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(plRelevanceMgr::Instance()->GetKey(), plRefMsg::kOnCreate, -1, -1); + plGenRefMsg *msg = new plGenRefMsg(plRelevanceMgr::Instance()->GetKey(), plRefMsg::kOnCreate, -1, -1); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), msg, plRefFlags::kPassiveRef); } } diff --git a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp index aa4ee072..f99d5d53 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp @@ -136,7 +136,7 @@ void plRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr) if( GetAck() ) { - plRenderRequestAck* ack = TRACKED_NEW plRenderRequestAck( GetAck(), GetUserData() ); + plRenderRequestAck* ack = new plRenderRequestAck( GetAck(), GetUserData() ); ack->SetNumDrawn(numDrawn); plgDispatch::MsgSend( ack ); } diff --git a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp index cc99b786..56d10d7a 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp @@ -103,7 +103,7 @@ void plSceneNode::Read(hsStream* s, hsResMgr* mgr) fSceneObjects.Reset(); for( i = 0; i < n; i++ ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, i, plNodeRefMsg::kObject); + plNodeRefMsg* refMsg = new plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, i, plNodeRefMsg::kObject); plKey key = mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef); } @@ -111,7 +111,7 @@ void plSceneNode::Read(hsStream* s, hsResMgr* mgr) fGenericPool.Reset(); for( i = 0; i < n; i++ ) { - plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); + plNodeRefMsg* refMsg = new plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric); mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef); } } diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp index b685244c..d9bb3e01 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp @@ -209,7 +209,7 @@ plVisMgr* plGlobalVisMgr::fInstance = nil; void plGlobalVisMgr::Init() { - fInstance = TRACKED_NEW plVisMgr; + fInstance = new plVisMgr; fInstance->RegisterAs(kGlobalVisMgr_KEY); } diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp index fd02e6cf..9384db6f 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp @@ -127,8 +127,8 @@ void plVisRegion::Read(hsStream* s, hsResMgr* mgr) { plObjInterface::Read(s, mgr); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRegion), plRefFlags::kActiveRef); - mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisMgr), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRegion), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisMgr), plRefFlags::kActiveRef); if( fMgr ) fMgr->Register(this, GetProperty(kIsNot)); diff --git a/Sources/Plasma/PubUtilLib/plSockets/plMemBuffer.cpp b/Sources/Plasma/PubUtilLib/plSockets/plMemBuffer.cpp index 5ac69b3a..6d27eea4 100644 --- a/Sources/Plasma/PubUtilLib/plSockets/plMemBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plSockets/plMemBuffer.cpp @@ -84,7 +84,7 @@ void plMemBuffer::SetBuffer(char * data, int len) void plMemBuffer::CopyBuffer(char * data, int len) { - char * tmp = TRACKED_NEW char[len]; + char * tmp = new char[len]; memcpy(tmp,data,len); ClearBuffer(); AllocBuffer(len); @@ -101,7 +101,7 @@ void plMemBuffer::GrowBuffer(int newLen) int len = newLen + kThrashSize; len = len+len; - char * tmp = TRACKED_NEW char[len]; + char * tmp = new char[len]; if(fBuffer != nil) memcpy(tmp,fBuffer,fBufferLen); @@ -144,7 +144,7 @@ void plMemBuffer::ClearBuffer() void plMemBuffer::AllocBuffer(int len) { - fBuffer = TRACKED_NEW char[len]; + fBuffer = new char[len]; fBufferLocal = true; fBufferLen = len; } diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp index f36eca09..6a430af3 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp @@ -162,7 +162,7 @@ void plAutoProfileImp::IInit() plgDispatch::Dispatch()->RegisterForExactType(plInitialAgeStateLoadedMsg::Index(), GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey()); - plConsoleMsg* consoleMsg = TRACKED_NEW plConsoleMsg(plConsoleMsg::kExecuteLine, "Camera.AlwaysCut true"); + plConsoleMsg* consoleMsg = new plConsoleMsg(plConsoleMsg::kExecuteLine, "Camera.AlwaysCut true"); consoleMsg->Send(); } @@ -201,7 +201,7 @@ void plAutoProfileImp::IShutdown() // Pump the queue so we get fully unregistered plgDispatch::Dispatch()->MsgQueueProcess(); - plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kQuit); + plClientMsg* clientMsg = new plClientMsg(plClientMsg::kQuit); clientMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY)); } @@ -326,7 +326,7 @@ bool plAutoProfileImp::INextSpawnPoint() fNextSpawnPoint++; - plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey()); + plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey()); plgTimerCallbackMgr::NewTimer(30, timerMsg); return true; @@ -372,7 +372,7 @@ hsBool plAutoProfileImp::MsgReceive(plMessage* msg) fStatusMessage = "Age loaded. Preparing to profile."; // Age is loaded, start profiling in 5 seconds (to make sure the avatar is linked in all the way) - plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey()); + plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey()); plgTimerCallbackMgr::NewTimer(5, timerMsg); return true; } diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index 34f0558c..b7626041 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -203,7 +203,7 @@ plStatusLog *plStatusLogMgr::CreateStatusLog( uint8_t numDisplayLines, const cha plStatusLog *plStatusLogMgr::CreateStatusLog( uint8_t numDisplayLines, const wchar_t *filename, uint32_t flags ) { IEnsurePathExists( fBasePath ); - plStatusLog *log = NEW(plStatusLog)( numDisplayLines, filename, flags ); + plStatusLog *log = new plStatusLog( numDisplayLines, filename, flags ); // Put the new log in its alphabetical position plStatusLog** nextLog = &fDisplays; @@ -445,8 +445,8 @@ void plStatusLog::IInit() fFlags = fOrigFlags; - fLines = TRACKED_NEW char *[ fMaxNumLines ]; - fColors = TRACKED_NEW uint32_t[ fMaxNumLines ]; + fLines = new char *[ fMaxNumLines ]; + fColors = new uint32_t[ fMaxNumLines ]; for( i = 0; i < fMaxNumLines; i++ ) { fLines[ i ] = nil; @@ -632,7 +632,7 @@ bool plStatusLog::IAddLine( const char *line, int32_t count, uint32_t color ) if (fMaxNumLines > 0) { - fLines[ i ] = TRACKED_NEW char[ count + 1 ]; + fLines[ i ] = new char[ count + 1 ]; hsStrncpy( fLines[ i ], line, count + 1 ); fLines[ i ][ count ] = 0; diff --git a/Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.cpp b/Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.cpp index aef45ac7..dd012bc4 100644 --- a/Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.cpp +++ b/Sources/Plasma/PubUtilLib/plStreamLogger/plStreamLogger.cpp @@ -181,7 +181,7 @@ char *hsReadOnlyLoggingStream::LogReadSafeString() numChars &= ~0xf000; // XXX: remove when hsStream no longer does this. if (numChars > 0) { - char *name = TRACKED_NEW char[numChars+1]; + char *name = new char[numChars+1]; ILogEntryWaiting(); uint32_t ret = Read(numChars, name); name[numChars] = '\0'; @@ -203,7 +203,7 @@ char *hsReadOnlyLoggingStream::LogReadSafeStringLong() LogReadLE(&numChars,"NumChars"); if (numChars > 0) { - char *name = TRACKED_NEW char[numChars+1]; + char *name = new char[numChars+1]; ILogEntryWaiting(); uint32_t ret = Read(numChars, name); name[numChars] = '\0'; diff --git a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp index b430c41d..beff637a 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp @@ -116,7 +116,7 @@ hsGMaterial* hsGMaterial::Clone() hsGMaterial* hsGMaterial::CloneNoLayers() { - hsGMaterial* clo = TRACKED_NEW hsGMaterial; + hsGMaterial* clo = new hsGMaterial; clo->fCompFlags = fCompFlags; clo->fLoadFlags = fLoadFlags; @@ -126,7 +126,7 @@ hsGMaterial* hsGMaterial::CloneNoLayers() plLayer* hsGMaterial::MakeBaseLayer() { - plLayer* newLay = TRACKED_NEW plLayer; + plLayer* newLay = new plLayer; newLay->InitToDefault(); IClearLayers(); @@ -150,7 +150,7 @@ uint32_t hsGMaterial::AddLayerViaNotify(plLayerInterface* layer) int idx = GetNumLayers(); // Add via notify so we'll dispose of it properly later. - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnRequest, idx, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(GetKey(), plRefMsg::kOnRequest, idx, plMatRefMsg::kLayer); hsgResMgr::ResMgr()->SendRef(layer->GetKey(), msg, plRefFlags::kActiveRef); fLayers.SetCount(idx+1); @@ -266,12 +266,12 @@ void hsGMaterial::Read(hsStream *stream, hsResMgr *group) // Assign texture(s) for (iLay = 0; iLay < GetNumLayers(); iLay++) { - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kLayer); + plMatRefMsg* msg = new plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kLayer); plKey key = group->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef); } for (iLay = 0; iLay < GetNumPiggyBacks(); iLay++) { - plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kPiggyBack); + plMatRefMsg* msg = new plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kPiggyBack); plKey key = group->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef); } } diff --git a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp index 981f138e..78f3dda8 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp @@ -200,7 +200,7 @@ void plGrassShaderMod::Read(hsStream *stream, hsResMgr *mgr) { plModifier::Read(stream, mgr); - mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefMaterial), plRefFlags::kActiveRef); + mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefMaterial), plRefFlags::kActiveRef); int i; for (i = 0; i < kNumWaves; i++) @@ -225,7 +225,7 @@ void plGrassShaderMod::ISetupShaders() { if (!fVShader) { - plShader* vShader = TRACKED_NEW plShader; + plShader* vShader = new plShader; char buff[256]; sprintf(buff, "%s_GrassVS", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation()); @@ -244,12 +244,12 @@ void plGrassShaderMod::ISetupShaders() vShader->SetPipeConst(0, plPipeConst::kLocalToNDC, plGrassVS::kLocalToNDC); vShader->SetDecl(plShaderTable::Decl(plShaderID::vs_GrassShader)); - hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassVS), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassVS), plRefFlags::kActiveRef); } if (!fPShader) { - plShader* pShader = TRACKED_NEW plShader; + plShader* pShader = new plShader; char buff[256]; sprintf(buff, "%s_GrassPS", GetKey()->GetName()); hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation()); @@ -258,18 +258,18 @@ void plGrassShaderMod::ISetupShaders() pShader->SetInputFormat(0); pShader->SetOutputFormat(0); pShader->SetDecl(plShaderTable::Decl(plShaderID::ps_GrassShader)); - hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassPS), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassPS), plRefFlags::kActiveRef); } plLayer* layer = plLayer::ConvertNoRef(fMaterial->GetLayer(0)->BottomOfStack()); if (layer && (layer->GetVertexShader() != fVShader)) { - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); hsgResMgr::ResMgr()->SendRef(fVShader->GetKey(), refMsg, plRefFlags::kActiveRef); } if (layer && (layer->GetPixelShader() != fPShader)) { - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); + plLayRefMsg* refMsg = new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); hsgResMgr::ResMgr()->SendRef(fPShader->GetKey(), refMsg, plRefFlags::kActiveRef); } } diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp index e330d83f..7e4e7d3e 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp @@ -73,32 +73,32 @@ plLayer::plLayer() | kPixelShader | kBumpEnvXfm; - fTransform = TRACKED_NEW hsMatrix44; + fTransform = new hsMatrix44; fTransform->Reset(); - fPreshadeColor = TRACKED_NEW hsColorRGBA; - fRuntimeColor = TRACKED_NEW hsColorRGBA; - fAmbientColor = TRACKED_NEW hsColorRGBA; - fSpecularColor = TRACKED_NEW hsColorRGBA; - fOpacity = TRACKED_NEW float; + fPreshadeColor = new hsColorRGBA; + fRuntimeColor = new hsColorRGBA; + fAmbientColor = new hsColorRGBA; + fSpecularColor = new hsColorRGBA; + fOpacity = new float; - fState = TRACKED_NEW hsGMatState; + fState = new hsGMatState; fState->Reset(); - fUVWSrc = TRACKED_NEW uint32_t; - fLODBias = TRACKED_NEW float; - fSpecularPower = TRACKED_NEW float; + fUVWSrc = new uint32_t; + fLODBias = new float; + fSpecularPower = new float; - fTexture = TRACKED_NEW plBitmap*; + fTexture = new plBitmap*; *fTexture = nil; - fVertexShader = TRACKED_NEW plShader*; + fVertexShader = new plShader*; *fVertexShader = nil; - fPixelShader = TRACKED_NEW plShader*; + fPixelShader = new plShader*; *fPixelShader = nil; - fBumpEnvXfm = TRACKED_NEW hsMatrix44; + fBumpEnvXfm = new hsMatrix44; fBumpEnvXfm->Reset(); } @@ -128,14 +128,14 @@ void plLayer::Read(hsStream* s, hsResMgr* mgr) *fLODBias = s->ReadLEScalar(); *fSpecularPower = s->ReadLEScalar(); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); + plLayRefMsg* refMsg = new plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture); mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef); #if 1 // For read/write shaders - refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); + refMsg = new plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader); mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef); - refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); + refMsg = new plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader); mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef); fBumpEnvXfm->Read(s); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp index 8f95d32c..4e84ff9a 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp @@ -98,32 +98,32 @@ void plLayerAnimationBase::Read(hsStream* s, hsResMgr* mgr) if( fOpacityCtl ) { fOwnedChannels |= kOpacity; - fOpacity = TRACKED_NEW float; + fOpacity = new float; } if( fPreshadeColorCtl ) { fOwnedChannels |= kPreshadeColor; - fPreshadeColor = TRACKED_NEW hsColorRGBA; + fPreshadeColor = new hsColorRGBA; } if( fRuntimeColorCtl ) { fOwnedChannels |= kRuntimeColor; - fRuntimeColor = TRACKED_NEW hsColorRGBA; + fRuntimeColor = new hsColorRGBA; } if( fAmbientColorCtl ) { fOwnedChannels |= kAmbientColor; - fAmbientColor = TRACKED_NEW hsColorRGBA; + fAmbientColor = new hsColorRGBA; } if( fSpecularColorCtl ) { fOwnedChannels |= kSpecularColor; - fSpecularColor = TRACKED_NEW hsColorRGBA; + fSpecularColor = new hsColorRGBA; } if( fTransformCtl ) { fOwnedChannels |= kTransform; - fTransform = TRACKED_NEW hsMatrix44; + fTransform = new hsMatrix44; } fLength = IMakeUniformLength(); } @@ -220,7 +220,7 @@ void plLayerAnimationBase::SetPreshadeColorCtl(plController* colCtl) if( fPreshadeColorCtl ) delete fPreshadeColorCtl; else - fPreshadeColor = TRACKED_NEW hsColorRGBA; + fPreshadeColor = new hsColorRGBA; fOwnedChannels |= kPreshadeColor; fPreshadeColorCtl = colCtl; @@ -231,7 +231,7 @@ void plLayerAnimationBase::SetRuntimeColorCtl(plController* colCtl) if( fRuntimeColorCtl ) delete fRuntimeColorCtl; else - fRuntimeColor = TRACKED_NEW hsColorRGBA; + fRuntimeColor = new hsColorRGBA; fOwnedChannels |= kRuntimeColor; fRuntimeColorCtl = colCtl; @@ -242,7 +242,7 @@ void plLayerAnimationBase::SetAmbientColorCtl(plController* ambCtl) if( fAmbientColorCtl ) delete fAmbientColorCtl; else - fAmbientColor = TRACKED_NEW hsColorRGBA; + fAmbientColor = new hsColorRGBA; fOwnedChannels |= kAmbientColor; fAmbientColorCtl = ambCtl; @@ -253,7 +253,7 @@ void plLayerAnimationBase::SetSpecularColorCtl(plController* ambCtl) if( fSpecularColorCtl ) delete fSpecularColorCtl; else - fSpecularColor = TRACKED_NEW hsColorRGBA; + fSpecularColor = new hsColorRGBA; fOwnedChannels |= kSpecularColor; fSpecularColorCtl = ambCtl; @@ -264,7 +264,7 @@ void plLayerAnimationBase::SetOpacityCtl(plController* opaCtl) if( fOpacityCtl ) delete fOpacityCtl; else - fOpacity = TRACKED_NEW float; + fOpacity = new float; fOwnedChannels |= kOpacity; fOpacityCtl = opaCtl; @@ -275,7 +275,7 @@ void plLayerAnimationBase::SetTransformCtl(plController* xfmCtl) if( fTransformCtl ) delete fTransformCtl; else - fTransform = TRACKED_NEW hsMatrix44; + fTransform = new hsMatrix44; fOwnedChannels |= kTransform; fTransformCtl = xfmCtl; @@ -330,7 +330,7 @@ void plLayerAnimation::Read(hsStream* s, hsResMgr* mgr) // add sdl modifier delete fLayerSDLMod; - fLayerSDLMod = TRACKED_NEW plLayerSDLModifier; + fLayerSDLMod = new plLayerSDLModifier; fLayerSDLMod->SetLayerAnimation(this); } @@ -427,7 +427,7 @@ plLayerLinkAnimation::plLayerLinkAnimation() : fLastFadeFlag(0), fFadeFlagsDirty(false) { - fIFaceCallback = TRACKED_NEW plEventCallbackMsg(); + fIFaceCallback = new plEventCallbackMsg(); fIFaceCallback->fEvent = kTime; fIFaceCallback->fRepeats = 0; } @@ -527,7 +527,7 @@ uint32_t plLayerLinkAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignor { // Either we're going opaque, or we were opaque and now we're fading. // Tell the armature to re-eval its opacity settings. - plAvatarOpacityCallbackMsg *opacityMsg = TRACKED_NEW plAvatarOpacityCallbackMsg(fLinkKey, kStop); + plAvatarOpacityCallbackMsg *opacityMsg = new plAvatarOpacityCallbackMsg(fLinkKey, kStop); opacityMsg->SetBCastFlag(plMessage::kPropagateToModifiers); opacityMsg->Send(); } diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp index c03a21b9..3cc3f5e0 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp @@ -148,7 +148,7 @@ uint32_t plLayerInterface::Eval(double secs, uint32_t frame, uint32_t ignore) // Export Only void plLayerInterface::AttachViaNotify(plLayerInterface *prev) { - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay); + plLayRefMsg* refMsg = new plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay); hsgResMgr::ResMgr()->AddViaNotify(prev->GetKey(), refMsg, plRefFlags::kActiveRef); } @@ -330,7 +330,7 @@ void plLayerInterface::Read(hsStream* s, hsResMgr* mgr) { plSynchedObject::Read(s, mgr); - plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay); + plLayRefMsg* refMsg = new plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay); plKey key = mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef); if( key && !fUnderLay ) Attach(plLayer::DefaultLayer()); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp index e8ef38b5..e621a2f7 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp @@ -60,14 +60,14 @@ void plLayerMultiply::Read(hsStream* s, hsResMgr* mgr) fOwnedChannels = s->ReadLE32(); if (fOwnedChannels & kOpacity) { - fOpacity = TRACKED_NEW float; + fOpacity = new float; *fOpacity = fSrcOpacity = s->ReadLEScalar(); fDirtyChannels |= kOpacity; } if (fOwnedChannels & kPreshadeColor) { - fPreshadeColor = TRACKED_NEW hsColorRGBA; + fPreshadeColor = new hsColorRGBA; fSrcPreshadeColor.Read(s); *fPreshadeColor = fSrcPreshadeColor; fDirtyChannels |= kPreshadeColor; @@ -75,7 +75,7 @@ void plLayerMultiply::Read(hsStream* s, hsResMgr* mgr) if (fOwnedChannels & kRuntimeColor) { - fRuntimeColor = TRACKED_NEW hsColorRGBA; + fRuntimeColor = new hsColorRGBA; fSrcRuntimeColor.Read(s); *fRuntimeColor = fSrcRuntimeColor; fDirtyChannels |= kRuntimeColor; @@ -83,7 +83,7 @@ void plLayerMultiply::Read(hsStream* s, hsResMgr* mgr) if (fOwnedChannels & kAmbientColor) { - fAmbientColor = TRACKED_NEW hsColorRGBA; + fAmbientColor = new hsColorRGBA; fSrcAmbientColor.Read(s); *fAmbientColor = fSrcAmbientColor; fDirtyChannels |= kAmbientColor; @@ -91,7 +91,7 @@ void plLayerMultiply::Read(hsStream* s, hsResMgr* mgr) if (fOwnedChannels & kTransform) { - fTransform = TRACKED_NEW hsMatrix44; + fTransform = new hsMatrix44; fSrcTransform.Read(s); *fTransform = fSrcTransform; fDirtyChannels |= kTransform; @@ -181,4 +181,4 @@ void plLayerMultiply::SetTransform(const hsMatrix44& xfm) { fSrcTransform = xfm; fDirtyChannels |= kTransform; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.cpp index ad828a3a..113670ed 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plLayerOr::plLayerOr() { - fState = TRACKED_NEW hsGMatState; + fState = new hsGMatState; fState->Reset(); fOwnedChannels = kState; diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.cpp index dc6d97ef..562d5974 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.cpp @@ -51,13 +51,13 @@ plLayerLightBase::plLayerLightBase() | kAmbientColor | kPreshadeColor; - fState = TRACKED_NEW hsGMatState; + fState = new hsGMatState; fState->Reset(); - fAmbientColor = TRACKED_NEW hsColorRGBA; + fAmbientColor = new hsColorRGBA; fAmbientColor->Set(0,0,0,1.f); - fPreshadeColor = TRACKED_NEW hsColorRGBA; + fPreshadeColor = new hsColorRGBA; fPreshadeColor->Set(0,0,0,1.f); } @@ -114,13 +114,13 @@ plLayerShadowBase::plLayerShadowBase() | kAmbientColor | kPreshadeColor; - fState = TRACKED_NEW hsGMatState; + fState = new hsGMatState; fState->Reset(); - fAmbientColor = TRACKED_NEW hsColorRGBA; + fAmbientColor = new hsColorRGBA; fAmbientColor->Set(0,0,0,1.f); - fPreshadeColor = TRACKED_NEW hsColorRGBA; + fPreshadeColor = new hsColorRGBA; fPreshadeColor->Set(0,0,0,1.f); } diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp index 01cc74d1..9dcf9133 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp @@ -1465,7 +1465,7 @@ RelVaultNode * RelVaultNode::GetParentAgeLinkIncRef () { //============================================================================ void VaultRegisterCallback (VaultCallback * cb) { - IVaultCallback * internal = NEW(IVaultCallback); + IVaultCallback * internal = new IVaultCallback; internal->cb = cb; cb->internal = internal; s_callbacks.Link(internal); @@ -1733,7 +1733,7 @@ void VaultAddChildNodeAndWait ( using namespace _VaultAddChildNodeAndWait; _AddChildNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultAddChildNode( parentId, @@ -1916,7 +1916,7 @@ RelVaultNode * VaultCreateNodeAndWaitIncRef ( using namespace _VaultCreateNodeAndWaitIncRef; _CreateNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultCreateNode( templateNode, @@ -1977,7 +1977,7 @@ void VaultForceSaveNodeAndWait ( using namespace _VaultForceSaveNodeAndWait; _SaveNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); NetCliAuthVaultNodeSave( node, @@ -2037,7 +2037,7 @@ void VaultFindNodesAndWait ( using namespace _VaultFindNodesAndWait; _FindNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); NetCliAuthVaultNodeFind( templateNode, @@ -2638,7 +2638,7 @@ bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link) { { // Init age vault _InitAgeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultInitAge( link->GetAgeInfo(), @@ -2664,7 +2664,7 @@ bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link) { { // Create age link _CreateNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultCreateNode( plVault::kNodeType_AgeLink, @@ -2689,7 +2689,7 @@ bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link) { { // Fetch age info node tree _FetchVaultParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultDownload( L"RegisterOwnedAge", @@ -2719,9 +2719,9 @@ bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link) { _AddChildNodeParam param1; _AddChildNodeParam param2; _AddChildNodeParam param3; - ZERO(param1); - ZERO(param2); - ZERO(param3); + memset(¶m1, 0, sizeof(param1)); + memset(¶m2, 0, sizeof(param2)); + memset(¶m3, 0, sizeof(param3)); unsigned ageOwnersId = 0; if (RelVaultNode * rvnAgeInfo = VaultGetNodeIncRef(ageInfoId)) { @@ -2881,7 +2881,7 @@ namespace _VaultRegisterOwnedAge { void _InitAgeCallback(ENetError result, void* state, void* param, uint32_t ageVaultId, uint32_t ageInfoVaultId) { if (IS_NET_SUCCESS(result)) { - _Params* p = TRACKED_NEW _Params(); + _Params* p = new _Params(); p->fAgeInfoId = (void*)ageInfoVaultId; p->fSpawn = (plSpawnPointInfo*)param; @@ -2916,7 +2916,7 @@ void VaultRegisterOwnedAge(const plAgeLinkStruct* link) { kNilGuid, (FVaultInitAgeCallback)_InitAgeCallback, nil, - TRACKED_NEW plSpawnPointInfo(link->SpawnPoint())); + new plSpawnPointInfo(link->SpawnPoint())); } //============================================================================ @@ -3012,7 +3012,7 @@ bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link) { { // Init age vault _InitAgeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultInitAge( link->GetAgeInfo(), @@ -3038,7 +3038,7 @@ bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link) { { // Create age link _CreateNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultCreateNode( plVault::kNodeType_AgeLink, @@ -3063,7 +3063,7 @@ bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link) { { // Fetch age info node tree _FetchVaultParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultDownload( L"RegisterVisitAge", @@ -3092,9 +3092,9 @@ bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link) { _AddChildNodeParam param1; _AddChildNodeParam param2; _AddChildNodeParam param3; - ZERO(param1); - ZERO(param2); - ZERO(param3); + memset(¶m1, 0, sizeof(param1)); + memset(¶m2, 0, sizeof(param2)); + memset(¶m3, 0, sizeof(param3)); unsigned ageVisitorsId = 0; if (RelVaultNode * rvnAgeInfo = VaultGetNodeIncRef(ageInfoId)) { @@ -3269,8 +3269,8 @@ void VaultRegisterVisitAge(const plAgeLinkStruct* link) { return; // Still here? We need to actually do some work, then. - _Params* p = TRACKED_NEW _Params; - p->fSpawn = TRACKED_NEW plSpawnPointInfo(link->SpawnPoint()); + _Params* p = new _Params; + p->fSpawn = new plSpawnPointInfo(link->SpawnPoint()); // This doesn't actually *create* a new age but rather fetches the // already existing age vault. Weird? Yes... @@ -4284,7 +4284,7 @@ bool VaultAgeFindOrCreateSubAgeLinkAndWait ( { // Init age vault _InitAgeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultInitAge( info, @@ -4310,7 +4310,7 @@ bool VaultAgeFindOrCreateSubAgeLinkAndWait ( { // Create age link _CreateNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultCreateNode( plVault::kNodeType_AgeLink, @@ -4335,7 +4335,7 @@ bool VaultAgeFindOrCreateSubAgeLinkAndWait ( { // Fetch age info node tree _FetchVaultParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultDownload( L"CreateSubAge", @@ -4363,8 +4363,8 @@ bool VaultAgeFindOrCreateSubAgeLinkAndWait ( // ageInfo to ageLink _AddChildNodeParam param1; _AddChildNodeParam param2; - ZERO(param1); - ZERO(param2); + memset(¶m1, 0, sizeof(param1)); + memset(¶m2, 0, sizeof(param2)); VaultAddChildNode( subAgesId, @@ -4635,10 +4635,10 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait ( { // Init age vault _InitAgeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); Uuid parentAgeInstId; - ZERO(parentAgeInstId); + memset(&parentAgeInstId, 0, sizeof(parentAgeInstId)); if (RelVaultNode * rvnAge = VaultGetAgeNodeIncRef()) { VaultAgeNode access(rvnAge); parentAgeInstId = access.ageInstUuid; @@ -4669,7 +4669,7 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait ( { // Create age link _CreateNodeParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultCreateNode( plVault::kNodeType_AgeLink, @@ -4694,7 +4694,7 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait ( { // Fetch age info node tree _FetchVaultParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultDownload( L"CreateChildAge", @@ -4722,8 +4722,8 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait ( // ageInfo to ageLink _AddChildNodeParam param1; _AddChildNodeParam param2; - ZERO(param1); - ZERO(param2); + memset(¶m1, 0, sizeof(param1)); + memset(¶m2, 0, sizeof(param2)); VaultAddChildNode( childAgesId, @@ -4890,7 +4890,7 @@ uint8_t VaultAgeFindOrCreateChildAgeLink( retval = TRUE; } else { - _Params* p = TRACKED_NEW _Params; + _Params* p = new _Params; p->fChildAgesFldr = (void*)rvnChildAges->nodeId; VaultAgeInfoNode accParentInfo(rvnParentInfo); @@ -4975,7 +4975,7 @@ void VaultDownloadAndWait ( void * cbProgressParam ) { _DownloadVaultParam param; - ZERO(param); + memset(¶m, 0, sizeof(param)); VaultDownload( tag, diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp index f9304217..c599bce3 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp @@ -789,7 +789,7 @@ bool VaultAgeLinkNode::HasSpawnPoint (const plSpawnPointInfo & point) const { void VaultAgeLinkNode::GetSpawnPoints (plSpawnPointVec * out) const { char str[2048]; - ZERO(str); + memset(&str, 0, sizeof(str)); MemCopy(str, spawnPoints, min(spawnPointsLen, arrsize(str) - 1)); char token1[ 1024 ];