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.

feat(gameengine): slider reaches the nine looks, all above high

Olcay Seygan3e6c5887ee0a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df26d5a3c..9d2ebf697 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,8 @@ found and fixed, EA's own, not port damage.**
- Defaults in Options now means this game too. It used to leave every setting this build added where you had put it, so a Reforged page stayed Reforged after the click. Now it ticks Classic Graphics and puts every row back where a first start has it, the controls and the sound included. Your language, window mode and resolution stay, and unticking the box still gives you High.
- Classic now means EA's picture in a fight too, checked side by side against the real 2003 game on this machine. Every explosion, every muzzle flash and all the black smoke this build retuned goes back to EA's own numbers under Classic: 132 effect lists and 235 particle systems stand as shipped, and the 51 particle systems this build invented draw nothing. So do the slow water, the eased hull turn, tank barrels that tilt to the target and the grade insignia on units, which return to the three chevrons, and a match opens at EA's camera height. Tick off Classic and Reforged has all of it, down to the pixel. Two players on different looks still share a match, and we ran one 3000 frames with no mismatch.
- Classic was the slower look in a big fight, and the picture never asked for that. Every explosion's light tested every patch of ground for every light on the map, and each shadow was copied a second time for a graphics device that draws nothing. Both are gone and the picture is the same. In a late 8-player match the drawing behind one frame falls from 9.6 ms to 5.4 ms, and the slowest frame in a thousand from 21.25 ms to 17.75 ms.
+- The Performance / Quality slider stopped short of this version's own looks: you had to find each box by hand. Now it reaches all nine. One stop past High brings tone mapping, the sky and ground light, ambient occlusion and water splashes, the next adds battle marks and weather, and Ultra adds firelight, atmosphere and collapsing buildings. All nine together cost 1.4 ms of graphics card time a frame on an RTX 2060 in our chaos fight, 9.36 against 7.99. High is the picture it always was, and under Classic Graphics the slider leaves every one of them off at any stop. Firelight, atmosphere and collapsing buildings carry known faults, a stall, a black smear at a flat camera and a hitch, which is why they wait for Ultra.
+- The launcher's Options page has the same slider, with every new box beside it. Move it there or in the game and each opens on what the other saved.
- A detail preset now means EA's detail settings. Before this, a preset in your settings file switched on team glow, water foam and 4x multisampling behind any box you could see, and not on the very first start, so the first start and the second drew different pictures. Now a Reforged setting comes on from its own line, which the menu writes when you accept.
- Smooth Motion, the blending that made units glide on a fast monitor, had no switch at all. It is a box in Options, Display, off until ticked, and a 60 Hz screen shows no difference either way.
- Already playing? Nothing in your settings file gets rewritten and every line in it still wins. A setting you never touched has no line, so it takes the new default, which for most of you means Classic on your next start. Untick Classic Graphics once and you are back. The settings can differ between players in one match: none of them reaches the game's logic.
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
index d7a77f4c7..95fb1c7af 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
@@ -624,58 +624,53 @@ const OptionDef TheOptionCatalog[] =
get_m_waterFoam, set_m_waterFoam },
// Craters and a building's stain on the terrain, fading over minutes, and darker treads. The
- // scorch buffer asks every draw. Off under Classic graphics and -d3d9, and no row in the quality
- // table: an opt-in until it has been seen. On Options > Effects.
+ // scorch buffer asks every draw. Off under Classic graphics and -d3d9. On Options > Effects.
{ "GroundMarks", OPT_WND( "CheckGroundMarks" ), "GUI:GroundMarks",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_groundMarks, set_m_groundMarks },
// Burning buildings, wrecks and blasts as flickering point lights on the ground, walls and units.
// The particle draw asks every frame. Off under Classic graphics and -d3d9, which light nothing
- // per pixel, and no row in the quality table: an opt-in until it has been seen. On Options > Effects.
+ // per pixel. On Options > Effects.
{ "Firelight", OPT_WND( "CheckFirelight" ), "GUI:Firelight",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_firelight, set_m_firelight },
// Models take the map's ambient from the sky above and the ground below instead of evenly. The
- // scene hands it to the backend every frame. Off under Classic graphics and -d3d9, and no row in
- // the quality table: an opt-in until it has been seen. On Options > Effects.
+ // scene hands it to the backend every frame. Off under Classic graphics and -d3d9. On Options > Effects.
{ "HemiAmbient", OPT_WND( "CheckHemiAmbient" ), "GUI:HemiAmbient",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_hemiAmbient, set_m_hemiAmbient },
// Corners and the ground under what stands on it darken. The scene reads it every frame. Off under
- // Classic graphics and -d3d9, and no row in the quality table: an opt-in until it has been seen. On
- // Options > Effects.
+ // Classic graphics and -d3d9. On Options > Effects.
{ "AmbientOcclusion", OPT_WND( "CheckAmbientOcclusion" ), "GUI:AmbientOcclusion",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_ambientOcclusion, set_m_ambientOcclusion },
// Rain, blowing sand or snow by the map's ground, and a wind on trees and smoke. Read every frame, and
- // no sim reads it, so two players may differ. Off under Classic graphics and -d3d9, and no row in the
- // quality table: an opt-in until it has been seen. On Options > Effects.
+ // no sim reads it, so two players may differ. Off under Classic graphics and -d3d9. On Options > Effects.
{ "Weather", OPT_WND( "CheckWeather" ), "GUI:Weather",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_weatherEffects, set_m_weatherEffects },
// A splash and rings where a blast or a falling body meets water: W3DGameClient::splashInWater makes
- // particle systems, and no sim reads them. Off under Classic graphics, -d3d9 and Modern water, and no
- // row in the quality table: an opt-in until it has been seen. On Options > Effects.
+ // particle systems, and no sim reads them. Off under Classic graphics, -d3d9 and Modern water. On
+ // Options > Effects.
{ "WaterSplashes", OPT_WND( "CheckWaterSplashes" ), "GUI:WaterSplashes",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_waterSplashes, set_m_waterSplashes },
// The far ground fades toward the horizon and what the frame left empty takes a sky. Read every frame,
- // and no sim reads it. Off under Classic graphics and -d3d9, and no row in the quality table: an opt-in
- // until it has been seen. On Options > Graphics, under Warm Light: Effects is full.
+ // and no sim reads it. Off under Classic graphics and -d3d9. On Options > Graphics, under Warm Light:
+ // Effects is full.
{ "Atmosphere", OPT_WND( "CheckAtmosphere" ), "GUI:Atmosphere",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_atmosphere, set_m_atmosphere },
// A building's last model goes into the ground: StructureCollapse.cpp moves a copy no drawable owns,
- // and no sim reads it. Off under Classic graphics and -d3d9, and no row in
- // the quality table: an opt-in until it has been seen. On Options > Display, under Picture: every
- // column of Graphics and Effects is full.
+ // and no sim reads it. Off under Classic graphics and -d3d9. On Options > Display, under Picture:
+ // every column of Graphics and Effects is full.
{ "StructureCollapse", OPT_WND( "CheckStructureCollapse" ), "GUI:StructureCollapse",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_structureCollapse, set_m_structureCollapse },
@@ -689,8 +684,8 @@ const OptionDef TheOptionCatalog[] =
get_m_smoothMotion, set_m_smoothMotion },
// What passes white keeps its colour on the way to the eight bit screen; no HDR monitor output. The
- // post chain is told every frame. Classic graphics has no half float scene and -d3d9 no chain, and
- // no row in the quality table: an opt-in until it has been seen. On Options > Effects.
+ // post chain is told every frame. Classic graphics has no half float scene and -d3d9 no chain. On
+ // Options > Effects.
{ "InternalHdr", OPT_WND( "CheckInternalHdr" ), "GUI:InternalHdr",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_internalHdr, set_m_internalHdr },
@@ -747,6 +742,12 @@ const Int TheOptionCatalogCount = (sizeof( TheOptionCatalog ) / sizeof( TheOptio
// MapLight, TeamGlow and WaterFoam are greyed and the slider leaves them; the shadow map and the
// volumetric clouds are the other renderers' alone.
//
+// The nine looks of 2026-10-31 all rise above High, so High stays the picture the Classic box's
+// untick has always given. Their costs are GPU means past frame 600, on against off in two pairs on
+// trailer chaos (water splashes on constant shelling), rows under 0.15 ms again written 0. Weather
+// and Atmosphere change a map's mood, and Atmosphere, Firelight and StructureCollapse still carry
+// faults listed in docs/plans/TODO.md, so those three wait for Ultra.
+//
// Trees have no row: GameLogic reads the setting as a map loads, so it stays with the memory test
// as EA had it and a preset never turns them off. The behind-buildings marker has none either; it
// is there to read the battlefield, not to cost frame time. Water style has none: the fight above
@@ -779,14 +780,24 @@ const GraphicsQualityRow TheGraphicsQualityTable[] =
{ "CheckVolumetricSmoke", 0.0f, { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 } },
{ "ComboBoxMSAA", 0.0f, { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3 } },
{ "CheckNoDynamicLOD", 0.0f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } },
+ { "CheckInternalHdr", 0.0f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
+ { "CheckHemiAmbient", 0.0f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
+ { "CheckStructureCollapse", 0.0f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } },
{ "ComboBoxTextureFilter", 0.1f, { 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 } },
{ "ComboBoxBloom", 0.1f, { 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 } },
{ "SliderAnisotropy", 0.1f, { 2, 4, 8, 16, 16, 16, 16, 16, 16, 16, 16 } },
{ "CheckParticleShadows", 0.15f, { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 } },
{ "LowResSlider", 0.2f, { 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } },
{ "CheckPropShadows", 0.2f, { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 } },
+ { "CheckWaterSplashes", 0.2f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
+ { "CheckAtmosphere", 0.2f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } },
{ "ComboBoxShadowQuality", 0.25f, { 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2 } },
+ { "CheckAmbientOcclusion", 0.3f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
{ "CheckMapLight", 0.35f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
+ { "CheckFirelight", 0.4f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } },
+ // 0.79 and 0.33 ms in the two pairs on 2026-11-01, the widest spread in the table
+ { "CheckGroundMarks", 0.55f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 } },
+ { "CheckWeather", 0.65f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 } },
{ "ComboBoxSmoke", 0.75f, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 } },
// measured 5000 against the slider's floor of 100 (1.6 ms) and against 1000 (0.5 ms)
{ "ParticleCapSlider", 1.6f, { 500, 1000, 1500, 1500, 1500, 2000, 2500, 3000, 3500, 4000, 5000 } },
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 36b2ec914..9059a6cbf 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -17287,6 +17287,19 @@ TEST(graphics_quality_slider_only_ever_turns_settings_up)
// Modern water is opt-in: a preset gave it to the sea of the main menu's shell map at 11 to 45 ms a pass
CHECK( findGraphicsQualityRow( "ComboBoxWaterStyle" ) == NULL );
+ // the looks of 2026-10-31 rise above High, which stays the picture the Classic box's untick gives,
+ // and every one is on at Ultra and a fork's row, so a Classic page keeps them off
+ static const char *const aboveHigh[] = { "CheckInternalHdr", "CheckHemiAmbient", "CheckGroundMarks", "CheckStructureCollapse",
+ "CheckWaterSplashes", "CheckAtmosphere", "CheckAmbientOcclusion", "CheckFirelight", "CheckWeather" };
+ for( Int i = 0; i < (Int)( sizeof( aboveHigh ) / sizeof( aboveHigh[ 0 ] ) ); ++i )
+ {
+ const GraphicsQualityRow *look = findGraphicsQualityRow( aboveHigh[ i ] );
+ CHECK( look != NULL );
+ CHECK_EQ( look->values[ TheGraphicsQualityAnchors[ STATIC_GAME_LOD_HIGH ] ], 0 );
+ CHECK_EQ( look->values[ TheGraphicsQualityAnchors[ STATIC_GAME_LOD_ULTRA ] ], 1 );
+ CHECK( graphicsQualityRowIsReforged( *look ) );
+ }
+
// the slider's own position is a catalog row with exactly the table's steps
const OptionDef *slider = findOptionDef( "GraphicsQuality" );
CHECK( slider != NULL );
diff --git a/GeneralsMD/Code/Tools/optionsmenu_layout.py b/GeneralsMD/Code/Tools/optionsmenu_layout.py
index 25f3b0dde..9d2573384 100644
--- a/GeneralsMD/Code/Tools/optionsmenu_layout.py
+++ b/GeneralsMD/Code/Tools/optionsmenu_layout.py
@@ -993,17 +993,18 @@ def selfcheck():
for key in ("GUI:%s" % setting_of(name), "TOOLTIP:%s" % setting_of(name)):
if key not in keys:
problems.append("%s needs %s in Patch.str" % (name, key))
- # every row of the quality slider names a control on Graphics or Effects and has a value for
- # every step; a row one value short still compiles, with a 0 in the last step
+ # every row of the quality slider names a control on Graphics, Effects or Display, where the full
+ # columns pushed Collapsing Buildings, and has a value for every step; a row one value short still
+ # compiles, with a 0 in the last step
steps = enum_count("GRAPHICS_QUALITY_STEPS")
quality = read_quality_table()
if len(quality) < 9:
problems.append("only %d quality rows parsed, the regex has stopped matching" % len(quality))
- on_pages = set(short(child) for page in ("PageGraphics", "PageEffects")
+ on_pages = set(short(child) for page in ("PageGraphics", "PageEffects", "PageDisplay")
for child in layout.find(page).children)
for control, values in quality:
if control not in on_pages:
- problems.append("quality row %s is not a control on the Graphics or Effects page" % control)
+ problems.append("quality row %s is not a control on the Graphics, Effects or Display page" % control)
if len(values) != steps:
problems.append("quality row %s has %d values for %d steps" % (control, len(values), steps))