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(gameclient): Classic zooms as near and as far as Reforged
Olcay Seygan452ac0677fc0
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cppindex b4a63cf5f..a962c77ad 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp@@ -137,8 +137,8 @@ void View::init( void )m_zoom = 1.0f;m_maxHeightAboveGround = TheGlobalData->m_maxCameraHeight;- // Classic stops at GameData.ini's own MinCameraHeight, as the game shipped- m_minHeightAboveGround = TheGlobalData->m_minCameraHeight * ( TheGlobalData->isClassicUI() ? 1.0f : CLOSEST_ZOOM_FACTOR );+ // the same in both interfaces; Classic keeps only EA's step (ZOOM_STEP_HEIGHT)+ m_minHeightAboveGround = TheGlobalData->m_minCameraHeight * CLOSEST_ZOOM_FACTOR;m_okToAdjustHeight = FALSE;m_defaultAngle = 0.0f;diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cppindex 9fdea701d..7536cba96 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp@@ -325,8 +325,8 @@ void W3DView::setOrigin( Int x, Int y)// 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.// 2.9 puts the ceiling at 899 over GameData.ini's MaxCameraHeight of 310; it was 3.2 (992).-// Classic is EA's: the hand zoom stops at the map's own maximum, a factor of 1.-#define ZOOM_OUT_LIMIT_FACTOR (TheGlobalData->isClassicUI() ? 1.0f : 2.9f)+// Classic shares the reach and keeps EA's 10 unit wheel step (View.cpp).+#define ZOOM_OUT_LIMIT_FACTOR (2.9f)void W3DView::buildCameraTransform( Matrix3D *transform ){Vector3 sourcePos, targetPos;