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
feat(gameengine): bake a closer camera range in, drop the closer zoom slider
Olcay Seygan2836001378df
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 44a99033a..97df9657c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1189,7 +1189,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- A nuke or a Scud Storm launched from the bottom of a fully zoomed-out screen climbs out of the top of it before it turns. EA flew the nuke at 500 and topped the Scud out at 634, low enough that from that height you watched the whole flight and knew where it was going before it got there. Both now climb to about 900, out of the picture on every screen shape from 16:9 to 5:4. The nuke flies faster to keep its time, so a far shot lands when it always did; the Scud missiles are a third faster at cruise and land a far shot within a twentieth of a second of the old time. A near target waits about half a second longer, since the missile still has the extra height to climb and come down.- The wheel covers that whole range in about six notches instead of thirty-eight.- Hold Ctrl and the wheel zooms five times as fast. With a building on the cursor, Ctrl and the wheel still turn the building.-- Closer Zoom, a slider on Options > Controls, lets the wheel bring the camera up to 60 percent nearer the ground than the game's own limit. The zoom-out ceiling does not move with it.+- The wheel brings the camera a quarter nearer the ground than the game's own limit, the same for every player, so the Closer Zoom slider is gone from Options > Controls. Zoomed all the way out, the camera now stops about a tenth lower than it did.- Zoom toward the cursor works; the spot under your pointer stays there.- Zoomed in over uneven ground, the camera holds still. Keeping the spot under the pointer moved the camera over different ground, the camera then settled to a new height, which moved it again, and on hilly ground that went on forever as a slow rocking forward and back.- The camera stays above the ground. Zoomed in on a slope it used to end up inside the hill it was looking over, and the world opened up along the near plane.diff --git a/GeneralsMD/Code/Data/German/Generals.str b/GeneralsMD/Code/Data/German/Generals.strindex 4b8747ac1..e65c833aa 100644--- a/GeneralsMD/Code/Data/German/Generals.str+++ b/GeneralsMD/Code/Data/German/Generals.str@@ -14713,14 +14713,6 @@ TOOLTIP:StartAtMaxZoom"Ein Spiel beginnt mit der Kamera so weit draußen, wie das Rad reicht. Aus beginnt es in der Höhe, für die die Karte gerahmt wurde."END-GUI:CloserZoom-"Näherer Zoom"-END--TOOLTIP:CloserZoom-"Wie viel näher ans Gelände das Rad die Kamera bringen darf. 0 Prozent ist die Grenze des Spiels."-END-GUI:DragTolerance"Ziehschwelle"ENDdiff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex 6bf62364b..497d8276f 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -869,14 +869,6 @@ TOOLTIP:StartAtMaxZoom"A match opens with the camera as far out as the wheel goes. Off, it opens at the height the map was framed for."END-GUI:CloserZoom-"Closer Zoom"-END--TOOLTIP:CloserZoom-"How much nearer the ground the wheel may bring the camera. 0% is the game's own limit."-END-GUI:DragTolerance"Drag Threshold"ENDdiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex 712c47361..0f34eb204 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -15357,14 +15357,6 @@ TOOLTIP:StartAtMaxZoom"Maç, kamera tekerleğin gittiği en uzak noktadayken açılır. Kapalıyken haritanın kendisi için ayarlanan yükseklikte açılır."END-GUI:CloserZoom-"Daha Yakın Kamera"-END--TOOLTIP:CloserZoom-"Tekerleğin kamerayı yere ne kadar daha yaklaştırabileceği. Yüzde 0 oyunun kendi sınırıdır."-END-GUI:DragTolerance"Sürükleme Eşiği"ENDdiff --git a/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wndindex 976cca60a..0155e799f 100644--- a/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd@@ -7475,174 +7475,6 @@ WINDOWIMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 34 322, BOTTOMRIGHT: 258 346, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:LabelCloserZoom";- TOOLTIPTEXT = "TOOLTIP:CloserZoom";- STATUS = ENABLED;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:CloserZoom";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 178 346, BOTTOMRIGHT: 258 370, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:ValueCloserZoom";- STATUS = ENABLED;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILD- WINDOW- WINDOWTYPE = HORZSLIDER;- SCREENRECT = UPPERLEFT: 40 346, BOTTOMRIGHT: 176 370, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:SliderCloserZoom";- STATUS = ENABLED+IMAGE+TABSTOP;- STYLE = HORZSLIDER+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Times New Roman", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "[None]";- TOOLTIPTEXT = "TOOLTIP:CloserZoom";- TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 254 254 254 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: hilightedbox, COLOR: 128 128 128 255, BORDERCOLOR: 64 64 64 255,- IMAGE: dehilightedbox, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: linebox, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,- IMAGE: arrow, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERDATA = MINVALUE: 0, MAXVALUE: 60;- SLIDERTHUMBENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 128 128 255, BORDERCOLOR: 255 0 0 255,- IMAGE: NoImage, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERTHUMBDISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 128 128 128 255,- IMAGE: NoImage, COLOR: 0 0 0 255, BORDERCOLOR: 64 64 64 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERTHUMBHILITEDRAWDATA = IMAGE: arrow, COLOR: 0 255 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: arrow, COLOR: 0 0 255 255, BORDERCOLOR: 128 128 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- END- CHILDWINDOWWINDOWTYPE = STATICTEXT;SCREENRECT = UPPERLEFT: 282 150, BOTTOMRIGHT: 506 174, CREATIONRESOLUTION: 800 600;diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.hindex d622fe491..9b4ab1593 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h@@ -428,7 +428,6 @@ public:Bool m_zoomToCursor; ///< the mouse wheel zooms toward whatever the cursor is overBool m_isometricCamera; ///< the tactical view from far off down a narrow cone, near enough orthographicBool m_smoothMotion; ///< R1: models shown between their last two logic states each render frame (W3DSmoothMotion.h)- Int m_closerZoomPercent; ///< percent taken off MinCameraHeight, so the wheel comes nearer the ground; 0 = as GameData.ini has itInt m_dragTolerance; ///< pixels the pointer may travel with a button held before the press is a drag; replaces Mouse.ini's DragToleranceBool m_formationDrag; ///< with the move, attack move or guard key armed, a left drag spreads the selection along the line drawnBool m_showAllyCursors; ///< in a network game, draw where each ally's mouse is pointingdiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h b/GeneralsMD/Code/GameEngine/Include/GameClient/View.hindex 4af31a219..c963a582d 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/View.h@@ -191,7 +191,6 @@ public:virtual void anchorZoomAt( const ICoord2D *pixel ) { } ///< ZoomToCursor: hold the ground under this pixel there while the zoom settlesvirtual void setZoomToDefault( void ) { } ///< Set zoom to default valuevirtual void setZoomToMax( void ) { } ///< Set zoom as far out as the player may zoom by hand- void setMinHeightAboveGround( Real height ) { m_minHeightAboveGround = height; } ///< CloserZoom: how near the ground the wheel may comevirtual void setOkToAdjustHeight( Bool val ) { m_okToAdjustHeight = val; } ///< Set this to adjust camera height// for debugging@@ -348,13 +347,6 @@ class ViewLocationextern Real View_snapAngleToEighth( Real angle ); ///< nearest multiple of 45 degreesextern Real View_stepAngleByEighths( Real angle, Int steps ); ///< snap, then move that many eighths-// CLOSEST ZOOM ///////////////////////////////////////////////////////////////////////////////////-// The CloserZoom option takes a percentage off GameData.ini's MinCameraHeight. It can only bring-// the camera nearer: the far limit is how much of the map a player sees, and that stays the same-// for everyone in the match. A free function for the reason above, and so View::init and the-// option's setter share one copy.-extern Real View_closestCameraHeight( Real minCameraHeight, Int closerZoomPercent );-// EXTERNALS //////////////////////////////////////////////////////////////////////////////////////extern View *TheTacticalView; ///< the main tactical interface to the game worlddiff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cppindex 788d14e51..48ec34c03 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp@@ -1160,7 +1160,6 @@ GlobalData::GlobalData()#elsem_smoothMotion = TRUE;#endif- m_closerZoomPercent = 0;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 linem_formationDrag = TRUE;diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cppindex 7d87f4e64..670252ab8 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp@@ -63,16 +63,6 @@ OPTION_BOOL_ACCESSORS( m_isometricCamera )OPTION_BOOL_ACCESSORS( m_smoothMotion )OPTION_BOOL_ACCESSORS( m_startAtMaxZoom )-// The view copied its closest height out of GlobalData once, when it was made, so a change from-// the menu has to be handed to it. It is not moved: the next turn of the wheel meets the new limit.-static Int get_m_closerZoomPercent( void ) { return TheGlobalData->m_closerZoomPercent; }-static void set_m_closerZoomPercent( Int value )-{- TheWritableGlobalData->m_closerZoomPercent = value;- if (TheTacticalView)- TheTacticalView->setMinHeightAboveGround( View_closestCameraHeight( TheGlobalData->m_minCameraHeight, value ) );-}-// This catalog loads before there is a mouse, so the value waits in GlobalData and Mouse::parseIni// takes it from there. The menu changes it with the mouse up, which is the branch below.static Int get_m_dragTolerance( void ) { return TheGlobalData->m_dragTolerance; }@@ -275,14 +265,6 @@ const OptionDef TheOptionCatalog[] =OPTION_BOOL, APPLY_LIVE, 0, 1,get_m_startAtMaxZoom, set_m_startAtMaxZoom },- // Percent taken off GameData.ini's MinCameraHeight, so the wheel comes nearer the ground than- // the 120 units the game ships with; 60 leaves 48. There is no row for the far end and there- // will not be one: how much of the map a player sees is an advantage, and Options.ini is outside- // the mismatch check. This one only ever shows less.- { "CloserZoom", OPT_WND( "SliderCloserZoom" ), "GUI:CloserZoom",- OPTION_INT, APPLY_LIVE, 0, 60,- get_m_closerZoomPercent, set_m_closerZoomPercent },-// Pixels the pointer may travel with a button held before the press stops being a click and// starts a selection box, a camera drag or a formation line. Mouse.ini says 25, which is the// default here; a high-DPI mouse wants more and a small screen less.diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cppindex 28884b817..e8dc29633 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp@@ -2038,7 +2038,6 @@ static const SliderReadout TheSliderReadouts[] ={ "OptionsMenu.wnd:SliderSFXVolume", "OptionsMenu.wnd:ValueSFXVolume", READOUT_PERCENT },{ "OptionsMenu.wnd:SliderVoiceVolume", "OptionsMenu.wnd:ValueVoiceVolume", READOUT_PERCENT },{ "OptionsMenu.wnd:SliderScrollSpeed", "OptionsMenu.wnd:ValueScrollSpeed", READOUT_NUMBER },- { "OptionsMenu.wnd:SliderCloserZoom", "OptionsMenu.wnd:ValueCloserZoom", READOUT_PERCENT },{ "OptionsMenu.wnd:SliderDragTolerance", "OptionsMenu.wnd:ValueDragTolerance", READOUT_NUMBER },};diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cppindex 03cd103e4..a86159298 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp@@ -117,6 +117,11 @@ View::~View(){}+// The wheel may bring the camera this much of GameData.ini's MinCameraHeight down to the ground:+// 120 becomes 90. A view setting, so it lives here and not in GameData.ini, which every machine in+// a network game has to agree on byte for byte. It only shows less of the map, never more.+#define CLOSEST_ZOOM_FACTOR (0.75f)+void View::init( void ){m_width = DEFAULT_VIEW_WIDTH;@@ -132,7 +137,7 @@ void View::init( void )m_zoom = 1.0f;m_maxHeightAboveGround = TheGlobalData->m_maxCameraHeight;- m_minHeightAboveGround = View_closestCameraHeight( TheGlobalData->m_minCameraHeight, TheGlobalData->m_closerZoomPercent );+ m_minHeightAboveGround = TheGlobalData->m_minCameraHeight * CLOSEST_ZOOM_FACTOR;m_okToAdjustHeight = FALSE;m_defaultAngle = 0.0f;@@ -158,9 +163,9 @@ View *View::prependViewToList( View *list )// zoom key does; a caller driving this from a render frame passes the fraction of a logic// frame that has actually gone by, so the zoom rate stops depending on the frame rate.//-// EA's step was 10 world units. The reachable band is roughly 100 (MinCameraHeight) to 480-// (MaxCameraHeight * ZOOM_OUT_LIMIT_FACTOR), so crossing it took about 38 notches - most of a-// wheel's travel to go from the ground to the whole map. 60 puts it at about six.+// EA's step was 10 world units. The reachable band is 90 (MinCameraHeight * CLOSEST_ZOOM_FACTOR)+// to about 900 (MaxCameraHeight * ZOOM_OUT_LIMIT_FACTOR), so crossing it would take about 80+// notches - a whole wheel's travel to go from the ground to the whole map. 60 puts it at about 14.#define ZOOM_STEP_HEIGHT (60.0f)void View::zoomIn( Real steps )@@ -216,15 +221,6 @@ Real View_stepAngleByEighths( Real angle, Int steps )return View_snapAngleToEighth( angle ) + steps * step;}-/**- * CloserZoom: the lowest the wheel may bring the camera, which is GameData.ini's MinCameraHeight- * with that percentage taken off.- */-Real View_closestCameraHeight( Real minCameraHeight, Int closerZoomPercent )-{- return minCameraHeight * (Real)(100 - closerZoomPercent) / 100.0f;-}-/*** Rotate the view around the up axis by the given angle.*/diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cppindex 096e9abe7..28f74a661 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp@@ -324,7 +324,8 @@ void W3DView::setOrigin( Int x, Int y)// how far past the map's default max camera height the player may zoom out by hand.// only the manual zoom limit is stretched - the default/scripted views still use// m_maxHeightAboveGround, so a map still opens framed the way its author meant it to.-#define ZOOM_OUT_LIMIT_FACTOR (3.2f)+// 2.9 puts the ceiling at 899 over GameData.ini's MaxCameraHeight of 310; it was 3.2 (992).+#define ZOOM_OUT_LIMIT_FACTOR (2.9f)void W3DView::buildCameraTransform( Matrix3D *transform ){Vector3 sourcePos, targetPos;diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex 0293d7152..a57ade2f7 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -12842,33 +12842,28 @@ TEST(texture_filter_defaults_to_anisotropic)TheWritableGlobalData = saved;}-/* Three rows on the Controls page. The zoom one may only ever bring the camera nearer: the far- limit is how much of the map a player sees, Options.ini is outside the mismatch check, and a row- whose range let the floor climb past the ceiling would push the ceiling up with it in- W3DView::setDefaultView. */-TEST(start_zoom_closer_zoom_and_drag_threshold_are_rows_that_change_nothing_until_asked)+/* Two rows on the Controls page. The camera's near and far limits are not among them: they are+ fixed in View.cpp and W3DView.cpp for everyone, because Options.ini is outside the mismatch+ check and the far one is how much of the map a player sees. */+TEST(start_zoom_and_drag_threshold_are_rows_that_change_nothing_until_asked){const OptionDef *start = findOptionDef( "StartAtMaxZoom" );- const OptionDef *closer = findOptionDef( "CloserZoom" );const OptionDef *drag = findOptionDef( "DragTolerance" );- CHECK( start != NULL && closer != NULL && drag != NULL );- if( start == NULL || closer == NULL || drag == NULL )+ CHECK( start != NULL && drag != NULL );+ if( start == NULL || drag == NULL )return;CHECK_EQ( (Int)start->kind, (Int)OPTION_BOOL );- CHECK_EQ( (Int)closer->kind, (Int)OPTION_INT );CHECK_EQ( (Int)drag->kind, (Int)OPTION_INT );CHECK( strstr( start->widgetName, "CheckStartAtMaxZoom" ) != NULL );- CHECK( strstr( closer->widgetName, "SliderCloserZoom" ) != NULL );CHECK( strstr( drag->widgetName, "SliderDragTolerance" ) != NULL );GlobalData *saved = TheWritableGlobalData;GlobalData *scratch = NEW GlobalData;TheWritableGlobalData = scratch;- // an Options.ini with none of the three keys plays the way the last version did+ // an Options.ini with neither key plays the way the last version didCHECK_EQ( start->get(), 1 );- CHECK_EQ( closer->get(), 0 );CHECK_EQ( drag->get(), 25 ); // DragTolerance in INIZH.big's Mouse.iniCHECK( drag->lo > 0 && drag->lo <= 25 && drag->hi >= 25 );@@ -12876,19 +12871,6 @@ TEST(start_zoom_closer_zoom_and_drag_threshold_are_rows_that_change_nothing_untiCHECK_EQ( (Int)scratch->m_startAtMaxZoom, 0 );drag->set( 8 );CHECK_EQ( scratch->m_dragTolerance, 8 );- closer->set( 40 );- CHECK_EQ( scratch->m_closerZoomPercent, 40 );-- // the slider's left end is GameData.ini's own limit, and no position on it is above that- CHECK_EQ( closer->lo, 0 );- CHECK( closer->hi < 100 );- CHECK_NEAR( View_closestCameraHeight( 120.0f, closer->lo ), 120.0f, 0.001f );- CHECK_NEAR( View_closestCameraHeight( 120.0f, 60 ), 48.0f, 0.001f );- for( Int percent = closer->lo; percent <= closer->hi; ++percent )- {- const Real height = View_closestCameraHeight( 120.0f, percent );- CHECK( height > 0.0f && height <= 120.0f );- }TheWritableGlobalData = saved;delete scratch;diff --git a/GeneralsMD/Code/Tools/optionsmenu_layout.py b/GeneralsMD/Code/Tools/optionsmenu_layout.pyindex 80c647a11..0761c8f43 100644--- a/GeneralsMD/Code/Tools/optionsmenu_layout.py+++ b/GeneralsMD/Code/Tools/optionsmenu_layout.py@@ -163,8 +163,6 @@ NEW_CONTROLS = [(CHECK, "CheckIsometricCamera", "GUI:IsometricCamera"),(CHECK, "CheckSmoothMotion", "GUI:SmoothMotion"),(CHECK, "CheckStartAtMaxZoom", "GUI:StartAtMaxZoom"),- (LABEL, "LabelCloserZoom", "GUI:CloserZoom"),- (SLIDER, "SliderCloserZoom", None),(LABEL, "LabelDragTolerance", "GUI:DragTolerance"),(SLIDER, "SliderDragTolerance", None),(CHECK, "CheckTreeSway", "GUI:TreeSway"),@@ -183,7 +181,7 @@ NEW_CONTROLS = [READOUTS = ["ValueGamma", "ValueTextureResolution", "ValueParticleCap", "ValueAnisotropy","ValueMusicVolume", "ValueSFXVolume", "ValueVoiceVolume", "ValueScrollSpeed",- "ValueCloserZoom", "ValueDragTolerance",+ "ValueDragTolerance",]# Lines of small grey text under a control that say what its current choice does, written by@@ -199,8 +197,7 @@ NOTE_COLOR = ("ENABLED: 192 192 192 255, ENABLEDBORDER: 0 0 0 255, "# a cloned slider keeps its template's range unless it is given one; selfcheck holds these to the# catalog row's own bounds-SLIDER_RANGES = [("SliderAnisotropy", 0, 16), ("SliderCloserZoom", 0, 60),- ("SliderDragTolerance", 2, 50)]+SLIDER_RANGES = [("SliderAnisotropy", 0, 16), ("SliderDragTolerance", 2, 50)]# EA's captions that do not fit the page: two popup headings written in capitals, and a check box# caption that ran 20 pixels past the panel's right edge once it stood in a 268 pixel column.@@ -291,8 +288,7 @@ GROUP_LAYOUT = [setting("ScrollSpeedLabel", "SliderScrollSpeed", "ValueScrollSpeed"),("check", "CheckZoomToCursor"),("check", "CheckIsometricCamera"),- ("check", "CheckStartAtMaxZoom"),- setting("LabelCloserZoom", "SliderCloserZoom", "ValueCloserZoom")]),+ ("check", "CheckStartAtMaxZoom")]),("PageControls", 1, "GUI:OptionsGroupOrders", [("check", "Retaliation"),("check", "CheckDoubleClickAttackMove")]),