diff --git a/Generals/Code/GameEngine/Include/Common/_DEFINES/NameKeys.h b/Generals/Code/GameEngine/Include/Common/_DEFINES/NameKeys.h
new file mode 100644
index 0000000000..fc9d89efc3
--- /dev/null
+++ b/Generals/Code/GameEngine/Include/Common/_DEFINES/NameKeys.h
@@ -0,0 +1,119 @@
+// TheSuperHackers @refactor @ShizCalev 04/05/2025 Switching a lot of strings to defines, first up: namekeys.
+
+/*
+** Command & Conquer Generals(tm)
+** Copyright 2025 Electronic Arts Inc.
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see .
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+// //
+// (c) 2001-2003 Electronic Arts Inc. //
+// //
+////////////////////////////////////////////////////////////////////////////////
+
+// This file contains various namekey strings.
+
+ // Factions
+#define NAMEKEY_FactionAmerica "FactionAmerica"
+#define NAMEKEY_FactionAmericaAirForce "FactionAmericaAirForce"
+#define NAMEKEY_FactionAmericaChooseAGeneral "FactionAmericaChooseAGeneral"
+#define NAMEKEY_FactionAmericaSpecialForces "FactionAmericaSpecialForces"
+#define NAMEKEY_FactionAmericaTankCommand "FactionAmericaTankCommand"
+#define NAMEKEY_FactionChina "FactionChina"
+#define NAMEKEY_FactionChinaChooseAGeneral "FactionChinaChooseAGeneral"
+#define NAMEKEY_FactionChinaRedArmy "FactionChinaRedArmy"
+#define NAMEKEY_FactionChinaSecretPolice "FactionChinaSecretPolice"
+#define NAMEKEY_FactionChinaSpecialWeapons "FactionChinaSpecialWeapons"
+#define NAMEKEY_FactionCivilian "FactionCivilian"
+#define NAMEKEY_FactionFundamentalist "FactionFundamentalist" //GLA's placeholder name during initial development.
+#define NAMEKEY_FactionGLA "FactionGLA"
+#define NAMEKEY_FactionGLABiowarCommand "FactionGLABiowarCommand"
+#define NAMEKEY_FactionGLAChooseAGeneral "FactionGLAChooseAGeneral"
+#define NAMEKEY_FactionGLATerrorCell "FactionGLATerrorCell"
+#define NAMEKEY_FactionGLAWarlordCommand "FactionGLAWarlordCommand"
+#define NAMEKEY_FactionObserver "FactionObserver"
+
+
+ // Misc
+#define NAMEKEY_Bogus "Bogus"
+#define NAMEKEY_BoneFXDamage "BoneFXDamage"
+#define NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon "ControlBar.wnd:ButtonPlaceBeacon"
+#define NAMEKEY_OverchargeBehavior "OverchargeBehavior"
+#define NAMEKEY_PlyrCivilian "PlyrCivilian"
+#define NAMEKEY_RailroadBehavior "RailroadBehavior"
+#define NAMEKEY_SupplyCenterCreate "SupplyCenterCreate"
+
+
+ // Upgrades
+#define NAMEKEY_AutoDepositUpdate "AutoDepositUpdate"
+#define NAMEKEY_BeaconClientUpdate "BeaconClientUpdate"
+#define NAMEKEY_DeliverPayloadAIUpdate "DeliverPayloadAIUpdate"
+#define NAMEKEY_DemoTrapUpdate "DemoTrapUpdate"
+#define NAMEKEY_FireSpreadUpdate "FireSpreadUpdate"
+#define NAMEKEY_FlammableUpdate "FlammableUpdate"
+#define NAMEKEY_HackInternetAIUpdate "HackInternetAIUpdate"
+#define NAMEKEY_PowerPlantUpdate "PowerPlantUpdate"
+#define NAMEKEY_PowerPlantUpgrade "PowerPlantUpgrade"
+#define NAMEKEY_RadarUpgrade "RadarUpgrade"
+#define NAMEKEY_StealthUpdate "StealthUpdate"
+#define NAMEKEY_SupplyCenterDockUpdate "SupplyCenterDockUpdate"
+#define NAMEKEY_SupplyWarehouseDockUpdate "SupplyWarehouseDockUpdate"
+#define NAMEKEY_SwayClientUpdate "SwayClientUpdate"
+
+// Menus
+#define NAMEKEY_PopupLadderSelect.wnd:StaticTextLadderName "PopupLadderSelect.wnd:StaticTextLadderName"
+#define NAMEKEY_PopupLadderSelect.wnd:PasswordParent "PopupLadderSelect.wnd:PasswordParent"
+#define NAMEKEY_PopupLadderSelect.wnd:PasswordEntry "PopupLadderSelect.wnd:PasswordEntry"
+#define NAMEKEY_PopupLadderSelect.wnd:Parent "PopupLadderSelect.wnd:Parent"
+#define NAMEKEY_PopupLadderSelect.wnd:ListBoxLadderSelect "PopupLadderSelect.wnd:ListBoxLadderSelect"
+#define NAMEKEY_PopupLadderSelect.wnd:ListBoxLadderDetails "PopupLadderSelect.wnd:ListBoxLadderDetails"
+#define NAMEKEY_PopupLadderSelect.wnd:ButtonPasswordOk "PopupLadderSelect.wnd:ButtonPasswordOk"
+#define NAMEKEY_PopupLadderSelect.wnd:ButtonPasswordCancel "PopupLadderSelect.wnd:ButtonPasswordCancel"
+#define NAMEKEY_PopupLadderSelect.wnd:ButtonOk "PopupLadderSelect.wnd:ButtonOk"
+#define NAMEKEY_PopupLadderSelect.wnd:ButtonCancel "PopupLadderSelect.wnd:ButtonCancel"
+#define NAMEKEY_PopupLadderSelect.wnd:ButtonBadPasswordOk "PopupLadderSelect.wnd:ButtonBadPasswordOk"
+#define NAMEKEY_PopupLadderSelect.wnd:BadPasswordParent "PopupLadderSelect.wnd:BadPasswordParent"
+
+#define NAMEKEY_SkirmishGameOptionsMenu.wnd:StaticTextWinsValue "SkirmishGameOptionsMenu.wnd:StaticTextWinsValue"
+#define NAMEKEY_SkirmishGameOptionsMenu.wnd:StaticTextStreakValue "SkirmishGameOptionsMenu.wnd:StaticTextStreakValue"
+#define NAMEKEY_SkirmishGameOptionsMenu.wnd:StaticTextLossesValue "SkirmishGameOptionsMenu.wnd:StaticTextLossesValue"
+#define NAMEKEY_SkirmishGameOptionsMenu.wnd:StaticTextBestStreakValue "SkirmishGameOptionsMenu.wnd:StaticTextBestStreakValue"
+#define NAMEKEY_SkirmishGameOptionsMenu.wnd:ListboxInfo "SkirmishGameOptionsMenu.wnd:ListboxInfo"
+
+#define NAMEKEY_WOLWelcomeMenu.wnd:WOLWelcomeMenuParent "WOLWelcomeMenu.wnd:WOLWelcomeMenuParent"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextUSAToday "WOLWelcomeMenu.wnd:StaticTextUSAToday"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextUSALastWeek "WOLWelcomeMenu.wnd:StaticTextUSALastWeek"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextGLAToday "WOLWelcomeMenu.wnd:StaticTextGLAToday"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextGLALastWeek "WOLWelcomeMenu.wnd:StaticTextGLALastWeek"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextChinaToday "WOLWelcomeMenu.wnd:StaticTextChinaToday"
+#define NAMEKEY_WOLWelcomeMenu.wnd:StaticTextChinaLastWeek "WOLWelcomeMenu.wnd:StaticTextChinaLastWeek"
+
+#define NAMEKEY_ControlBar.wnd:BackgroundMarker "ControlBar.wnd:BackgroundMarker"
+#define NAMEKEY_ControlBar.wnd:ButtonGeneral "ControlBar.wnd:ButtonGeneral"
+#define NAMEKEY_ControlBar.wnd:ButtonIdleWorker "ControlBar.wnd:ButtonIdleWorker"
+#define NAMEKEY_ControlBar.wnd:ButtonLarge "ControlBar.wnd:ButtonLarge"
+#define NAMEKEY_ControlBar.wnd:ButtonOptions "ControlBar.wnd:ButtonOptions"
+#define NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon "ControlBar.wnd:ButtonPlaceBeacon"
+#define NAMEKEY_ControlBar.wnd:GeneralsExp "ControlBar.wnd:GeneralsExp"
+#define NAMEKEY_ControlBar.wnd:MoneyDisplay "ControlBar.wnd:MoneyDisplay"
+#define NAMEKEY_ControlBar.wnd:PowerWindow "ControlBar.wnd:PowerWindow"
+#define NAMEKEY_ControlBar.wnd:WinUAttack "ControlBar.wnd:WinUAttack"
+
+#define NAMEKEY_NonCommand_UpDown "NonCommand_UpDown"
+#define NAMEKEY_NonCommand_Options "NonCommand_Options"
+#define NAMEKEY_NonCommand_IdleWorker "NonCommand_IdleWorker"
+#define NAMEKEY_NonCommand_GeneralsExperience "NonCommand_GeneralsExperience"
+#define NAMEKEY_NonCommand_Beacon "NonCommand_Beacon"
\ No newline at end of file
diff --git a/Generals/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h b/Generals/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
index 9249fd299a..01ddaa5002 100644
--- a/Generals/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
@@ -57,7 +57,7 @@ class BeaconClientUpdateModuleData : public ClientUpdateModuleData
class BeaconClientUpdate : public ClientUpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BeaconClientUpdate, "BeaconClientUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BeaconClientUpdate, NAMEKEY_BeaconClientUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( BeaconClientUpdate, BeaconClientUpdateModuleData );
public:
diff --git a/Generals/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h b/Generals/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
index 595342db30..cfb60bf31b 100644
--- a/Generals/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
@@ -44,7 +44,7 @@ class Thing;
class SwayClientUpdate : public ClientUpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SwayClientUpdate, "SwayClientUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SwayClientUpdate, NAMEKEY_SwayClientUpdate )
MAKE_STANDARD_MODULE_MACRO( SwayClientUpdate );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
index 976d891cac..c2b928f554 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
@@ -97,7 +97,7 @@ class AutoDepositUpdateModuleData : public UpdateModuleData
class AutoDepositUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( AutoDepositUpdate, "AutoDepositUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( AutoDepositUpdate, NAMEKEY_AutoDepositUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( AutoDepositUpdate, AutoDepositUpdateModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h b/Generals/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
index d16d107bf5..c3fda0f740 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
@@ -47,7 +47,7 @@ class BoneFXDamage : public DamageModule
{
MAKE_STANDARD_MODULE_MACRO( BoneFXDamage );
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BoneFXDamage, "BoneFXDamage" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BoneFXDamage, NAMEKEY_BoneFXDamage )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
index 8bc6fa71eb..625dc67e85 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
@@ -312,7 +312,7 @@ class DeliverPayloadData
//-------------------------------------------------------------------------------------------------
class DeliverPayloadAIUpdate : public AIUpdateInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DeliverPayloadAIUpdate, "DeliverPayloadAIUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DeliverPayloadAIUpdate, NAMEKEY_DeliverPayloadAIUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( DeliverPayloadAIUpdate, DeliverPayloadAIUpdateModuleData )
private:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
index b49a7cbb73..30b7f54dda 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
@@ -68,7 +68,7 @@ class DemoTrapUpdateModuleData : public ModuleData
class DemoTrapUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DemoTrapUpdate, "DemoTrapUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DemoTrapUpdate, NAMEKEY_DemoTrapUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( DemoTrapUpdate, DemoTrapUpdateModuleData );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
index 0539ce86d1..89b7566fd7 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
@@ -59,7 +59,7 @@ class FireSpreadUpdateModuleData : public UpdateModuleData
class FireSpreadUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FireSpreadUpdate, "FireSpreadUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FireSpreadUpdate, NAMEKEY_FireSpreadUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( FireSpreadUpdate, FireSpreadUpdateModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
index 93514d12d9..04ce80ee0e 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
@@ -76,7 +76,7 @@ class FlammableUpdateModuleData : public UpdateModuleData
class FlammableUpdate : public UpdateModule, public DamageModuleInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FlammableUpdate, "FlammableUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FlammableUpdate, NAMEKEY_FlammableUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( FlammableUpdate, FlammableUpdateModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
index 6259f6b938..e1dcef11cb 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
@@ -186,7 +186,7 @@ class HackInternetAIInterface
//-------------------------------------------------------------------------------------------------
class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( HackInternetAIUpdate, "HackInternetAIUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( HackInternetAIUpdate, NAMEKEY_HackInternetAIUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( HackInternetAIUpdate, HackInternetAIUpdateModuleData )
private:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h b/Generals/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
index 6fbb61185a..d7fe608800 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
@@ -75,7 +75,7 @@ class OverchargeBehavior : public UpdateModule,
public OverchargeBehaviorInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( OverchargeBehavior, "OverchargeBehavior" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( OverchargeBehavior, NAMEKEY_OverchargeBehavior )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( OverchargeBehavior, OverchargeBehaviorModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
index f5d6d0e611..5d30ca3a7f 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
@@ -80,7 +80,7 @@ class PowerPlantUpdate : public UpdateModule,
public PowerPlantUpdateInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpdate, "PowerPlantUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpdate, NAMEKEY_PowerPlantUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( PowerPlantUpdate, PowerPlantUpdateModuleData );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h b/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
index 1afce4f215..aa4b50d70c 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
@@ -45,7 +45,7 @@ class Player;
class PowerPlantUpgrade : public UpgradeModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpgrade, "PowerPlantUpgrade" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpgrade, NAMEKEY_PowerPlantUpgrade )
MAKE_STANDARD_MODULE_MACRO( PowerPlantUpgrade );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h b/Generals/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
index e079a1bd19..78a84ffce5 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
@@ -59,7 +59,7 @@ class RadarUpgradeModuleData : public UpgradeModuleData
class RadarUpgrade : public UpgradeModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RadarUpgrade, "RadarUpgrade" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RadarUpgrade, NAMEKEY_RadarUpgrade )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( RadarUpgrade, RadarUpgradeModuleData );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
index a91077f5a6..2f3e1fa62a 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
@@ -189,7 +189,7 @@ struct TrainTrack
class RailroadBehavior : public PhysicsBehavior
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RailroadBehavior, "RailroadBehavior" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RailroadBehavior, NAMEKEY_RailroadBehavior )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( RailroadBehavior, RailroadBehaviorModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
index 558a258c4e..788ff78f43 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
@@ -116,7 +116,7 @@ class StealthUpdateModuleData : public UpdateModuleData
class StealthUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( StealthUpdate, "StealthUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( StealthUpdate, NAMEKEY_StealthUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( StealthUpdate, StealthUpdateModuleData );
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
index e756aed35d..2af7f95bfa 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
@@ -43,7 +43,7 @@ class Thing;
class SupplyCenterCreate : public CreateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterCreate, "SupplyCenterCreate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterCreate, NAMEKEY_SupplyCenterCreate )
MAKE_STANDARD_MODULE_MACRO( SupplyCenterCreate )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
index 4724d28faa..9263aaa8d5 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
@@ -54,7 +54,7 @@ class SupplyCenterDockUpdateModuleData : public DockUpdateModuleData
class SupplyCenterDockUpdate : public DockUpdate
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterDockUpdate, "SupplyCenterDockUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterDockUpdate, NAMEKEY_SupplyCenterDockUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( SupplyCenterDockUpdate, SupplyCenterDockUpdateModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
index 6a6de51e7c..0fa2855e0d 100644
--- a/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
+++ b/Generals/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
@@ -55,7 +55,7 @@ class SupplyWarehouseDockUpdateModuleData : public DockUpdateModuleData
class SupplyWarehouseDockUpdate : public DockUpdate
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyWarehouseDockUpdate, "SupplyWarehouseDockUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyWarehouseDockUpdate, NAMEKEY_SupplyWarehouseDockUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( SupplyWarehouseDockUpdate, SupplyWarehouseDockUpdateModuleData )
public:
diff --git a/Generals/Code/GameEngine/Include/Precompiled/PreRTS.h b/Generals/Code/GameEngine/Include/Precompiled/PreRTS.h
index 34469069d7..6dc80896a1 100644
--- a/Generals/Code/GameEngine/Include/Precompiled/PreRTS.h
+++ b/Generals/Code/GameEngine/Include/Precompiled/PreRTS.h
@@ -102,6 +102,7 @@ class STLSpecialAlloc;
//------------------------------------------------------------------------------------ RTS Includes
// Icky. These have to be in this order.
#include "Lib/Basetype.h"
+#include "Common/_DEFINES/NameKeys.h" // TheSuperHackers @refactor @ShizCalev 04/05/2025 Switching a lot of strings to defines, first up: namekeys.
#include "Common/STLTypedefs.h"
#include "Common/Errors.h"
#include "Common/Debug.h"
diff --git a/Generals/Code/GameEngine/Source/Common/RTS/ActionManager.cpp b/Generals/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
index face2f89fc..229dc197a0 100644
--- a/Generals/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
+++ b/Generals/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
@@ -235,7 +235,7 @@ Bool ActionManager::canTransferSuppliesAt( const Object *obj, const Object *tran
return FALSE;
// If it is a warehouse, it must have boxes left and not be an enemy
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)transferDest->findUpdateModule( key_warehouseUpdate );
if( warehouseModule )
if( warehouseModule->getBoxesStored() == 0 || transferDest->getRelationship( obj ) == ENEMIES )
@@ -243,7 +243,7 @@ Bool ActionManager::canTransferSuppliesAt( const Object *obj, const Object *tran
// if it is a supply center, I must have boxes, and must be controlled by the same player
// (not merely an ally... otherwise you may find yourself funding your allies. ick.)
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*)transferDest->findUpdateModule( key_centerUpdate );
if( centerModule )
if( supplyTruck->getNumberBoxes() == 0 || transferDest->getControllingPlayer() != obj->getControllingPlayer() )
@@ -1548,7 +1548,7 @@ Bool ActionManager::canDoSpecialPowerAtObject( const Object *obj, const Object *
{
//Don't allow it to disguise as a train -- they don't have KINDOF_TRAIN yet, but
//if added, please change this code so it'll be faster!
- static const NameKeyType key = NAMEKEY( "RailroadBehavior" );
+ static const NameKeyType key = NAMEKEY( NAMEKEY_RailroadBehavior );
RailroadBehavior *rBehavior = (RailroadBehavior*)target->findUpdateModule( key );
if( !rBehavior )
{
diff --git a/Generals/Code/GameEngine/Source/Common/RTS/Player.cpp b/Generals/Code/GameEngine/Source/Common/RTS/Player.cpp
index da460577b2..692dc1e91e 100644
--- a/Generals/Code/GameEngine/Source/Common/RTS/Player.cpp
+++ b/Generals/Code/GameEngine/Source/Common/RTS/Player.cpp
@@ -1037,7 +1037,7 @@ void Player::becomingTeamMember(Object *obj, Bool yes)
// if so, award the cash bonus
if(this != ThePlayerList->getNeutralPlayer() && yes)
{
- NameKeyType key_AutoDepositUpdate = NAMEKEY("AutoDepositUpdate");
+ NameKeyType key_AutoDepositUpdate = NAMEKEY(NAMEKEY_AutoDepositUpdate);
AutoDepositUpdate *adu = (AutoDepositUpdate *)obj->findUpdateModule(key_AutoDepositUpdate);
if (adu != NULL) {
adu->awardInitialCaptureBonus( this );
@@ -1107,7 +1107,7 @@ void Player::becomingLocalPlayer(Bool yes)
Drawable *draw = object->getDrawable();
if( draw )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate *update = (StealthUpdate*)object->findUpdateModule( key_StealthUpdate );
if( update && update->isDisguised() )
{
@@ -1737,7 +1737,7 @@ void Player::killPlayer(void)
}
else
{
- TheControlBar->setControlBarSchemeByPlayerTemplate(ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY("FactionObserver")));
+ TheControlBar->setControlBarSchemeByPlayerTemplate(ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(NAMEKEY_FactionObserver)));
}
}
diff --git a/Generals/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp b/Generals/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
index 82959a51d7..90f55f5820 100644
--- a/Generals/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
+++ b/Generals/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
@@ -278,23 +278,23 @@ void PlayerTemplateStore::update()
const PlayerTemplate* PlayerTemplateStore::findPlayerTemplate(NameKeyType namekey) const
{
// begin ugly, hokey code to quietly load old maps...
- static NameKeyType a0 = NAMEKEY("FactionAmerica");
- static NameKeyType a1 = NAMEKEY("FactionAmericaChooseAGeneral");
- static NameKeyType a2 = NAMEKEY("FactionAmericaTankCommand");
- static NameKeyType a3 = NAMEKEY("FactionAmericaSpecialForces");
- static NameKeyType a4 = NAMEKEY("FactionAmericaAirForce");
-
- static NameKeyType c0 = NAMEKEY("FactionChina");
- static NameKeyType c1 = NAMEKEY("FactionChinaChooseAGeneral");
- static NameKeyType c2 = NAMEKEY("FactionChinaRedArmy");
- static NameKeyType c3 = NAMEKEY("FactionChinaSpecialWeapons");
- static NameKeyType c4 = NAMEKEY("FactionChinaSecretPolice");
-
- static NameKeyType g0 = NAMEKEY("FactionGLA");
- static NameKeyType g1 = NAMEKEY("FactionGLAChooseAGeneral");
- static NameKeyType g2 = NAMEKEY("FactionGLATerrorCell");
- static NameKeyType g3 = NAMEKEY("FactionGLABiowarCommand");
- static NameKeyType g4 = NAMEKEY("FactionGLAWarlordCommand");
+ static NameKeyType a0 = NAMEKEY(NAMEKEY_FactionAmerica);
+ static NameKeyType a1 = NAMEKEY(NAMEKEY_FactionAmericaChooseAGeneral);
+ static NameKeyType a2 = NAMEKEY(NAMEKEY_FactionAmericaTankCommand);
+ static NameKeyType a3 = NAMEKEY(NAMEKEY_FactionAmericaSpecialForces);
+ static NameKeyType a4 = NAMEKEY(NAMEKEY_FactionAmericaAirForce);
+
+ static NameKeyType c0 = NAMEKEY(NAMEKEY_FactionChina);
+ static NameKeyType c1 = NAMEKEY(NAMEKEY_FactionChinaChooseAGeneral);
+ static NameKeyType c2 = NAMEKEY(NAMEKEY_FactionChinaRedArmy);
+ static NameKeyType c3 = NAMEKEY(NAMEKEY_FactionChinaSpecialWeapons);
+ static NameKeyType c4 = NAMEKEY(NAMEKEY_FactionChinaSecretPolice);
+
+ static NameKeyType g0 = NAMEKEY(NAMEKEY_FactionGLA);
+ static NameKeyType g1 = NAMEKEY(NAMEKEY_FactionGLAChooseAGeneral);
+ static NameKeyType g2 = NAMEKEY(NAMEKEY_FactionGLATerrorCell);
+ static NameKeyType g3 = NAMEKEY(NAMEKEY_FactionGLABiowarCommand);
+ static NameKeyType g4 = NAMEKEY(NAMEKEY_FactionGLAWarlordCommand);
if (namekey == a1 || namekey == a2 || namekey == a3 || namekey == a4)
namekey = a0;
diff --git a/Generals/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp b/Generals/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
index 275d59daf2..5365d367ef 100644
--- a/Generals/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
+++ b/Generals/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
@@ -152,7 +152,7 @@ Object *ResourceGatheringManager::findBestSupplyWarehouse( Object *queryObject )
Object *dock = TheGameLogic->findObjectByID(dockID);
if( dock )
{
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)dock->findUpdateModule( key_warehouseUpdate );
//If remotely okay, let User win.
if( warehouseModule && computeRelativeCost( queryObject, dock, NULL ) != FLT_MAX )
@@ -212,7 +212,7 @@ Object *ResourceGatheringManager::findBestSupplyCenter( Object *queryObject )
Object *dock = TheGameLogic->findObjectByID(dockID);
if( dock )
{
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyWarehouseDockUpdate *centerModule = (SupplyWarehouseDockUpdate*)dock->findUpdateModule( key_centerUpdate );
//If remotely okay, let User win.
if( centerModule && computeRelativeCost( queryObject, dock, NULL ) != FLT_MAX )
diff --git a/Generals/Code/GameEngine/Source/Common/System/MemoryInit.cpp b/Generals/Code/GameEngine/Source/Common/System/MemoryInit.cpp
index 6798a26f36..231592b6f9 100644
--- a/Generals/Code/GameEngine/Source/Common/System/MemoryInit.cpp
+++ b/Generals/Code/GameEngine/Source/Common/System/MemoryInit.cpp
@@ -123,8 +123,8 @@ static PoolSizeRec sizes[] =
{ "TerrainRoadType", 64, 64, },
{ "WindowLayoutPool", 32, 32 },
{ "AnimatedParticleSysBoneClientUpdate", 16, 16 },
- { "SwayClientUpdate", 4096, 32 },
- { "BeaconClientUpdate", 64, 32 },
+ { NAMEKEY_SwayClientUpdate, 4096, 32 },
+ { NAMEKEY_BeaconClientUpdate, 64, 32 },
{ "AIGroupPool", 64, 32 },
{ "AIDockMachinePool", 256, 32 },
{ "AIGuardMachinePool", 32, 32 },
@@ -165,7 +165,7 @@ static PoolSizeRec sizes[] =
{ "AudioRequest", 256, 8 },
{ "AutoHealBehavior", 4096, 32 },
{ "BaseRegenerateUpdate", 64, 32 },
- { "BoneFXDamage", 64, 32 },
+ { NAMEKEY_BoneFXDamage, 64, 32 },
{ "BoneFXUpdate", 64, 32 },
{ "BridgeBehavior", 32, 32 },
{ "BridgeTowerBehavior", 32, 32 },
@@ -180,10 +180,10 @@ static PoolSizeRec sizes[] =
{ "DelayedUpgrade", 32, 32 },
{ "DelayedWeaponSetUpgradeUpdate", 32, 32 },
{ "DeliverPayloadStateMachine", 32, 32 },
- { "DeliverPayloadAIUpdate", 32, 32 },
+ { NAMEKEY_DeliverPayloadAIUpdate, 32, 32 },
{ "DeletionUpdate", 128, 32 },
{ "HackInternetStateMachine", 32, 32 },
- { "HackInternetAIUpdate", 32, 32 },
+ { NAMEKEY_HackInternetAIUpdate, 32, 32 },
{ "MissileAIUpdate", 512, 32 },
{ "DumbProjectileBehavior", 64, 32 },
{ "DestroyDie", 1024, 32 },
@@ -193,11 +193,11 @@ static PoolSizeRec sizes[] =
{ "DynamicGeometryInfoUpdate", 16, 16 },
{ "DynamicShroudClearingRangeUpdate", 128, 16 },
{ "FXListDie", 1024, 32 },
- { "FireSpreadUpdate", 2048, 128 },
+ { NAMEKEY_FireSpreadUpdate, 2048, 128 },
{ "FirestormDynamicGeometryInfoUpdate", 16, 16 },
{ "FireWeaponCollide", 2048, 32 },
{ "FireWeaponUpdate", 32, 32 },
- { "FlammableUpdate", 4096, 256 },
+ { NAMEKEY_FlammableUpdate, 4096, 256 },
{ "FloatUpdate", 512, 128 },
{ "TensileFormationUpdate", 256, 32 },
{ "GarrisonContain", 256, 32 },
@@ -230,19 +230,19 @@ static PoolSizeRec sizes[] =
{ "AutoFindHealingUpdate", 256, 32 },
{ "CommandButtonHuntUpdate", 512, 8 },
{ "PilotFindVehicleUpdate", 256, 32 },
- { "DemoTrapUpdate", 32, 32 },
+ { NAMEKEY_DemoTrapUpdate, 32, 32 },
{ "ParticleUplinkCannonUpdate", 16, 16 },
{ "BaikonurLaunchPower", 4, 4 },
{ "RadiusDecalUpdate", 16, 16 },
{ "BattlePlanUpdate", 32, 32 },
{ "LifetimeUpdate", 256, 32 },
{ "LocomotorSetUpgrade", 512, 128 },
- { "AutoDepositUpdate", 256, 32 },
+ { NAMEKEY_AutoDepositUpdate, 256, 32 },
{ "NeutronMissileUpdate", 512, 32 },
{ "MoneyCrateCollide", 32, 32 },
{ "NeutronMissileSlowDeathBehavior", 8, 8 },
{ "OpenContain", 128, 32 },
- { "OverchargeBehavior", 32, 32 },
+ { NAMEKEY_OverchargeBehavior, 32, 32 },
{ "OverlordContain", 32, 32 },
{ "ParachuteContain", 128, 32 },
{ "PhysicsBehavior", 600, 32 },
@@ -253,7 +253,7 @@ static PoolSizeRec sizes[] =
{ "ProneUpdate", 128, 32 },
{ "QueueProductionExitUpdate", 32, 32 },
{ "RadarUpdate", 16, 16 },
- { "RadarUpgrade", 16, 16 },
+ { NAMEKEY_RadarUpgrade, 16, 16 },
{ "SupplyWarehouseCripplingBehavior", 16, 16 },
{ "CostModifierUpgrade", 32, 32 },
{ "CashBountyPower", 32, 32 },
@@ -270,7 +270,7 @@ static PoolSizeRec sizes[] =
{ "RailedTransportDockUpdate", 16, 16 },
{ "RailedTransportAIUpdate", 16, 16 },
{ "RailedTransportContain", 16, 16 },
- { "RailroadBehavior", 16, 16 },
+ { NAMEKEY_RailroadBehavior, 16, 16 },
{ "SalvageCrateCollide", 32, 32 },
{ "ShroudCrateCollide", 32, 32 },
{ "SlavedUpdate", 64, 32 },
@@ -290,13 +290,13 @@ static PoolSizeRec sizes[] =
{ "HiveStructureBody", 64, 32 }, //Stinger sites
{ "StructureCollapseUpdate", 32, 32 },
{ "StructureToppleUpdate", 32, 32 },
- { "SupplyCenterCreate", 32, 32 },
- { "SupplyCenterDockUpdate", 32, 32 },
+ { NAMEKEY_SupplyCenterCreate, 32, 32 },
+ { NAMEKEY_SupplyCenterDockUpdate, 32, 32 },
{ "SupplyCenterProductionExitUpdate", 32, 32 },
{ "SupplyTruckStateMachine", 256, 32 },
{ "SupplyTruckAIUpdate", 32, 32 },
{ "SupplyWarehouseCreate", 32, 32 },
- { "SupplyWarehouseDockUpdate", 32, 32 },
+ { NAMEKEY_SupplyWarehouseDockUpdate, 32, 32 },
{ "EnemyNearUpdate", 1024, 32 },
{ "TechBuildingBehavior", 32, 32 },
{ "ToppleUpdate", 2048, 32 },
@@ -357,7 +357,7 @@ static PoolSizeRec sizes[] =
{ "GrantUpgradeCreate", 256, 32 },
{ "SpyVisionSpecialPower", 256, 32 },
{ "StealthDetectorUpdate", 256, 32 },
- { "StealthUpdate", 256, 32 },
+ { NAMEKEY_StealthUpdate, 256, 32 },
{ "StealthUpgrade", 256, 32 },
{ "StatusBitsUpgrade", 128, 128 },
{ "SubObjectsUpgrade", 128, 128 },
@@ -368,8 +368,8 @@ static PoolSizeRec sizes[] =
{ "FireOCLAfterWeaponCooldownUpdate", 64, 32 },
{ "HijackerUpdate", 64, 32 },
{ "ChinaMinesUpgrade", 64, 32 },
- { "PowerPlantUpdate", 16, 16 },
- { "PowerPlantUpgrade", 16, 16 },
+ { NAMEKEY_PowerPlantUpdate, 16, 16 },
+ { NAMEKEY_PowerPlantUpgrade, 16, 16 },
{ "DefectorSpecialPower", 16, 16 },
{ "CheckpointUpdate", 16, 16 },
{ "MobNexusContain", 128, 32 },
diff --git a/Generals/Code/GameEngine/Source/Common/System/Radar.cpp b/Generals/Code/GameEngine/Source/Common/System/Radar.cpp
index 1de9f7425c..a07d2b32a3 100644
--- a/Generals/Code/GameEngine/Source/Common/System/Radar.cpp
+++ b/Generals/Code/GameEngine/Source/Common/System/Radar.cpp
@@ -426,7 +426,7 @@ void Radar::addObject( Object *obj )
//Because we have support for disguised units pretending to be units from another
//team, we need to intercept it here and make sure it's rendered appropriately
//based on which client is rendering it.
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate *update = (StealthUpdate*)obj->findUpdateModule( key_StealthUpdate );
if( update )
{
diff --git a/Generals/Code/GameEngine/Source/GameClient/Drawable.cpp b/Generals/Code/GameEngine/Source/GameClient/Drawable.cpp
index 26b70353ce..cfdaff2a51 100644
--- a/Generals/Code/GameEngine/Source/GameClient/Drawable.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/Drawable.cpp
@@ -449,7 +449,7 @@ Drawable::Drawable( const ThingTemplate *thingTemplate, DrawableStatus statusBit
/// @todo srj -- this is evil, we shouldn't look at the module name directly!
if (thingTemplate->isKindOf(KINDOF_SHRUBBERY) &&
!TheGlobalData->m_useTreeSway &&
- cuMI.getNthName(modIdx).compareNoCase("SwayClientUpdate") == 0)
+ cuMI.getNthName(modIdx).compareNoCase(NAMEKEY_SwayClientUpdate) == 0)
continue;
*m++ = TheModuleFactory->newModule(this, cuMI.getNthName(modIdx), newModData, MODULETYPE_CLIENT_UPDATE);
@@ -2126,7 +2126,7 @@ void Drawable::setStealthLook(StealthLookType look)
if( obj )
{
//Try to get the stealthupdate module and see if the opacity value is overriden.
- static NameKeyType key_StealthUpdate = NAMEKEY("StealthUpdate");
+ static NameKeyType key_StealthUpdate = NAMEKEY(NAMEKEY_StealthUpdate);
StealthUpdate* stealth = (StealthUpdate *)obj->findUpdateModule(key_StealthUpdate);
if( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index b68522ca9e..948bdaa477 100644
--- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -1101,7 +1101,7 @@ void ControlBar::init( void )
setControlCommand(win, findCommandButton("NonCommand_IdleWorker") );
win->winSetTooltipFunc(commandButtonTooltip);
}
- win = TheWindowManager->winGetWindowFromId(NULL,TheNameKeyGenerator->nameToKey("ControlBar.wnd:ButtonPlaceBeacon"));
+ win = TheWindowManager->winGetWindowFromId(NULL,TheNameKeyGenerator->nameToKey(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon));
if(win)
{
setControlCommand(win, findCommandButton("NonCommand_Beacon") );
@@ -1409,7 +1409,7 @@ void ControlBar::update( void )
Int count;
const ThingTemplate *thing = TheThingFactory->findTemplate( ThePlayerList->getLocalPlayer()->getPlayerTemplate()->getBeaconTemplate() );
ThePlayerList->getLocalPlayer()->countObjectsByThingTemplate( 1, &thing, false, &count );
- static NameKeyType beaconPlacementButtonID = NAMEKEY("ControlBar.wnd:ButtonPlaceBeacon");
+ static NameKeyType beaconPlacementButtonID = NAMEKEY(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon);
GameWindow *win = TheWindowManager->winGetWindowFromId(NULL, beaconPlacementButtonID);
if (win)
{
@@ -2503,7 +2503,7 @@ void ControlBar::setPortraitByObject( Object *obj )
setPortraitByObject( NULL );
return;
}
- static NameKeyType key_StealthUpdate = NAMEKEY("StealthUpdate");
+ static NameKeyType key_StealthUpdate = NAMEKEY(NAMEKEY_StealthUpdate);
StealthUpdate* stealth = (StealthUpdate *)obj->findUpdateModule(key_StealthUpdate);
if( stealth && stealth->isDisguised() )
{
@@ -2642,7 +2642,7 @@ void ControlBar::setControlBarSchemeByPlayer(Player *p)
if(m_controlBarSchemeManager)
m_controlBarSchemeManager->setControlBarSchemeByPlayer(p);
- static NameKeyType buttonPlaceBeaconID = NAMEKEY( "ControlBar.wnd:ButtonPlaceBeacon" );
+ static NameKeyType buttonPlaceBeaconID = NAMEKEY( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon );
static NameKeyType buttonIdleWorkerID = NAMEKEY("ControlBar.wnd:ButtonIdleWorker");
static NameKeyType buttonGeneralID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
GameWindow *buttonPlaceBeacon = TheWindowManager->winGetWindowFromId( NULL, buttonPlaceBeaconID );
@@ -2687,14 +2687,14 @@ void ControlBar::setControlBarSchemeByPlayerTemplate( const PlayerTemplate *pt)
if(m_controlBarSchemeManager)
m_controlBarSchemeManager->setControlBarSchemeByPlayerTemplate(pt);
- static NameKeyType buttonPlaceBeaconID = NAMEKEY( "ControlBar.wnd:ButtonPlaceBeacon" );
+ static NameKeyType buttonPlaceBeaconID = NAMEKEY( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon );
static NameKeyType buttonIdleWorkerID = NAMEKEY("ControlBar.wnd:ButtonIdleWorker");
static NameKeyType buttonGeneralID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
GameWindow *buttonPlaceBeacon = TheWindowManager->winGetWindowFromId( NULL, buttonPlaceBeaconID );
GameWindow *buttonIdleWorker = TheWindowManager->winGetWindowFromId( NULL, buttonIdleWorkerID );
GameWindow *buttonGeneral = TheWindowManager->winGetWindowFromId( NULL, buttonGeneralID );
- if(pt == ThePlayerTemplateStore->findPlayerTemplate(TheNameKeyGenerator->nameToKey("FactionObserver")))
+ if(pt == ThePlayerTemplateStore->findPlayerTemplate(TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver)))
{
m_isObserverCommandBar = TRUE;
switchToContext( CB_CONTEXT_OBSERVER_LIST, NULL );
diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
index 06bea9b829..20c0553ebd 100644
--- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
@@ -523,7 +523,7 @@ void ControlBarScheme::init(void)
win->winSetPosition(x,y );
win->winSetSize((m_optionsLR.x - m_optionsUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_optionsLR.y - m_optionsUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);
}
- win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonPlaceBeacon" ) );
+ win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon ) );
if(win)
{
GadgetButtonSetEnabledImage(win, m_beaconButtonEnable);
diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
index 40dd06ee5e..404960e1f2 100644
--- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
@@ -384,7 +384,7 @@ WindowMsgHandledType ControlBarSystem( GameWindow *window, UnsignedInt msg,
case GBM_SELECTED_RIGHT:
{
GameWindow *control = (GameWindow *)mData1;
- static NameKeyType beaconPlacementButtonID = NAMEKEY("ControlBar.wnd:ButtonPlaceBeacon");
+ static NameKeyType beaconPlacementButtonID = NAMEKEY(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon);
static NameKeyType beaconDeleteButtonID = NAMEKEY("ControlBar.wnd:ButtonDeleteBeacon");
static NameKeyType beaconClearTextButtonID = NAMEKEY("ControlBar.wnd:ButtonClearBeaconText");
static NameKeyType beaconGeneralButtonID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
index 5a69575d35..e51fcf03ca 100644
--- a/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
@@ -783,7 +783,7 @@ void MultiPlayerLoadScreen::init( GameInfo *game )
if (lSlot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(lSlot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
const Image *loadScreenImage = TheMappedImageCollection->findImageByName(pt->getLoadScreen());
@@ -1012,7 +1012,7 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
if (lSlot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(lSlot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
const Image *loadScreenImage = TheMappedImageCollection->findImageByName(pt->getLoadScreen());
if(loadScreenImage)
m_loadScreen->winSetEnabledImage(0, loadScreenImage);
diff --git a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 6c074b9247..c8677e50d8 100644
--- a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -2226,7 +2226,7 @@ void InGameUI::createMouseoverHint( const GameMessage *msg )
//Because we have support for disguised units pretending to be units from another
//team, we need to intercept it here and make sure it's rendered appropriately
//based on which client is rendering it.
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate *update = (StealthUpdate*)obj->findUpdateModule( key_StealthUpdate );
if( update )
{
@@ -2309,7 +2309,7 @@ void InGameUI::createMouseoverHint( const GameMessage *msg )
#endif
UnicodeString warehouseFeedback;
// Add on dollar amount of warehouse contents so people don't freak out until the art is hooked up
- static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( "SupplyWarehouseDockUpdate" );
+ static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( NAMEKEY_SupplyWarehouseDockUpdate );
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate *)obj->findUpdateModule( warehouseModuleKey );
if( warehouseModule != NULL )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp
index b50ebb2e22..9bf465c1ff 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AIGroup.cpp
@@ -1620,7 +1620,7 @@ void AIGroup::groupMoveToPosition( const Coord3D *pos, Bool addWaypoint, Command
//Not stealthed, not detected -- so do auto-acquire while stealthed?
if( !ai->canAutoAcquireWhileStealthed() )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)theUnit->findUpdateModule( key_StealthUpdate );
if( stealth )
{
@@ -1915,7 +1915,7 @@ void AIGroup::groupIdle(CommandSourceType cmdSource)
//Not stealthed, not detected -- so do auto-acquire while stealthed?
if( !ai->canAutoAcquireWhileStealthed() )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)obj->findUpdateModule( key_StealthUpdate );
if( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
index 6f34f452c3..6d4ff61bab 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
@@ -189,7 +189,7 @@ void AIPlayer::checkForSupplyCenter( BuildListInfo *info, Object *bldg )
{
class SupplyCenterDockUpdate;
// if it is a supply center, I must have boxes
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*)bldg->findUpdateModule( key_centerUpdate );
if( centerModule )
{
@@ -294,7 +294,7 @@ void AIPlayer::queueSupplyTruck( void )
// No supplies.
continue;
}
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)supplySource->findUpdateModule( key_warehouseUpdate );
if( warehouseModule ) {
Int availableCash = warehouseModule->getBoxesStored()*TheGlobalData->m_baseValuePerSupplyBox;
@@ -1848,7 +1848,7 @@ Object *AIPlayer::findSupplyCenter(Int minimumCash)
{
if (!obj->isKindOf(KINDOF_STRUCTURE)) continue;
if (!obj->isKindOf(KINDOF_SUPPLY_SOURCE)) continue;
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)obj->findUpdateModule( key_warehouseUpdate );
if( warehouseModule ) {
Int availableCash = warehouseModule->getBoxesStored()*TheGlobalData->m_baseValuePerSupplyBox;
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp b/Generals/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
index 92f01ec79d..71c076c068 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
@@ -485,7 +485,7 @@ void SidesList::prepareForMP_or_Skirmish(void)
{
m_skirmishSides[m_numSkirmishSides] = m_sides[i];
m_numSkirmishSides++;
- if (m_sides[i].getDict()->getAsciiString(TheKey_playerFaction) == "FactionCivilian") {
+ if (m_sides[i].getDict()->getAsciiString(TheKey_playerFaction) == NAMEKEY_FactionCivilian) {
// Don't remove FactionCivilian.
continue;
}
@@ -495,7 +495,7 @@ void SidesList::prepareForMP_or_Skirmish(void)
}
Bool gotScripts = false;
for (i=0; igetAsciiString(TheKey_playerFaction) == "FactionCivilian") {
+ if (m_skirmishSides[i].getDict()->getAsciiString(TheKey_playerFaction) == NAMEKEY_FactionCivilian) {
// Don't consider FactionCivilian.
continue;
}
@@ -685,7 +685,7 @@ void SidesList::addPlayerByTemplate(AsciiString playerTemplateName)
playerDisplayName.translate(playerName);
isHuman = true;
// special-case "civilian"...
- if (playerName == "PlyrCivilian")
+ if (playerName == NAMEKEY_PlyrCivilian)
isHuman = false;
}
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/MobNexusContain.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/MobNexusContain.cpp
index bd3eb02b36..0997389988 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/MobNexusContain.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/MobNexusContain.cpp
@@ -442,7 +442,7 @@ Bool MobNexusContain::tryToEvacuate( Bool exposeStealthedUnits )
if( obj->isKindOf( KINDOF_STEALTH_GARRISON ) && exposeStealthedUnits )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)obj->findUpdateModule( key_StealthUpdate );
if( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
index 217cc1573a..69f54bc06e 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
@@ -533,7 +533,7 @@ void OpenContain::removeFromContainViaIterator( ContainedItemsList::iterator it,
m_stealthUnitsContained--;
if( exposeStealthUnits )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)rider->findUpdateModule( key_StealthUpdate );
if( stealth )
{
@@ -700,7 +700,7 @@ void OpenContain::onCollide( Object *other, const Coord3D *loc, const Coord3D *n
if( rider->isKindOf( KINDOF_STEALTH_GARRISON ) )
{
// aiExit is needed to walk away from the building well, but it doesn't take the Unstealth flag
- static const NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static const NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)rider->findUpdateModule( key_StealthUpdate );
if( stealth )
{
@@ -1239,7 +1239,7 @@ void OpenContain::markAllPassengersDetected( )
// call it
if( rider->isKindOf( KINDOF_STEALTH_GARRISON ) )
{
- static const NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static const NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)rider->findUpdateModule( key_StealthUpdate );
if( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
index 6e3ac315d8..c94602db65 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
@@ -3306,7 +3306,7 @@ void Object::onDisabledEdge(Bool becomingDisabled)
{
//@todo jkmcd - Colin suggested we rewrite this to use the interface stuff. I agree, but need
// to get some more bugs fixed today.
- static NameKeyType radar = NAMEKEY("RadarUpgrade");
+ static NameKeyType radar = NAMEKEY(NAMEKEY_RadarUpgrade);
Module *mod = mod = findModule(radar);
if (mod) {
RadarUpgrade *radarMod = (RadarUpgrade*) mod;
@@ -3329,8 +3329,8 @@ void Object::onDisabledEdge(Bool becomingDisabled)
// We can't affect something that consumes, or else we go low power which removes the consumption
// which makes us not low power so we add the consumption so we go low power...
// This check also guaards the IsDisabled in friend_adjustPower above
- static NameKeyType powerPlant = NAMEKEY("PowerPlantUpgrade");
- static NameKeyType overCharge = NAMEKEY("OverchargeBehavior");
+ static NameKeyType powerPlant = NAMEKEY(NAMEKEY_PowerPlantUpgrade);
+ static NameKeyType overCharge = NAMEKEY(NAMEKEY_OverchargeBehavior);
Module* mod = findModule(powerPlant);
if (mod) {
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
index f9d13c8027..b098d178f5 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
@@ -400,7 +400,7 @@ class DeliverPayloadNugget : public ObjectCreationNugget
die->setCreator(INVALID_ID);
}
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *ai = (DeliverPayloadAIUpdate*)transport->findUpdateModule(key_DeliverPayloadAIUpdate);
if( ai )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp
index 373820f365..742ebd8aaa 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp
@@ -5445,7 +5445,7 @@ Bool PartitionFilterStealthedAndUndetected::allow( Object *objOther )
else
{
//Exception case -- bomb trucks can't be considered stealthed units when they are disguised as the enemy.
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate *update = (StealthUpdate*)objOther->findUpdateModule( key_StealthUpdate );
if( update && update->isDisguised() )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
index dcf4d6911e..817300c7de 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
@@ -2935,7 +2935,7 @@ void AIUpdateInterface::privateMoveToAndEvacuateAndExit( const Coord3D *pos, Com
m_isBlockedAndStuck = FALSE;
setLastCommandSource( cmdSource );
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *dp = (DeliverPayloadAIUpdate*)getObject()->findUpdateModule( key_DeliverPayloadAIUpdate );
if( dp )
{
@@ -3930,7 +3930,7 @@ void AIUpdateInterface::privateHackInternet( CommandSourceType cmdSource )
getStateMachine()->clear();
setLastCommandSource( cmdSource );
- static NameKeyType key_HackInternetAIUpdate = NAMEKEY("HackInternetAIUpdate");
+ static NameKeyType key_HackInternetAIUpdate = NAMEKEY(NAMEKEY_HackInternetAIUpdate);
HackInternetAIUpdate *ai = (HackInternetAIUpdate*)getObject()->findUpdateModule( key_HackInternetAIUpdate );
if( ai )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
index 60d6519422..54b472ba6c 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
@@ -271,7 +271,7 @@ void RailroadBehavior::onCollide( Object *other, const Coord3D *loc, const Coord
return;
}
- static NameKeyType key_DemoTrapUpdate = NAMEKEY("DemoTrapUpdate");
+ static NameKeyType key_DemoTrapUpdate = NAMEKEY(NAMEKEY_DemoTrapUpdate);
DemoTrapUpdate *dtu = (DemoTrapUpdate*)other->findUpdateModule(key_DemoTrapUpdate);
if( dtu )
{
@@ -775,7 +775,7 @@ UpdateSleepTime RailroadBehavior::update( void )
if ( trailer )
{
//call his pull trailer with my info;
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -838,7 +838,7 @@ void RailroadBehavior::disembark(void)
Object *trailer = TheGameLogic->findObjectByID( m_trailerID );
if ( trailer )
{
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -888,7 +888,7 @@ class PartitionFilterIsValidCarriage : public PartitionFilter
if (m_obj == objOther)
return FALSE;
// must have railroady goodness
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)objOther->findUpdateModule(key_rb);
if( ! rb )
return FALSE;
@@ -971,7 +971,7 @@ void RailroadBehavior::createCarriages( void )
firstCarriage->setProducer(self);
m_trailerID = firstCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)firstCarriage->findUpdateModule(key_rb);
if( rb )
{
@@ -1033,7 +1033,7 @@ void RailroadBehavior::hitchNewCarriagebyTemplate( ObjectID locoID, const Templa
newCarriage->setProducer(locomotive);
m_trailerID = newCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)newCarriage->findUpdateModule(key_rb);
if( rb )
{
@@ -1110,7 +1110,7 @@ void RailroadBehavior::hitchNewCarriagebyProximity( ObjectID locoID, TrainTrack
closeCarriage->setProducer(self);
m_trailerID = closeCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)closeCarriage->findUpdateModule(key_rb);
if( rb )
rb->hitchNewCarriagebyProximity( self->getID(), m_track );
@@ -1164,7 +1164,7 @@ void RailroadBehavior::getPulled( PullInfo *info )
if ( trailer )
{
//call his pull trailer with MY info;
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -1311,7 +1311,7 @@ void RailroadBehavior::destroyTheWholeTrainNow( void )
Object *trailer = TheGameLogic->findObjectByID( m_trailerID );
if ( trailer )
{
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
index 6755ef023f..3e2051e475 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
@@ -218,12 +218,12 @@ void SupplyTruckAIUpdate::privateDock( Object *dock, CommandSourceType cmdSource
UnsignedInt SupplyTruckAIUpdate::getActionDelayForDock( Object *dock )
{
// Decide whether to use my Center or Warehouse delay time
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) dock->findUpdateModule( key_warehouseUpdate );
if (warehouseModule) {
return getSupplyTruckAIUpdateModuleData()->m_warehouseDelay;
}
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*) dock->findUpdateModule( key_centerUpdate );
if (centerModule) {
return getSupplyTruckAIUpdateModuleData()->m_centerDelay;
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
index 1865407d2c..97624dcfc6 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
@@ -219,12 +219,12 @@ void WorkerAIUpdate::createMachines( void )
UnsignedInt WorkerAIUpdate::getActionDelayForDock( Object *dock )
{
// Decide whether to use my Center or Warehouse delay time
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) dock->findUpdateModule( key_warehouseUpdate );
if (warehouseModule) {
return getWorkerAIUpdateModuleData()->m_warehouseDelay;
}
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*) dock->findUpdateModule( key_centerUpdate );
if (centerModule) {
return getWorkerAIUpdateModuleData()->m_centerDelay;
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
index 693e8cf09b..49ff5a23c3 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
@@ -95,7 +95,7 @@ BoneFXUpdate::BoneFXUpdate( Thing *thing, const ModuleData* moduleData ) : Updat
//-------------------------------------------------------------------------------------------------
void BoneFXUpdate::onObjectCreated()
{
- static NameKeyType key_BoneFXDamage = NAMEKEY("BoneFXDamage");
+ static NameKeyType key_BoneFXDamage = NAMEKEY(NAMEKEY_BoneFXDamage);
BoneFXDamage* bfxd = (BoneFXDamage*)getObject()->findDamageModule(key_BoneFXDamage);
if (bfxd == NULL)
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
index 598e226494..4e8d72cec2 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
@@ -126,7 +126,7 @@ UpdateSleepTime SupplyCenterDockUpdate::update()
UpdateSleepTime result = DockUpdate::update();
#ifdef _DEBUG_ECONOMY
- static const NameKeyType key_SupplyCenterCreate = NAMEKEY("SupplyCenterCreate");
+ static const NameKeyType key_SupplyCenterCreate = NAMEKEY(NAMEKEY_SupplyCenterCreate);
SupplyCenterCreate* create = (SupplyCenterCreate*)getObject()->findCreateModule(key_SupplyCenterCreate);
DEBUG_ASSERTCRASH( create && ! create->shouldDoOnBuildComplete(), ("A Supply center did not call onBuildComplete.") );
#endif
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
index f0a793a85f..b29be82a0f 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
@@ -60,7 +60,7 @@ class PartitionFilterFlammable : public PartitionFilter
Bool PartitionFilterFlammable::allow(Object *objOther)
{
// It must be burnable in general, and burnable now
- static NameKeyType key_FlammableUpdate = NAMEKEY("FlammableUpdate");
+ static NameKeyType key_FlammableUpdate = NAMEKEY(NAMEKEY_FlammableUpdate);
FlammableUpdate* fu = (FlammableUpdate*)objOther->findUpdateModule(key_FlammableUpdate);
if (fu == NULL)
return FALSE;
@@ -147,7 +147,7 @@ UpdateSleepTime FireSpreadUpdate::update( void )
Object* objectToLight = ThePartitionManager->getClosestObject(getObject(), d->m_spreadTryRange, FROM_CENTER_3D, filters);
if( objectToLight )
{
- static NameKeyType key_FlammableUpdate = NAMEKEY("FlammableUpdate");
+ static NameKeyType key_FlammableUpdate = NAMEKEY(NAMEKEY_FlammableUpdate);
FlammableUpdate* fu = (FlammableUpdate*)objectToLight->findUpdateModule(key_FlammableUpdate);
if( fu )
fu->tryToIgnite();
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
index 0db0b36e10..89b21ad3c7 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
@@ -202,7 +202,7 @@ void FlammableUpdate::tryToIgnite()
startBurningSound();
// bleah. this sucks. (srj)
- static const NameKeyType key_FireSpreadUpdate = NAMEKEY("FireSpreadUpdate");
+ static const NameKeyType key_FireSpreadUpdate = NAMEKEY(NAMEKEY_FireSpreadUpdate);
FireSpreadUpdate* fu = (FireSpreadUpdate*)getObject()->findUpdateModule(key_FireSpreadUpdate);
if (fu != NULL)
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
index aada4f5f55..65e9517755 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
@@ -437,7 +437,7 @@ void NeutronMissileSlowDeathBehavior::doScorchBlast( const BlastInfo *blastInfo
// set things aflame
///@todo can't to this now, flames eat too many particles
- // static NameKeyType flammableKey = NAMEKEY( "FlammableUpdate" );
+ // static NameKeyType flammableKey = NAMEKEY( NAMEKEY_FlammableUpdate );
// FlammableUpdate *update = (FlammableUpdate *)other->findUpdateModule( flammableKey );
// if( update )
// update->tryToIgnite();
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
index 6fb139803b..52f5dd3793 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
@@ -580,7 +580,7 @@ Bool SpecialAbilityUpdate::handlePackingProcessing()
if( getSpecialAbilityUpdateModuleData()->m_loseStealthOnTrigger &&
m_animFrames < getSpecialAbilityUpdateModuleData()->m_preTriggerUnstealthFrames)
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)getObject()->findUpdateModule( key_StealthUpdate );
if( stealth )
{
@@ -1440,7 +1440,7 @@ void SpecialAbilityUpdate::triggerAbilityEffect()
case SPECIAL_DISGUISE_AS_VEHICLE:
{
Object *target = TheGameLogic->findObjectByID( m_targetID );
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
if( target )
{
StealthUpdate *update = (StealthUpdate*)object->findUpdateModule( key_StealthUpdate );
@@ -1456,7 +1456,7 @@ void SpecialAbilityUpdate::triggerAbilityEffect()
if( data->m_loseStealthOnTrigger && okToLoseStealth)
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)object->findUpdateModule( key_StealthUpdate );
if( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthDetectorUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthDetectorUpdate.cpp
index 8dba9ffa89..764dc2cc90 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthDetectorUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthDetectorUpdate.cpp
@@ -207,7 +207,7 @@ UpdateSleepTime StealthDetectorUpdate::update( void )
if ( them->isEffectivelyDead() )
continue;
- static NameKeyType key_StealthUpdate = NAMEKEY("StealthUpdate");
+ static NameKeyType key_StealthUpdate = NAMEKEY(NAMEKEY_StealthUpdate);
StealthUpdate* stealth = (StealthUpdate *)them->findUpdateModule(key_StealthUpdate);
if ( stealth )
{
@@ -324,7 +324,7 @@ UpdateSleepTime StealthDetectorUpdate::update( void )
{
rider = *it;
- static NameKeyType key_StealthUpdate = NAMEKEY("StealthUpdate");
+ static NameKeyType key_StealthUpdate = NAMEKEY(NAMEKEY_StealthUpdate);
StealthUpdate* stealth = (StealthUpdate *)rider->findUpdateModule(key_StealthUpdate);
if ( stealth )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp
index 48c4c92717..70f07800c4 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp
@@ -647,7 +647,7 @@ void StealthUpdate::disguiseAsObject( const Object *target )
const StealthUpdateModuleData *data = getStealthUpdateModuleData();
if( target && target->getControllingPlayer() )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)target->findUpdateModule( key_StealthUpdate );
if( stealth && stealth->getDisguisedTemplate() )
{
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
index 536e32ec0b..8a26fc6af2 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
@@ -168,7 +168,7 @@ void ToppleUpdate::applyTopplingForce( const Coord3D* toppleDirection, Real topp
// tell the drawable to stop swaying
Drawable * draw = getObject()->getDrawable();
- static NameKeyType nameKeySwayUpdate = NAMEKEY("SwayClientUpdate");
+ static NameKeyType nameKeySwayUpdate = NAMEKEY(NAMEKEY_SwayClientUpdate);
ClientUpdateModule ** clientModules = draw->getClientUpdateModules();
if (clientModules)
diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp
index 55fe5b9ed1..ddf7140c7a 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp
@@ -425,7 +425,7 @@ Bool WeaponSet::isAnyWithinTargetPitch(const Object* obj, const Object* victim)
//-------------------------------------------------------------------------------------------------
CanAttackResult WeaponSet::getAbleToAttackSpecificObject( AbleToAttackType attackType, const Object* source, const Object* victim, CommandSourceType commandSource ) const
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
// basic sanity checks.
if (!source ||
diff --git a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
index 8a8212e073..0d1eee1891 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
@@ -532,7 +532,7 @@ void ScriptActions::doCreateReinforcements(const AsciiString& team, const AsciiS
//Check to see if we have a transport, and if our transport has paradrop capabilities. If this is the
//case, we'll need to create each unit inside "parachute containers".
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *dp = NULL;
if( transport )
{
@@ -4782,7 +4782,7 @@ void ScriptActions::doSetWarehouseValue( const AsciiString& warehouseName, Int c
return;
}
- static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( "SupplyWarehouseDockUpdate" );
+ static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( NAMEKEY_SupplyWarehouseDockUpdate );
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate *)obj->findUpdateModule( warehouseModuleKey );
if( warehouseModule == NULL )
return;
diff --git a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
index ff98ef79bf..60515b6f5d 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
@@ -2131,7 +2131,7 @@ Bool ScriptConditions::evaluateSkirmishSuppliesWithinDistancePerimeter(Parameter
Real maxValue = 0;
for (Object *them = iter->first(); them; them = iter->next()) {
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) them->findUpdateModule( key_warehouseUpdate );
if (!warehouseModule) {
continue;
diff --git a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
index 9b598efc71..e0d941076f 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
@@ -309,7 +309,7 @@ void VictoryConditions::cachePlayerPtrs( void )
return;
Int playerCount = 0;
- const PlayerTemplate *civTemplate = ThePlayerTemplateStore->findPlayerTemplate( NAMEKEY("FactionCivilian") );
+ const PlayerTemplate *civTemplate = ThePlayerTemplateStore->findPlayerTemplate( NAMEKEY(NAMEKEY_FactionCivilian) );
for (Int i=0; igetNthPlayer(i);
diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
index 631e8fff61..3d49c9b1ef 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
@@ -1183,7 +1183,7 @@ void GameLogic::startNewGame( Bool saveGame )
if (slot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(slot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
d.setAsciiString(TheKey_playerFaction, KEYNAME(pt->getNameKey()));
@@ -1304,7 +1304,7 @@ void GameLogic::startNewGame( Bool saveGame )
d.setBool(TheKey_playerIsHuman, TRUE);
d.setUnicodeString(TheKey_playerDisplayName, UnicodeString(L"Observer"));
const PlayerTemplate* pt;
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
d.setAsciiString(TheKey_playerFaction, KEYNAME(pt->getNameKey()));
@@ -1726,7 +1726,7 @@ void GameLogic::startNewGame( Bool saveGame )
if (slot->getPlayerTemplate() == PLAYERTEMPLATE_OBSERVER)
{
slot->setPlayerTemplate(0);
- const PlayerTemplate *pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ const PlayerTemplate *pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
for (Int j=0; jgetPlayerTemplateCount(); ++j)
diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
index 4387f9c0bc..a16f8b4534 100644
--- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
+++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
@@ -1634,7 +1634,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
{
Int updateCount = 0;
- static NameKeyType nameKeyClientUpdate = NAMEKEY("BeaconClientUpdate");
+ static NameKeyType nameKeyClientUpdate = NAMEKEY(NAMEKEY_BeaconClientUpdate);
ClientUpdateModule ** clientModules = object->getDrawable()->getClientUpdateModules();
if (clientModules)
{
@@ -1697,7 +1697,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
if (beaconDrawable)
{
- static NameKeyType nameKeyClientUpdate = NAMEKEY("BeaconClientUpdate");
+ static NameKeyType nameKeyClientUpdate = NAMEKEY(NAMEKEY_BeaconClientUpdate);
ClientUpdateModule ** clientModules = beaconDrawable->getClientUpdateModules();
if (clientModules)
{
diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp
index 68caa79e33..5682e98e0e 100644
--- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp
+++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp
@@ -698,7 +698,7 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
// Now it twinkles for any stealthed object, whether locally controlled or neutral-observier-viewed
if( obj->testStatus( OBJECT_STATUS_STEALTHED ) )
{
- static NameKeyType key_StealthUpdate = NAMEKEY( "StealthUpdate" );
+ static NameKeyType key_StealthUpdate = NAMEKEY( NAMEKEY_StealthUpdate );
StealthUpdate* stealth = (StealthUpdate*)obj->findUpdateModule( key_StealthUpdate );
if( !stealth )
continue;
diff --git a/Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp b/Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
index 6d7abf7fd0..08fdb22cee 100644
--- a/Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
+++ b/Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
@@ -441,8 +441,8 @@ AsciiString ConvertFaction(AsciiString name)
char oldName[256];
char newName[256];
strcpy(oldName, name.str());
- strcpy(newName, "FactionGLA");
- strcat(newName, oldName+strlen("FactionFundamentalist"));
+ strcpy(newName, NAMEKEY_FactionGLA);
+ strcat(newName, oldName+strlen(NAMEKEY_FactionFundamentalist));
AsciiString swapName;
swapName.set(newName);
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(swapName));
@@ -468,7 +468,7 @@ void CWorldBuilderDoc::validate(void)
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(tmplname));
if (!pt) {
DEBUG_LOG(("Faction %s could not be found in sides list!\n", tmplname.str()));
- if (tmplname.startsWith("FactionFundamentalist")) {
+ if (tmplname.startsWith(NAMEKEY_FactionFundamentalist)) {
swapName = ConvertFaction(tmplname);
if (swapName != AsciiString::TheEmptyString) {
DEBUG_LOG(("Changing Faction from %s to %s\n", tmplname.str(), swapName.str()));
@@ -593,7 +593,7 @@ void CWorldBuilderDoc::validate(void)
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(tmplname));
if (!pt) {
DEBUG_LOG(("Faction %s could not be found in sides list!\n", tmplname.str()));
- if (tmplname.startsWith("FactionFundamentalist")) {
+ if (tmplname.startsWith(NAMEKEY_FactionFundamentalist)) {
swapName = ConvertFaction(tmplname);
if (swapName != AsciiString::TheEmptyString) {
DEBUG_LOG(("Changing Faction from %s to %s\n", tmplname.str(), swapName.str()));
diff --git a/Generals/Code/Tools/WorldBuilder/src/playerlistdlg.cpp b/Generals/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
index b841380f26..66f2d825ee 100644
--- a/Generals/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
+++ b/Generals/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
@@ -840,8 +840,8 @@ void PlayerListDlg::OnAddskirmishplayers()
{
// PlyrCivilian
- AsciiString addedPTName = "FactionCivilian";
- AsciiString pname = "PlyrCivilian";
+ AsciiString addedPTName = NAMEKEY_FactionCivilian;
+ AsciiString pname = NAMEKEY_PlyrCivilian;
UnicodeString pnameu;
pnameu = L"PlyrCivilian";
@@ -862,7 +862,7 @@ void PlayerListDlg::OnAddskirmishplayers()
DEBUG_ASSERTLOG(!modified,("had to clean up sides in PlayerListDlg::OnNewplayer"));
}
- addedPTName = "FactionAmerica";
+ addedPTName = NAMEKEY_FactionAmerica;
pname = "SkirmishAmerica";
pnameu = L"SkirmishAmerica";
@@ -883,7 +883,7 @@ void PlayerListDlg::OnAddskirmishplayers()
DEBUG_ASSERTLOG(!modified,("had to clean up sides in PlayerListDlg::OnNewplayer"));
}
- addedPTName = "FactionChina";
+ addedPTName = NAMEKEY_FactionChina;
pname = "SkirmishChina";
pnameu = L"SkirmishChina";
@@ -904,7 +904,7 @@ void PlayerListDlg::OnAddskirmishplayers()
DEBUG_ASSERTLOG(!modified,("had to clean up sides in PlayerListDlg::OnNewplayer"));
}
- addedPTName = "FactionGLA";
+ addedPTName = NAMEKEY_FactionGLA;
pname = "SkirmishGLA";
pnameu = L"SkirmishGLA";
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
index 6c319dbc7c..845fbe2e6c 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Module/BeaconClientUpdate.h
@@ -57,7 +57,7 @@ class BeaconClientUpdateModuleData : public ClientUpdateModuleData
class BeaconClientUpdate : public ClientUpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BeaconClientUpdate, "BeaconClientUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BeaconClientUpdate, NAMEKEY_BeaconClientUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( BeaconClientUpdate, BeaconClientUpdateModuleData );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
index b1021c0e33..0f6997c5f3 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Module/SwayClientUpdate.h
@@ -44,7 +44,7 @@ class Thing;
class SwayClientUpdate : public ClientUpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SwayClientUpdate, "SwayClientUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SwayClientUpdate, NAMEKEY_SwayClientUpdate )
MAKE_STANDARD_MODULE_MACRO( SwayClientUpdate );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
index e285907a9b..bb6b7e7c91 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AutoDepositUpdate.h
@@ -111,7 +111,7 @@ class AutoDepositUpdateModuleData : public UpdateModuleData
class AutoDepositUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( AutoDepositUpdate, "AutoDepositUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( AutoDepositUpdate, NAMEKEY_AutoDepositUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( AutoDepositUpdate, AutoDepositUpdateModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
index f6e61b3a4a..39ce3ca9c3 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h
@@ -47,7 +47,7 @@ class BoneFXDamage : public DamageModule
{
MAKE_STANDARD_MODULE_MACRO( BoneFXDamage );
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BoneFXDamage, "BoneFXDamage" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( BoneFXDamage, NAMEKEY_BoneFXDamage )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
index c545699965..abb4b9c58f 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeliverPayloadAIUpdate.h
@@ -314,7 +314,7 @@ class DeliverPayloadData
//-------------------------------------------------------------------------------------------------
class DeliverPayloadAIUpdate : public AIUpdateInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DeliverPayloadAIUpdate, "DeliverPayloadAIUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DeliverPayloadAIUpdate, NAMEKEY_DeliverPayloadAIUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( DeliverPayloadAIUpdate, DeliverPayloadAIUpdateModuleData )
private:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
index e6f64f3abb..5d75645064 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DemoTrapUpdate.h
@@ -68,7 +68,7 @@ class DemoTrapUpdateModuleData : public ModuleData
class DemoTrapUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DemoTrapUpdate, "DemoTrapUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DemoTrapUpdate, NAMEKEY_DemoTrapUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( DemoTrapUpdate, DemoTrapUpdateModuleData );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
index ec658a1c22..25923287ae 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireSpreadUpdate.h
@@ -59,7 +59,7 @@ class FireSpreadUpdateModuleData : public UpdateModuleData
class FireSpreadUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FireSpreadUpdate, "FireSpreadUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FireSpreadUpdate, NAMEKEY_FireSpreadUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( FireSpreadUpdate, FireSpreadUpdateModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
index 9809365687..35b2646ac1 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h
@@ -76,7 +76,7 @@ class FlammableUpdateModuleData : public UpdateModuleData
class FlammableUpdate : public UpdateModule, public DamageModuleInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FlammableUpdate, "FlammableUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( FlammableUpdate, NAMEKEY_FlammableUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( FlammableUpdate, FlammableUpdateModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
index a9c100b5cb..5f0347843c 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h
@@ -189,7 +189,7 @@ class HackInternetAIInterface
//-------------------------------------------------------------------------------------------------
class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( HackInternetAIUpdate, "HackInternetAIUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( HackInternetAIUpdate, NAMEKEY_HackInternetAIUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( HackInternetAIUpdate, HackInternetAIUpdateModuleData )
private:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
index c4c4be45b4..1818056182 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OverchargeBehavior.h
@@ -75,7 +75,7 @@ class OverchargeBehavior : public UpdateModule,
public OverchargeBehaviorInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( OverchargeBehavior, "OverchargeBehavior" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( OverchargeBehavior, NAMEKEY_OverchargeBehavior )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( OverchargeBehavior, OverchargeBehaviorModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
index d6fcb730ba..9c1ce6e4d3 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpdate.h
@@ -80,7 +80,7 @@ class PowerPlantUpdate : public UpdateModule,
public PowerPlantUpdateInterface
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpdate, "PowerPlantUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpdate, NAMEKEY_PowerPlantUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( PowerPlantUpdate, PowerPlantUpdateModuleData );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
index ea1c4eaed5..374486347d 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PowerPlantUpgrade.h
@@ -45,7 +45,7 @@ class Player;
class PowerPlantUpgrade : public UpgradeModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpgrade, "PowerPlantUpgrade" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( PowerPlantUpgrade, NAMEKEY_PowerPlantUpgrade )
MAKE_STANDARD_MODULE_MACRO( PowerPlantUpgrade );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
index 2610df236f..af6cf3b67f 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RadarUpgrade.h
@@ -59,7 +59,7 @@ class RadarUpgradeModuleData : public UpgradeModuleData
class RadarUpgrade : public UpgradeModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RadarUpgrade, "RadarUpgrade" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RadarUpgrade, NAMEKEY_RadarUpgrade )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( RadarUpgrade, RadarUpgradeModuleData );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
index e02d2c109b..54fa967ed0 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailroadGuideAIUpdate.h
@@ -189,7 +189,7 @@ struct TrainTrack
class RailroadBehavior : public PhysicsBehavior
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RailroadBehavior, "RailroadBehavior" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( RailroadBehavior, NAMEKEY_RailroadBehavior )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( RailroadBehavior, RailroadBehaviorModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
index 20194d5a29..7bdff0e4da 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h
@@ -109,7 +109,7 @@ class StealthUpdateModuleData : public UpdateModuleData
class StealthUpdate : public UpdateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( StealthUpdate, "StealthUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( StealthUpdate, NAMEKEY_StealthUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( StealthUpdate, StealthUpdateModuleData );
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
index c04601b2d8..d52a03b537 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterCreate.h
@@ -43,7 +43,7 @@ class Thing;
class SupplyCenterCreate : public CreateModule
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterCreate, "SupplyCenterCreate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterCreate, NAMEKEY_SupplyCenterCreate )
MAKE_STANDARD_MODULE_MACRO( SupplyCenterCreate )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
index 4f39179b13..8a1da32cca 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyCenterDockUpdate.h
@@ -53,7 +53,7 @@ class SupplyCenterDockUpdateModuleData : public DockUpdateModuleData
class SupplyCenterDockUpdate : public DockUpdate
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterDockUpdate, "SupplyCenterDockUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyCenterDockUpdate, NAMEKEY_SupplyCenterDockUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( SupplyCenterDockUpdate, SupplyCenterDockUpdateModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
index ad8143aa79..53630b7737 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SupplyWarehouseDockUpdate.h
@@ -55,7 +55,7 @@ class SupplyWarehouseDockUpdateModuleData : public DockUpdateModuleData
class SupplyWarehouseDockUpdate : public DockUpdate
{
- MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyWarehouseDockUpdate, "SupplyWarehouseDockUpdate" )
+ MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( SupplyWarehouseDockUpdate, NAMEKEY_SupplyWarehouseDockUpdate )
MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( SupplyWarehouseDockUpdate, SupplyWarehouseDockUpdateModuleData )
public:
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
index eb27ba747f..50b211fecf 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
@@ -239,7 +239,7 @@ Bool ActionManager::canTransferSuppliesAt( const Object *obj, const Object *tran
return FALSE;
// If it is a warehouse, it must have boxes left and not be an enemy
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)transferDest->findUpdateModule( key_warehouseUpdate );
if( warehouseModule )
if( warehouseModule->getBoxesStored() == 0 || transferDest->getRelationship( obj ) == ENEMIES )
@@ -247,7 +247,7 @@ Bool ActionManager::canTransferSuppliesAt( const Object *obj, const Object *tran
// if it is a supply center, I must have boxes, and must be controlled by the same player
// (not merely an ally... otherwise you may find yourself funding your allies. ick.)
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*)transferDest->findUpdateModule( key_centerUpdate );
if( centerModule )
if( supplyTruck->getNumberBoxes() == 0 || transferDest->getControllingPlayer() != obj->getControllingPlayer() )
@@ -1707,7 +1707,7 @@ Bool ActionManager::canDoSpecialPowerAtObject( const Object *obj, const Object *
{
//Don't allow it to disguise as a train -- they don't have KINDOF_TRAIN yet, but
//if added, please change this code so it'll be faster!
- static const NameKeyType key = NAMEKEY( "RailroadBehavior" );
+ static const NameKeyType key = NAMEKEY( NAMEKEY_RailroadBehavior );
RailroadBehavior *rBehavior = (RailroadBehavior*)target->findUpdateModule( key );
if( !rBehavior )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
index 59959f24fe..ca123f991a 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
@@ -1072,7 +1072,7 @@ void Player::becomingTeamMember(Object *obj, Bool yes)
// if so, award the cash bonus
if(this != ThePlayerList->getNeutralPlayer() && yes)
{
- NameKeyType key_AutoDepositUpdate = NAMEKEY("AutoDepositUpdate");
+ NameKeyType key_AutoDepositUpdate = NAMEKEY(NAMEKEY_AutoDepositUpdate);
AutoDepositUpdate *adu = (AutoDepositUpdate *)obj->findUpdateModule(key_AutoDepositUpdate);
if (adu != NULL) {
adu->awardInitialCaptureBonus( this );
@@ -2093,7 +2093,7 @@ void Player::killPlayer(void)
}
else
{
- TheControlBar->setControlBarSchemeByPlayerTemplate(ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY("FactionObserver")));
+ TheControlBar->setControlBarSchemeByPlayerTemplate(ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(NAMEKEY_FactionObserver)));
}
}
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
index efc8dc729d..ba6ad3ff27 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
@@ -307,23 +307,23 @@ Int PlayerTemplateStore::getTemplateNumByName(AsciiString name) const
const PlayerTemplate* PlayerTemplateStore::findPlayerTemplate(NameKeyType namekey) const
{
// begin ugly, hokey code to quietly load old maps...
- static NameKeyType a0 = NAMEKEY("FactionAmerica");
- static NameKeyType a1 = NAMEKEY("FactionAmericaChooseAGeneral");
- static NameKeyType a2 = NAMEKEY("FactionAmericaTankCommand");
- static NameKeyType a3 = NAMEKEY("FactionAmericaSpecialForces");
- static NameKeyType a4 = NAMEKEY("FactionAmericaAirForce");
-
- static NameKeyType c0 = NAMEKEY("FactionChina");
- static NameKeyType c1 = NAMEKEY("FactionChinaChooseAGeneral");
- static NameKeyType c2 = NAMEKEY("FactionChinaRedArmy");
- static NameKeyType c3 = NAMEKEY("FactionChinaSpecialWeapons");
- static NameKeyType c4 = NAMEKEY("FactionChinaSecretPolice");
-
- static NameKeyType g0 = NAMEKEY("FactionGLA");
- static NameKeyType g1 = NAMEKEY("FactionGLAChooseAGeneral");
- static NameKeyType g2 = NAMEKEY("FactionGLATerrorCell");
- static NameKeyType g3 = NAMEKEY("FactionGLABiowarCommand");
- static NameKeyType g4 = NAMEKEY("FactionGLAWarlordCommand");
+ static NameKeyType a0 = NAMEKEY(NAMEKEY_FactionAmerica);
+ static NameKeyType a1 = NAMEKEY(NAMEKEY_FactionAmericaChooseAGeneral);
+ static NameKeyType a2 = NAMEKEY(NAMEKEY_FactionAmericaTankCommand);
+ static NameKeyType a3 = NAMEKEY(NAMEKEY_FactionAmericaSpecialForces);
+ static NameKeyType a4 = NAMEKEY(NAMEKEY_FactionAmericaAirForce);
+
+ static NameKeyType c0 = NAMEKEY(NAMEKEY_FactionChina);
+ static NameKeyType c1 = NAMEKEY(NAMEKEY_FactionChinaChooseAGeneral);
+ static NameKeyType c2 = NAMEKEY(NAMEKEY_FactionChinaRedArmy);
+ static NameKeyType c3 = NAMEKEY(NAMEKEY_FactionChinaSpecialWeapons);
+ static NameKeyType c4 = NAMEKEY(NAMEKEY_FactionChinaSecretPolice);
+
+ static NameKeyType g0 = NAMEKEY(NAMEKEY_FactionGLA);
+ static NameKeyType g1 = NAMEKEY(NAMEKEY_FactionGLAChooseAGeneral);
+ static NameKeyType g2 = NAMEKEY(NAMEKEY_FactionGLATerrorCell);
+ static NameKeyType g3 = NAMEKEY(NAMEKEY_FactionGLABiowarCommand);
+ static NameKeyType g4 = NAMEKEY(NAMEKEY_FactionGLAWarlordCommand);
if (namekey == a1 || namekey == a2 || namekey == a3 || namekey == a4)
namekey = a0;
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
index 1eee4168bd..cd2c6e6697 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
@@ -152,7 +152,7 @@ Object *ResourceGatheringManager::findBestSupplyWarehouse( Object *queryObject )
Object *dock = TheGameLogic->findObjectByID(dockID);
if( dock )
{
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)dock->findUpdateModule( key_warehouseUpdate );
//If remotely okay, let User win.
if( warehouseModule && computeRelativeCost( queryObject, dock, NULL ) != FLT_MAX )
@@ -212,7 +212,7 @@ Object *ResourceGatheringManager::findBestSupplyCenter( Object *queryObject )
Object *dock = TheGameLogic->findObjectByID(dockID);
if( dock )
{
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyWarehouseDockUpdate *centerModule = (SupplyWarehouseDockUpdate*)dock->findUpdateModule( key_centerUpdate );
//If remotely okay, let User win.
if( centerModule && computeRelativeCost( queryObject, dock, NULL ) != FLT_MAX )
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/MemoryInit.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/MemoryInit.cpp
index 27f04f3478..687c83afbd 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/System/MemoryInit.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/System/MemoryInit.cpp
@@ -123,8 +123,8 @@ static PoolSizeRec sizes[] =
{ "TerrainRoadType", 100, 32, },
{ "WindowLayoutPool", 32, 32 },
{ "AnimatedParticleSysBoneClientUpdate", 16, 16 },
- { "SwayClientUpdate", 32, 32 },
- { "BeaconClientUpdate", 64, 32 },
+ { NAMEKEY_SwayClientUpdate, 32, 32 },
+ { NAMEKEY_BeaconClientUpdate, 64, 32 },
{ "AIGroupPool", 64, 32 },
{ "AIDockMachinePool", 256, 32 },
{ "AIGuardMachinePool", 32, 32 },
@@ -173,7 +173,7 @@ static PoolSizeRec sizes[] =
{ "NeutronBlastBehavior", 4096, 32 },
{ "CountermeasuresBehavior", 256, 32 },
{ "BaseRegenerateUpdate", 128, 32 },
- { "BoneFXDamage", 64, 32 },
+ { NAMEKEY_BoneFXDamage, 64, 32 },
{ "BoneFXUpdate", 64, 32 },
{ "BridgeBehavior", 4, 4 },
{ "BridgeTowerBehavior", 32, 32 },
@@ -186,12 +186,12 @@ static PoolSizeRec sizes[] =
{ "CrushDie", 1024, 32 },
{ "DamDie", 8, 8 },
{ "DeliverPayloadStateMachine", 32, 32 },
- { "DeliverPayloadAIUpdate", 32, 32 },
+ { NAMEKEY_DeliverPayloadAIUpdate, 32, 32 },
{ "DeletionUpdate", 128, 32 },
{ "SmartBombTargetHomingUpdate", 8, 8 },
{ "DynamicAudioEventInfo", 16, 256 }, // Note: some levels have none, some have lots. Since all are allocated at level load time, we can set this low for the levels with none.
{ "HackInternetStateMachine", 32, 32 },
- { "HackInternetAIUpdate", 32, 32 },
+ { NAMEKEY_HackInternetAIUpdate, 32, 32 },
{ "MissileAIUpdate", 512, 32 },
{ "DumbProjectileBehavior", 64, 32 },
{ "DestroyDie", 1024, 32 },
@@ -201,11 +201,11 @@ static PoolSizeRec sizes[] =
{ "DynamicGeometryInfoUpdate", 16, 16 },
{ "DynamicShroudClearingRangeUpdate", 128, 16 },
{ "FXListDie", 1024, 32 },
- { "FireSpreadUpdate", 2048, 128 },
+ { NAMEKEY_FireSpreadUpdate, 2048, 128 },
{ "FirestormDynamicGeometryInfoUpdate", 16, 16 },
{ "FireWeaponCollide", 2048, 32 },
{ "FireWeaponUpdate", 32, 32 },
- { "FlammableUpdate", 512, 256 },
+ { NAMEKEY_FlammableUpdate, 512, 256 },
{ "FloatUpdate", 512, 128 },
{ "TensileFormationUpdate", 256, 32 },
{ "GarrisonContain", 256, 32 },
@@ -241,7 +241,7 @@ static PoolSizeRec sizes[] =
{ "AutoFindHealingUpdate", 256, 32 },
{ "CommandButtonHuntUpdate", 512, 8 },
{ "PilotFindVehicleUpdate", 256, 32 },
- { "DemoTrapUpdate", 32, 32 },
+ { NAMEKEY_DemoTrapUpdate, 32, 32 },
{ "ParticleUplinkCannonUpdate", 16, 16 },
{ "SpectreGunshipUpdate", 8, 8 },
{ "SpectreGunshipDeploymentUpdate", 8, 8 },
@@ -251,12 +251,12 @@ static PoolSizeRec sizes[] =
{ "LifetimeUpdate", 32, 32 },
{ "LocomotorSetUpgrade", 512, 128 },
{ "LockWeaponCreate", 64, 128 },
- { "AutoDepositUpdate", 256, 32 },
+ { NAMEKEY_AutoDepositUpdate, 256, 32 },
{ "NeutronMissileUpdate", 512, 32 },
{ "MoneyCrateCollide", 48, 16 },
{ "NeutronMissileSlowDeathBehavior", 8, 8 },
{ "OpenContain", 128, 32 },
- { "OverchargeBehavior", 32, 32 },
+ { NAMEKEY_OverchargeBehavior, 32, 32 },
{ "OverlordContain", 32, 32 },
{ "HelixContain", 32, 32 },
{ "ParachuteContain", 128, 32 },
@@ -268,7 +268,7 @@ static PoolSizeRec sizes[] =
{ "ProneUpdate", 128, 32 },
{ "QueueProductionExitUpdate", 32, 32 },
{ "RadarUpdate", 16, 16 },
- { "RadarUpgrade", 16, 16 },
+ { NAMEKEY_RadarUpgrade, 16, 16 },
{ "AnimationSteeringUpdate", 1024, 32 },
{ "SupplyWarehouseCripplingBehavior", 16, 16 },
{ "CostModifierUpgrade", 32, 32 },
@@ -287,7 +287,7 @@ static PoolSizeRec sizes[] =
{ "RailedTransportDockUpdate", 16, 16 },
{ "RailedTransportAIUpdate", 16, 16 },
{ "RailedTransportContain", 16, 16 },
- { "RailroadBehavior", 16, 16 },
+ { NAMEKEY_RailroadBehavior, 16, 16 },
{ "SalvageCrateCollide", 32, 32 },
{ "ShroudCrateCollide", 32, 32 },
{ "SlavedUpdate", 64, 32 },
@@ -307,13 +307,13 @@ static PoolSizeRec sizes[] =
{ "HiveStructureBody", 64, 32 }, //Stinger sites
{ "StructureCollapseUpdate", 32, 32 },
{ "StructureToppleUpdate", 32, 32 },
- { "SupplyCenterCreate", 32, 32 },
- { "SupplyCenterDockUpdate", 32, 32 },
+ { NAMEKEY_SupplyCenterCreate, 32, 32 },
+ { NAMEKEY_SupplyCenterDockUpdate, 32, 32 },
{ "SupplyCenterProductionExitUpdate", 32, 32 },
{ "SupplyTruckStateMachine", 256, 32 },
{ "SupplyTruckAIUpdate", 32, 32 },
{ "SupplyWarehouseCreate", 48, 16 },
- { "SupplyWarehouseDockUpdate", 48, 16 },
+ { NAMEKEY_SupplyWarehouseDockUpdate, 48, 16 },
{ "EnemyNearUpdate", 1024, 32 },
{ "TechBuildingBehavior", 32, 32 },
{ "ToppleUpdate", 256, 128 },
@@ -394,7 +394,7 @@ static PoolSizeRec sizes[] =
{ "ModelConditionUpgrade", 32, 32 },
{ "SpyVisionSpecialPower", 256, 32 },
{ "StealthDetectorUpdate", 256, 32 },
- { "StealthUpdate", 512, 128 },
+ { NAMEKEY_StealthUpdate, 512, 128 },
{ "StealthUpgrade", 256, 32 },
{ "StatusBitsUpgrade", 128, 128 },
{ "SubObjectsUpgrade", 128, 128 },
@@ -405,8 +405,8 @@ static PoolSizeRec sizes[] =
{ "FireOCLAfterWeaponCooldownUpdate", 64, 32 },
{ "HijackerUpdate", 64, 32 },
{ "ChinaMinesUpgrade", 64, 32 },
- { "PowerPlantUpdate", 48, 16 },
- { "PowerPlantUpgrade", 48, 16 },
+ { NAMEKEY_PowerPlantUpdate, 48, 16 },
+ { NAMEKEY_PowerPlantUpgrade, 48, 16 },
{ "DefectorSpecialPower", 16, 16 },
{ "CheckpointUpdate", 16, 16 },
{ "MobNexusContain", 128, 32 },
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
index 869568b533..073e30945b 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
@@ -483,7 +483,7 @@ Drawable::Drawable( const ThingTemplate *thingTemplate, DrawableStatus statusBit
/// @todo srj -- this is evil, we shouldn't look at the module name directly!
if (thingTemplate->isKindOf(KINDOF_SHRUBBERY) &&
!TheGlobalData->m_useTreeSway &&
- cuMI.getNthName(modIdx).compareNoCase("SwayClientUpdate") == 0)
+ cuMI.getNthName(modIdx).compareNoCase(NAMEKEY_SwayClientUpdate) == 0)
continue;
*m++ = TheModuleFactory->newModule(this, cuMI.getNthName(modIdx), newModData, MODULETYPE_CLIENT_UPDATE);
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index 2185a84a04..523028e8ec 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -1205,7 +1205,7 @@ void ControlBar::init( void )
setControlCommand(win, findCommandButton("NonCommand_IdleWorker") );
win->winSetTooltipFunc(commandButtonTooltip);
}
- win = TheWindowManager->winGetWindowFromId(NULL,TheNameKeyGenerator->nameToKey("ControlBar.wnd:ButtonPlaceBeacon"));
+ win = TheWindowManager->winGetWindowFromId(NULL,TheNameKeyGenerator->nameToKey(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon));
if(win)
{
setControlCommand(win, findCommandButton("NonCommand_Beacon") );
@@ -1513,7 +1513,7 @@ void ControlBar::update( void )
Int count;
const ThingTemplate *thing = TheThingFactory->findTemplate( ThePlayerList->getLocalPlayer()->getPlayerTemplate()->getBeaconTemplate() );
ThePlayerList->getLocalPlayer()->countObjectsByThingTemplate( 1, &thing, false, &count );
- static NameKeyType beaconPlacementButtonID = NAMEKEY("ControlBar.wnd:ButtonPlaceBeacon");
+ static NameKeyType beaconPlacementButtonID = NAMEKEY(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon);
GameWindow *win = TheWindowManager->winGetWindowFromId(NULL, beaconPlacementButtonID);
if (win)
{
@@ -2752,7 +2752,7 @@ void ControlBar::setControlBarSchemeByPlayer(Player *p)
if(m_controlBarSchemeManager)
m_controlBarSchemeManager->setControlBarSchemeByPlayer(p);
- static NameKeyType buttonPlaceBeaconID = NAMEKEY( "ControlBar.wnd:ButtonPlaceBeacon" );
+ static NameKeyType buttonPlaceBeaconID = NAMEKEY( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon );
static NameKeyType buttonIdleWorkerID = NAMEKEY("ControlBar.wnd:ButtonIdleWorker");
static NameKeyType buttonGeneralID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
GameWindow *buttonPlaceBeacon = TheWindowManager->winGetWindowFromId( NULL, buttonPlaceBeaconID );
@@ -2797,14 +2797,14 @@ void ControlBar::setControlBarSchemeByPlayerTemplate( const PlayerTemplate *pt)
if(m_controlBarSchemeManager)
m_controlBarSchemeManager->setControlBarSchemeByPlayerTemplate(pt);
- static NameKeyType buttonPlaceBeaconID = NAMEKEY( "ControlBar.wnd:ButtonPlaceBeacon" );
+ static NameKeyType buttonPlaceBeaconID = NAMEKEY( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon );
static NameKeyType buttonIdleWorkerID = NAMEKEY("ControlBar.wnd:ButtonIdleWorker");
static NameKeyType buttonGeneralID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
GameWindow *buttonPlaceBeacon = TheWindowManager->winGetWindowFromId( NULL, buttonPlaceBeaconID );
GameWindow *buttonIdleWorker = TheWindowManager->winGetWindowFromId( NULL, buttonIdleWorkerID );
GameWindow *buttonGeneral = TheWindowManager->winGetWindowFromId( NULL, buttonGeneralID );
- if(pt == ThePlayerTemplateStore->findPlayerTemplate(TheNameKeyGenerator->nameToKey("FactionObserver")))
+ if(pt == ThePlayerTemplateStore->findPlayerTemplate(TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver)))
{
m_isObserverCommandBar = TRUE;
switchToContext( CB_CONTEXT_OBSERVER_LIST, NULL );
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
index 2d8ea77453..bc60f7bf73 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
@@ -526,7 +526,7 @@ void ControlBarScheme::init(void)
win->winSetPosition(x,y );
win->winSetSize((m_optionsLR.x - m_optionsUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_optionsLR.y - m_optionsUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);
}
- win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonPlaceBeacon" ) );
+ win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon ) );
if(win)
{
GadgetButtonSetEnabledImage(win, m_beaconButtonEnable);
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
index bbf91e3144..aba8b06d5a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
@@ -383,7 +383,7 @@ WindowMsgHandledType ControlBarSystem( GameWindow *window, UnsignedInt msg,
case GBM_SELECTED_RIGHT:
{
GameWindow *control = (GameWindow *)mData1;
- static NameKeyType beaconPlacementButtonID = NAMEKEY("ControlBar.wnd:ButtonPlaceBeacon");
+ static NameKeyType beaconPlacementButtonID = NAMEKEY(NAMEKEY_ControlBar.wnd:ButtonPlaceBeacon);
static NameKeyType beaconDeleteButtonID = NAMEKEY("ControlBar.wnd:ButtonDeleteBeacon");
static NameKeyType beaconClearTextButtonID = NAMEKEY("ControlBar.wnd:ButtonClearBeaconText");
static NameKeyType beaconGeneralButtonID = NAMEKEY("ControlBar.wnd:ButtonGeneral");
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp
index e4600d2dc3..4bcbed471d 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp
@@ -440,7 +440,7 @@ void ScoreScreenUpdate( WindowLayout * layout, void *userData)
if (lSlot && lSlot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(lSlot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
AsciiString musicName = pt->getScoreScreenMusic();
if ( !musicName.isEmpty() )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
index d62815a27e..0c2979ac6d 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
@@ -1334,7 +1334,7 @@ void MultiPlayerLoadScreen::init( GameInfo *game )
if (lSlot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(lSlot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
// const Image *loadScreenImage = TheMappedImageCollection->findImageByName(pt->getLoadScreen());
// add portrait, features, and name for the local player's general
@@ -1350,11 +1350,11 @@ void MultiPlayerLoadScreen::init( GameInfo *game )
{
// the main original factions don't have associated generals
AsciiString imageName;
- if (pt->getName() == "FactionAmerica")
+ if (pt->getName() == NAMEKEY_FactionAmerica)
portrait = TheMappedImageCollection->findImageByName("SAFactionLogoLg_US");
- else if (pt->getName() == "FactionGLA")
+ else if (pt->getName() == NAMEKEY_FactionGLA)
portrait = TheMappedImageCollection->findImageByName("SUFactionLogoLg_GLA");
- else if (pt->getName() == "FactionChina")
+ else if (pt->getName() == NAMEKEY_FactionChina)
portrait = TheMappedImageCollection->findImageByName("SNFactionLogoLg_China");
else
DEBUG_ASSERTCRASH(NULL, ("Unexpected player template"));
@@ -1602,7 +1602,7 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
if (lSlot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(lSlot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
// const Image *loadScreenImage = TheMappedImageCollection->findImageByName(pt->getLoadScreen());
// if(loadScreenImage)
// m_loadScreen->winSetEnabledImage(0, loadScreenImage);
@@ -1620,11 +1620,11 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
{
// the main original factions don't have associated generals
AsciiString imageName;
- if (pt->getName() == "FactionAmerica")
+ if (pt->getName() == NAMEKEY_FactionAmerica)
portrait = TheMappedImageCollection->findImageByName("SAFactionLogo144_US");
- else if (pt->getName() == "FactionGLA")
+ else if (pt->getName() == NAMEKEY_FactionGLA)
portrait = TheMappedImageCollection->findImageByName("SUFactionLogo144_GLA");
- else if (pt->getName() == "FactionChina")
+ else if (pt->getName() == NAMEKEY_FactionChina)
portrait = TheMappedImageCollection->findImageByName("SNFactionLogo144_China");
else
DEBUG_ASSERTCRASH(NULL, ("Unexpected player template"));
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 305ea9f554..013a11d40c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -2411,7 +2411,7 @@ void InGameUI::createMouseoverHint( const GameMessage *msg )
#endif
UnicodeString warehouseFeedback;
// Add on dollar amount of warehouse contents so people don't freak out until the art is hooked up
- static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( "SupplyWarehouseDockUpdate" );
+ static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( NAMEKEY_SupplyWarehouseDockUpdate );
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate *)obj->findUpdateModule( warehouseModuleKey );
if( warehouseModule != NULL )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
index caedafac01..0b3b48e27d 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
@@ -191,7 +191,7 @@ void AIPlayer::checkForSupplyCenter( BuildListInfo *info, Object *bldg )
{
class SupplyCenterDockUpdate;
// if it is a supply center, I must have boxes
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*)bldg->findUpdateModule( key_centerUpdate );
if( centerModule )
{
@@ -296,7 +296,7 @@ void AIPlayer::queueSupplyTruck( void )
// No supplies.
continue;
}
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)supplySource->findUpdateModule( key_warehouseUpdate );
if( warehouseModule ) {
Int availableCash = warehouseModule->getBoxesStored()*TheGlobalData->m_baseValuePerSupplyBox;
@@ -2196,7 +2196,7 @@ Object *AIPlayer::findSupplyCenter(Int minimumCash)
{
if (!obj->isKindOf(KINDOF_STRUCTURE)) continue;
if (!obj->isKindOf(KINDOF_SUPPLY_SOURCE)) continue;
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*)obj->findUpdateModule( key_warehouseUpdate );
if( warehouseModule ) {
Int availableCash = warehouseModule->getBoxesStored()*TheGlobalData->m_baseValuePerSupplyBox;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
index 6361cb8969..a29623f169 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Map/SidesList.cpp
@@ -495,7 +495,7 @@ void SidesList::prepareForMP_or_Skirmish(void)
{
m_skirmishSides[m_numSkirmishSides] = m_sides[i];
m_numSkirmishSides++;
- if (m_sides[i].getDict()->getAsciiString(TheKey_playerFaction) == "FactionCivilian") {
+ if (m_sides[i].getDict()->getAsciiString(TheKey_playerFaction) == NAMEKEY_FactionCivilian) {
// Don't remove FactionCivilian.
continue;
}
@@ -505,7 +505,7 @@ void SidesList::prepareForMP_or_Skirmish(void)
}
Bool gotScripts = false;
for (i=0; igetAsciiString(TheKey_playerFaction) == "FactionCivilian") {
+ if (m_skirmishSides[i].getDict()->getAsciiString(TheKey_playerFaction) == NAMEKEY_FactionCivilian) {
// Don't consider FactionCivilian.
continue;
}
@@ -695,7 +695,7 @@ void SidesList::addPlayerByTemplate(AsciiString playerTemplateName)
playerDisplayName.translate(playerName);
isHuman = true;
// special-case "civilian"...
- if (playerName == "PlyrCivilian")
+ if (playerName == NAMEKEY_PlyrCivilian)
isHuman = false;
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
index 0182d5695d..6666d86656 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
@@ -3831,7 +3831,7 @@ void Object::onDisabledEdge(Bool becomingDisabled)
{
//@todo jkmcd - Colin suggested we rewrite this to use the interface stuff. I agree, but need
// to get some more bugs fixed today.
- static NameKeyType radar = NAMEKEY("RadarUpgrade");
+ static NameKeyType radar = NAMEKEY(NAMEKEY_RadarUpgrade);
Module *mod = mod = findModule(radar);
if (mod) {
RadarUpgrade *radarMod = (RadarUpgrade*) mod;
@@ -3854,8 +3854,8 @@ void Object::onDisabledEdge(Bool becomingDisabled)
// We can't affect something that consumes, or else we go low power which removes the consumption
// which makes us not low power so we add the consumption so we go low power...
// This check also guaards the IsDisabled in friend_adjustPower above
- static NameKeyType powerPlant = NAMEKEY("PowerPlantUpgrade");
- static NameKeyType overCharge = NAMEKEY("OverchargeBehavior");
+ static NameKeyType powerPlant = NAMEKEY(NAMEKEY_PowerPlantUpgrade);
+ static NameKeyType overCharge = NAMEKEY(NAMEKEY_OverchargeBehavior);
Module* mod = findModule(powerPlant);
if (mod) {
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
index a9459024f8..14f5b8ad0a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp
@@ -416,7 +416,7 @@ class DeliverPayloadNugget : public ObjectCreationNugget
die->setCreator(INVALID_ID);
}
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *ai = (DeliverPayloadAIUpdate*)transport->findUpdateModule(key_DeliverPayloadAIUpdate);
if( ai )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
index b1d318aa25..4620f2f1df 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
@@ -3071,7 +3071,7 @@ void AIUpdateInterface::privateMoveToAndEvacuateAndExit( const Coord3D *pos, Com
m_isBlockedAndStuck = FALSE;
setLastCommandSource( cmdSource );
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *dp = (DeliverPayloadAIUpdate*)getObject()->findUpdateModule( key_DeliverPayloadAIUpdate );
if( dp )
{
@@ -4150,7 +4150,7 @@ void AIUpdateInterface::privateHackInternet( CommandSourceType cmdSource )
getStateMachine()->clear();
setLastCommandSource( cmdSource );
- static NameKeyType key_HackInternetAIUpdate = NAMEKEY("HackInternetAIUpdate");
+ static NameKeyType key_HackInternetAIUpdate = NAMEKEY(NAMEKEY_HackInternetAIUpdate);
HackInternetAIUpdate *ai = (HackInternetAIUpdate*)getObject()->findUpdateModule( key_HackInternetAIUpdate );
if( ai )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
index f1c9d0677f..d0fdcc8f0c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailroadGuideAIUpdate.cpp
@@ -270,7 +270,7 @@ void RailroadBehavior::onCollide( Object *other, const Coord3D *loc, const Coord
return;
}
- static NameKeyType key_DemoTrapUpdate = NAMEKEY("DemoTrapUpdate");
+ static NameKeyType key_DemoTrapUpdate = NAMEKEY(NAMEKEY_DemoTrapUpdate);
DemoTrapUpdate *dtu = (DemoTrapUpdate*)other->findUpdateModule(key_DemoTrapUpdate);
if( dtu )
{
@@ -656,7 +656,7 @@ void RailroadBehavior::makeAWallOutOfThisTrain( Bool on )
Object *trailer = TheGameLogic->findObjectByID( m_trailerID );
if ( trailer )
{
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -811,7 +811,7 @@ UpdateSleepTime RailroadBehavior::update( void )
if ( trailer )
{
//call his pull trailer with my info;
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -874,7 +874,7 @@ void RailroadBehavior::disembark(void)
Object *trailer = TheGameLogic->findObjectByID( m_trailerID );
if ( trailer )
{
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -924,7 +924,7 @@ class PartitionFilterIsValidCarriage : public PartitionFilter
if (m_obj == objOther)
return FALSE;
// must have railroady goodness
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)objOther->findUpdateModule(key_rb);
if( ! rb )
return FALSE;
@@ -1007,7 +1007,7 @@ void RailroadBehavior::createCarriages( void )
firstCarriage->setProducer(self);
m_trailerID = firstCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)firstCarriage->findUpdateModule(key_rb);
if( rb )
{
@@ -1069,7 +1069,7 @@ void RailroadBehavior::hitchNewCarriagebyTemplate( ObjectID locoID, const Templa
newCarriage->setProducer(locomotive);
m_trailerID = newCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)newCarriage->findUpdateModule(key_rb);
if( rb )
{
@@ -1146,7 +1146,7 @@ void RailroadBehavior::hitchNewCarriagebyProximity( ObjectID locoID, TrainTrack
closeCarriage->setProducer(self);
m_trailerID = closeCarriage->getID();
- static NameKeyType key_rb = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_rb = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *rb = (RailroadBehavior*)closeCarriage->findUpdateModule(key_rb);
if( rb )
rb->hitchNewCarriagebyProximity( self->getID(), m_track );
@@ -1200,7 +1200,7 @@ void RailroadBehavior::getPulled( PullInfo *info )
if ( trailer )
{
//call his pull trailer with MY info;
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
@@ -1352,7 +1352,7 @@ void RailroadBehavior::destroyTheWholeTrainNow( void )
Object *trailer = TheGameLogic->findObjectByID( m_trailerID );
if ( trailer )
{
- static NameKeyType key_RGUpdate = NAMEKEY("RailroadBehavior");
+ static NameKeyType key_RGUpdate = NAMEKEY(NAMEKEY_RailroadBehavior);
RailroadBehavior *RGUpdate = (RailroadBehavior*)trailer->findUpdateModule(key_RGUpdate);
if( RGUpdate )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
index 1657deb133..184bf2a2cc 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp
@@ -224,12 +224,12 @@ void SupplyTruckAIUpdate::privateDock( Object *dock, CommandSourceType cmdSource
UnsignedInt SupplyTruckAIUpdate::getActionDelayForDock( Object *dock )
{
// Decide whether to use my Center or Warehouse delay time
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) dock->findUpdateModule( key_warehouseUpdate );
if (warehouseModule) {
return getSupplyTruckAIUpdateModuleData()->m_warehouseDelay;
}
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*) dock->findUpdateModule( key_centerUpdate );
if (centerModule) {
return getSupplyTruckAIUpdateModuleData()->m_centerDelay;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
index 06c80f4a61..acb7577924 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp
@@ -220,12 +220,12 @@ void WorkerAIUpdate::createMachines( void )
UnsignedInt WorkerAIUpdate::getActionDelayForDock( Object *dock )
{
// Decide whether to use my Center or Warehouse delay time
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) dock->findUpdateModule( key_warehouseUpdate );
if (warehouseModule) {
return getWorkerAIUpdateModuleData()->m_warehouseDelay;
}
- static const NameKeyType key_centerUpdate = NAMEKEY("SupplyCenterDockUpdate");
+ static const NameKeyType key_centerUpdate = NAMEKEY(NAMEKEY_SupplyCenterDockUpdate);
SupplyCenterDockUpdate *centerModule = (SupplyCenterDockUpdate*) dock->findUpdateModule( key_centerUpdate );
if (centerModule) {
return getWorkerAIUpdateModuleData()->m_centerDelay;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
index c7d817b5d7..26ce790159 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/BoneFXUpdate.cpp
@@ -98,7 +98,7 @@ BoneFXUpdate::BoneFXUpdate( Thing *thing, const ModuleData* moduleData ) : Updat
//-------------------------------------------------------------------------------------------------
void BoneFXUpdate::onObjectCreated()
{
- static NameKeyType key_BoneFXDamage = NAMEKEY("BoneFXDamage");
+ static NameKeyType key_BoneFXDamage = NAMEKEY(NAMEKEY_BoneFXDamage);
BoneFXDamage* bfxd = (BoneFXDamage*)getObject()->findDamageModule(key_BoneFXDamage);
if (bfxd == NULL)
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
index 36a22de319..e6b13a8a55 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DockUpdate/SupplyCenterDockUpdate.cpp
@@ -172,7 +172,7 @@ UpdateSleepTime SupplyCenterDockUpdate::update()
UpdateSleepTime result = DockUpdate::update();
#ifdef _DEBUG_ECONOMY
- static const NameKeyType key_SupplyCenterCreate = NAMEKEY("SupplyCenterCreate");
+ static const NameKeyType key_SupplyCenterCreate = NAMEKEY(NAMEKEY_SupplyCenterCreate);
SupplyCenterCreate* create = (SupplyCenterCreate*)getObject()->findCreateModule(key_SupplyCenterCreate);
DEBUG_ASSERTCRASH( create && ! create->shouldDoOnBuildComplete(), ("A Supply center did not call onBuildComplete.") );
#endif
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
index 6ae3e34d4e..bfe14b10e4 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FireSpreadUpdate.cpp
@@ -60,7 +60,7 @@ class PartitionFilterFlammable : public PartitionFilter
Bool PartitionFilterFlammable::allow(Object *objOther)
{
// It must be burnable in general, and burnable now
- static NameKeyType key_FlammableUpdate = NAMEKEY("FlammableUpdate");
+ static NameKeyType key_FlammableUpdate = NAMEKEY(NAMEKEY_FlammableUpdate);
FlammableUpdate* fu = (FlammableUpdate*)objOther->findUpdateModule(key_FlammableUpdate);
if (fu == NULL)
return FALSE;
@@ -147,7 +147,7 @@ UpdateSleepTime FireSpreadUpdate::update( void )
Object* objectToLight = ThePartitionManager->getClosestObject(getObject(), d->m_spreadTryRange, FROM_CENTER_3D, filters);
if( objectToLight )
{
- static NameKeyType key_FlammableUpdate = NAMEKEY("FlammableUpdate");
+ static NameKeyType key_FlammableUpdate = NAMEKEY(NAMEKEY_FlammableUpdate);
FlammableUpdate* fu = (FlammableUpdate*)objectToLight->findUpdateModule(key_FlammableUpdate);
if( fu )
fu->tryToIgnite();
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
index 8de2c056e7..964ec5b01b 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/FlammableUpdate.cpp
@@ -202,7 +202,7 @@ void FlammableUpdate::tryToIgnite()
startBurningSound();
// bleah. this sucks. (srj)
- static const NameKeyType key_FireSpreadUpdate = NAMEKEY("FireSpreadUpdate");
+ static const NameKeyType key_FireSpreadUpdate = NAMEKEY(NAMEKEY_FireSpreadUpdate);
FireSpreadUpdate* fu = (FireSpreadUpdate*)getObject()->findUpdateModule(key_FireSpreadUpdate);
if (fu != NULL)
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
index d044f1afa4..59d74ae62a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp
@@ -437,7 +437,7 @@ void NeutronMissileSlowDeathBehavior::doScorchBlast( const BlastInfo *blastInfo
// set things aflame
///@todo can't to this now, flames eat too many particles
- // static NameKeyType flammableKey = NAMEKEY( "FlammableUpdate" );
+ // static NameKeyType flammableKey = NAMEKEY( NAMEKEY_FlammableUpdate );
// FlammableUpdate *update = (FlammableUpdate *)other->findUpdateModule( flammableKey );
// if( update )
// update->tryToIgnite();
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
index bde5710e54..73d7f475bd 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ToppleUpdate.cpp
@@ -168,7 +168,7 @@ void ToppleUpdate::applyTopplingForce( const Coord3D* toppleDirection, Real topp
// tell the drawable to stop swaying
Drawable * draw = getObject()->getDrawable();
- static NameKeyType nameKeySwayUpdate = NAMEKEY("SwayClientUpdate");
+ static NameKeyType nameKeySwayUpdate = NAMEKEY(NAMEKEY_SwayClientUpdate);
ClientUpdateModule ** clientModules = draw->getClientUpdateModules();
if (clientModules)
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
index 65b8fd6ac4..b82eec1e36 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptActions.cpp
@@ -557,7 +557,7 @@ void ScriptActions::doCreateReinforcements(const AsciiString& team, const AsciiS
//Check to see if we have a transport, and if our transport has paradrop capabilities. If this is the
//case, we'll need to create each unit inside "parachute containers".
- static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY("DeliverPayloadAIUpdate");
+ static NameKeyType key_DeliverPayloadAIUpdate = NAMEKEY(NAMEKEY_DeliverPayloadAIUpdate);
DeliverPayloadAIUpdate *dp = NULL;
if( transport )
{
@@ -5110,7 +5110,7 @@ void ScriptActions::doSetWarehouseValue( const AsciiString& warehouseName, Int c
return;
}
- static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( "SupplyWarehouseDockUpdate" );
+ static const NameKeyType warehouseModuleKey = TheNameKeyGenerator->nameToKey( NAMEKEY_SupplyWarehouseDockUpdate );
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate *)obj->findUpdateModule( warehouseModuleKey );
if( warehouseModule == NULL )
return;
@@ -6388,7 +6388,7 @@ void ScriptActions::doNamedSetTrainHeld( const AsciiString &locoName, const Bool
if( obj )
{
- static const NameKeyType rrkey = NAMEKEY( "RailroadBehavior" );
+ static const NameKeyType rrkey = NAMEKEY( NAMEKEY_RailroadBehavior );
RailroadBehavior *rBehavior = (RailroadBehavior*)obj->findUpdateModule( rrkey );
if ( rBehavior )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
index e9fb7de37a..f20581e4a8 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptConditions.cpp
@@ -2235,7 +2235,7 @@ Bool ScriptConditions::evaluateSkirmishSuppliesWithinDistancePerimeter(Parameter
Real maxValue = 0;
for (Object *them = iter->first(); them; them = iter->next()) {
- static const NameKeyType key_warehouseUpdate = NAMEKEY("SupplyWarehouseDockUpdate");
+ static const NameKeyType key_warehouseUpdate = NAMEKEY(NAMEKEY_SupplyWarehouseDockUpdate);
SupplyWarehouseDockUpdate *warehouseModule = (SupplyWarehouseDockUpdate*) them->findUpdateModule( key_warehouseUpdate );
if (!warehouseModule) {
continue;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp
index 943fa90716..135d026e62 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp
@@ -5833,8 +5833,8 @@ Player *ScriptEngine::getPlayerFromAsciiString(const AsciiString& playerString)
{
Bool is_GeneralsChallengeContext = TheCampaignManager->getCurrentCampaign() && TheCampaignManager->getCurrentCampaign()->m_isChallengeCampaign;
if (playerString == LOCAL_PLAYER || (playerString == THE_PLAYER && is_GeneralsChallengeContext))
- // Designers have built their Generals' Challenge maps, referencing "ThePlayer" meaning the local player.
- // However, they've also built many of their single player maps with this string, where "ThePlayer" is not intended as an alias.
+ // Designers have built their Generals' Challenge maps, referencing THE_PLAYER meaning the local player.
+ // However, they've also built many of their single player maps with this string, where THE_PLAYER is not intended as an alias.
return ThePlayerList->getLocalPlayer();
if (playerString == THIS_PLAYER)
return getCurrentPlayer();
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp
index a01e6b8515..12e3e5a31c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp
@@ -1667,7 +1667,7 @@ void Condition::WriteConditionDataChunk(DataChunkOutput &chunkWriter, Condition
chunkWriter.writeNameKey(ct->m_internalNameKey);
} else {
DEBUG_CRASH(("Invalid condition."));
- chunkWriter.writeNameKey(NAMEKEY("Bogus"));
+ chunkWriter.writeNameKey(NAMEKEY(NAMEKEY_Bogus));
}
chunkWriter.writeInt(pCondition->m_numParms);
Int i;
@@ -2427,7 +2427,7 @@ void ScriptAction::WriteActionDataChunk(DataChunkOutput &chunkWriter, ScriptActi
chunkWriter.writeNameKey(at->m_internalNameKey);
} else {
DEBUG_CRASH(("Invalid action."));
- chunkWriter.writeNameKey(NAMEKEY("Bogus"));
+ chunkWriter.writeNameKey(NAMEKEY(NAMEKEY_Bogus));
}
chunkWriter.writeInt(pScriptAction->m_numParms);
Int i;
@@ -2664,7 +2664,7 @@ void ScriptAction::WriteActionFalseDataChunk(DataChunkOutput &chunkWriter, Scrip
chunkWriter.writeNameKey(at->m_internalNameKey);
} else {
DEBUG_CRASH(("Invalid action."));
- chunkWriter.writeNameKey(NAMEKEY("Bogus"));
+ chunkWriter.writeNameKey(NAMEKEY(NAMEKEY_Bogus));
}
chunkWriter.writeInt(pScriptAction->m_numParms);
Int i;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
index eafb55b7ec..c7451435bb 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/VictoryConditions.cpp
@@ -311,7 +311,7 @@ void VictoryConditions::cachePlayerPtrs( void )
return;
Int playerCount = 0;
- const PlayerTemplate *civTemplate = ThePlayerTemplateStore->findPlayerTemplate( NAMEKEY("FactionCivilian") );
+ const PlayerTemplate *civTemplate = ThePlayerTemplateStore->findPlayerTemplate( NAMEKEY(NAMEKEY_FactionCivilian) );
for (Int i=0; igetNthPlayer(i);
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
index 91d18bc9bb..1a08d5833b 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
@@ -1342,7 +1342,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
if (slot->getPlayerTemplate() >= 0)
pt = ThePlayerTemplateStore->getNthPlayerTemplate(slot->getPlayerTemplate());
else
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
d.setAsciiString(TheKey_playerFaction, KEYNAME(pt->getNameKey()));
@@ -1463,7 +1463,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
d.setBool(TheKey_playerIsHuman, TRUE);
d.setUnicodeString(TheKey_playerDisplayName, UnicodeString(L"Observer"));
const PlayerTemplate* pt;
- pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
d.setAsciiString(TheKey_playerFaction, KEYNAME(pt->getNameKey()));
@@ -1950,7 +1950,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
if (slot->getPlayerTemplate() == PLAYERTEMPLATE_OBSERVER)
{
slot->setPlayerTemplate(0);
- const PlayerTemplate *pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") );
+ const PlayerTemplate *pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey(NAMEKEY_FactionObserver) );
if (pt)
{
for (Int j=0; jgetPlayerTemplateCount(); ++j)
@@ -2097,16 +2097,16 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
if ( isChallengeCampaign )
{
// Establish local player relationships with other teams as
- // they're set up for "ThePlayer" in challenge mode map.
- // Some designers have used "ThePlayer" as an empty player for Generals'
+ // they're set up for THE_PLAYER in challenge mode map.
+ // Some designers have used THE_PLAYER as an empty player for Generals'
// Challenge maps which they reference in script and by which they set
// player relationships. The skirmish local player will receive these
- // relationships. If there is no "ThePlayer", we have to assume that
+ // relationships. If there is no THE_PLAYER, we have to assume that
// all players on the map are the local player's enemy, except neutral
// and civilian players.
Player *localPlayer = ThePlayerList->getLocalPlayer();
DEBUG_ASSERTCRASH(localPlayer, ("Local player has not been established for Challenge map."));
- Player *placeholderThePlayer = ThePlayerList->findPlayerWithNameKey(NAMEKEY("ThePlayer"));
+ Player *placeholderThePlayer = ThePlayerList->findPlayerWithNameKey(NAMEKEY(THE_PLAYER));
DEBUG_ASSERTCRASH(placeholderThePlayer, ("Challenge maps without player \"ThePlayer\" assume that the local player is mutual enemies with all other players except the neutral and civilian players."));
if (placeholderThePlayer)
@@ -2114,7 +2114,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
PlayerMaskType thePlayerEnemysMask = ThePlayerList->getPlayersWithRelationship(placeholderThePlayer->getPlayerIndex(), ALLOW_ENEMIES);
while( thePlayerEnemysMask )
{
- // set local player enemy relationships based on "ThePlayer" enemy relationships
+ // set local player enemy relationships based on THE_PLAYER enemy relationships
Player *thePlayerEnemy = ThePlayerList->getEachPlayerFromMask(thePlayerEnemysMask);
thePlayerEnemy->setPlayerRelationship(localPlayer, ENEMIES);
localPlayer->setPlayerRelationship(thePlayerEnemy, ENEMIES);
@@ -2122,7 +2122,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
}
else
{
- // This map has no "ThePlayer" by which to model the local player's
+ // This map has no THE_PLAYER by which to model the local player's
// relationships, so make assumptions.
for (Int i = 0; i < ThePlayerList->getPlayerCount(); i++)
{
@@ -2133,7 +2133,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
rel = ALLIES;
}
else if (thatPlayer != ThePlayerList->getNeutralPlayer()
- && thatPlayer != ThePlayerList->findPlayerWithNameKey(NAMEKEY("PlyrCivilian")))
+ && thatPlayer != ThePlayerList->findPlayerWithNameKey(NAMEKEY(NAMEKEY_PlyrCivilian)))
{
rel = ENEMIES;
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
index 2e2719bde1..dadc444632 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp
@@ -1662,7 +1662,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
{
Int updateCount = 0;
- static NameKeyType nameKeyClientUpdate = NAMEKEY("BeaconClientUpdate");
+ static NameKeyType nameKeyClientUpdate = NAMEKEY(NAMEKEY_BeaconClientUpdate);
ClientUpdateModule ** clientModules = object->getDrawable()->getClientUpdateModules();
if (clientModules)
{
@@ -1725,7 +1725,7 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
if (beaconDrawable)
{
- static NameKeyType nameKeyClientUpdate = NAMEKEY("BeaconClientUpdate");
+ static NameKeyType nameKeyClientUpdate = NAMEKEY(NAMEKEY_BeaconClientUpdate);
ClientUpdateModule ** clientModules = beaconDrawable->getClientUpdateModules();
if (clientModules)
{
diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
index 4f791dd53d..7b8eb9141f 100644
--- a/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
+++ b/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
@@ -477,8 +477,8 @@ AsciiString ConvertFaction(AsciiString name)
char oldName[256];
char newName[256];
strcpy(oldName, name.str());
- strcpy(newName, "FactionGLA");
- strcat(newName, oldName+strlen("FactionFundamentalist"));
+ strcpy(newName, NAMEKEY_FactionGLA);
+ strcat(newName, oldName+strlen(NAMEKEY_FactionFundamentalist));
AsciiString swapName;
swapName.set(newName);
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(swapName));
@@ -510,7 +510,7 @@ void CWorldBuilderDoc::validate(void)
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(tmplname));
if (!pt) {
DEBUG_LOG(("Player '%s' Faction '%s' could not be found in sides list!\n", playername.str(), tmplname.str()));
- if (tmplname.startsWith("FactionFundamentalist")) {
+ if (tmplname.startsWith(NAMEKEY_FactionFundamentalist)) {
swapName = ConvertFaction(tmplname);
if (swapName != AsciiString::TheEmptyString) {
DEBUG_LOG(("Changing Faction from %s to %s\n", tmplname.str(), swapName.str()));
@@ -648,7 +648,7 @@ void CWorldBuilderDoc::validate(void)
const PlayerTemplate* pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(tmplname));
if (!pt) {
DEBUG_LOG(("Player '%s' Faction '%s' could not be found in sides list!\n", playername.str(), tmplname.str()));
- if (tmplname.startsWith("FactionFundamentalist")) {
+ if (tmplname.startsWith(NAMEKEY_FactionFundamentalist)) {
swapName = ConvertFaction(tmplname);
if (swapName != AsciiString::TheEmptyString) {
DEBUG_LOG(("Changing Faction from %s to %s\n", tmplname.str(), swapName.str()));
diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
index 74047c3823..f223af87ef 100644
--- a/GeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
+++ b/GeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
@@ -865,10 +865,10 @@ void PlayerListDlg::OnAddskirmishplayers()
{
// PlyrCivilian
- addSide(&m_sides, "FactionCivilian", "PlyrCivilian", L"PlyrCivilian");
- addSide(&m_sides, "FactionAmerica", "SkirmishAmerica", L"SkirmishAmerica");
- addSide(&m_sides, "FactionChina", "SkirmishChina", L"SkirmishChina");
- addSide(&m_sides, "FactionGLA", "SkirmishGLA", L"SkirmishGLA");
+ addSide(&m_sides, NAMEKEY_FactionCivilian, "PlyrCivilian", L"PlyrCivilian");
+ addSide(&m_sides, NAMEKEY_FactionAmerica, "SkirmishAmerica", L"SkirmishAmerica");
+ addSide(&m_sides, NAMEKEY_FactionChina, "SkirmishChina", L"SkirmishChina");
+ addSide(&m_sides, NAMEKEY_FactionGLA, "SkirmishGLA", L"SkirmishGLA");
addSide(&m_sides, "FactionAmericaAirForceGeneral", "SkirmishAmericaAirForceGeneral", L"SkirmishAmericaAirForceGeneral");
addSide(&m_sides, "FactionAmericaLaserGeneral", "SkirmishAmericaLaserGeneral", L"SkirmishAmericaLaserGeneral");