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 @@ -606,11 +606,19 @@ Bool W3DTerrainVisual::load( AsciiString filename )
// apply the heightmap to the terrain render object

#ifdef DO_SEISMIC_SIMULATIONS
if (TheGlobalData->m_renderAllTerrain) {
m_clientHeightMap->setDrawWidth(m_clientHeightMap->getXExtent());
m_clientHeightMap->setDrawHeight(m_clientHeightMap->getYExtent());
}
m_terrainRenderObject->initHeightData( m_clientHeightMap->getDrawWidth(),
m_clientHeightMap->getDrawHeight(),
m_clientHeightMap,
it);
#else
if (TheGlobalData->m_renderAllTerrain) {
m_logicHeightMap->setDrawWidth(m_logicHeightMap->getXExtent());
m_logicHeightMap->setDrawHeight(m_logicHeightMap->getYExtent());
}
m_terrainRenderObject->initHeightData( m_logicHeightMap->getDrawWidth(),
m_logicHeightMap->getDrawHeight(),
m_logicHeightMap,
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
5 changes: 3 additions & 2 deletions Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "UseHalfHeightMap", INI::parseBool, nullptr, offsetof( GlobalData, m_useHalfHeightMap ) },
{ "UserDataLeafName", INI::parseQuotedAsciiString, nullptr, offsetof( GlobalData, m_userDataLeafName ) },


{ "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) },
{ "DrawEntireTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_drawEntireTerrain ) },
{ "TerrainLOD", INI::parseIndexList, TerrainLODNames, offsetof( GlobalData, m_terrainLOD ) },
{ "TerrainLODTargetTimeMS", INI::parseInt, nullptr, offsetof( GlobalData, m_terrainLODTargetTimeMS ) },
Expand Down Expand Up @@ -427,7 +427,6 @@ 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 ) },

{ "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 +626,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 Expand Up @@ -1225,6 +1225,7 @@ void GlobalData::parseGameDataDefinition( INI* ini )

TheWritableGlobalData->m_xResolution = xres;
TheWritableGlobalData->m_yResolution = yres;
TheWritableGlobalData->m_renderAllTerrain = optionPref.getBool("RenderAllTerrain", TheWritableGlobalData->m_renderAllTerrain);
}

void GlobalData::parseCustomDefinition()
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
5 changes: 3 additions & 2 deletions GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "StretchTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_stretchTerrain ) },
{ "UseHalfHeightMap", INI::parseBool, nullptr, offsetof( GlobalData, m_useHalfHeightMap ) },


{ "RenderAllTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_renderAllTerrain ) },
{ "DrawEntireTerrain", INI::parseBool, nullptr, offsetof( GlobalData, m_drawEntireTerrain ) },
{ "TerrainLOD", INI::parseIndexList, TerrainLODNames, offsetof( GlobalData, m_terrainLOD ) },
{ "TerrainLODTargetTimeMS", INI::parseInt, nullptr, offsetof( GlobalData, m_terrainLODTargetTimeMS ) },
Expand Down Expand Up @@ -427,7 +427,6 @@ 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 ) },

{ "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 +630,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 Expand Up @@ -1245,6 +1245,7 @@ void GlobalData::parseGameDataDefinition( INI* ini )

TheWritableGlobalData->m_xResolution = xres;
TheWritableGlobalData->m_yResolution = yres;
TheWritableGlobalData->m_renderAllTerrain = optionPref.getBool("RenderAllTerrain", TheWritableGlobalData->m_renderAllTerrain);
}

void GlobalData::parseCustomDefinition()
Expand Down
Loading