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

#include <GameStateMap.h>

Inherits SubsystemInterface, and Snapshot.

Public Member Functions

 GameStateMap (void)
 
virtual ~GameStateMap (void)
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
virtual void crc (Xfer *xfer)
 run the "light" crc check on this data structure
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
void clearScratchPadMaps (void)
 clear any scratch pad maps from the save directory
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Additional Inherited Members

- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 44 of file GameStateMap.h.

Constructor & Destructor Documentation

◆ GameStateMap()

GameStateMap::GameStateMap ( void )

Definition at line 58 of file GameStateMap.cpp.

◆ ~GameStateMap()

GameStateMap::~GameStateMap ( void )
virtual

Definition at line 65 of file GameStateMap.cpp.

Member Function Documentation

◆ clearScratchPadMaps()

void GameStateMap::clearScratchPadMaps ( void )

clear any scratch pad maps from the save directory

Delete any scratch pad maps in the save directory. Scratch pad maps are maps that were embedded in previously loaded save game files and temporarily written out as their own file so that those map files could be loaded as a part of the load game process

Definition at line 460 of file GameStateMap.cpp.

◆ crc()

virtual void GameStateMap::crc ( Xfer * xfer)
inlinevirtual

run the "light" crc check on this data structure

Implements Snapshot.

Definition at line 59 of file GameStateMap.h.

◆ init()

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

Implements SubsystemInterface.

Definition at line 54 of file GameStateMap.h.

◆ loadPostProcess()

virtual void GameStateMap::loadPostProcess ( void )
inlinevirtual

post process phase for loading save games. All save systems have their xfer run using XferLoad mode, and then all systems each have their post process run

Implements Snapshot.

Definition at line 61 of file GameStateMap.h.

◆ reset()

virtual void GameStateMap::reset ( void )
inlinevirtual
  • 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.

Implements SubsystemInterface.

Definition at line 55 of file GameStateMap.h.

◆ update()

virtual void GameStateMap::update ( void )
inlinevirtual
  • 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.

Implements SubsystemInterface.

Definition at line 56 of file GameStateMap.h.

◆ xfer()

void GameStateMap::xfer ( Xfer * xfer)
virtual

Xfer method Version Info: 1: Initial version 2: Now storing the game mode from logic. Storing that here cause TheGameLogic->startNewGame needs to set up the player list based on it.

Implements Snapshot.

Definition at line 248 of file GameStateMap.cpp.


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