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): the game opens classic with every added setting off

Olcay Seyganffa57fbc6769
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a61d1f24e..50a98b502 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,14 @@ found and fixed, EA's own, not port damage.**
---
+## Classic first, Reforged when you ask
+
+- A first start now opens the game EA shipped: its own textures and ground, the hard stencil shadows, the flat 2003 light, no glow, bilinear filtering, the original sound mix, health bars only on what you select or point at. The HD art stays on your disk, unmounted. Every setting this build added to the picture, the sound and the controls starts off, and each one is a box in Options.
+- One click brings the other game back. Options, Graphics, untick Classic Graphics: the High preset fills in every Reforged box on the page, you can move the quality slider from there, and Accept saves it for the next start. Tick it again and the same boxes go off.
+- 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.
+
## Buildings go down
- Collapsing Buildings, under Options, Display, is a new setting, off by default until it has been played. EA's building stands until the frame it dies, then it is gone or it is a pile of rubble, with a cloud thrown over the moment. With this on it holds for a beat, shudders, leans about seven degrees and goes into the ground, a second for a small one and up to two and a half for a tall one. Most of the fall happens inside EA's cloud, so the part you see is the first half second, the roof dropping as the smoke comes up. It blocks nothing and nothing in the game reads it, so two players in one match can have it set differently. Direct3D 11 only.
diff --git a/GeneralsMD/Code/Data/German/Generals.str b/GeneralsMD/Code/Data/German/Generals.str
index a40a71b00..95090cdbe 100644
--- a/GeneralsMD/Code/Data/German/Generals.str
+++ b/GeneralsMD/Code/Data/German/Generals.str
@@ -14326,7 +14326,7 @@ GUI:ClassicGraphics
END
TOOLTIP:ClassicGraphics
-"Das Spiel wie 2003: eigene Texturen und Boden, die alten harten Schatten, keine Bump-Details, kein Leuchten und keine Schärfung. Aus ist Reforged. Gilt ab dem nächsten Spielstart."
+"Das Spiel wie 2003: eigene Texturen und Boden, die alten harten Schatten, keine Bump-Details, kein Leuchten und keine Schärfung. So startet das Spiel. Für das Reforged-Bild den Haken entfernen: Die Stufe Hoch füllt die Felder aus, von dort lässt sich der Regler verschieben. Gilt ab dem nächsten Spielstart."
END
GUI:InfantryShadows
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 543276e1f..23eafe02a 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -498,7 +498,7 @@ GUI:ClassicGraphics
END
TOOLTIP:ClassicGraphics
-"The game as it looked in 2003: its own textures and ground, the old hard shadows, no bump detail and no glow or sharpening. Off is Reforged. Takes effect the next time the game starts."
+"The game as it looked in 2003: its own textures and ground, the old hard shadows, no bump detail and no glow or sharpening. The game opens this way. Untick it for the Reforged picture: the High preset fills in the boxes, and you can move the slider from there. Takes effect the next time the game starts."
END
GUI:InfantryShadows
@@ -1564,6 +1564,14 @@ TOOLTIP:Atmosphere
"The ground far from the camera fades toward the sky's colour, and where the map ends or the camera lies flat you see a sky by the map's time of day instead of black. The ground near the camera stays clear and fog of war keeps its dark. Only your picture changes: nothing in the game reads it, and other players see their own setting. Direct3D 11 only, and off under Classic Graphics."
END
+GUI:SmoothMotion
+"Smooth Motion"
+END
+
+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:StructureCollapse
"Collapsing Buildings"
END
diff --git a/GeneralsMD/Code/Data/Russian/Generals.str b/GeneralsMD/Code/Data/Russian/Generals.str
index adbfb2e02..be53ac907 100644
--- a/GeneralsMD/Code/Data/Russian/Generals.str
+++ b/GeneralsMD/Code/Data/Russian/Generals.str
@@ -16046,7 +16046,7 @@ GUI:ClassicGraphics
END
TOOLTIP:ClassicGraphics
-"Игра такой, какой она была в 2003 году: её текстуры и земля, старые жёсткие тени, без рельефа, свечения и резкости. Выключено: Reforged. Вступает в силу при следующем запуске игры."
+"Игра такой, какой она была в 2003 году: её текстуры и земля, старые жёсткие тени, без рельефа, свечения и резкости. Игра открывается в этом виде. Для картинки Reforged снимите флажок: пресет «Высокий» заполнит поля, дальше можно двигать ползунок. Вступает в силу при следующем запуске игры."
END
GUI:InfantryShadows
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index cc71a720b..1ce7f3101 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -14990,7 +14990,7 @@ GUI:ClassicGraphics
END
TOOLTIP:ClassicGraphics
-"Oyunun 2003'teki görünümü: kendi kaplamaları ve zemini, eski keskin gölgeler, kabartma ayrıntısı yok, parlama ve keskinleştirme yok. Kapalıyken Reforged. Oyun bir sonraki açılışında geçerli olur."
+"Oyunun 2003'teki görünümü: kendi kaplamaları ve zemini, eski keskin gölgeler, kabartma ayrıntısı yok, parlama ve keskinleştirme yok. Oyun böyle açılır. Reforged görüntüsü için işareti kaldırın: Yüksek hazır ayarı kutuları doldurur, oradan kaydırıcıyı oynatabilirsiniz. Oyun bir sonraki açılışında geçerli olur."
END
GUI:InfantryShadows
@@ -15957,6 +15957,14 @@ TOOLTIP:Atmosphere
"Kameradan uzak zemin gökyüzünün rengine doğru solar; haritanın bittiği yerde ya da kamera yatık durduğunda siyah yerine haritanın saatine uygun bir gökyüzü görünür. Kameraya yakın zemin temiz kalır, savaş sisi karanlığını korur. Değişen sadece sizin görüntünüzdür: oyunda hiçbir şey bunu okumaz, diğer oyuncular kendi ayarını görür. Yalnızca Direct3D 11 ile, Klasik Grafikler açıkken kapalıdır."
END
+GUI:SmoothMotion
+"Akıcı Hareket"
+END
+
+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:StructureCollapse
"Yıkılan Binalar"
END
diff --git a/GeneralsMD/Code/Data/Ukrainian/Generals.str b/GeneralsMD/Code/Data/Ukrainian/Generals.str
index 8f42583ec..762dcc707 100644
--- a/GeneralsMD/Code/Data/Ukrainian/Generals.str
+++ b/GeneralsMD/Code/Data/Ukrainian/Generals.str
@@ -16046,7 +16046,7 @@ GUI:ClassicGraphics
END
TOOLTIP:ClassicGraphics
-"Гра такою, якою була у 2003: власні текстури й земля, старі різкі тіні, без рельєфу, сяйва та різкості. Вимк. — це Reforged. Діє після наступного запуску гри."
+"Гра такою, якою була у 2003: власні текстури й земля, старі різкі тіні, без рельєфу, сяйва та різкості. Гра відкривається в цьому вигляді. Для картинки Reforged зніміть прапорець: пресет «Висока» заповнить поля, далі можна рухати повзунок. Діє після наступного запуску гри."
END
GUI:InfantryShadows
diff --git a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
index 1752d68d7..382f2d8fa 100644
--- a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
+++ b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd
@@ -2605,6 +2605,53 @@ WINDOW
IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
END
CHILD
+ WINDOW
+ WINDOWTYPE = CHECKBOX;
+ SCREENRECT = UPPERLEFT: 288 266, BOTTOMRIGHT: 512 290, CREATIONRESOLUTION: 800 600;
+ NAME = "OptionsMenu.wnd:CheckSmoothMotion";
+ 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:SmoothMotion";
+ TOOLTIPDELAY = -1;
+ TEXT = "GUI:SmoothMotion";
+ 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/OptionsCatalog.h b/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h
index b6026e4ab..20030c406 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h
@@ -185,19 +185,18 @@ extern const Int TheGraphicsQualityAnchors[];
/** The row for this control, or NULL. */
extern const GraphicsQualityRow *findGraphicsQualityRow( const char *control );
+/** A row the fork added to the picture, as against one of EA's detail settings. While Classic
+ * Graphics is ticked the slider and the presets move only EA's, and unticking it fills these in. */
+extern Bool graphicsQualityRowIsReforged( const GraphicsQualityRow &row );
+
/** Options.ini -> TheWritableGlobalData, for every row. A key that is absent leaves the field at
- * whatever GlobalData's constructor put there, which is what makes an old Options.ini keep
- * working when a row is added. A file that names a detail preset and no GraphicsQuality, one
- * written before the slider or by the launcher alone, first gets that preset's column of
- * TheGraphicsQualityTable, so the keys it does carry still win. */
+ * whatever GlobalData's constructor put there, which is off for everything the fork added: a detail
+ * preset named in the file, or picked for a first run, sets only the GameLOD fields. The rest of
+ * its column reaches a row through the menu, which saves what it shows. */
extern void loadOptionsFromPreferences( UserPreferences& pref );
-/** The first detail preset GameLODManager applies, when Options.ini had no GraphicsQuality: every
- * catalog row its column names goes to that column, except a row Options.ini named or a switch or
- * ClassicGraphics changed after the load. This is how a first run with no Options.ini, whose
- * preset is picked only once the display starts, gets the boxes its preset shows. Custom, and
- * every later call, changes nothing. */
-extern void applyGraphicsQualityColumnAtStartup( Int staticGameLODLevel );
+/** One log line with every row's value as it stands, for a run's log to say which setup it drew. */
+extern void logOptionCatalog( void );
/** TheGlobalData -> Options.ini, for every row. The options menu's Accept writes only the rows the
* player changed instead, so a value the command line or ClassicGraphics put in GlobalData for one
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameLOD.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameLOD.cpp
index 19b009ba0..2d89bdac5 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/GameLOD.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/GameLOD.cpp
@@ -542,10 +542,6 @@ Bool GameLODManager::setStaticLODLevel(StaticGameLODLevel level)
if (level == STATIC_GAME_LOD_UNKNOWN || (level != STATIC_GAME_LOD_CUSTOM && m_currentStaticLOD == level))
return FALSE; //level is already applied. Custom levels are always applied since random options could change.
- // the first preset of a run with no quality step saved brings its column's catalog rows with it
- if (m_currentStaticLOD == STATIC_GAME_LOD_UNKNOWN)
- applyGraphicsQualityColumnAtStartup(level);
-
applyStaticLODLevel(level);
m_currentStaticLOD = level;
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
index d53d5eafc..806a4e7a6 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
@@ -1030,25 +1030,27 @@ GlobalData::GlobalData()
m_useCloudPlane = FALSE;
m_downwindAngle = ( -0.785f );//Northeast!
m_useShadowVolumes = FALSE;
- m_useShadowVolumesForSkins = TRUE; //on by default: the shipped INI has no entry for it
+ m_useShadowVolumesForSkins = FALSE; //the fork's; retail infantry wear their round decal until a box says otherwise
m_useShadowDecals = FALSE;
- m_shadowsForProjectiles = TRUE; //on by default: the shipped INI has no entry for it
+ m_shadowsForProjectiles = FALSE;
m_startAtMaxZoom = FALSE; //off, a match opens at START_CAMERA_HEIGHT (View.cpp); on, as far out as the wheel goes
m_turboMode = FALSE; //a mission runs at normal speed
- m_shadowsForProps = TRUE; //likewise: scenery with no shadow of its own gets one
- m_shadowsForParticles = TRUE; //on by default: the shipped INI has no entry for it
- m_volumetricSmokeShadows = TRUE;
- m_smokeFireLighting = TRUE;
- m_smoothMotion = TRUE;
+ m_shadowsForProps = FALSE; //on, scenery with no shadow of its own gets one
+ m_shadowsForParticles = FALSE;
+ m_volumetricSmokeShadows = FALSE;
+ m_smokeFireLighting = FALSE;
+ m_smoothMotion = FALSE; //a model stands where the last logic tick left it until the box is ticked
m_smoothMotionAnyDisplay = FALSE;
m_waterStyle = 0; // classic by default; modern water is an explicit option
m_cloudStyle = 0; // Classic by default; volumetric hazard clouds are opt-in
- m_explosionDebrisTrails = TRUE;
+ m_explosionDebrisTrails = FALSE;
m_shadowQuality = 1; //medium, the 2048 map the shadows always had
m_graphicsQuality = TheGraphicsQualityAnchors[ STATIC_GAME_LOD_HIGH ]; //a preset moves it to its own step as the menu opens
- m_classicGraphics = FALSE;
- m_lightingStyle = LIGHTING_STYLE_REFORGED;
- m_shadowMap = TRUE; //the sun's own shadows are what the game draws with now
+ // The owner's rule of 2026-10-31: the game opens in Classic with everything the fork added off, and
+ // whoever wants the Reforged picture turns it on in Options. Options.ini wins over all of this.
+ m_classicGraphics = TRUE;
+ m_lightingStyle = LIGHTING_STYLE_CLASSIC;
+ m_shadowMap = TRUE; //the sun's own shadows, once ClassicGraphics is off; parseGameDataDefinition takes them back while it is on
m_shadowMapOnly = TRUE; //and they replace the stencil volumes rather than joining them
m_shadowMapReport = FALSE;
m_shadowMapOldCasters = FALSE;
@@ -1056,7 +1058,7 @@ GlobalData::GlobalData()
m_shadowMapSkyFill = 0.0f;
m_shadowMapStrength = 0.0f;
m_shadowMapWidest = 0.0f;
- m_contactShadows = TRUE; //on by default: a building with nothing under it reads as laid on the ground
+ m_contactShadows = TRUE; //a building with nothing under it reads as laid on the ground; Classic graphics draws none (W3DModelDraw)
m_textureReductionFactor = -1;
m_enableBehindBuildingMarkers = TRUE;
m_scriptDebug = FALSE;
@@ -1333,8 +1335,8 @@ GlobalData::GlobalData()
m_showClientPhysics = TRUE;
m_showTerrainNormals = FALSE;
m_showObjectHealth = FALSE;
- // what this fork has always done, so nobody's game changes until they say so
- m_healthBarMode = HEALTH_BAR_ALWAYS;
+ // retail's: the selection and whatever is under the cursor
+ m_healthBarMode = HEALTH_BAR_SELECTION;
m_healthBarColors = 0;
// the game's own mouse unless the launcher passes -mouse reforged
m_mouseStyle = MOUSE_STYLE_CLASSIC;
@@ -1342,8 +1344,7 @@ GlobalData::GlobalData()
m_playerColorScheme = PLAYER_COLORS_ORIGINAL;
// the words the game shipped with until somebody picks a translation
m_textLanguage = TEXT_LANGUAGE_ENGLISH;
- // the lines have been on since they were added, so nobody loses them until they say so
- m_showOrderLines = TRUE;
+ m_showOrderLines = FALSE;
m_particleEdit = FALSE;
@@ -1527,10 +1528,10 @@ GlobalData::GlobalData()
m_voiceVolumeFactor = 0.5f;
// Half the effects slider's 80: birds, wind and water used to play at the battle's volume and
// covered the replies and the guns.
- m_ambientVolume = 40;
+ m_ambientVolume = 80; // retail's: ambience played at AudioSettings.ini's 80% effects volume
m_masterVolume = 100;
- m_dynamicMusic = TRUE;
- m_legacySound = FALSE;
+ m_dynamicMusic = FALSE;
+ m_legacySound = TRUE; // retail's mix; this is the one row where on is the original
m_muteInBackground = TRUE; // retail's: loseFocus on every deactivation
m_3DSoundPref = false;
@@ -1540,22 +1541,16 @@ GlobalData::GlobalData()
m_enforceMaxCameraHeight = TRUE;
//
- // The fork's own conveniences default ON. They were opt-in at first, which in practice meant
- // nobody saw them: an Options.ini that predates them simply has no such key, so every one of
- // them stayed off and the features looked like they had never been added.
- //
- // The camera rows, grid placement and snap-to-45 building rotation are still catalog rows, so
- // Options.ini (and for some the menu) can turn them off. The rest are not: they left TheOptionCatalog with the
- // controls that used to set them, and what is written here is what every game gets. GameData.ini
- // remains the way to change one, because the field table above still names it.
- //
- // The snaps are the exception: the camera's and a building's 45 degree steps, grid placement, the
- // snap to a neighbour's edge, the nudge off a blocked spot and zoom to cursor start off, ticked on
- // Options > Controls by whoever wants them.
+ // The fork's conveniences that are catalog rows start off, ticked in Options by whoever wants them,
+ // and an Options.ini line beats this. Camera shake stays on: it is EA's own, and off is the choice
+ // the fork added. Workers returning to supply, replay archiving and the placement preview below are
+ // not rows: they left TheOptionCatalog with the controls that used to set them, and what is written
+ // here is what every game gets. GameData.ini remains the way to change one, because the field table
+ // above still names it.
//
m_useCameraConstraints = TRUE;
- m_cameraBoundaryMargin = 200;
- m_edgeScrollInWindowedMode = TRUE;
+ m_cameraBoundaryMargin = 0; // retail's limit; above 0 a manual pan may pull back inside limits a scripted path widened
+ m_edgeScrollInWindowedMode = FALSE;
m_snapCameraRotateTo45 = FALSE;
m_zoomToCursor = FALSE; // the wheel zooms on the middle of the screen, as 1.04 did, until ticked
m_zoomSpeed = 100; // a notch moves the camera the 60 units it always did
@@ -1563,11 +1558,11 @@ GlobalData::GlobalData()
m_cameraShake = TRUE;
m_dragTolerance = 25; // what Mouse.ini in INIZH.big says, so nothing moves until the slider does
// a left drag with the move, attack move or guard key armed draws a formation line
- m_formationDrag = TRUE;
- m_buildWithoutWorker = TRUE;
- m_chromaLighting = TRUE; //costs nothing on a machine with no Razer server: the handshake fails once
+ m_formationDrag = FALSE;
+ m_buildWithoutWorker = FALSE;
+ m_chromaLighting = FALSE;
m_menuTransitionSpeed = 100;
- m_textureFilterMode = 2; // anisotropic; retail shipped bilinear on a 2003 fill-rate budget
+ m_textureFilterMode = 0; // bilinear, as retail shipped it; anisotropic is the option's 2
m_anisotropyLevel = 0; // whatever the card offers, capped at 16 in _Init_Filters
m_snapBuildPlacementTo45 = FALSE;
@@ -1577,16 +1572,16 @@ GlobalData::GlobalData()
m_moneyPerMinute = 0;
m_buildPlacementOpacity = PLACEMENT_SILHOUETTE_OPACITY;
m_buildPlacementShadows = TRUE;
- m_showNetBox = TRUE;
+ m_showNetBox = FALSE;
m_showEmptyBuildingPips = TRUE;
m_workersReturnToSupply = TRUE;
m_archiveReplays = TRUE;
- // Glow defaults to the options screen's Medium, 50 percent. GameData.ini sets the field as a
+ // Glow defaults to the options screen's Off. GameData.ini sets the field as a
// percentage; the options screen offers levels and stores one of those in Options.ini, and
// OptionsCatalog.cpp holds the percentage each level stands for. W3DShaderManager.cpp turns
// the percentage into the additive gain, the bloom strength and the blur width.
- m_bloomIntensity = 50;
+ m_bloomIntensity = 0;
m_animateWindows = TRUE;
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
index 2d67bf58c..17256d715 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp
@@ -150,6 +150,7 @@ OPTION_BOOL_ACCESSORS( m_weatherEffects )
OPTION_BOOL_ACCESSORS( m_waterSplashes )
OPTION_BOOL_ACCESSORS( m_atmosphere )
OPTION_BOOL_ACCESSORS( m_structureCollapse )
+OPTION_BOOL_ACCESSORS( m_smoothMotion )
OPTION_BOOL_ACCESSORS( m_internalHdr )
OPTION_INT_ACCESSORS( m_shadowQuality )
OPTION_INT_ACCESSORS( m_graphicsQuality )
@@ -368,9 +369,10 @@ const OptionDef TheOptionCatalog[] =
get_m_dynamicMusic, set_m_dynamicMusic },
// Retail's mix: no sound travel delay, air, doppler, room, occlusion, duck, limiter, battle voice
- // budget, shot folding, reply limits, zoom mix, ambience bed or music following the fight. The
- // audio manager takes it up on its next pass (MilesAudioManager::applyLegacySound), the room and
- // the bed included. Master volume, the device and the speakers stay as they are. On Options > Audio.
+ // budget, shot folding, reply limits, zoom mix, ambience bed or music following the fight. On by
+ // default, since off is what the fork added. The audio manager takes it up on its next pass
+ // (MilesAudioManager::applyLegacySound), the room and the bed included. Master volume, the device
+ // and the speakers stay as they are. On Options > Audio.
{ "LegacySound", OPT_WND( "CheckLegacySound" ), "GUI:LegacySound",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_legacySound, set_m_legacySound },
@@ -382,8 +384,7 @@ const OptionDef TheOptionCatalog[] =
get_m_muteInBackground, set_m_muteInBackground },
// With the move, attack move or guard key armed, a left drag over the ground spreads the
- // selection along the line drawn instead of sending everyone to one point. On by default, and
- // here for anyone who would rather that drag did nothing at all. On Options > Controls.
+ // selection along the line drawn instead of sending everyone to one point. On Options > Controls.
{ "FormationDrag", OPT_WND( "CheckFormationDrag" ), "GUI:FormationDrag",
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_formationDrag, set_m_formationDrag },
@@ -411,8 +412,8 @@ const OptionDef TheOptionCatalog[] =
get_m_menuTransitionSpeed, set_m_menuTransitionSpeed },
// 0 bilinear, 1 trilinear, 2 anisotropic. Retail shipped bilinear with point mip selection,
- // which is a 2003 fill-rate budget and is why distant ground used to shimmer; 2 is the default
- // here. The filter table is built when the device is made, and W3DDisplay::init is the only place
+ // which is a 2003 fill-rate budget and is why distant ground shimmers; 0 is the default, and 2 is
+ // what the presets from Medium up fill in. The filter table is built when the device is made, and W3DDisplay::init is the only place
// that hands this value to WW3D2 - a reset from the display page does not push it again - so it
// waits for the next launch. A combo box on the Graphics page; stored as the same decimal the
// hand-edited key always was.
@@ -433,7 +434,7 @@ const OptionDef TheOptionCatalog[] =
// Grid placement, snap-to-45 building rotation and the nudge left with them and came back to
// Options > Controls, above, off until ticked.
- // Glow: off, low, medium, high, ultra. Medium (50) is the default, set in GlobalData's
+ // Glow: off, low, medium, high, ultra. Off is the default, set in GlobalData's
// constructor. The key is "Bloom", not "Glow" or "BloomLevel" - it predates the levels and an
// Options.ini in the wild already spells it this way. The "What Glows" threshold row that sat
// under it is gone: a lower threshold only ever bloomed the buildings and the sand, so the
@@ -485,9 +486,11 @@ const OptionDef TheOptionCatalog[] =
get_m_cloudStyle, set_m_cloudStyle },
// Classic or Reforged. Classic is the picture the game shipped with: its own textures, EA's
- // ground tile, no normal maps, the stencil shadows and no post effects. The upscaled archives
- // are mounted before GlobalData exists, so Win32BIGFileSystem reads this key out of Options.ini
- // itself, and everything else takes it once while the device starts.
+ // ground tile, no normal maps, the stencil shadows and no post effects, and it is what a key-less
+ // file gets. The upscaled archives are mounted before GlobalData exists, so Win32BIGFileSystem
+ // reads this key out of Options.ini itself, with the same default, and everything else takes it
+ // once while the device starts. Unticking the box in the menu fills in the High preset, which is
+ // the Reforged look in one click; ticking it takes the fork's rows of the slider back to their first step.
{ "ClassicGraphics", OPT_WND( "CheckClassicGraphics" ), "GUI:ClassicGraphics",
OPTION_BOOL, APPLY_RESTART, 0, 1,
get_m_classicGraphics, set_m_classicGraphics },
@@ -545,7 +548,7 @@ const OptionDef TheOptionCatalog[] =
OPTION_ENUM, APPLY_RESTART, 0, TEXT_LANGUAGE_COUNT - 1,
get_m_textLanguage, set_m_textLanguage },
- // The Effects page. These four sat in GameData.ini with no control, all on. Each is read when the
+ // The Effects page. These four sat in GameData.ini with no control, all off. Each is read when the
// thing that casts the shadow is made (fillShadowInfoFromTemplate, promoteSkinShadowToVolume), so a
// change shows on the next map rather than on the units already standing there - except smoke
// clouds, which ask every frame.
@@ -677,6 +680,14 @@ const OptionDef TheOptionCatalog[] =
OPTION_BOOL, APPLY_LIVE, 0, 1,
get_m_structureCollapse, set_m_structureCollapse },
+ // Models drawn between their last two logic ticks on a display faster than the logic; a 60 Hz screen
+ // shows no change. Read every picture by W3DDisplay's smoothMotionBegin, and no sim reads it. The
+ // key is the one the launcher offered once; a line it left behind is the player's choice.
+ // -nosmoothmotion and -smoothmotion beat it for a run. On Options > Display, under Picture.
+ { "SmoothMotion", OPT_WND( "CheckSmoothMotion" ), "GUI:SmoothMotion",
+ OPTION_BOOL, APPLY_LIVE, 0, 1,
+ 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.
@@ -719,7 +730,9 @@ const Int TheOptionCatalogCount = (sizeof( TheOptionCatalog ) / sizeof( TheOptio
// The Performance / Quality slider, described in OptionsCatalog.h.
//
// Rows run from the cheapest setting to the dearest, and a row's values climb from step 0 to step
-// 10: the column a row first rises in is where the slider starts paying for it. costMs is the one
+// 10: the column a row first rises in is where the slider starts paying for it. A column is what the
+// menu fills in, and saves: a preset named in Options.ini or picked for a first run sets only the
+// GameLOD fields (applyGraphicsQualityStep), so a row with no line stays at GlobalData's off. costMs is the one
// place the price is written down: Direct3D 11 GPU milliseconds a frame saved by turning that one
// setting from its best to its cheapest with everything else at its best, in a 900 unit four-army
// fight at 1920x1080 on a GeForce RTX 2060 (2026-10-25). Anything under the 0.15 ms the baselines
@@ -875,17 +888,6 @@ AsciiString formatOptionValue( const OptionDef& def, Int value )
}
//-----------------------------------------------------------------------------
-// A detail preset is its column on the quality slider, catalog rows included. An Options.ini with
-// no GraphicsQuality never had the slider save its rows, so they start from the preset's column;
-// the keys the file does carry and the switches still win, the keys by being read after it and the
-// switches by being parsed later.
-//-----------------------------------------------------------------------------
-enum { OPTION_CATALOG_ROWS = sizeof( TheOptionCatalog ) / sizeof( TheOptionCatalog[ 0 ] ) };
-
-static Bool TheGraphicsQualityColumnWanted = FALSE; ///< the loaded Options.ini held no GraphicsQuality
-static Bool TheOptionNamedInFile[ OPTION_CATALOG_ROWS ]; ///< the row's key was in it
-static Int TheOptionValueAsLoaded[ OPTION_CATALOG_ROWS ]; ///< what the load left, before any switch
-
/** The catalog row a quality table row sets, or -1 for a GameLOD field, which the preset sets itself. */
static Int graphicsQualityOptionIndex( const GraphicsQualityRow &row )
{
@@ -904,67 +906,38 @@ static Int graphicsQualityOptionIndex( const GraphicsQualityRow &row )
return -1;
}
-/** Put a quality table value in a catalog row: the table holds a combo box's entry, the catalog its value. */
-static void setGraphicsQualityOption( Int option, Int value )
+//-----------------------------------------------------------------------------
+Bool graphicsQualityRowIsReforged( const GraphicsQualityRow &row )
{
- const OptionDef &def = TheOptionCatalog[ option ];
- def.set( def.kind == OPTION_ENUM ? def.lo + value : value );
+ return graphicsQualityOptionIndex( row ) >= 0 && strcmp( row.control, "CheckCloudShadows" ) != 0;
}
//-----------------------------------------------------------------------------
void loadOptionsFromPreferences( UserPreferences& pref )
{
- TheGraphicsQualityColumnWanted = pref.find( "GraphicsQuality" ) == pref.end();
- UserPreferences::const_iterator detail = pref.find( "StaticGameLOD" );
- if( TheGraphicsQualityColumnWanted && detail != pref.end() )
- {
- const Int level = GameLODManager::getStaticGameLODIndex( detail->second );
- if( level >= STATIC_GAME_LOD_LOW && level <= STATIC_GAME_LOD_ULTRA )
- {
- for( Int row = 0; row < TheGraphicsQualityTableCount; ++row )
- {
- const Int option = graphicsQualityOptionIndex( TheGraphicsQualityTable[ row ] );
- if( option >= 0 )
- setGraphicsQualityOption( option, TheGraphicsQualityTable[ row ].values[ TheGraphicsQualityAnchors[ level ] ] );
- }
- }
- }
-
for( Int i = 0; i < TheOptionCatalogCount; ++i )
{
const OptionDef& def = TheOptionCatalog[ i ];
UserPreferences::const_iterator it = pref.find( AsciiString( def.iniKey ) );
- TheOptionNamedInFile[ i ] = it != pref.end();
if( it == pref.end() )
continue; // no key, so keep whatever GameData.ini's default put in GlobalData
def.set( parseOptionValue( def, it->second ) );
}
-
- for( Int i = 0; i < TheOptionCatalogCount; ++i )
- TheOptionValueAsLoaded[ i ] = TheOptionCatalog[ i ].get();
}
//-----------------------------------------------------------------------------
-void applyGraphicsQualityColumnAtStartup( Int staticGameLODLevel )
+void logOptionCatalog( void )
{
- if( !TheGraphicsQualityColumnWanted )
- return;
-
- TheGraphicsQualityColumnWanted = FALSE;
- if( staticGameLODLevel < STATIC_GAME_LOD_LOW || staticGameLODLevel > STATIC_GAME_LOD_ULTRA )
- return;
-
- for( Int row = 0; row < TheGraphicsQualityTableCount; ++row )
+ AsciiString line;
+ for( Int i = 0; i < TheOptionCatalogCount; ++i )
{
- const Int option = graphicsQualityOptionIndex( TheGraphicsQualityTable[ row ] );
- // the file's own key, or a value a switch or ClassicGraphics put there after the load
- if( option < 0 || TheOptionNamedInFile[ option ] || TheOptionCatalog[ option ].get() != TheOptionValueAsLoaded[ option ] )
- continue;
-
- setGraphicsQualityOption( option, TheGraphicsQualityTable[ row ].values[ TheGraphicsQualityAnchors[ staticGameLODLevel ] ] );
+ AsciiString entry;
+ entry.format( " %s=%d", TheOptionCatalog[ i ].iniKey, TheOptionCatalog[ i ].get() );
+ line.concat( entry );
}
+ DEBUG_LOG(( "OPTIONS%s\n", line.str() ));
}
//-----------------------------------------------------------------------------
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 ce5ad614c..88741c515 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp
@@ -41,6 +41,7 @@
#include "Common/UserPreferences.h"
#include "Common/GameLOD.h"
#include "Common/Monitors.h"
+#include "Common/EarlyOptions.h"
#include "Common/OptionsCatalog.h"
#include "Common/Registry.h"
#include "Common/version.h"
@@ -1180,6 +1181,19 @@ static void fillCatalogWidgets( void )
break;
}
}
+
+ // the choice for the next start, which is the file's: GlobalData holds what this run started with
+ const Bool classicNextStart = getEarlyOptionBool( "ClassicGraphics", true );
+ GadgetCheckBoxSetChecked( findOptionWidget( *findOptionDef( "ClassicGraphics" ) ), classicNextStart );
+
+ // A Classic run holds these two forced in memory, and a Reforged next start reads them from the
+ // file. Shown as forced they read Custom beside the High the player just saved, and Accept saves that.
+ if( TheGlobalData->m_classicGraphics && !classicNextStart )
+ {
+ GadgetComboBoxSetSelectedPos( findOptionWidget( *findOptionDef( "LightingStyle" ) ),
+ getEarlyOptionInt( "LightingStyle", LIGHTING_STYLE_CLASSIC, LIGHTING_STYLE_CLASSIC, LIGHTING_STYLE_REFORGED ) );
+ GadgetCheckBoxSetChecked( findOptionWidget( *findOptionDef( "VolumetricSmokeShadows" ) ), getEarlyOptionBool( "VolumetricSmokeShadows", false ) );
+ }
}
//-------------------------------------------------------------------------------------------------
@@ -1228,6 +1242,15 @@ static void readCatalogWidgets( OptionPreferences &out )
break;
}
+ // Only the file moves. This run keeps the archives, the tile and the shadow pass it started with,
+ // and everything that asks GlobalData has to go on agreeing with them until the next start.
+ if( strcmp( def.iniKey, "ClassicGraphics" ) == 0 )
+ {
+ if( ( value != 0 ) != getEarlyOptionBool( def.iniKey, true ) )
+ out[ AsciiString( def.iniKey ) ] = formatOptionValue( def, value );
+ continue;
+ }
+
if( value == def.get() )
continue;
@@ -1237,6 +1260,13 @@ static void readCatalogWidgets( OptionPreferences &out )
def.set( value );
out[ AsciiString( def.iniKey ) ] = formatOptionValue( def, value );
}
+
+ // saved for the next start, and still forced in this Classic run (GlobalData::parseGameDataDefinition)
+ if( TheGlobalData->m_classicGraphics )
+ {
+ TheWritableGlobalData->m_lightingStyle = LIGHTING_STYLE_CLASSIC;
+ TheWritableGlobalData->m_volumetricSmokeShadows = FALSE;
+ }
}
static const Color MENU_ENTRY_COLOR = GameMakeColor( 255, 255, 255, 255 );
@@ -2234,17 +2264,22 @@ static Bool isGraphicsQualityControl( const GameWindow *control )
return FALSE;
}
+static GameWindow *classicGraphicsCheckBox( void )
+{
+ return findOptionWidget( *findOptionDef( "ClassicGraphics" ) );
+}
+
/** The row's control when the quality slider sets it, otherwise NULL. It leaves a control the player
- * cannot change - greyed in a match or under Direct3D 9, hidden where the device lacks it - and the
- * two ClassicGraphics forces, whose forced value Accept would otherwise save over the player's own. */
+ * cannot change - greyed in a match or under Direct3D 9, hidden where the device lacks it - and,
+ * while Classic Graphics is ticked, every row the fork added: under it a preset is EA's detail
+ * settings alone, so the box can read High with the Reforged boxes off, which is what a first run is. */
static GameWindow *graphicsQualityDrivenWidget( const GraphicsQualityRow &row )
{
GameWindow *control = graphicsQualityWidget( row );
if( control->winIsHidden() || !control->winGetEnabled() )
return NULL;
- if( TheGlobalData->m_classicGraphics
- && ( strcmp( row.control, "ComboBoxLightingStyle" ) == 0 || strcmp( row.control, "CheckVolumetricSmoke" ) == 0 ) )
+ if( GadgetCheckBoxIsChecked( classicGraphicsCheckBox() ) && graphicsQualityRowIsReforged( row ) )
return NULL;
return control;
@@ -2372,6 +2407,17 @@ static void updateSliderReadouts( void )
static void updateDetailNote( void );
+/** One quality table value in its control. */
+static void setGraphicsQualityControl( GameWindow *control, Int value )
+{
+ if( BitTest( control->winGetStyle(), GWS_CHECK_BOX ) )
+ GadgetCheckBoxSetChecked( control, value != 0 );
+ else if( BitTest( control->winGetStyle(), GWS_COMBO_BOX ) )
+ GadgetComboBoxSetSelectedPos( control, value );
+ else
+ GadgetSliderSetPosition( control, value );
+}
+
/** Put one step of the quality slider in every control TheGraphicsQualityTable names, and the detail
* box on the preset that step is, or on Custom between two of them. A control the slider leaves
* (graphicsQualityDrivenWidget) keeps what it shows, and so Accept leaves its setting alone. */
@@ -2381,16 +2427,8 @@ static void showGraphicsQualityStep( Int step )
for( Int row = 0; row < TheGraphicsQualityTableCount; ++row )
{
GameWindow *control = graphicsQualityDrivenWidget( TheGraphicsQualityTable[ row ] );
- if( control == NULL )
- continue;
-
- const Int value = TheGraphicsQualityTable[ row ].values[ step ];
- if( BitTest( control->winGetStyle(), GWS_CHECK_BOX ) )
- GadgetCheckBoxSetChecked( control, value != 0 );
- else if( BitTest( control->winGetStyle(), GWS_COMBO_BOX ) )
- GadgetComboBoxSetSelectedPos( control, value );
- else
- GadgetSliderSetPosition( control, value );
+ if( control != NULL )
+ setGraphicsQualityControl( control, TheGraphicsQualityTable[ row ].values[ step ] );
}
// trees are no step's: a preset gives them whenever the memory test passed, as applyStaticLODLevel does
if( detailIndexAtStep( step ) != CUSTOMDETAIL && checkProps->winGetEnabled() )
@@ -2416,6 +2454,31 @@ static void showDetailPreset( Int index )
showGraphicsQualityStep( step );
}
+/** The Classic Graphics box clicked, outside a match. Unticked, the page shows the High preset, which
+ * is the Reforged picture in one click, and Accept saves it. Ticked, the fork's rows go back to the
+ * slider's first step, where every one of them is off, so no glow or filter stays behind under Classic. */
+static void showClassicGraphicsChoice( void )
+{
+ if( !comboBoxDetail->winGetEnabled() )
+ return;
+
+ if( !GadgetCheckBoxIsChecked( classicGraphicsCheckBox() ) )
+ {
+ showDetailPreset( HIGHDETAIL );
+ return;
+ }
+
+ ignoreSelected = TRUE;
+ for( Int row = 0; row < TheGraphicsQualityTableCount; ++row )
+ {
+ GameWindow *control = graphicsQualityWidget( TheGraphicsQualityTable[ row ] );
+ if( graphicsQualityRowIsReforged( TheGraphicsQualityTable[ row ] ) && !control->winIsHidden() && control->winGetEnabled() )
+ setGraphicsQualityControl( control, TheGraphicsQualityTable[ row ].values[ 0 ] );
+ }
+ ignoreSelected = FALSE;
+ updateSliderReadouts();
+}
+
/** The grey line under the detail box: what the picked preset turns on, and that picking one only
* fills in the boxes until Accept. GUI:DetailNote0..4 follow the box's own order, Ultra to Custom. */
static void updateDetailNote( void )
@@ -3275,6 +3338,10 @@ WindowMsgHandledType OptionsMenuSystem( GameWindow *window, UnsignedInt msg,
setDefaults();
updateSliderReadouts();
}
+ else if( control == classicGraphicsCheckBox() )
+ {
+ showClassicGraphicsChoice();
+ }
else if( isGraphicsDetailControl( control ) || isGraphicsQualityControl( control ) )
{
markDetailCustom();
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp
index bbbee4e28..87768fce5 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp
@@ -2155,7 +2155,7 @@ void W3DModelDraw::allocateContactShadow(void)
// shadow and a contact patch would follow it around looking like a stain.
const ThingTemplate *tmplate = getDrawable() ? getDrawable()->getTemplate() : NULL;
if (m_contactShadow != NULL || m_renderObject == NULL || tmplate == NULL
- || TheW3DShadowManager == NULL || !TheGlobalData->m_contactShadows
+ || TheW3DShadowManager == NULL || !TheGlobalData->m_contactShadows || TheGlobalData->m_classicGraphics
|| !tmplate->isKindOf( KINDOF_STRUCTURE ))
return;
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
index 38ac4068a..3d441e2e4 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
@@ -1300,6 +1300,16 @@ void W3DDisplay::init( void )
}
}
+ // the setup this run draws: every option as it stands now the preset is in, and what ClassicGraphics took back
+ logOptionCatalog();
+ DEBUG_LOG(("OPTIONS in force: detail %s reduction %d particles %d volumes %d decals %d lightmap %d softwater %d scaffolds %d sway %d heat %d dynamicLOD %d trees %d; shadow map %d post chain '%s' smooth motion %d\n",
+ TheGameLODManager->getStaticGameLODLevelName(TheGameLODManager->getStaticLODLevel()),
+ TheGlobalData->m_textureReductionFactor, TheGlobalData->m_maxParticleCount,
+ (Int)TheGlobalData->m_useShadowVolumes, (Int)TheGlobalData->m_useShadowDecals,
+ (Int)TheGlobalData->m_useLightMap, (Int)TheGlobalData->m_showSoftWaterEdge, (Int)!TheGlobalData->m_useDrawModuleLOD,
+ (Int)TheGlobalData->m_useTreeSway, (Int)TheGlobalData->m_useHeatEffects, (Int)TheGlobalData->m_enableDynamicLOD, (Int)TheGlobalData->m_useTrees,
+ (Int)TheGlobalData->m_shadowMap, TheGlobalData->m_direct3D11PostChain.str(), (Int)TheGlobalData->m_smoothMotion));
+
if (TheGlobalData->m_displayGamma != 1.0f)
setGamma(TheGlobalData->m_displayGamma,0.0f,1.0f,FALSE);
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
index a8dbd009b..197788208 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
@@ -1105,7 +1105,7 @@ void RTS3DScene::Flush(RenderInfoClass & rinfo)
// The Ambient Occlusion option goes on under the water and every translucent draw, none of which
// writes depth: the water takes no corner's shade from its bed and only the bed's shows through it.
- if (TheGlobalData->m_ambientOcclusion && m_customPassMode == SCENE_PASS_DEFAULT && Get_Extra_Pass_Polygon_Mode() == EXTRA_PASS_DISABLE)
+ if (TheGlobalData->m_ambientOcclusion && !TheGlobalData->m_classicGraphics && m_customPassMode == SCENE_PASS_DEFAULT && Get_Extra_Pass_Polygon_Mode() == EXTRA_PASS_DISABLE)
Direct3D11_Ambient_Occlusion();
WW3D::Render_And_Clear_Static_Sort_Lists(rinfo); //draws things like water
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
index 532701561..c4ba01041 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp
@@ -148,7 +148,7 @@ void Win32BIGFileSystem::init() {
return;
}
- theClassicGraphics = getEarlyOptionBool("ClassicGraphics", false);
+ theClassicGraphics = getEarlyOptionBool("ClassicGraphics", true);
//
// The exe's own directory and no further down. This used to walk every subdirectory under it,
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index b909def41..701ace3f7 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -6766,7 +6766,7 @@ TEST(particlesys_debris_trails_option_destroys_only_marked_systems)
GlobalData *savedData = TheWritableGlobalData;
TheWritableGlobalData = NEW GlobalData;
- CHECK( TheGlobalData->m_explosionDebrisTrails );
+ CHECK( !TheGlobalData->m_explosionDebrisTrails );
UserPreferences pref;
TheWritableGlobalData->m_explosionDebrisTrails = FALSE;
@@ -6810,7 +6810,7 @@ TEST(particlesys_debris_trails_option_destroys_only_marked_systems)
/* BuildWithoutWorker, on by default, is a live bool row with a check box on Options > Controls,
and it round-trips through Options.ini. */
-TEST(options_build_without_worker_row_defaults_on_and_round_trips)
+TEST(options_build_without_worker_row_defaults_off_and_round_trips)
{
const OptionDef *def = findOptionDef( "BuildWithoutWorker" );
CHECK( def != NULL );
@@ -6820,8 +6820,8 @@ TEST(options_build_without_worker_row_defaults_on_and_round_trips)
GlobalData *savedData = TheWritableGlobalData;
TheWritableGlobalData = NEW GlobalData;
- CHECK( TheGlobalData->m_buildWithoutWorker );
- CHECK_EQ( def->get(), 1 );
+ CHECK( !TheGlobalData->m_buildWithoutWorker );
+ CHECK_EQ( def->get(), 0 );
UserPreferences pref;
TheWritableGlobalData->m_buildWithoutWorker = FALSE;
@@ -9563,7 +9563,7 @@ TEST(health_bar_mode_round_trips_through_options_ini)
GlobalData *saved = TheWritableGlobalData;
TheWritableGlobalData = NEW GlobalData;
- CHECK_EQ( TheGlobalData->m_healthBarMode, (Int)HEALTH_BAR_ALWAYS );
+ CHECK_EQ( TheGlobalData->m_healthBarMode, (Int)HEALTH_BAR_SELECTION );
TheWritableGlobalData->m_healthBarMode = HEALTH_BAR_SMART;
@@ -16621,7 +16621,7 @@ TEST(gameplay_conveniences_are_forced_on_and_left_the_catalog)
CHECK( bars != NULL );
CHECK( bars->widgetName != NULL && bars->widgetName[ 0 ] != '\0' );
- /* The two mouse habits are Controls check boxes again, on by default. */
+ /* The two mouse habits are Controls check boxes again, off by default. */
static const char *const habits[] =
{
"FormationDrag", "EdgeScrollInWindowedMode", NULL
@@ -16631,7 +16631,7 @@ TEST(gameplay_conveniences_are_forced_on_and_left_the_catalog)
const OptionDef *def = findOptionDef( habits[ i ] );
CHECK( def != NULL );
CHECK( def->widgetName != NULL && def->widgetName[ 0 ] != '\0' );
- CHECK_EQ( def->get(), 1 );
+ CHECK_EQ( def->get(), 0 );
}
/* The snaps, grid placement and the opening zoom are Controls check boxes, off by default, under
@@ -16700,10 +16700,10 @@ TEST(an_options_ini_naming_the_removed_input_scheme_and_wasd_keys_still_loads)
TheWritableGlobalData = saved;
}
-TEST(order_lines_are_a_live_check_box_that_starts_on)
+TEST(order_lines_are_a_live_check_box_that_starts_off)
{
/* The lines are rebuilt from the units every frame, so the box takes effect at Accept, and a player
- who never opens the menu keeps the lines the game has drawn since they were added. */
+ who never opens the menu sees no line, as retail drew none. */
const OptionDef *def = findOptionDef( "OrderLines" );
CHECK( def != NULL );
if( def == NULL )
@@ -16716,10 +16716,10 @@ TEST(order_lines_are_a_live_check_box_that_starts_on)
GlobalData *scratch = NEW GlobalData;
TheWritableGlobalData = scratch;
- CHECK( scratch->m_showOrderLines );
- def->set( 0 );
CHECK( !scratch->m_showOrderLines );
- CHECK_EQ( def->get(), 0 );
+ def->set( 1 );
+ CHECK( scratch->m_showOrderLines );
+ CHECK_EQ( def->get(), 1 );
delete scratch; // while it is the current one: a Debug build's ~GlobalData reads TheWritableGlobalData
TheWritableGlobalData = saved;
@@ -16912,7 +16912,7 @@ TEST(bloom_levels_carry_the_percentages_the_shader_reads)
// what GlobalData's constructor put there, before anything below scribbles on it
const Int shippedIntensity = TheGlobalData->m_bloomIntensity;
- CHECK_EQ( bloom->get(), 2 ); // a fresh install starts on Medium, not Off
+ CHECK_EQ( bloom->get(), 0 ); // a fresh install starts on Off, the Classic picture
// off is off, and nothing else is: a level that mapped to 0 would be a silent second Off entry
bloom->set( 0 );
@@ -17008,7 +17008,7 @@ TEST(vsync_is_off_until_the_player_asks)
TheWritableGlobalData = saved;
}
-TEST(texture_filter_defaults_to_anisotropic)
+TEST(texture_filter_defaults_to_bilinear)
{
const OptionDef *filter = findOptionDef( "TextureFilter" );
CHECK( filter != NULL );
@@ -17028,8 +17028,8 @@ TEST(texture_filter_defaults_to_anisotropic)
GlobalData *scratch = NEW GlobalData;
TheWritableGlobalData = scratch;
- // 2 is anisotropic. 0 anisotropy is "whatever the card offers", not a downgrade to off.
- CHECK_EQ( scratch->m_textureFilterMode, 2 );
+ // 0 is retail's bilinear. 0 anisotropy is "whatever the card offers", read once the filter is 2.
+ CHECK_EQ( scratch->m_textureFilterMode, 0 );
CHECK_EQ( scratch->m_anisotropyLevel, 0 );
CHECK_EQ( scratch->m_vsync, FALSE );
@@ -17074,7 +17074,7 @@ TEST(start_zoom_and_drag_threshold_are_rows_that_change_nothing_until_asked)
/* The corner box is the player's to switch off, under a key of its own. ShowHudOverlay left the
catalog with a "no" still sitting in old Options.ini files, and a row under that name would
read it back and take the box away from people who never asked. */
-TEST(net_box_is_a_check_box_that_starts_on_under_its_own_key)
+TEST(net_box_is_a_check_box_that_starts_off_under_its_own_key)
{
const OptionDef *def = findOptionDef( "ShowNetBox" );
CHECK( def != NULL );
@@ -17089,9 +17089,9 @@ TEST(net_box_is_a_check_box_that_starts_on_under_its_own_key)
GlobalData *scratch = NEW GlobalData;
TheWritableGlobalData = scratch;
- CHECK( scratch->m_showNetBox );
- def->set( 0 );
CHECK( !scratch->m_showNetBox );
+ def->set( 1 );
+ CHECK( scratch->m_showNetBox );
TheWritableGlobalData = saved;
delete scratch;
@@ -17282,43 +17282,67 @@ TEST(graphics_quality_slider_only_ever_turns_settings_up)
/* A preset is its column at startup, catalog rows included, while Options.ini has no quality step:
the file's own keys win over the column, a file the slider has saved is left alone, and with no
preset named the first preset applied fills only the rows nothing set after the load. */
-TEST(a_preset_brings_its_column_until_the_slider_has_saved_a_step)
+/* A preset named in Options.ini is EA's detail settings. A row the fork added comes on only from a
+ line of its own, which the menu writes when it shows the preset and the player accepts. */
+TEST(a_preset_in_the_file_turns_on_no_row_without_a_line)
{
GlobalData *saved = TheWritableGlobalData;
TheWritableGlobalData = NEW GlobalData;
- CHECK( !TheGlobalData->m_teamGlow );
UserPreferences pref;
pref[ AsciiString( "StaticGameLOD" ) ] = AsciiString( "Ultra" );
- pref[ AsciiString( "MapLight" ) ] = AsciiString( "no" );
- loadOptionsFromPreferences( pref );
- CHECK( TheGlobalData->m_teamGlow );
- CHECK( !TheGlobalData->m_mapLight );
- CHECK_EQ( findOptionDef( "Smoke" )->get(), 1 );
-
- TheWritableGlobalData->m_teamGlow = FALSE;
- pref[ AsciiString( "GraphicsQuality" ) ] = AsciiString( "4" );
+ pref[ AsciiString( "MapLight" ) ] = AsciiString( "yes" );
loadOptionsFromPreferences( pref );
CHECK( !TheGlobalData->m_teamGlow );
- applyGraphicsQualityColumnAtStartup( STATIC_GAME_LOD_ULTRA );
- CHECK( !TheGlobalData->m_teamGlow );
+ CHECK( !TheGlobalData->m_waterFoam );
+ CHECK_EQ( findOptionDef( "Smoke" )->get(), 0 );
+ CHECK_EQ( findOptionDef( "MSAA" )->get(), 0 );
+ CHECK( TheGlobalData->m_mapLight );
- UserPreferences none;
- loadOptionsFromPreferences( none );
- CHECK( !TheGlobalData->m_teamGlow );
- TheWritableGlobalData->m_lightingStyle = LIGHTING_STYLE_CLASSIC; // a switch after the load
- applyGraphicsQualityColumnAtStartup( STATIC_GAME_LOD_MEDIUM );
- CHECK( TheGlobalData->m_teamGlow );
- CHECK_EQ( TheGlobalData->m_lightingStyle, (Int)LIGHTING_STYLE_CLASSIC );
- // once only
- TheWritableGlobalData->m_teamGlow = FALSE;
- applyGraphicsQualityColumnAtStartup( STATIC_GAME_LOD_MEDIUM );
- CHECK( !TheGlobalData->m_teamGlow );
+ delete TheWritableGlobalData;
+ TheWritableGlobalData = saved;
+}
+
+/* The owner's rule of 2026-10-31: no Options.ini is the Classic game with everything the fork added
+ off. These rows are the ones whose first run value differs from an on/off reading of the name:
+ LegacySound's on is retail, and the volumes and levels sit at retail's number. */
+TEST(no_options_file_is_the_classic_game_with_every_added_row_off)
+{
+ GlobalData *saved = TheWritableGlobalData;
+ TheWritableGlobalData = NEW GlobalData;
+
+ static const char *const off[] =
+ {
+ "CameraBoundaryMargin", "EdgeScrollInWindowedMode", "CameraSnapTo45", "BuildGrid", "BuildSnapTo45",
+ "BuildSnapToNeighbour", "BuildNudge", "WheelZoomToCursor", "IsometricCamera", "OpenAtMaxZoom", "TurboMode",
+ "DynamicMusic", "FormationDrag", "BuildWithoutWorker", "ChromaLighting", "TextureFilter", "Bloom", "MSAA",
+ "VSync", "WaterStyle", "CloudStyle", "LightingStyle", "OrderLines", "ShowNetBox", "UseShadowVolumesForSkins",
+ "ShadowsForProjectiles", "ShadowsForProps", "ShadowsForParticles", "VolumetricSmokeShadows", "SmokeFireLighting",
+ "DebrisTrails", "MapLight", "TeamGlow", "WaterFoam", "GroundMarks", "Firelight", "HemiAmbient", "AmbientOcclusion",
+ "Weather", "WaterSplashes", "Atmosphere", "StructureCollapse", "SmoothMotion", "InternalHdr", "Smoke", "ParticleBounce",
+ NULL
+ };
+ for( Int i = 0; off[ i ] != NULL; ++i )
+ CHECK_EQ( findOptionDef( off[ i ] )->get(), 0 );
+
+ CHECK_EQ( findOptionDef( "ClassicGraphics" )->get(), 1 );
+ CHECK_EQ( findOptionDef( "LegacySound" )->get(), 1 );
+ CHECK_EQ( findOptionDef( "HealthBars" )->get(), (Int)HEALTH_BAR_SELECTION );
+ CHECK_EQ( findOptionDef( "AmbientVolume" )->get(), 80 );
delete TheWritableGlobalData;
TheWritableGlobalData = saved;
}
+/* While Classic Graphics is ticked the slider moves EA's rows alone, and the menu reads this to say which. */
+TEST(the_quality_table_knows_the_forks_rows_from_eas)
+{
+ CHECK( graphicsQualityRowIsReforged( *findGraphicsQualityRow( "CheckTeamGlow" ) ) );
+ CHECK( graphicsQualityRowIsReforged( *findGraphicsQualityRow( "ComboBoxBloom" ) ) );
+ CHECK( !graphicsQualityRowIsReforged( *findGraphicsQualityRow( "Check3DShadows" ) ) );
+ CHECK( !graphicsQualityRowIsReforged( *findGraphicsQualityRow( "CheckCloudShadows" ) ) );
+}
+
/* The particle ring has no control on the options pages, so a Custom mix between two presets takes
it from the preset at or below the slider's step. */
TEST(custom_detail_takes_the_particle_ring_of_the_preset_below_the_slider)
@@ -17354,12 +17378,12 @@ TEST(effects_page_rows_reach_the_fields_the_command_line_switches_set)
const OptionDef *def = findOptionDef( shadows[ i ] );
CHECK( def != NULL );
CHECK_EQ( (Int)def->kind, (Int)OPTION_BOOL );
- // on until the player says otherwise, as GameData.ini had them
- CHECK_EQ( def->get(), 1 );
- def->set( 0 );
+ // off until the player says otherwise; EA's shadows are the detail preset's
CHECK_EQ( def->get(), 0 );
+ def->set( 1 );
+ CHECK_EQ( def->get(), 1 );
}
- CHECK_EQ( (Int)scratch->m_shadowsForProps, 0 );
+ CHECK_EQ( (Int)scratch->m_shadowsForProps, 1 );
const OptionDef *smoke = findOptionDef( "Smoke" );
CHECK( smoke != NULL );
@@ -18316,9 +18340,9 @@ TEST(build_placement_preview_defaults_are_the_ones_the_game_always_used)
// and the income trickle is off unless somebody asks for it
CHECK_EQ( scratch->m_moneyPerMinute, 0 );
- // a left drag with the move, attack move or guard key armed draws a formation line; that is on
- // unless somebody turns it off
- CHECK( scratch->m_formationDrag );
+ // a left drag with the move, attack move or guard key armed draws a formation line once somebody
+ // turns that on
+ CHECK( !scratch->m_formationDrag );
delete scratch; // while it is the current one: a Debug build's ~GlobalData reads TheWritableGlobalData
TheWritableGlobalData = saved;
@@ -19616,14 +19640,14 @@ TEST(camera_scroll_clocks_are_independent_and_handle_timer_wrap)
CHECK_NEAR(second.sample(9000, 33), 3.0f, 0.00001f);
}
-TEST(camera_preferences_default_to_a_finite_map_margin)
+TEST(camera_preferences_default_to_retails_map_limit)
{
CHECK(bootOnce());
GlobalData *saved = TheWritableGlobalData;
GlobalData *scratch = NEW GlobalData;
TheWritableGlobalData = scratch;
CHECK(scratch->m_useCameraConstraints);
- CHECK_EQ(scratch->m_cameraBoundaryMargin, 200);
+ CHECK_EQ(scratch->m_cameraBoundaryMargin, 0);
// -noViewLimit is the only way off, EA's switch; Options.ini has no row for it
CHECK(findOptionDef("UseCameraConstraints") == NULL);
delete scratch; // while it is the current one: a Debug build's ~GlobalData reads TheWritableGlobalData
diff --git a/GeneralsMD/Code/Tools/optionsmenu_layout.py b/GeneralsMD/Code/Tools/optionsmenu_layout.py
index a571350be..25f3b0dde 100644
--- a/GeneralsMD/Code/Tools/optionsmenu_layout.py
+++ b/GeneralsMD/Code/Tools/optionsmenu_layout.py
@@ -247,6 +247,7 @@ NEW_CONTROLS = [
(CHECK, "CheckWaterSplashes", "GUI:WaterSplashes"),
(CHECK, "CheckAtmosphere", "GUI:Atmosphere"),
(CHECK, "CheckStructureCollapse", "GUI:StructureCollapse"),
+ (CHECK, "CheckSmoothMotion", "GUI:SmoothMotion"),
(LABEL, "LabelGraphicsQuality", "GUI:GraphicsQuality"),
(SLIDER, "SliderGraphicsQuality", None),
]
@@ -353,7 +354,8 @@ GROUP_LAYOUT = [
("GUI:OptionsGroupPicture", [
setting("GammaLabel", "SliderGamma", "ValueGamma"),
# every column of Graphics and Effects is full
- ("check", "CheckStructureCollapse")])]),
+ ("check", "CheckStructureCollapse"),
+ ("check", "CheckSmoothMotion")])]),
("PageGraphics", [
# the particle limit went to Effects' Particles group to make room for the quality slider
diff --git a/GeneralsMD/Code/Tools/packaging-resolution-check.sh b/GeneralsMD/Code/Tools/packaging-resolution-check.sh
index 46d46251c..ed59cf73a 100755
--- a/GeneralsMD/Code/Tools/packaging-resolution-check.sh
+++ b/GeneralsMD/Code/Tools/packaging-resolution-check.sh
@@ -109,6 +109,8 @@ lay_over() { # lay_over <overlay> <farm>: the overlay's entries into the farm, e
dump() { # dump <name> <root> <out> <switches...>
local name="$1" root="$2" out="$3"; shift 3
mkdir -p "$WORK/user_$name"
+ # the Reforged archives are what this checks the order of, and a first run leaves them out
+ echo "ClassicGraphics = no" > "$WORK/user_$name/Options.ini"
( cd "$root" && ZH_USER_DATA_DIR="$WORK/user_$name" "$GENERALS" -headless -root "$root" "$@" -quickstart -noshellmap \
-multiInstance -logPrefix "$TAG$name" -dumpFileResolution "$out" \
> "$WORK/$name.out" 2> "$WORK/$name.err" )
diff --git a/GeneralsMD/Code/Tools/record-dx11-shaders.ps1 b/GeneralsMD/Code/Tools/record-dx11-shaders.ps1
index b16c50c8a..22267bece 100644
--- a/GeneralsMD/Code/Tools/record-dx11-shaders.ps1
+++ b/GeneralsMD/Code/Tools/record-dx11-shaders.ps1
@@ -25,7 +25,9 @@
programs recorded here are never compiled on a player's machine.
This plays AI-against-AI skirmishes with the picture drawn by Direct3D 11, on a Windows machine whose
- d3dcompiler_47 is Microsoft's. It does so at the default post chain and with it off, on a few seeds,
+ d3dcompiler_47 is Microsoft's. Each run names its setup in a user data folder of this script's own:
+ reforged-look.ini as Options.ini for the Reforged picture, none for a run marked Classic, which is what a
+ first start draws. It does so at the default post chain and with it off, on a few seeds,
plus the two scenarios that stage the per-object looks, plus the shell map. It starts each run from an empty cache: the player's cache is moved aside and put
back afterwards, and the farm's shipped file is unlinked. What the runs compiled is then the shipped
file. The bytecode is exactly what run-time D3DCompile gives on this machine, because it is that output.
@@ -50,9 +52,9 @@ param(
[string] $RunDir = (Join-Path $PSScriptRoot "..\..\Run"),
# where the recording goes (default: Data\dx11shaders.shipped)
[string] $Out = "",
- # the game's user data folder, where the backend keeps the player's cache
- [string] $UserData = (Join-Path ([Environment]::GetFolderPath('MyDocuments')) "Command and Conquer Generals Zero Hour Data"),
[string] $WorkDir = (Join-Path $env:TEMP "zh-record-dx11-shaders"),
+ # the game's user data folder, where the backend keeps the cache this reads back
+ [string] $UserData = (Join-Path $env:TEMP "zh-record-dx11-shaders-userdata"),
[int[]] $Seeds = @(0, 1, 2),
# named skirmish maps played the same way, for the lighting the random maps do not have (night, snow)
[string[]] $Maps = @(),
@@ -112,12 +114,22 @@ foreach ($look in @(
# The main menu's shell map, the first thing a player sees: the intro movies, then the menu, which runs until
# it is killed. The cache is written while the game runs, so the kill loses nothing.
$runs += , @{ Name = "shellmap"; Args = @("-multiInstance", "-noFPSLimit"); Minutes = 5 }
+# What a first start draws: the Classic game, no Options.ini, on the menu and in a match.
+$runs += , @{ Name = "shellmap-classic"; Args = @("-multiInstance", "-noFPSLimit"); Minutes = 5; Classic = $true }
+$runs += , @{ Name = "seed0-classic"; Args = @("-quickstart", "-noshellmap", "-multiInstance", "-noFPSLimit", "-randommap", 0, 2,
+ "-autoskirmish", 2, "-aidiff", "brutal", "-seed", 0, "-observer"); Minutes = $TimeoutMinutes; Classic = $true }
+
+New-Item -ItemType Directory -Force $UserData | Out-Null
+$env:ZH_USER_DATA_DIR = (Resolve-Path $UserData).Path
if (Test-Path $cache) { Move-Item -Force $cache $aside }
try {
foreach ($run in $runs) {
$farm = Join-Path $WorkDir "farm-$($run.Name)" # one a run, so every run's log is kept
New-Farm $zh $farm
+ $options = Join-Path $UserData "Options.ini"
+ if ($run.Classic) { Remove-Item -LiteralPath $options -Force -ErrorAction SilentlyContinue }
+ else { Copy-Item (Join-Path $repoRoot "reforged-look.ini") $options -Force }
$shipped = Join-Path $farm "dx11shaders.shipped"
if (-not $KeepShipped -and (Test-Path -LiteralPath $shipped)) { Remove-Item -LiteralPath $shipped -Force } # the link, never its target
# -win as well: Windows has no hidden window, and a full screen game minimizes when someone clicks
diff --git a/GeneralsMD/Code/Tools/sun-shadow-check.py b/GeneralsMD/Code/Tools/sun-shadow-check.py
index 2a3372a02..a4e3c018f 100644
--- a/GeneralsMD/Code/Tools/sun-shadow-check.py
+++ b/GeneralsMD/Code/Tools/sun-shadow-check.py
@@ -27,6 +27,8 @@ CASES = {
}
OPTIONS = """Resolution = 1280 720
+ClassicGraphics = no
+LightingStyle = 1
StaticGameLOD = Custom
IdealStaticGameLOD = High
DynamicLOD = no
diff --git a/README.md b/README.md
index 77312967e..048dc52eb 100644
--- a/README.md
+++ b/README.md
@@ -65,9 +65,9 @@ yet. [CHANGELOG.md](CHANGELOG.md) has the measurements behind every line.
| What | Since |
|:--|:--|
-| Direct3D 11 draws by default, with glow and edge smoothing over the battlefield only; `-d3d9` brings back the old renderer | 1.0.0 |
+| Direct3D 11 draws by default, `-d3d9` brings back the old renderer; with Classic Graphics off, glow and edge smoothing over the battlefield only | 1.0.0 |
| Shadows soften and pale as the caster leaves the ground, so a helicopter's spreads as it climbs and a tank's stays hard | 2.0.0 |
-| Classic Graphics puts the 2003 look back in one click | 2.0.0 |
+| Classic Graphics is the 2003 look and what a first start opens; untick it and the High preset fills in the Reforged picture | 2.0.0, first start `main` |
| Fullscreen Fit picks stretch or bands when the resolution is not the monitor's shape | 2.6.0 |
| The whole options screen is in the game again, every page the launcher sets | 3.1.0 |
| The options screen restyled to match the other menus | 3.2.0 |
diff --git a/dx11-check.ps1 b/dx11-check.ps1
index 466a04c05..d6f43198f 100644
--- a/dx11-check.ps1
+++ b/dx11-check.ps1
@@ -56,7 +56,14 @@ $env:ZH_UNATTENDED = "1" # every game this starts is unattended: no box may wait
Add-Type -AssemblyName System.Drawing
$run = Join-Path $PSScriptRoot "GeneralsMD\Run"
-$shots = "$env:USERPROFILE\Documents\Command and Conquer Generals Zero Hour Data"
+# A user data folder of its own with reforged-look.ini as its Options.ini: the renderers are compared on
+# the Reforged picture, and the player's file, or none, would be some other picture. Less the rows
+# only Direct3D 11 draws, which the -d3d9 shot lacks and this would count as the backend's error.
+$shots = Join-Path $env:TEMP "dx11check_userdata"
+$env:ZH_USER_DATA_DIR = $shots
+$null = New-Item -ItemType Directory -Force $shots
+Get-Content (Join-Path $PSScriptRoot "reforged-look.ini") | Where-Object { $_ -notmatch '^(WaterFoam|TeamGlow|CloudStyle) ' } |
+ Set-Content (Join-Path $shots "Options.ini")
$tmp = Join-Path $env:TEMP "dx11check"
if (-not (Test-Path $tmp)) { $null = New-Item -ItemType Directory $tmp }
diff --git a/gate-60hz.ps1 b/gate-60hz.ps1
index 17cea48fe..a5a652bc4 100644
--- a/gate-60hz.ps1
+++ b/gate-60hz.ps1
@@ -38,8 +38,12 @@ param(
[string] $Exe = "generals.exe",
# switches to add to the run
[string[]] $ExtraArgs = @(),
- # the game's user data folder (ZH_USER_DATA_DIR). Empty: the player's own, in Documents
+ # the game's user data folder (ZH_USER_DATA_DIR). Empty: one of this script's own under TEMP, so the
+ # picture measured is never the Options.ini of whoever runs it
[string] $UserDataDir = "",
+ # copied to Options.ini there. Empty: a file the folder already has stays, and a folder with none
+ # gets reforged-look.ini, the setup the gate measures, the Reforged picture at High
+ [string] $Options = "",
# minutes of wall clock before a run is killed and counted as no result
[int] $TimeoutMinutes = 180
)
@@ -53,12 +57,12 @@ $HistogramTopMS = 64 # the log's frame time histogram: past this a percentile r
$exePath = Join-Path $RunDir $Exe
if (-not (Test-Path $exePath)) { throw "no $Exe in $RunDir" }
-if ($UserDataDir -ne "") {
- New-Item -ItemType Directory -Force $UserDataDir | Out-Null
- $env:ZH_USER_DATA_DIR = (Resolve-Path $UserDataDir).Path
-} else {
- Remove-Item Env:\ZH_USER_DATA_DIR -ErrorAction SilentlyContinue
-}
+if ($UserDataDir -eq "") { $UserDataDir = Join-Path $env:TEMP "gate60hz_userdata" }
+New-Item -ItemType Directory -Force $UserDataDir | Out-Null
+$env:ZH_USER_DATA_DIR = (Resolve-Path $UserDataDir).Path
+$optionsFile = Join-Path $env:ZH_USER_DATA_DIR "Options.ini"
+if ($Options -ne "") { Copy-Item $Options $optionsFile }
+elseif (-not (Test-Path $optionsFile)) { Copy-Item "$PSScriptRoot\reforged-look.ini" $optionsFile }
$lastFrame = $Minutes * 60 * 60
$prefix = "gate60hz_"
diff --git a/reforged-look.ini b/reforged-look.ini
new file mode 100644
index 000000000..a7b8ce4a3
--- /dev/null
+++ b/reforged-look.ini
@@ -0,0 +1,41 @@
+; The named setup the drawing harnesses measure: tree-check.ps1, dx11-check.ps1, shadow-check.ps1 and
+; gate-60hz.ps1 copy this file to Options.ini in their own user data folder. No Options.ini is the
+; Classic game since 2026-10-31. These lines are the High preset with Classic Graphics off plus the
+; fork's other rows on, which is what a first run was before that. Every row the High column of the
+; quality table sets is named and GraphicsQuality is here, so an exe from before that day and one
+; after it load the same values. A line must not hold an equals sign unless it is a setting.
+ClassicGraphics = no
+StaticGameLOD = High
+GraphicsQuality = 7
+LightingStyle = 1
+UseCloudMap = yes
+ShadowsForProjectiles = yes
+DebrisTrails = yes
+SmokeFireLighting = yes
+TeamGlow = yes
+WaterFoam = yes
+CloudStyle = 1
+ParticleBounce = yes
+UseShadowVolumesForSkins = yes
+VolumetricSmokeShadows = yes
+MSAA = 2
+TextureFilter = 2
+Bloom = 2
+Anisotropy = 16
+ShadowsForParticles = yes
+ShadowsForProps = yes
+ShadowQuality = 1
+MapLight = no
+Smoke = 0
+SmoothMotion = yes
+HealthBars = 0
+OrderLines = yes
+ShowNetBox = yes
+FormationDrag = yes
+BuildWithoutWorker = yes
+EdgeScrollInWindowedMode = yes
+CameraBoundaryMargin = 200
+ChromaLighting = yes
+DynamicMusic = yes
+LegacySound = no
+AmbientVolume = 40
diff --git a/shadow-check.ps1 b/shadow-check.ps1
index 96303fb94..ee87c2713 100644
--- a/shadow-check.ps1
+++ b/shadow-check.ps1
@@ -11,7 +11,12 @@ $env:ZH_UNATTENDED = "1" # every game this starts is unattended: no box may wait
Add-Type -AssemblyName System.Drawing
$run = Join-Path $PSScriptRoot "GeneralsMD\Run"
-$shots = "$env:USERPROFILE\Documents\Command and Conquer Generals Zero Hour Data"
+# A user data folder of its own with reforged-look.ini as its Options.ini: Classic, a first run's picture,
+# draws no shadow map to compare.
+$shots = Join-Path $env:TEMP "shadowcheck_userdata"
+$env:ZH_USER_DATA_DIR = $shots
+$null = New-Item -ItemType Directory -Force $shots
+Copy-Item (Join-Path $PSScriptRoot "reforged-look.ini") (Join-Path $shots "Options.ini")
$out = Join-Path $env:TEMP "shadowcheck"
if (-not (Test-Path $out)) { $null = New-Item -ItemType Directory $out }
diff --git a/tree-check.ps1 b/tree-check.ps1
index 9286f05a3..4ad8c8d6d 100644
--- a/tree-check.ps1
+++ b/tree-check.ps1
@@ -9,6 +9,8 @@
# .\tree-check.ps1 # eight views over five maps, each against its own limit
# .\tree-check.ps1 -Limit 4 # one limit for every view; a tree-dense map with long shadows reached ~3.7%
# .\tree-check.ps1 -Extra '-d3d9' # switches added to both builds' command lines
+# .\tree-check.ps1 -Options '' # no Options.ini: the first-run game, Classic since 2026-10-31. The default
+# # is reforged-look.ini, the Reforged picture, named so neither build draws its own default
# .\tree-check.ps1 -NewEnv 'ZH_D3DX_PORTABLE=1' # NAME=value set for generals.exe's runs only: with a copy
# # of the same exe as generals_base.exe, one code path against another
#
@@ -25,7 +27,7 @@
#
# Exit code is the number of views over the limit.
param([double]$Limit = 0, [string[]]$Extra = @(), [string[]]$NewEnv = @(), [string]$Base = 'generals_base.exe', [string]$Candidate = 'generals.exe',
- [int]$BaseFps = 60)
+ [int]$BaseFps = 60, [string]$Options = (Join-Path $PSScriptRoot 'reforged-look.ini'))
$LogicFps = 60 # LOGICFRAMES_PER_SECOND of the candidate build
$env:ZH_UNATTENDED = "1" # every game this starts is unattended: no box may wait on a person (EarlyCommandLine.h)
@@ -35,6 +37,8 @@ $run = Join-Path $PSScriptRoot "GeneralsMD\Run"
# same machine writes its shots into the player's folder, and one of those was once compared as if it were ours.
$shots = Join-Path $env:TEMP "treecheck_userdata_$PID"
$env:ZH_USER_DATA_DIR = $shots
+$null = New-Item -ItemType Directory -Force $shots
+if ($Options) { Copy-Item $Options (Join-Path $shots 'Options.ini') }
$tmp = Join-Path $env:TEMP "treecheck_$PID"
"pictures in $tmp"
if (-not (Test-Path $tmp)) { $null = New-Item -ItemType Directory $tmp }