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

#include <VictoryConditions.h>

Inherits SubsystemInterface.

Inherited by VictoryConditions.

Public Member Functions

 VictoryConditionsInterface ()
 
virtual void init (void)=0
 
virtual void reset (void)=0
 
virtual void update (void)=0
 
void setVictoryConditions (Int victoryConditions)
 
Int getVictoryConditions (void)
 
virtual Bool hasAchievedVictory (Player *player)=0
 has a specific player and his allies won?
 
virtual Bool hasBeenDefeated (Player *player)=0
 has a specific player and his allies lost?
 
virtual Bool hasSinglePlayerBeenDefeated (Player *player)=0
 has a specific player lost?
 
virtual void cachePlayerPtrs (void)=0
 players have been created - cache the ones of interest
 
virtual Bool isLocalAlliedVictory (void)=0
 convenience function
 
virtual Bool isLocalAlliedDefeat (void)=0
 convenience function
 
virtual Bool isLocalDefeat (void)=0
 convenience function
 
virtual Bool amIObserver (void)=0
 Am I an observer?( need this for scripts )
 
virtual UnsignedInt getEndFrame (void)=0
 on which frame was the game effectively over?
 
- 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)
 

Protected Attributes

Int m_victoryConditions
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

VictoryConditionsInterface class - maintains information about the game setup and the contents of its slot list hroughout the game.

Definition at line 52 of file VictoryConditions.h.

Constructor & Destructor Documentation

◆ VictoryConditionsInterface()

VictoryConditionsInterface::VictoryConditionsInterface ( )
inline

Definition at line 55 of file VictoryConditions.h.

Member Function Documentation

◆ amIObserver()

virtual Bool VictoryConditionsInterface::amIObserver ( void )
pure virtual

Am I an observer?( need this for scripts )

Implemented in VictoryConditions.

◆ cachePlayerPtrs()

virtual void VictoryConditionsInterface::cachePlayerPtrs ( void )
pure virtual

players have been created - cache the ones of interest

Implemented in VictoryConditions.

◆ getEndFrame()

virtual UnsignedInt VictoryConditionsInterface::getEndFrame ( void )
pure virtual

on which frame was the game effectively over?

Implemented in VictoryConditions.

◆ getVictoryConditions()

Int VictoryConditionsInterface::getVictoryConditions ( void )
inline

Definition at line 62 of file VictoryConditions.h.

◆ hasAchievedVictory()

virtual Bool VictoryConditionsInterface::hasAchievedVictory ( Player * player)
pure virtual

has a specific player and his allies won?

Implemented in VictoryConditions.

◆ hasBeenDefeated()

virtual Bool VictoryConditionsInterface::hasBeenDefeated ( Player * player)
pure virtual

has a specific player and his allies lost?

Implemented in VictoryConditions.

◆ hasSinglePlayerBeenDefeated()

virtual Bool VictoryConditionsInterface::hasSinglePlayerBeenDefeated ( Player * player)
pure virtual

has a specific player lost?

Implemented in VictoryConditions.

◆ init()

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

Implements SubsystemInterface.

Implemented in VictoryConditions.

◆ isLocalAlliedDefeat()

virtual Bool VictoryConditionsInterface::isLocalAlliedDefeat ( void )
pure virtual

convenience function

Implemented in VictoryConditions.

◆ isLocalAlliedVictory()

virtual Bool VictoryConditionsInterface::isLocalAlliedVictory ( void )
pure virtual

convenience function

Implemented in VictoryConditions.

◆ isLocalDefeat()

virtual Bool VictoryConditionsInterface::isLocalDefeat ( void )
pure virtual

convenience function

Implemented in VictoryConditions.

◆ reset()

virtual void VictoryConditionsInterface::reset ( void )
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.

Implements SubsystemInterface.

Implemented in VictoryConditions.

◆ setVictoryConditions()

void VictoryConditionsInterface::setVictoryConditions ( Int victoryConditions)
inline

Definition at line 61 of file VictoryConditions.h.

◆ update()

virtual void VictoryConditionsInterface::update ( void )
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.

Implements SubsystemInterface.

Implemented in VictoryConditions.

Member Data Documentation

◆ m_victoryConditions

Int VictoryConditionsInterface::m_victoryConditions
protected

Definition at line 76 of file VictoryConditions.h.


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