Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -604,19 +604,29 @@ Bool W3DTerrainVisual::load( AsciiString filename )

RefRenderObjListIterator *it = W3DDisplay::m_3DScene ? W3DDisplay::m_3DScene->createLightsIterator() : nullptr;
// apply the heightmap to the terrain render object

#ifdef DO_SEISMIC_SIMULATIONS
m_terrainRenderObject->initHeightData( m_clientHeightMap->getDrawWidth(),
m_clientHeightMap->getDrawHeight(),
m_clientHeightMap,
it);
WorldHeightMap* heightMap = m_clientHeightMap;
#else
m_terrainRenderObject->initHeightData( m_logicHeightMap->getDrawWidth(),
m_logicHeightMap->getDrawHeight(),
m_logicHeightMap,
it);
WorldHeightMap* heightMap = m_logicHeightMap;
#endif

const Bool isRenderAllTerrain = TheGlobalData->m_renderAllTerrain;

Int xExt, yExt;

if (isRenderAllTerrain) {
xExt = heightMap->getXExtent();
yExt = heightMap->getYExtent();

// TheSuperHackers @feature explicitly draw boundaries to match full extent
heightMap->setDrawWidth(xExt);
heightMap->setDrawHeight(yExt);
} else {
xExt = heightMap->getDrawWidth();
yExt = heightMap->getDrawHeight();
}

m_terrainRenderObject->initHeightData(xExt, yExt, heightMap, it);

if (it) {
W3DDisplay::m_3DScene->destroyLightsIterator(it);
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class GlobalData : public SubsystemInterface
// TheSuperHackers @feature helmutbuhler 11/04/2025
// Run game without graphics, input or audio.
Bool m_headless;

Bool m_renderAllTerrain;
Bool m_windowed;
Int m_xResolution;
Int m_yResolution;
Expand Down
3 changes: 2 additions & 1 deletion Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "ShellMapName", INI::parseAsciiString,nullptr, offsetof( GlobalData, m_shellMapName ) },
{ "ShellMapOn", INI::parseBool, nullptr, offsetof( GlobalData, m_shellMapOn ) },
{ "PlayIntro", INI::parseBool, nullptr, offsetof( GlobalData, m_playIntro ) },

{ "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) },
{ "FirewallBehavior", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallBehavior ) },
{ "FirewallPortOverride", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortOverride ) },
{ "FirewallPortAllocationDelta",INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortAllocationDelta) },
Expand Down Expand Up @@ -627,6 +627,7 @@ GlobalData::GlobalData()
m_framesPerSecondLimit = 0;
m_chipSetType = 0;
m_headless = FALSE;
m_renderAllTerrain = FALSE;
m_windowed = 0;
m_xResolution = DEFAULT_DISPLAY_WIDTH;
m_yResolution = DEFAULT_DISPLAY_HEIGHT;
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class GlobalData : public SubsystemInterface
// TheSuperHackers @feature helmutbuhler 11/04/2025
// Run game without graphics, input or audio.
Bool m_headless;

Bool m_renderAllTerrain;
Bool m_windowed;
Int m_xResolution;
Int m_yResolution;
Expand Down
3 changes: 2 additions & 1 deletion GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "ShellMapName", INI::parseAsciiString,nullptr, offsetof( GlobalData, m_shellMapName ) },
{ "ShellMapOn", INI::parseBool, nullptr, offsetof( GlobalData, m_shellMapOn ) },
{ "PlayIntro", INI::parseBool, nullptr, offsetof( GlobalData, m_playIntro ) },

{ "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) },
{ "FirewallBehavior", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallBehavior ) },
{ "FirewallPortOverride", INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortOverride ) },
{ "FirewallPortAllocationDelta",INI::parseInt, nullptr, offsetof( GlobalData, m_firewallPortAllocationDelta) },
Expand Down Expand Up @@ -631,6 +631,7 @@ GlobalData::GlobalData()
m_framesPerSecondLimit = 0;
m_chipSetType = 0;
m_headless = FALSE;
m_renderAllTerrain = FALSE;
m_windowed = 0;
m_xResolution = DEFAULT_DISPLAY_WIDTH;
m_yResolution = DEFAULT_DISPLAY_HEIGHT;
Expand Down
Loading