Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(w3ddevice): weather no longer hides the field
Olcay Seygan86a9bfd54ad1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex dc0b8d7f1..a75476ce2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -48,7 +48,7 @@ found and fixed, EA's own, not port damage.**## Weather, if you want it-- Weather, under Options, Effects, is a new setting, off by default until it has been played. A green map gets rain, and a desert map gets blowing sand over a still tan haze. A snowy map with no flakes of its own gets them. The trees lean and sway harder and smoke drifts downwind; a map that already rains or snows, Flooded Plains or Bitter Winter, keeps what EA gave it and takes only the wind. No part of the game reads any of this: what a unit sees and hits stays what the map says, so you and your opponent can have different weather in one match. A sandstorm over a battle of three armies and three superweapons takes the graphics card's frame from about 7.9 to 8.5 ms. Direct3D 11 only, and off under Classic Graphics.+- Weather, under Options, Effects, is a new setting, off by default until it has been played. A green map gets rain, and a desert map gets blowing sand over a still tan haze. A snowy map with no flakes of its own gets them. The trees lean and sway harder and smoke drifts downwind; a map that already rains or snows, Flooded Plains or Bitter Winter, keeps what EA gave it and takes only the wind. The weather is much lighter than it first was, so the field stays readable in rain, sand and snow. No part of the game reads any of this: what a unit sees and hits stays what the map says, so you and your opponent can have different weather in one match. A sandstorm over a battle of three armies and three superweapons takes the graphics card's frame from about 7.9 to 8.5 ms. Direct3D 11 only, and off under Classic Graphics.## Fire keeps its colourdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cppindex 724905447..9430db418 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Snow.cpp@@ -126,7 +126,7 @@ void SnowManager::getWeatherHaze(float colour[3], Real *strength) const{static const float COLOURS[WEATHER_KIND_COUNT][3] = {{ 0.0f, 0.0f, 0.0f }, { 0.50f, 0.54f, 0.60f }, { 0.74f, 0.58f, 0.38f }, { 0.82f, 0.86f, 0.92f } };- static const Real STRENGTHS[WEATHER_KIND_COUNT] = { 0.0f, 0.24f, 0.70f, 0.28f };+ static const Real STRENGTHS[WEATHER_KIND_COUNT] = { 0.0f, 0.10f, 0.20f, 0.12f };const GlobalData::TerrainLighting &sun = TheGlobalData->m_terrainLighting[TheGlobalData->m_timeOfDay][0];const Real red = min(sun.ambient.red + sun.diffuse.red, 1.0f);const Real green = min(sun.ambient.green + sun.diffuse.green, 1.0f);diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cppindex 3243ac4d6..8210edffb 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp@@ -235,13 +235,15 @@ struct WeatherLayerBool facesCamera; // a card instead of a streak along the flight};+// The battlefield reads first: motion is what says weather, so a layer stays sparse and faint. Sand's+// streaks all fly above the ground and its cards go over everything, so they cost the most picture.static const WeatherLayer WEATHER_LAYERS[WEATHER_KIND_COUNT][2] ={{ { NULL }, { NULL } },- { { "EXRainDrop.tga", 8000, 180.0f, 1100.0f, 44.0f, 3.4f, 0xe0d8e4f0, 0.0f, FALSE }, { NULL } },- { { "EXRainDrop.tga", 6000, 520.0f, 25.0f, 72.0f, 3.2f, 0xb0ecd4a4, 150.0f, FALSE },- { "EXCloud01.tga", 200, 260.0f, 4.0f, 260.0f, 260.0f, 0x40d0ac7c, 170.0f, TRUE } },- { { "EXSnowFlake1.tga", 7000, 34.0f, 46.0f, 2.4f, 2.4f, 0xe0e8eef4, 0.0f, TRUE }, { NULL } }+ { { "EXRainDrop.tga", 6000, 180.0f, 1100.0f, 44.0f, 3.0f, 0xb8d8e4f0, 0.0f, FALSE }, { NULL } },+ { { "EXRainDrop.tga", 3500, 520.0f, 25.0f, 64.0f, 3.0f, 0x90ecd4a4, 150.0f, FALSE },+ { "EXCloud01.tga", 70, 260.0f, 4.0f, 260.0f, 260.0f, 0x1cd0ac7c, 170.0f, TRUE } },+ { { "EXSnowFlake1.tga", 6000, 34.0f, 46.0f, 2.4f, 2.4f, 0xd0e8eef4, 0.0f, TRUE }, { NULL } }};static const Real WEATHER_WIND_STRENGTH[WEATHER_KIND_COUNT] = { 0.5f, 0.8f, 1.0f, 0.35f };