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

#include <SubsystemInterface.h>

Inherited by AI, ActionManager, Anim2DCollection, AnimateWindowManager, ArchiveFileSystem, ArmorStore, AudioManager, BuildAssistant, CDManagerInterface, CaveSystem, ControlBar, CrateSystem, CreditsManager, DamageFXStore, Display, DisplayStringManager, Eva, FXListStore, FileSystem, FontLibrary, FunctionLexicon, GameClient, GameEngine, GameLogic, GameMessageList, GameResultsInterface, GameState, GameStateMap, GameTextInterface, GameWindowManager, GameWindowTransitionsHandler, GlobalData, GlobalLanguage, HotKeyManager, IMEManagerInterface, ImageCollection, InGameUI, Keyboard, LANAPIInterface, LanguageFilter, LocalFileSystem, LocomotorStore, MetaMap, ModuleFactory, Mouse, MultiplayerSettings, NameKeyGenerator, NetworkInterface, ObjectCreationListStore, ParticleSystemManager, PartitionManager, PlayerList, PlayerTemplateStore, RTS2DScene, RTS3DScene, Radar, RankInfoStore, RayEffectSystem, RecorderClass, ScienceStore, ScriptActionsInterface, ScriptConditionsInterface, ScriptEngine, Shell, SidesList, SnowManager, SoundManager, SpecialPowerStore, TeamFactory, TerrainLogic, TerrainRoadCollection, TerrainTypeCollection, TerrainVisual, ThingFactory, UpgradeCenter, VictoryConditionsInterface, VideoPlayerInterface, W3DView, WeaponStore, WebBrowser, and WindowVideoManager.

Public Member Functions

 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void init ()=0
 
virtual void postProcessLoad ()
 
virtual void reset ()=0
 
virtual void update ()=0
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Attributes

AsciiString m_name
 

Detailed Description

This is the abstract base class from which all game engine subsytems should derive from. In order to provide consistent behaviors across all these systems, any implementation must obey the rules defined in here

Nothing about the subsystems is automatic, this interface does not wrap up automated functions, it is only here to provide a basic interface and rules for behavior all subsystems

Definition at line 49 of file SubsystemInterface.h.

Constructor & Destructor Documentation

◆ SubsystemInterface()

SubsystemInterface::SubsystemInterface ( )
  • Constructors should initialize any data to a valid state. That DOES NOT mean the data has default values (something done in the init() method), only that nothing is left pointing to garbage, un-initialized memory. In most cases this probably means just setting members to zero or NULL.

Definition at line 46 of file SubsystemInterface.cpp.

◆ ~SubsystemInterface()

SubsystemInterface::~SubsystemInterface ( )
virtual
  • Free any resources allocated for this class.
    • DO NOT throw exceptions during any destruction ever, and do not call other methods that have the possibility of throwing exceptions. Try to keep it simple and keep as much work actually inside the destructor as possible.

Definition at line 62 of file SubsystemInterface.cpp.

Member Function Documentation

◆ DRAW()

void SubsystemInterface::DRAW ( void )
inline

Definition at line 135 of file SubsystemInterface.h.

◆ draw()

virtual void SubsystemInterface::draw ( void )
inlinevirtual

◆ getName()

AsciiString SubsystemInterface::getName ( void )
inline

Definition at line 140 of file SubsystemInterface.h.

◆ init()

virtual void SubsystemInterface::init ( )
pure virtual
  • Assign any default values to data required for the class
    • Allocate any memory and resources needed throughout the lifetime of the class

Implemented in ActionManager, AI, Anim2DCollection, AnimateWindowManager, ArchiveFileSystem, ArmorStore, AudioManager, BinkVideoPlayer, BuildAssistant, CaveSystem, CDManager, CommandList, ControlBar, CrateSystem, CreditsManager, DamageFXStore, DirectInputKeyboard, DirectInputMouse, Display, DisplayStringManager, Eva, FileSystem, FontLibrary, FunctionLexicon, FXListStore, GameClient, GameEngine, GameLogic, GameMessageList, GameResultsQueue, GameState, GameStateMap, GameTextInterface, GameTextManager, GameTextManager, GameWindowManager, GameWindowTransitionsHandler, GlobalData, GlobalLanguage, GUIEditWindowManager, HotKeyManager, ImageCollection, IMEManager, InGameUI, Keyboard, LANAPI, LANAPIInterface, LanguageFilter, LocalFileSystem, LocomotorStore, MessageStream, MetaMap, MilesAudioManager, ModuleFactory, Mouse, MultiplayerSettings, NameKeyGenerator, Network, NetworkInterface, ObjectCreationListStore, ParticleSystemManager, PartitionManager, PlayerList, PlayerTemplateStore, Radar, RankInfoStore, RayEffectSystem, RecorderClass, RTS2DScene, RTS3DScene, ScienceStore, ScriptActions, ScriptActionsInterface, ScriptConditions, ScriptConditionsInterface, ScriptEngine, Shell, SidesList, SnowManager, SoundManager, SpecialPowerStore, TeamFactory, TerrainLogic, TerrainRoadCollection, TerrainTypeCollection, TerrainVisual, ThingFactory, UpgradeCenter, VictoryConditions, VictoryConditionsInterface, VideoPlayer, VideoPlayerInterface, W3DDisplay, W3DFunctionLexicon, W3DGameClient, W3DGameWindowManager, W3DInGameUI, W3DModuleFactory, W3DMouse, W3DRadar, W3DSnowManager, W3DTerrainLogic, W3DTerrainVisual, W3DView, WeaponStore, WebBrowser, Win32BIGFileSystem, Win32CDManager, Win32GameEngine, Win32LocalFileSystem, Win32Mouse, and WindowVideoManager.

