Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GameLODManager Class Reference

#include <GameLOD.h>

Public Member Functions

 GameLODManager (void)
 
 ~GameLODManager ()
 
const char * getStaticGameLODLevelName (StaticGameLODLevel level)
 
const char * getDynamicGameLODLevelName (DynamicGameLODLevel level)
 
StaticGameLODLevel findStaticLODLevel (void)
 calculate the optimal static LOD level for this system.
 
Bool setStaticLODLevel (StaticGameLODLevel level)
 set the current static LOD level.
 
StaticGameLODLevel getStaticLODLevel (void)
 
DynamicGameLODLevel findDynamicLODLevel (Real averageFPS)
 given an average fps, return the optimal dynamic LOD.
 
Bool setDynamicLODLevel (DynamicGameLODLevel level)
 set the current dynamic LOD level.
 
DynamicGameLODLevel getDynamicLODLevel (void)
 
void init (void)
 initialize tables of preset LOD's.
 
void setCurrentTextureReduction (Int val)
 
Int getCurrentTextureReduction (void)
 
Int getStaticGameLODIndex (AsciiString name)
 
Int getDynamicGameLODIndex (AsciiString name)
 
Bool isParticleSkipped (void)
 
Bool isDebrisSkipped (void)
 
Real getSlowDeathScale (void)
 
ParticlePriorityType getMinDynamicParticlePriority (void)
 priority at which particles will still render at current FPS.
 
ParticlePriorityType getMinDynamicParticleSkipPriority (void)
 priority at which particles will never be skipped at any FPS.
 
Int getRecommendedTextureReduction (void)
 return the optimal texture reduction for the system.
 
Int getLevelTextureReduction (StaticGameLODLevel level)
 return texture reduction specified in INI for this game detail.
 
LODPresetInfonewLODPreset (StaticGameLODLevel index)
 
BenchProfilenewBenchProfile (void)
 
Bool didMemPass (void)
 
void setReallyLowMHz (Int mhz)
 
Bool isReallyLowMHz () const
 

Public Attributes

StaticGameLODInfo m_staticGameLODInfo [STATIC_GAME_LOD_COUNT]
 
DynamicGameLODInfo m_dynamicGameLODInfo [DYNAMIC_GAME_LOD_COUNT]
 
LODPresetInfo m_lodPresets [STATIC_GAME_LOD_CUSTOM][MAX_LOD_PRESETS_PER_LEVEL]
 
BenchProfile m_benchProfiles [MAX_BENCH_PROFILES]
 

Protected Member Functions

void applyStaticLODLevel (StaticGameLODLevel level)
 
void applyDynamicLODLevel (DynamicGameLODLevel level)
 
void refreshCustomStaticLODLevel (void)
 grabs current globaldata values and makes them the custom detail setting.
 

Protected Attributes

StaticGameLODLevel m_currentStaticLOD
 current value of static LOD.
 
DynamicGameLODLevel m_currentDynamicLOD
 current value of dynamic LOD.
 
Int m_numParticleGenerations
 number of particles that have been generated since dynamic LOD reduction started.
 
Int m_dynamicParticleSkipMask
 mask used to enable rendering of every Nth particle.
 
Int m_numDebrisGenerations
 number of debris that have been generated since dynamic LOD reduction started.
 
Int m_dynamicDebrisSkipMask
 mask used to enable rendering of every Nth debris.
 
Real m_slowDeathScale
 values < 1.0f are used to accelerate deaths
 
ParticlePriorityType m_minDynamicParticlePriority
 only priorities above/including this value are allowed to render.
 
ParticlePriorityType m_minDynamicParticleSkipPriority
 priorities above/including this value never skip particles.
 
Bool m_videoPassed
 
Bool m_cpuPassed
 
Bool m_memPassed
 
Int m_numLevelPresets [STATIC_GAME_LOD_CUSTOM]
 
Int m_numBenchProfiles
 
StaticGameLODLevel m_idealDetailLevel
 
ChipsetType m_videoChipType
 
CpuType m_cpuType
 
Int m_numRAM
 
Int m_cpuFreq
 
Real m_intBenchIndex
 
Real m_floatBenchIndex
 
Real m_memBenchIndex
 
Real m_compositeBenchIndex
 
Int m_currentTextureReduction
 
Int m_reallyLowMHz
 

Static Protected Attributes

static const FieldParse m_staticGameLODFieldParseTable []
 

Detailed Description

Definition at line 157 of file GameLOD.h.

Constructor & Destructor Documentation

◆ GameLODManager()

GameLODManager::GameLODManager ( void )

Definition at line 210 of file GameLOD.cpp.

◆ ~GameLODManager()

GameLODManager::~GameLODManager ( )

Definition at line 239 of file GameLOD.cpp.

Member Function Documentation

◆ applyDynamicLODLevel()

void GameLODManager::applyDynamicLODLevel ( DynamicGameLODLevel level)
protected

Definition at line 675 of file GameLOD.cpp.

◆ applyStaticLODLevel()

void GameLODManager::applyStaticLODLevel ( StaticGameLODLevel level)
protected
Todo
: Still need to implement these settings:

