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

Inherits VictoryConditionsInterface.

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from VictoryConditionsInterface
Int m_victoryConditions
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 79 of file VictoryConditions.cpp.

Constructor & Destructor Documentation

◆ VictoryConditions()

VictoryConditions::VictoryConditions ( )

Definition at line 117 of file VictoryConditions.cpp.

Member Function Documentation

◆ amIObserver()

Bool VictoryConditions::amIObserver ( void )
inlinevirtual

Am I an observer?( need this for scripts )

Implements VictoryConditionsInterface.

Definition at line 97 of file VictoryConditions.cpp.

◆ cachePlayerPtrs()

void VictoryConditions::cachePlayerPtrs ( void )
virtual

players have been created - cache the ones of interest

Implements VictoryConditionsInterface.

Definition at line 308 of file VictoryConditions.cpp.

◆ getEndFrame()

virtual UnsignedInt VictoryConditions::getEndFrame ( void )
inlinevirtual

on which frame was the game effectively over?

Implements VictoryConditionsInterface.

Definition at line 98 of file VictoryConditions.cpp.

◆ hasAchievedVictory()

Bool VictoryConditions::hasAchievedVictory ( Player * player)
virtual

has a specific player and his allies won?

Implements VictoryConditionsInterface.

Definition at line 243 of file VictoryConditions.cpp.

◆ hasBeenDefeated()

Bool VictoryConditions::hasBeenDefeated ( Player * player)
virtual

has a specific player and his allies lost?

Implements VictoryConditionsInterface.

Definition at line 262 of file VictoryConditions.cpp.

◆ hasSinglePlayerBeenDefeated()

Bool VictoryConditions::hasSinglePlayerBeenDefeated ( Player * player)
virtual

has a specific player lost?

Implements VictoryConditionsInterface.

Definition at line 274 of file VictoryConditions.cpp.

◆ init()

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

Implements VictoryConditionsInterface.

Definition at line 123 of file VictoryConditions.cpp.

◆ isLocalAlliedDefeat()

Bool VictoryConditions::isLocalAlliedDefeat ( void )
virtual

convenience function

Implements VictoryConditionsInterface.

Definition at line 352 of file VictoryConditions.cpp.

◆ isLocalAlliedVictory()

Bool VictoryConditions::isLocalAlliedVictory ( void )
virtual

convenience function

Implements VictoryConditionsInterface.

Definition at line 343 of file VictoryConditions.cpp.

◆ isLocalDefeat()

Bool VictoryConditions::isLocalDefeat ( void )
virtual

convenience function

Implements VictoryConditionsInterface.

Definition at line 361 of file VictoryConditions.cpp.

◆ reset()

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

Definition at line 129 of file VictoryConditions.cpp.

◆ update()

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

Definition at line 147 of file VictoryConditions.cpp.


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