◆ postProcessLoad()

virtual void SubsystemInterface::postProcessLoad ( void )
inlinevirtual
  • Called for all subsystems after all other Subsystems are inited. (allows for initializing inter-system dependencies)

Reimplemented in ArchiveFileSystem, AudioManager, MilesAudioManager, SoundManager, ThingFactory, W3DDisplayStringManager, WeaponStore, and Win32BIGFileSystem.

Definition at line 82 of file SubsystemInterface.h.

◆ reset()

virtual void SubsystemInterface::reset ( )
pure virtual
  • Any system should be able to reset all data and go back to an empty state that is ready to accept a completely new set of data. Reset() can expect to be used in the context of resetting the engine in order to start or load a new game.
    • Do NOT free and re-allocate resources needed, where possible reorganize and re-initialize the resources already allocated.
    • After a reset, the system does not need to be in EXACTLY the same state as a fresh instantiation. If there are persistent state information for the system make sure you maintain it while restoring or re-initializing other transient parts.

Implemented in ActionManager, AI, Anim2DCollection, AnimateWindowManager, ArchiveFileSystem, ArmorStore, AudioManager, BinkVideoPlayer, BuildAssistant, CaveSystem, CDManager, CommandList, ControlBar, CrateSystem, CreditsManager, DamageFXStore, DirectInputKeyboard, DirectInputMouse, Display, DisplayStringManager, Eva, FileSystem, FontLibrary, FunctionLexicon, FXListStore, GameClient, GameEngine, GameLogic, GameMessageList, GameResultsQueue, GameState, GameStateMap, GameTextManager, GameTextManager, GameWindowManager, GameWindowTransitionsHandler, GlobalData, GlobalLanguage, HotKeyManager, ImageCollection, IMEManager, InGameUI, Keyboard, LANAPI, LANAPIInterface, LanguageFilter, LocalFileSystem, LocomotorStore, MessageStream, MetaMap, MilesAudioManager, ModuleFactory, Mouse, MultiplayerSettings, NameKeyGenerator, Network, NetworkInterface, ObjectCreationListStore, ParticleSystemManager, PartitionManager, PlayerList, PlayerTemplateStore, Radar, RankInfoStore, RayEffectSystem, RecorderClass, RTS2DScene, RTS3DScene, ScienceStore, ScriptActions, ScriptActionsInterface, ScriptConditions, ScriptConditionsInterface, ScriptEngine, Shell, SidesList, SnowManager, SoundManager, SpecialPowerStore, TeamFactory, TerrainLogic, TerrainRoadCollection, TerrainTypeCollection, TerrainVisual, ThingFactory, UpgradeCenter, VictoryConditions, VictoryConditionsInterface, VideoPlayer, VideoPlayerInterface, W3DDisplay, W3DFunctionLexicon, W3DGameClient, W3DInGameUI, W3DMouse, W3DRadar, W3DSnowManager, W3DTerrainLogic, W3DTerrainVisual, W3DView, WeaponStore, WebBrowser, Win32BIGFileSystem, Win32CDManager, Win32GameEngine, Win32LocalFileSystem, Win32Mouse, and WindowVideoManager.

◆ setName()

void SubsystemInterface::setName ( AsciiString name)
inline

Definition at line 141 of file SubsystemInterface.h.

◆ UPDATE()

void SubsystemInterface::UPDATE ( void )
inline

Definition at line 134 of file SubsystemInterface.h.

◆ update()

virtual void SubsystemInterface::update ( )
pure virtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implemented in ActionManager, AI, Anim2DCollection, AnimateWindowManager, ArchiveFileSystem, ArmorStore, AudioManager, BinkVideoPlayer, BuildAssistant, CaveSystem, CDManager, CommandList, ControlBar, CrateSystem, CreditsManager, DamageFXStore, DirectInputKeyboard, DirectInputMouse, Display, DisplayStringManager, Eva, FileSystem, FontLibrary, FunctionLexicon, FXListStore, GameClient, GameEngine, GameLogic, GameMessageList, GameResultsQueue, GameState, GameStateMap, GameTextManager, GameTextManager, GameWindowManager, GameWindowTransitionsHandler, GlobalData, GlobalLanguage, HotKeyManager, ImageCollection, IMEManager, InGameUI, Keyboard, LANAPI, LANAPIInterface, LanguageFilter, LocalFileSystem, LocomotorStore, MessageStream, MetaMap, MilesAudioManager, ModuleFactory, Mouse, MultiplayerSettings, NameKeyGenerator, Network, NetworkInterface, ObjectCreationListStore, ParticleSystemManager, PartitionManager, PlayerList, PlayerTemplateStore, Radar, RankInfoStore, RayEffectSystem, RecorderClass, RTS2DScene, RTS3DScene, ScienceStore, ScriptActions, ScriptActionsInterface, ScriptConditions, ScriptConditionsInterface, ScriptEngine, Shell, SidesList, SoundManager, SpecialPowerStore, TeamFactory, TerrainLogic, TerrainRoadCollection, TerrainTypeCollection, TerrainVisual, ThingFactory, UpgradeCenter, VictoryConditions, VictoryConditionsInterface, VideoPlayer, VideoPlayerInterface, W3DDisplayStringManager, W3DFunctionLexicon, W3DGameClient, W3DInGameUI, W3DRadar, W3DSnowManager, W3DTerrainLogic, W3DTerrainVisual, W3DView, WeaponStore, WebBrowser, Win32BIGFileSystem, Win32CDManager, Win32GameEngine, Win32LocalFileSystem, Win32Mouse, and WindowVideoManager.

Member Data Documentation

◆ m_name

AsciiString SubsystemInterface::m_name
protected

Definition at line 138 of file SubsystemInterface.h.


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