Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
refactor(gameclient): drop the numpad game speed keys
Olcay Seyganbeec416f3781
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 31846e917..990e18c9e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -655,7 +655,7 @@ found and fixed — EA's own, not port damage.**- The skirmish and LAN rooms are laid out again, on one grid. Each column heading sits over its own column instead of up to 18 pixels to the right of it. The seats and the settings page underneath them start and stop at the same two edges, and Play Game stands under the map and your win record on the right-hand pair. The open tab used to be lettered in a grey that measured about 2 to 1 against the panel and read as a button that was switched off. Play Game waits at the bottom right and the button that leaves the room sits at the bottom left, as far from it as the screen allows. With all eight seats taken, "USA Super Weapon General" still fits in its box. The online room keeps its old layout.- Skirmish keeps starting cash and the game speed there. LAN and online keep starting cash next to peace time and the superweapon rule. Before this they were scattered around whatever space each of the three lobby screens happened to have left over.- Game speed in the skirmish room is a dropdown now: x0.5, x0.75, x1, x1.5 or x2. The old slider read out a frame rate nobody plays by, and its last notch read "--" and started the match at a thousand game frames a second, which no machine can play and every machine tried to. A speed saved by the old slider comes back as the nearest of the five.-- The speed can change during a skirmish or a mission, too. Numpad plus and minus move it a sixth at a time and say where it stands, 50% up to 200% and past it; Ctrl with numpad plus puts it back. The console takes an exact number too: `speed 150` for half again as fast, `speed` alone to ask, `speed reset` for normal. The reset used to land on one and a half times normal speed and the readout gave a number of frames nobody could read as a speed. Network games keep the speed the host picked.+- The speed can change during a skirmish or a mission, too, from the console: `speed 150` for half again as fast, `speed` alone to ask, `speed reset` for normal. It used to live on numpad plus and minus, where the reset landed on one and a half times normal speed and the readout gave a number of frames nobody could read as a speed. Those keys are free again. Network games keep the speed the host picked.- A Unit Limit box on the settings page caps the match at 840 units, shared out evenly: two players get 420 each, four get 210, eight get 105. Units standing and units waiting in a queue both count against your share, buildings do not, and the build buttons grey out when you reach it. A transport that rolls out full is charged for its riders while it is still in the queue, so a Troop Crawler costs nine and cannot slip eight Red Guards past the limit, and a pair of Red Guards costs two. A shift or control batch near the wall queues as many as still fit and stops there, and a button whose next order would not fit greys out. Your own count and your share sit in the top right corner next to the frame rate, so you can see the wall coming. The host ticks it; everybody else sees it ticked.- Allies can pool their income. Share Income on the settings page splits every payment evenly between whoever earned it and each teammate still in the match, so an oil derrick paying 200 to one of two allies pays 100 to each. Oil Derricks shares the derricks you capture and nothing else; All Income adds supply runs, hackers and black markets. In a two-against-two between computer players one pair of partners had earned 4,600 apart after five minutes without it, and 190 apart with it. It works in skirmish too, with a computer ally. No Sharing is the game as it always played.- Superweapons are a dropdown instead of a tick box. Allow Superweapons is the game as it plays without a rule. Limit Superweapons leaves each player one Particle Cannon, one Nuclear Missile or one Scud Storm at a time. No Superweapons bars them.diff --git a/GeneralsMD/Code/Data/INI/CommandMap.ini b/GeneralsMD/Code/Data/INI/CommandMap.iniindex 7e5576576..e8464e76f 100644--- a/GeneralsMD/Code/Data/INI/CommandMap.ini+++ b/GeneralsMD/Code/Data/INI/CommandMap.ini@@ -446,36 +446,6 @@ CommandMap TOGGLE_PAUSEDisplayName = GUI:TogglePauseEnd-CommandMap GAME_SPEED_UP- Key = KEY_KPPLUS- Transition = DOWN- Modifiers = NONE- UseableIn = GAME- Category = INTERFACE- Description = GUI:GameSpeedUpDescription- DisplayName = GUI:GameSpeedUp-End--CommandMap GAME_SPEED_DOWN- Key = KEY_KPMINUS- Transition = DOWN- Modifiers = NONE- UseableIn = GAME- Category = INTERFACE- Description = GUI:GameSpeedDownDescription- DisplayName = GUI:GameSpeedDown-End--CommandMap GAME_SPEED_RESET- Key = KEY_KPPLUS- Transition = DOWN- Modifiers = CTRL- UseableIn = GAME- Category = INTERFACE- Description = GUI:GameSpeedResetDescription- DisplayName = GUI:GameSpeedReset-End-;------------------------------------------------------------------------------; General's power shortcut bar, top right: F1..F8 press its visible buttons in; order. Retail's F1..F8 (go to a saved camera position) move onto SHIFT.diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex e85b1f070..7703085a2 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -251,30 +251,6 @@ GUI:GameResumed"Game resumed."END-GUI:GameSpeedUp-"Game Speed Up"-END--GUI:GameSpeedUpDescription-"Speeds the game up by five logic frames a second. Single player and replays only."-END--GUI:GameSpeedDown-"Game Speed Down"-END--GUI:GameSpeedDownDescription-"Slows the game down by five logic frames a second. Single player and replays only."-END--GUI:GameSpeedReset-"Normal Game Speed"-END--GUI:GameSpeedResetDescription-"Puts the game back to its normal speed. Single player and replays only."-END-GUI:SelectAllMilitary"Select Military Units"ENDdiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex 471b0e362..7068d5e06 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -14849,30 +14849,6 @@ GUI:GameResumed"Oyun devam ediyor."END-GUI:GameSpeedUp-"Oyunu Hızlandır"-END--GUI:GameSpeedUpDescription-"Oyunu saniyede beş mantık karesi hızlandırır. Yalnızca tek oyunculu oyunlarda ve tekrarlarda."-END--GUI:GameSpeedDown-"Oyunu Yavaşlat"-END--GUI:GameSpeedDownDescription-"Oyunu saniyede beş mantık karesi yavaşlatır. Yalnızca tek oyunculu oyunlarda ve tekrarlarda."-END--GUI:GameSpeedReset-"Normal Oyun Hızı"-END--GUI:GameSpeedResetDescription-"Oyunu normal hızına döndürür. Yalnızca tek oyunculu oyunlarda ve tekrarlarda."-END-GUI:SelectAllMilitary"Askeri Birlikleri Seç"ENDdiff --git a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.hindex a1360285d..e319754a6 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h@@ -297,9 +297,6 @@ public:MSG_META_HOLD_POSITION, ///< hold position: guard in place, no pursuit (fork)MSG_META_TOGGLE_GUARD, ///< arm guard for the next order click or drag (fork)MSG_META_TOGGLE_PAUSE, ///< pause/unpause, single player and replay only (fork)- MSG_META_GAME_SPEED_UP, ///< raise the logic rate (fork)- MSG_META_GAME_SPEED_DOWN, ///< lower the logic rate (fork)- MSG_META_GAME_SPEED_RESET, ///< back to the default logic rate (fork)MSG_META_TOGGLE_PURCHASE_SCIENCE, ///< open/close the general's promotion screen (fork)MSG_META_BEGIN_CAMERA_ROTATE_LEFT,diff --git a/GeneralsMD/Code/GameEngine/Source/Common/MessageStream.cpp b/GeneralsMD/Code/GameEngine/Source/Common/MessageStream.cppindex a606fc4eb..7520686ce 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/MessageStream.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/MessageStream.cpp@@ -373,9 +373,6 @@ AsciiString GameMessage::getCommandTypeAsAsciiString(GameMessage::Type t)CHECK_IF(MSG_META_HOLD_POSITION)CHECK_IF(MSG_META_TOGGLE_GUARD)CHECK_IF(MSG_META_TOGGLE_PAUSE)- CHECK_IF(MSG_META_GAME_SPEED_UP)- CHECK_IF(MSG_META_GAME_SPEED_DOWN)- CHECK_IF(MSG_META_GAME_SPEED_RESET)CHECK_IF(MSG_META_BEGIN_CAMERA_ROTATE_LEFT)CHECK_IF(MSG_META_END_CAMERA_ROTATE_LEFT)CHECK_IF(MSG_META_BEGIN_CAMERA_ROTATE_RIGHT)diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cppindex be8d28efb..a43274c5a 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp@@ -3579,33 +3579,6 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessagebreak;}- case GameMessage::MSG_META_GAME_SPEED_UP:- case GameMessage::MSG_META_GAME_SPEED_DOWN:- case GameMessage::MSG_META_GAME_SPEED_RESET:- {- if( TheGameEngine && TheGameLogic && !TheGameLogic->isInMultiplayerGame() )- {- const Int MIN_LOGIC_FPS = 5;- const Int MAX_LOGIC_FPS = 200;- Int fps = TheGameEngine->getFramesPerSecondLimit();-- if( t == GameMessage::MSG_META_GAME_SPEED_RESET )- fps = LOGICFRAMES_PER_SECOND; // DEFAULT_MAX_FPS is 45, which put "normal" at one and a half times- else if( t == GameMessage::MSG_META_GAME_SPEED_UP )- fps += 5;- else- fps -= 5;-- if( fps < MIN_LOGIC_FPS ) fps = MIN_LOGIC_FPS;- if( fps > MAX_LOGIC_FPS ) fps = MAX_LOGIC_FPS;-- TheGameEngine->setFramesPerSecondLimit( fps );- TheInGameUI->message( UnicodeString( L"Game speed: %d%%" ), fps * 100 / LOGICFRAMES_PER_SECOND );- }- disp = DESTROY_MESSAGE;- break;- }-//// Hold position: every selected unit guards the spot it is standing on and does not// pursue. The location has to be resolved per unit on the logic side, so this carriesdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cppindex dfecab6c0..b3a130861 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp@@ -183,9 +183,6 @@ static const LookupListRec GameMessageMetaTypeNames[] ={ "HOLD_POSITION", GameMessage::MSG_META_HOLD_POSITION },{ "TOGGLE_GUARD", GameMessage::MSG_META_TOGGLE_GUARD },{ "TOGGLE_PAUSE", GameMessage::MSG_META_TOGGLE_PAUSE },- { "GAME_SPEED_UP", GameMessage::MSG_META_GAME_SPEED_UP },- { "GAME_SPEED_DOWN", GameMessage::MSG_META_GAME_SPEED_DOWN },- { "GAME_SPEED_RESET", GameMessage::MSG_META_GAME_SPEED_RESET },{ "DEPLOY", GameMessage::MSG_META_DEPLOY },{ "CREATE_FORMATION", GameMessage::MSG_META_CREATE_FORMATION },{ "FOLLOW", GameMessage::MSG_META_FOLLOW },