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

#include <ScoreKeeper.h>

Inherits Snapshot.

Public Member Functions

 ScoreKeeper (void)
 
 ~ScoreKeeper (void)
 
void reset (Int playerIdx)
 Zero out the variables.
 
Int calculateScore (void)
 Performs the equation to calculate the score.
 
void addMoneySpent (Int money)
 Adds money to the amount spent.
 
void addMoneyEarned (Int money)
 Adds money to the earned amount.
 
void addObjectBuilt (const Object *o)
 
void addObjectDestroyed (const Object *o)
 
void addObjectLost (const Object *o)
 
void addObjectCaptured (const Object *o)
 
void removeObjectBuilt (const Object *o)
 
Int getTotalMoneyEarned (void)
 
Int getTotalMoneySpent (void)
 
Int getTotalUnitsDestroyed (void)
 
Int getTotalUnitsBuilt (void)
 
Int getTotalUnitsLost (void)
 
Int getTotalBuildingsDestroyed (void)
 
Int getTotalBuildingsBuilt (void)
 
Int getTotalBuildingsLost (void)
 
Int getTotalTechBuildingsCaptured (void)
 
Int getTotalFactionBuildingsCaptured (void)
 
Int getTotalObjectsBuilt (const ThingTemplate *pTemplate)
 
Int getTotalUnitsBuilt (KindOfMaskType validMask, KindOfMaskType invalidMask)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 

Detailed Description

Definition at line 68 of file ScoreKeeper.h.

Constructor & Destructor Documentation

◆ ScoreKeeper()

ScoreKeeper::ScoreKeeper ( void )

Definition at line 77 of file ScoreKeeper.cpp.

◆ ~ScoreKeeper()

ScoreKeeper::~ScoreKeeper ( void )

Definition at line 82 of file ScoreKeeper.cpp.

Member Function Documentation

◆ addMoneyEarned()

void ScoreKeeper::addMoneyEarned ( Int money)
inline

Adds money to the earned amount.

Definition at line 139 of file ScoreKeeper.h.

◆ addMoneySpent()

void ScoreKeeper::addMoneySpent ( Int money)
inline

Adds money to the amount spent.

Definition at line 138 of file ScoreKeeper.h.

◆ addObjectBuilt()

void ScoreKeeper::addObjectBuilt ( const Object * o)

Definition at line 121 of file ScoreKeeper.cpp.

◆ addObjectCaptured()

void ScoreKeeper::addObjectCaptured ( const Object * o)

Definition at line 220 of file ScoreKeeper.cpp.

◆ addObjectDestroyed()

void ScoreKeeper::addObjectDestroyed ( const Object * o)

Definition at line 252 of file ScoreKeeper.cpp.

◆ addObjectLost()

void ScoreKeeper::addObjectLost ( const Object * o)

Definition at line 297 of file ScoreKeeper.cpp.

◆ calculateScore()

Int ScoreKeeper::calculateScore ( void )

Performs the equation to calculate the score.

Definition at line 339 of file ScoreKeeper.cpp.

◆ crc()

void ScoreKeeper::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 399 of file ScoreKeeper.cpp.

◆ getTotalBuildingsBuilt()

Int ScoreKeeper::getTotalBuildingsBuilt ( void )
inline

Definition at line 93 of file ScoreKeeper.h.

◆ getTotalBuildingsDestroyed()

Int ScoreKeeper::getTotalBuildingsDestroyed ( void )

Definition at line 362 of file ScoreKeeper.cpp.

◆ getTotalBuildingsLost()

Int ScoreKeeper::getTotalBuildingsLost ( void )
inline

Definition at line 94 of file ScoreKeeper.h.

◆ getTotalFactionBuildingsCaptured()

Int ScoreKeeper::getTotalFactionBuildingsCaptured ( void )
inline

Definition at line 96 of file ScoreKeeper.h.

◆ getTotalMoneyEarned()

Int ScoreKeeper::getTotalMoneyEarned ( void )
inline

Definition at line 87 of file ScoreKeeper.h.

◆ getTotalMoneySpent()

Int ScoreKeeper::getTotalMoneySpent ( void )
inline

Definition at line 88 of file ScoreKeeper.h.

◆ getTotalObjectsBuilt()

Int ScoreKeeper::getTotalObjectsBuilt ( const ThingTemplate * pTemplate)

Definition at line 171 of file ScoreKeeper.cpp.

◆ getTotalTechBuildingsCaptured()

Int ScoreKeeper::getTotalTechBuildingsCaptured ( void )
inline

Definition at line 95 of file ScoreKeeper.h.

◆ getTotalUnitsBuilt() [1/2]

Int ScoreKeeper::getTotalUnitsBuilt ( KindOfMaskType validMask,
KindOfMaskType invalidMask )

Definition at line 158 of file ScoreKeeper.cpp.

◆ getTotalUnitsBuilt() [2/2]

Int ScoreKeeper::getTotalUnitsBuilt ( void )
inline

Definition at line 90 of file ScoreKeeper.h.

◆ getTotalUnitsDestroyed()

Int ScoreKeeper::getTotalUnitsDestroyed ( void )

Definition at line 380 of file ScoreKeeper.cpp.

◆ getTotalUnitsLost()

Int ScoreKeeper::getTotalUnitsLost ( void )
inline

Definition at line 91 of file ScoreKeeper.h.

◆ loadPostProcess()

void ScoreKeeper::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 565 of file ScoreKeeper.cpp.

◆ removeObjectBuilt()

void ScoreKeeper::removeObjectBuilt ( const Object * o)

Definition at line 184 of file ScoreKeeper.cpp.

◆ reset()

void ScoreKeeper::reset ( Int playerIdx)

Zero out the variables.

Definition at line 91 of file ScoreKeeper.cpp.

◆ xfer()

void ScoreKeeper::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 489 of file ScoreKeeper.cpp.


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