Definition at line 509 of file GameLOD.cpp.

◆ didMemPass()

Bool GameLODManager::didMemPass ( void )

Definition at line 704 of file GameLOD.cpp.

◆ findDynamicLODLevel()

DynamicGameLODLevel GameLODManager::findDynamicLODLevel ( Real averageFPS)

given an average fps, return the optimal dynamic LOD.

Given an average fps, return the optimal dynamic LOD level that matches this fps.

Definition at line 650 of file GameLOD.cpp.

◆ findStaticLODLevel()

StaticGameLODLevel GameLODManager::findStaticLODLevel ( void )

calculate the optimal static LOD level for this system.

Function which calculates the recommended LOD level for current hardware configuration.

Definition at line 445 of file GameLOD.cpp.

◆ getCurrentTextureReduction()

Int GameLODManager::getCurrentTextureReduction ( void )
inline

Definition at line 173 of file GameLOD.h.

◆ getDynamicGameLODIndex()

Int GameLODManager::getDynamicGameLODIndex ( AsciiString name)

Convert LOD name to an index

Definition at line 632 of file GameLOD.cpp.

◆ getDynamicGameLODLevelName()

const char * GameLODManager::getDynamicGameLODLevelName ( DynamicGameLODLevel level)

Definition at line 644 of file GameLOD.cpp.

◆ getDynamicLODLevel()

DynamicGameLODLevel GameLODManager::getDynamicLODLevel ( void )
inline

Definition at line 170 of file GameLOD.h.

◆ getLevelTextureReduction()

Int GameLODManager::getLevelTextureReduction ( StaticGameLODLevel level)

return texture reduction specified in INI for this game detail.

Definition at line 699 of file GameLOD.cpp.

◆ getMinDynamicParticlePriority()

ParticlePriorityType GameLODManager::getMinDynamicParticlePriority ( void )
inline

priority at which particles will still render at current FPS.

Definition at line 242 of file GameLOD.h.

◆ getMinDynamicParticleSkipPriority()

ParticlePriorityType GameLODManager::getMinDynamicParticleSkipPriority ( void )
inline

priority at which particles will never be skipped at any FPS.

Definition at line 247 of file GameLOD.h.

◆ getRecommendedTextureReduction()

Int GameLODManager::getRecommendedTextureReduction ( void )

return the optimal texture reduction for the system.

Definition at line 688 of file GameLOD.cpp.

◆ getSlowDeathScale()

Real GameLODManager::getSlowDeathScale ( void )
inline

Definition at line 237 of file GameLOD.h.

◆ getStaticGameLODIndex()

Int GameLODManager::getStaticGameLODIndex ( AsciiString name)

Convert LOD name to an index

Definition at line 389 of file GameLOD.cpp.

◆ getStaticGameLODLevelName()

const char * GameLODManager::getStaticGameLODLevelName ( StaticGameLODLevel level)

Definition at line 438 of file GameLOD.cpp.

◆ getStaticLODLevel()

StaticGameLODLevel GameLODManager::getStaticLODLevel ( void )
inline

Definition at line 167 of file GameLOD.h.

◆ init()

void GameLODManager::init ( void )

initialize tables of preset LOD's.

Todo
: Need to scale these based on our apps usage of int/float/mem ops.

Definition at line 268 of file GameLOD.cpp.

◆ isDebrisSkipped()

Bool GameLODManager::isDebrisSkipped ( void )
inline

Definition at line 232 of file GameLOD.h.

◆ isParticleSkipped()

Bool GameLODManager::isParticleSkipped ( void )
inline

Definition at line 227 of file GameLOD.h.

◆ isReallyLowMHz()

Bool GameLODManager::isReallyLowMHz ( ) const
inline

Definition at line 187 of file GameLOD.h.

◆ newBenchProfile()

BenchProfile * GameLODManager::newBenchProfile ( void )

Definition at line 244 of file GameLOD.cpp.

◆ newLODPreset()

LODPresetInfo * GameLODManager::newLODPreset ( StaticGameLODLevel index)

Definition at line 256 of file GameLOD.cpp.

◆ refreshCustomStaticLODLevel()

void GameLODManager::refreshCustomStaticLODLevel ( void )
protected

grabs current globaldata values and makes them the custom detail setting.

Definition at line 365 of file GameLOD.cpp.

◆ setCurrentTextureReduction()

void GameLODManager::setCurrentTextureReduction ( Int val)
inline

Definition at line 172 of file GameLOD.h.

◆ setDynamicLODLevel()

Bool GameLODManager::setDynamicLODLevel ( DynamicGameLODLevel level)

set the current dynamic LOD level.

Set all game systems to match the desired LOD level.

Definition at line 663 of file GameLOD.cpp.

◆ setReallyLowMHz()

void GameLODManager::setReallyLowMHz ( Int mhz)
inline

Definition at line 186 of file GameLOD.h.

◆ setStaticLODLevel()

Bool GameLODManager::setStaticLODLevel ( StaticGameLODLevel level)

set the current static LOD level.

