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
fix(gameengine): quality slider leaves the water style alone
Olcay Seygan002e8d5ee332
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cppindex bd71b439c..3f394ec41 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp@@ -651,12 +651,16 @@ const Int TheOptionCatalogCount = (sizeof( TheOptionCatalog ) / sizeof( TheOptio// free on a card that holds its frame rate and is what saves one that does not, so it waits for// Ultra. Multisampling is read by Direct3D 9 alone and cost nothing measurable there at 8x on this// card, which another card may not repeat, so it rises through the middle. Under Direct3D 9-// MapLight, TeamGlow and WaterFoam are greyed and the slider leaves them; the shadow map, Modern-// water and the volumetric clouds are the other renderers' alone.+// MapLight, TeamGlow and WaterFoam are greyed and the slider leaves them; the shadow map and the+// volumetric clouds are the other renderers' alone.//// 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.+// is there to read the battlefield, not to cost frame time. Water style has none: the fight above+// had no sea, so Modern water read as free, and v3.4.0 gave it to every preset from Medium up and+// to every Options.ini without the key. The main menu's shell map is mostly sea, and there the+// same card spent 11 to 45 ms a pass against 3.3 to 6 ms with Classic water. It stays the opt-in+// GlobalData's constructor makes it.//-----------------------------------------------------------------------------const Int TheGraphicsQualityAnchors[] = { 0, 4, 7, 10 };@@ -676,7 +680,6 @@ const GraphicsQualityRow TheGraphicsQualityTable[] ={ "CheckSmokeFireLighting", 0.0f, { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 } },{ "CheckTeamGlow", 0.0f, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } },{ "CheckWaterFoam", 0.0f, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } },- { "ComboBoxWaterStyle", 0.0f, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } },{ "ComboBoxCloudStyle", 0.0f, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } },{ "CheckParticleBounce", 0.0f, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } },{ "CheckInfantryShadows", 0.0f, { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 } },diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex 45542c62e..429f16e52 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -16763,6 +16763,8 @@ TEST(graphics_quality_slider_only_ever_turns_settings_up)for( Int step = 1; step < GRAPHICS_QUALITY_STEPS; ++step )CHECK( quality.values[ step ] >= quality.values[ step - 1 ] );}+ // 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 slider's own position is a catalog row with exactly the table's stepsconst OptionDef *slider = findOptionDef( "GraphicsQuality" );