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): heat haze option, on with the quality slider past High

Olcay Seygan637462daee01
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07ee00ab0..1b56f61f6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ found and fixed, EA's own, not port damage.**
---
+## Air that shimmers over fire
+
+- Heat Haze, under Options, Display, is a new setting, off by default until it has been played. The air above a burning building wavers, a laser's beam bends what lies behind it, and a missile leaves a ripple behind its exhaust, the way hot air does in Command and Conquer 3. Only the ground behind the heat moves: a tank parked in the fire keeps its outline. The Performance / Quality slider turns it on one stop past High, with ambient occlusion, and you can still tick it by hand at any stop. Your opponent's setting is his own, because nothing in the game reads it. Direct3D 11 only, and off under Classic Graphics.
+
## EA's four ranks are back
- The rank ladder is gone, every grade, perk and aura of it. A unit is Regular, Veteran, Elite or Heroic again, on the kills and the bonuses the 2003 game gave them, with EA's chevrons over the health bar and on the portrait. Six kills of its own kind make a Crusader Heroic, where an American one needed 66 on the ladder.
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 6a45b06a3..f51503bdd 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -1572,6 +1572,14 @@ TOOLTIP:SmoothMotion
"On a screen faster than 60 Hz, units are drawn between their last two positions instead of holding each one until the next. A 60 Hz screen shows no change. Only your picture changes: nothing in the game reads it, and other players see their own setting. Applies when you press Accept."
END
+GUI:HeatHaze
+"Heat Haze"
+END
+
+TOOLTIP:HeatHaze
+"The air shimmers over fires, along laser beams and behind missile exhaust. Direct3D 11 only, and off under Classic Graphics. Applies when you press Accept."
+END
+
GUI:StructureCollapse
"Collapsing Buildings"
END
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index 8978ef04c..34bdc118e 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -15985,6 +15985,14 @@ TOOLTIP:SmoothMotion
"60 Hz'den hızlı ekranda birimler, her konumu bir sonrakine kadar tutmak yerine son iki konumlarının arasında çizilir. 60 Hz ekranda fark görünmez. Yalnızca sizin görüntünüz değişir: oyundaki hiçbir şey bunu okumaz, diğer oyuncular kendi ayarını görür. Kabul'e basınca geçerli olur."
END
+GUI:HeatHaze
+"Isı Dalgalanması"
+END
+
+TOOLTIP:HeatHaze
+"Yangınların üstünde, lazer ışınları boyunca ve füze egzozunun arkasında hava dalgalanır. Yalnızca Direct3D 11 ile, Klasik Grafikler açıkken kapalıdır. Kabul Et'e basınca uygulanır."
+END
+
GUI:StructureCollapse
"Yıkılan Binalar"
END
diff --git a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
index 382f2d8fa..a648c9f5a 100644
--- a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
+++ b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
@@ -2652,6 +2652,53 @@ WINDOW
IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
END
CHILD
+ WINDOW
+ WINDOWTYPE = CHECKBOX;
+ SCREENRECT = UPPERLEFT: 288 294, BOTTOMRIGHT: 512 318, CREATIONRESOLUTION: 800 600;
+ NAME = "OptionsMenu.wnd:CheckHeatHaze";
+ STATUS = ENABLED+IMAGE+BORDER;
+ STYLE = CHECKBOX+MOUSETRACK;
+ SYSTEMCALLBACK = "[None]";
+ INPUTCALLBACK = "[None]";
+ TOOLTIPCALLBACK = "[None]";
+ DRAWCALLBACK = "[None]";
+ FONT = NAME: "Arial", SIZE: 14, BOLD: 0;
+ HEADERTEMPLATE = "MinorTitle";
+ TOOLTIPTEXT = "TOOLTIP:HeatHaze";
+ TOOLTIPDELAY = -1;
+ TEXT = "GUI:HeatHaze";
+ TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,
+ DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,
+ HILITE: 186 255 12 255, HILITEBORDER: 0 0 0 255;
+ ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,
+ IMAGE: Active-Unchecked, COLOR: 255 255 255 0, BORDERCOLOR: 128 128 255 255,
+ IMAGE: Active-Checked, COLOR: 0 0 255 255, BORDERCOLOR: 128 128 255 255,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
+ DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,
+ IMAGE: Disabled-Unchecked, COLOR: 255 255 255 0, BORDERCOLOR: 192 192 192 255,
+ IMAGE: Disabled-Checked, COLOR: 64 64 64 255, BORDERCOLOR: 254 254 254 255,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
+ HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 255 0 255, BORDERCOLOR: 128 255 128 255,
+ IMAGE: Active-HiLighted, COLOR: 255 255 255 0, BORDERCOLOR: 128 128 255 255,
+ IMAGE: Active-Checked, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
+ END
+ CHILD
WINDOW
WINDOWTYPE = STATICTEXT;
SCREENRECT = UPPERLEFT: 536 182, BOTTOMRIGHT: 760 206, CREATIONRESOLUTION: 800 600;
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
index ac359efb4..916c03ffd 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
@@ -552,7 +552,7 @@ public:
Bool m_waterFoam; ///< "WaterFoam": foam, shore band and the sun's shadow on water (Direct3D 11, client only)
Bool m_groundMarks; ///< "GroundMarks": craters, stains and longer treads that fade over minutes (Direct3D 11, client only)
Bool m_firelight; ///< "Firelight": flames light the ground, walls and units around them (Direct3D 11, client only)
- Bool m_heatHaze; ///< "-heathaze": the air over FireLook flames shimmers (Direct3D 11, client only, prototype)
+ Bool m_heatHaze; ///< "HeatHaze", "-heathaze": the air over fire, beams and exhausts shimmers (Direct3D 11, client only)
Bool m_hemiAmbient; ///< "HemiAmbient": models take the ambient from the sky above and the ground below (Direct3D 11, client only)
Bool m_ambientOcclusion; ///< "AmbientOcclusion": corners and the ground under what stands on it darken, half size in world units (Direct3D 11, client only)
Bool m_weatherEffects; ///< "Weather": rain, blowing sand or snow by the map's ground, and a wind on trees and smoke (Direct3D 11, client only)
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp
index 6a627773a..fae0214e7 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp
@@ -1101,7 +1101,7 @@ Int parseSmoothMotion(char *args[], int)
return 1;
}
-/* -heathaze: the air over the FireLook flames shimmers on Direct3D 11, a prototype. Client only. */
+/* -heathaze: the HeatHaze option on for one run, whatever Options.ini says. Client only. */
Int parseHeatHaze(char *args[], int)
{
if (TheWritableGlobalData)
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
index 95fb1c7af..c8ff77ee5 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
@@ -152,6 +152,7 @@ OPTION_BOOL_ACCESSORS( m_atmosphere )
OPTION_BOOL_ACCESSORS( m_structureCollapse )
OPTION_BOOL_ACCESSORS( m_smoothMotion )
OPTION_BOOL_ACCESSORS( m_internalHdr )
+OPTION_BOOL_ACCESSORS( m_heatHaze )
OPTION_INT_ACCESSORS( m_shadowQuality )
OPTION_INT_ACCESSORS( m_graphicsQuality )
@@ -690,6 +691,14 @@ const OptionDef TheOptionCatalog[] =
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_internalHdr, set_m_internalHdr },
+ // The air over fire, along laser beams and behind missile exhaust shimmers, at the strength the
+ // HEAT_HAZE_*, HEAT_BEAM_* and HEAT_EXHAUST_* constants in W3DParticleSys.cpp give. The particle draw
+ // reads it every frame, and no sim reads it. Off under Classic graphics and -d3d9; -heathaze turns it
+ // on for a run. On Options > Display, under Picture: every column of Graphics and Effects is full.
+ { "HeatHaze", OPT_WND( "CheckHeatHaze" ), "GUI:HeatHaze",
+ OPTION_BOOL, APPLY_LIVE, 0, 1,
+ get_m_heatHaze, set_m_heatHaze },
+
// The size of the sun's depth map. The shadow pass asks for it every frame and the backend makes
// the map again when the size changes, so a new level shows on the next frame. On Options >
// Effects. Classic graphics and -d3d9 draw no map at all.
@@ -792,6 +801,9 @@ const GraphicsQualityRow TheGraphicsQualityTable[] =
{ "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 } },
+ // from the DX11 GPU frame lines at 1920x1080 with -noFPSLimit, on against off: about 0.1 ms in a
+ // normal match (0.08 to 0.13), 0.2 to 0.4 in a fire-heavy one (0.07 to 0.55 at the ends)
+ { "CheckHeatHaze", 0.25f, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 } },
{ "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 } },
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp
index 0d7c84128..67da11750 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp
@@ -3072,7 +3072,7 @@ void OptionsMenuInit( WindowLayout *layout, void *userData )
// three looks only the Direct3D 11 picture draws; under -d3d9 their boxes keep the saved value, greyed
if( !TheGlobalData->m_direct3D11 )
{
- static const char *const direct3D11Only[] = { "MapLight", "TeamGlow", "WaterFoam", "GroundMarks", "Firelight", "HemiAmbient", "AmbientOcclusion", "InternalHdr", "Weather", "WaterSplashes", "Atmosphere", "StructureCollapse" };
+ static const char *const direct3D11Only[] = { "MapLight", "TeamGlow", "WaterFoam", "GroundMarks", "Firelight", "HemiAmbient", "AmbientOcclusion", "InternalHdr", "Weather", "WaterSplashes", "Atmosphere", "StructureCollapse", "HeatHaze" };
for( Int i = 0; i < (Int)( sizeof( direct3D11Only ) / sizeof( direct3D11Only[ 0 ] ) ); ++i )
findOptionWidget( *findOptionDef( direct3D11Only[ i ] ) )->winEnable( FALSE );
}
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 8e4dddeba..e40f6a9fc 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -19541,7 +19541,7 @@ TEST(graphics_quality_slider_only_ever_turns_settings_up)
// 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" };
+ "CheckWaterSplashes", "CheckAtmosphere", "CheckAmbientOcclusion", "CheckFirelight", "CheckWeather", "CheckHeatHaze" };
for( Int i = 0; i < (Int)( sizeof( aboveHigh ) / sizeof( aboveHigh[ 0 ] ) ); ++i )
{
const GraphicsQualityRow *look = findGraphicsQualityRow( aboveHigh[ i ] );
@@ -19607,7 +19607,7 @@ TEST(no_options_file_is_the_classic_game_with_every_added_row_off)
"ShadowsForProjectiles", "ShadowsForProps", "ShadowsForParticles", "VolumetricSmokeShadows", "SmokeFireLighting",
"DebrisTrails", "MapLight", "TeamGlow", "WaterFoam", "GroundMarks", "Firelight", "HemiAmbient", "AmbientOcclusion",
"Weather", "WaterSplashes", "Atmosphere", "StructureCollapse", "SmoothMotion", "InternalHdr", "Smoke", "ParticleBounce",
- NULL
+ "HeatHaze", NULL
};
for( Int i = 0; off[ i ] != NULL; ++i )
CHECK_EQ( findOptionDef( off[ i ] )->get(), 0 );
diff --git a/GeneralsMD/Code/Tools/optionsmenu_layout.py b/GeneralsMD/Code/Tools/optionsmenu_layout.py
index 6789f6190..e1d4c57fc 100644
--- a/GeneralsMD/Code/Tools/optionsmenu_layout.py
+++ b/GeneralsMD/Code/Tools/optionsmenu_layout.py
@@ -248,6 +248,7 @@ NEW_CONTROLS = [
(CHECK, "CheckAtmosphere", "GUI:Atmosphere"),
(CHECK, "CheckStructureCollapse", "GUI:StructureCollapse"),
(CHECK, "CheckSmoothMotion", "GUI:SmoothMotion"),
+ (CHECK, "CheckHeatHaze", "GUI:HeatHaze"),
(LABEL, "LabelGraphicsQuality", "GUI:GraphicsQuality"),
(SLIDER, "SliderGraphicsQuality", None),
]
@@ -355,7 +356,8 @@ GROUP_LAYOUT = [
setting("GammaLabel", "SliderGamma", "ValueGamma"),
# every column of Graphics and Effects is full
("check", "CheckStructureCollapse"),
- ("check", "CheckSmoothMotion")])]),
+ ("check", "CheckSmoothMotion"),
+ ("check", "CheckHeatHaze")])]),
("PageGraphics", [
# the particle limit went to Effects' Particles group to make room for the quality slider