Set all game systems to match the desired LOD level.

Definition at line 493 of file GameLOD.cpp.

Member Data Documentation

◆ m_benchProfiles

BenchProfile GameLODManager::m_benchProfiles[MAX_BENCH_PROFILES]

Definition at line 192 of file GameLOD.h.

◆ m_compositeBenchIndex

Real GameLODManager::m_compositeBenchIndex
protected

Definition at line 222 of file GameLOD.h.

◆ m_cpuFreq

Int GameLODManager::m_cpuFreq
protected

Definition at line 218 of file GameLOD.h.

◆ m_cpuPassed

Bool GameLODManager::m_cpuPassed
protected

Definition at line 210 of file GameLOD.h.

◆ m_cpuType

CpuType GameLODManager::m_cpuType
protected

Definition at line 216 of file GameLOD.h.

◆ m_currentDynamicLOD

DynamicGameLODLevel GameLODManager::m_currentDynamicLOD
protected

current value of dynamic LOD.

Definition at line 201 of file GameLOD.h.

◆ m_currentStaticLOD

StaticGameLODLevel GameLODManager::m_currentStaticLOD
protected

current value of static LOD.

Definition at line 200 of file GameLOD.h.

◆ m_currentTextureReduction

Int GameLODManager::m_currentTextureReduction
protected

Definition at line 223 of file GameLOD.h.

◆ m_dynamicDebrisSkipMask

Int GameLODManager::m_dynamicDebrisSkipMask
protected

mask used to enable rendering of every Nth debris.

Definition at line 205 of file GameLOD.h.

◆ m_dynamicGameLODInfo

DynamicGameLODInfo GameLODManager::m_dynamicGameLODInfo[DYNAMIC_GAME_LOD_COUNT]

Definition at line 190 of file GameLOD.h.

◆ m_dynamicParticleSkipMask

Int GameLODManager::m_dynamicParticleSkipMask
protected

mask used to enable rendering of every Nth particle.

Definition at line 203 of file GameLOD.h.

◆ m_floatBenchIndex

Real GameLODManager::m_floatBenchIndex
protected

Definition at line 220 of file GameLOD.h.

◆ m_idealDetailLevel

StaticGameLODLevel GameLODManager::m_idealDetailLevel
protected

Definition at line 214 of file GameLOD.h.

◆ m_intBenchIndex

Real GameLODManager::m_intBenchIndex
protected

Definition at line 219 of file GameLOD.h.

◆ m_lodPresets

Definition at line 191 of file GameLOD.h.

◆ m_memBenchIndex

Real GameLODManager::m_memBenchIndex
protected

Definition at line 221 of file GameLOD.h.

◆ m_memPassed

Bool GameLODManager::m_memPassed
protected

Definition at line 211 of file GameLOD.h.

◆ m_minDynamicParticlePriority

ParticlePriorityType GameLODManager::m_minDynamicParticlePriority
protected

only priorities above/including this value are allowed to render.

Definition at line 207 of file GameLOD.h.

◆ m_minDynamicParticleSkipPriority

ParticlePriorityType GameLODManager::m_minDynamicParticleSkipPriority
protected

priorities above/including this value never skip particles.

Definition at line 208 of file GameLOD.h.

◆ m_numBenchProfiles

Int GameLODManager::m_numBenchProfiles
protected

Definition at line 213 of file GameLOD.h.

◆ m_numDebrisGenerations

Int GameLODManager::m_numDebrisGenerations
protected

number of debris that have been generated since dynamic LOD reduction started.

Definition at line 204 of file GameLOD.h.

◆ m_numLevelPresets

Int GameLODManager::m_numLevelPresets[STATIC_GAME_LOD_CUSTOM]
protected

Definition at line 212 of file GameLOD.h.

◆ m_numParticleGenerations

Int GameLODManager::m_numParticleGenerations
protected

number of particles that have been generated since dynamic LOD reduction started.

Definition at line 202 of file GameLOD.h.

◆ m_numRAM

Int GameLODManager::m_numRAM
protected

Definition at line 217 of file GameLOD.h.

◆ m_reallyLowMHz

Int GameLODManager::m_reallyLowMHz
protected

Definition at line 224 of file GameLOD.h.

◆ m_slowDeathScale

Real GameLODManager::m_slowDeathScale
protected

values < 1.0f are used to accelerate deaths

Definition at line 206 of file GameLOD.h.

◆ m_staticGameLODFieldParseTable

const FieldParse GameLODManager::m_staticGameLODFieldParseTable[]
staticprotected

Definition at line 199 of file GameLOD.h.

◆ m_staticGameLODInfo

StaticGameLODInfo GameLODManager::m_staticGameLODInfo[STATIC_GAME_LOD_COUNT]

Definition at line 189 of file GameLOD.h.

◆ m_videoChipType

ChipsetType GameLODManager::m_videoChipType
protected

Definition at line 215 of file GameLOD.h.

◆ m_videoPassed

Bool GameLODManager::m_videoPassed
protected

Definition at line 209 of file GameLOD.h.


The documentation for this class was generated from the following files: