Skip to content

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.

refactor(gameengine): rename the fork to Zero Hour Reforged

Olcay Seyganb95e04b5e2ac
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 64ade3736..2c2098417 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# Command and Conquer: Generals: Zero Hour: Reborn
+# Command and Conquer: Generals: Zero Hour: Reforged
EA opened the source of Generals and Zero Hour, the game that is still on sale and still runs on
Steam. This build is that source with the bugs the game shipped with fixed and everything below added.
@@ -962,7 +962,7 @@ found and fixed — EA's own, not port damage.**
- The main menu buttons are there when the menu is. On the first visit they used to stay hidden, pointer and all, until you nudged the mouse or pressed a key, so a freshly started game looked stuck on the background battle.
- The zip installs itself and takes itself back off. `install.bat` asks where the game is, offering
whatever the registry says, and copies the build there; anything it is about to write over goes
- into a zip in `ZHReborn-Uninstall` first, and anything it adds that was not there is written down
+ into a zip in `ZHReforged-Uninstall` first, and anything it adds that was not there is written down
so it can be deleted rather than restored. `uninstall.bat`, left in that same folder, puts the
install back the way it found it. Installing a second time on top does not bury the first backup:
it keeps the copy of the files as the retail game had them, not as the previous build left them.
diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt
index fd033f972..50bfd4a18 100644
--- a/GeneralsMD/Code/CMakeLists.txt
+++ b/GeneralsMD/Code/CMakeLists.txt
@@ -744,12 +744,12 @@ target_sources(test_gameengine PRIVATE ${TESTS}/test_gameengine_stubs.cpp)
set_target_properties(test_gameengine PROPERTIES CXX_STANDARD 17)
# simulation_uses_no_runtime_trig reads the engine's own sources back off disk to prove nothing in
# GameLogic or Common has gone back to calling sinf().
-# fxlist_reborn_ini_parses_and_keeps_its_light runs the fork's own FXList file through the real
+# fxlist_reforged_ini_parses_and_keeps_its_light runs the fork's own FXList file through the real
# INI parser, so it needs the tracked master rather than whatever sits in Run/.
# the_options_menu_buttons_all_wear_one_font reads the tracked layout master, not Run/'s copy.
target_compile_definitions(test_gameengine PRIVATE
GAMEENGINE_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/GameEngine"
- FXLIST_REBORN_INI="${CMAKE_CURRENT_SOURCE_DIR}/Data/INI/FXListReborn.ini"
+ FXLIST_REFORGED_INI="${CMAKE_CURRENT_SOURCE_DIR}/Data/INI/FXListReforged.ini"
OPTIONS_MENU_WND="${CMAKE_CURRENT_SOURCE_DIR}/Data/Window/Menus/OptionsMenu.wnd")
# The three hand-written self-checks predate the harness; run them from ctest
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaCenter.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaCenter.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaCenter.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaCenter.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaLeft.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaLeft.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaLeft.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaLeft.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaRight.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaRight.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarAmericaRight.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarAmericaRight.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarChinaCenter.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaCenter.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarChinaCenter.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaCenter.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarChinaLeft.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaLeft.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarChinaLeft.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaLeft.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarChinaRight.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaRight.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarChinaRight.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarChinaRight.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarGLACenter.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLACenter.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarGLACenter.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLACenter.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarGLALeft.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLALeft.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarGLALeft.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLALeft.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/RebornBarGLARight.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLARight.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/RebornBarGLARight.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedBarGLARight.tga
diff --git a/GeneralsMD/Code/Data/INI/FXListReborn.ini b/GeneralsMD/Code/Data/INI/FXListReforged.ini
similarity index 99%
rename from GeneralsMD/Code/Data/INI/FXListReborn.ini
rename to GeneralsMD/Code/Data/INI/FXListReforged.ini
index 2fb26e04e..e43a42e1b 100644
--- a/GeneralsMD/Code/Data/INI/FXListReborn.ini
+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini
@@ -1,5 +1,5 @@
;//////////////////////////////////////////////////////////////////////////////
-;FILE: FXListReborn.ini ////////////////////////////////////////////////////////
+;FILE: FXListReforged.ini //////////////////////////////////////////////////////
;//////////////////////////////////////////////////////////////////////////////
;
; Muzzle and detonation light. EA's explosions throw particles and sound but no
diff --git a/GeneralsMD/Code/Data/Install_Final.bmp b/GeneralsMD/Code/Data/Install_Final.bmp
index 64125f7a6..78006dc04 100644
Binary files a/GeneralsMD/Code/Data/Install_Final.bmp and b/GeneralsMD/Code/Data/Install_Final.bmp differ
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
index b45dcf0bb..483e5c6af 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
@@ -822,7 +822,7 @@ void GameEngine::init( int argc, char *argv[] )
loose copy of FXList.ini because a loose copy shadows the whole 190K shipped file: it goes
stale against every patch, it cannot be reviewed, and - since it lands in the INI CRC below -
it silently refuses every multiplayer join from a machine that does not have the same one. */
- ini.load( AsciiString( "Data\\INI\\FXListReborn.ini" ), INI_LOAD_OVERWRITE, &xferCRC );
+ ini.load( AsciiString( "Data\\INI\\FXListReforged.ini" ), INI_LOAD_OVERWRITE, &xferCRC );
initSubsystem(TheWeaponStore,"TheWeaponStore", MSGNEW("GameEngineSubsystem") WeaponStore(), &xferCRC, NULL, "Data\\INI\\Weapon.ini");
initSubsystem(TheObjectCreationListStore,"TheObjectCreationListStore", MSGNEW("GameEngineSubsystem") ObjectCreationListStore(), &xferCRC, "Data\\INI\\Default\\ObjectCreationList.ini", "Data\\INI\\ObjectCreationList.ini");
initSubsystem(TheLocomotorStore,"TheLocomotorStore", MSGNEW("GameEngineSubsystem") LocomotorStore(), &xferCRC, NULL, "Data\\INI\\Locomotor.ini");
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index 4dc31328a..aea6cb2e7 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -1545,7 +1545,7 @@ static const ControlBarPlateSet thePlateSets[] =
{
{ "America",
{
- { "RebornBarAmericaLeft.tga", { { 0, 412 }, { 183, 599 } }, 0, 0, 0, 293, 301 },
+ { "ReforgedBarAmericaLeft.tga", { { 0, 412 }, { 183, 599 } }, 0, 0, 0, 293, 301 },
/* This painting is 170 design units tall for a 180-unit slot, and it is the plate's own
composition rather than a straight cut of the shipped bar: its grid field lines up with
the command buttons (494-589) exactly where it stands, and its money box does not line
@@ -1572,26 +1572,26 @@ static const ControlBarPlateSet thePlateSets[] =
runs 224.6 to 614.2, and the fourteen command buttons are 223 to 603: the first
column overhangs the left bezel by a unit and a half while eleven units stand empty
on the right. Six to the right centres the block in the field. */
- { "RebornBarAmericaCenter.tga", { { 180, 429 }, { 623, 599 } }, 9, 10, 6, 706, 271 },
- { "RebornBarAmericaRight.tga", { { 610, 433 }, { 800, 599 } }, 0, 0, 0, 304, 268,
+ { "ReforgedBarAmericaCenter.tga", { { 180, 429 }, { 623, 599 } }, 9, 10, 6, 706, 271 },
+ { "ReforgedBarAmericaRight.tga", { { 610, 433 }, { 800, 599 } }, 0, 0, 0, 304, 268,
{ { 648, 434 }, { 717, 460 } } },
}
},
{ "China",
{
- { "RebornBarChinaLeft.tga", { { 1, 417 }, { 196, 598 } }, 0, 0, 0, 315, 295 },
- { "RebornBarChinaCenter.tga", { { 176, 433 }, { 617, 597 } }, 0, 0, 0, 718, 269 },
- { "RebornBarChinaRight.tga", { { 611, 424 }, { 798, 598 } }, 0, 0, 0, 303, 284,
+ { "ReforgedBarChinaLeft.tga", { { 1, 417 }, { 196, 598 } }, 0, 0, 0, 315, 295 },
+ { "ReforgedBarChinaCenter.tga", { { 176, 433 }, { 617, 597 } }, 0, 0, 0, 718, 269 },
+ { "ReforgedBarChinaRight.tga", { { 611, 424 }, { 798, 598 } }, 0, 0, 0, 303, 284,
{ { 639, 430 }, { 686, 463 } } },
}
},
{ "GLA",
{
- { "RebornBarGLALeft.tga", { { 0, 416 }, { 215, 599 } }, 0, 0, 0, 345, 295 },
+ { "ReforgedBarGLALeft.tga", { { 0, 416 }, { 215, 599 } }, 0, 0, 0, 345, 295 },
/* No shift: this plate paints its box at design 443.2 to 459.3, middle 451.3, and
ControlBarScheme.ini already puts GLA's readout at 443 to 462, middle 452.5. */
- { "RebornBarGLACenter.tga", { { 168, 437 }, { 617, 599 } }, 0, 0, 0, 720, 261 },
- { "RebornBarGLARight.tga", { { 612, 423 }, { 799, 599 } }, 0, 0, 0, 300, 284,
+ { "ReforgedBarGLACenter.tga", { { 168, 437 }, { 617, 599 } }, 0, 0, 0, 720, 261 },
+ { "ReforgedBarGLARight.tga", { { 612, 423 }, { 799, 599 } }, 0, 0, 0, 300, 284,
{ { 631, 428 }, { 705, 465 } } },
}
},
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index b23d42cf1..02bc5e894 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -483,14 +483,14 @@ TEST(ini_unknown_block_aborts_the_file)
remove( TEST_INI );
}
-/* Data\INI\FXListReborn.ini is the fork's own explosion light: 89 of EA's FXLists, each repeated
+/* Data\INI\FXListReforged.ini is the fork's own explosion light: 89 of EA's FXLists, each repeated
whole with one LightPulse added. Whole, because FXListStore::parseFXListDefinition clears an
entry before re-reading it - a half-copied block does not add a light, it deletes an explosion.
GameEngine::init loads the file and folds it into the multiplayer INI CRC, so both ways of
getting it wrong are expensive: a malformed block throws and takes the whole startup down, and
a regeneration that loses the LightPulse ships a file that lights nothing and still refuses
every player who does not have that exact copy. */
-TEST(fxlist_reborn_ini_parses_and_keeps_its_light)
+TEST(fxlist_reforged_ini_parses_and_keeps_its_light)
{
CHECK( bootOnce() );
@@ -498,7 +498,7 @@ TEST(fxlist_reborn_ini_parses_and_keeps_its_light)
TheFXListStore = NEW FXListStore;
/* through the game's own parser, not a lookalike */
- CHECK( loadIni( FXLIST_REBORN_INI ) );
+ CHECK( loadIni( FXLIST_REFORGED_INI ) );
/* the blocks landed in the store, under the names the game looks them up by */
CHECK( TheFXListStore->findFXList( "ScudStormMissileDetonation" ) != NULL );
@@ -506,7 +506,7 @@ TEST(fxlist_reborn_ini_parses_and_keeps_its_light)
CHECK( TheFXListStore->findFXList( "NoSuchFXListIsDeclaredAnywhere" ) == NULL );
/* and every block in the file still carries the light it exists for */
- FILE *fp = fopen( FXLIST_REBORN_INI, "rb" );
+ FILE *fp = fopen( FXLIST_REFORGED_INI, "rb" );
CHECK( fp != NULL );
Int blocks = 0, lit = 0, open = 0, hasLight = 0;
diff --git a/README.md b/README.md
index 90da8489c..5e35fc8bc 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
### COMMAND AND CONQUER · GENERALS
-# ZERO HOUR: REBORN
+# ZERO HOUR: REFORGED
**Zero Hour, rebuilt from the source EA opened.**
@@ -19,7 +19,7 @@
EA opened the source of Generals and Zero Hour. The game itself never went away and still runs on
Steam.
-**Reborn** is that source moved to Visual Studio 2022 and changed as a game: ~580 engine source
+**Reforged** is that source moved to Visual Studio 2022 and changed as a game: ~580 engine source
files ported, and around sixty original defects found and fixed. Not port damage. EA's own, shipped
in 2003 and never noticed.
@@ -27,7 +27,7 @@ You need to own the game; no game data ships here. Nothing changes unit stats, w
## Then and now
-| | The source EA released | Reborn |
+| | The source EA released | Reforged |
|:--|:--|:--|
| **Frame rate** | 33 fps, with game speed tied to it | uncapped picture, rules on their own clock |
| **Worst logic turn** | `2,976 ms` | `243 ms` |