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

#include <Money.h>

Inherits Snapshot.

Public Member Functions

 Money ()
 
void init ()
 
UnsignedInt countMoney () const
 
UnsignedInt withdraw (UnsignedInt amountToWithdraw, Bool playSound=TRUE)
 returns the actual amount withdrawn, which may be less than you want. (sorry, can't go into debt...)
 
void deposit (UnsignedInt amountToDeposit, Bool playSound=TRUE)
 
void setPlayerIndex (Int ndx)
 
Bool amountEqual (const Money &that) const
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static void parseMoneyAmount (INI *ini, void *instance, void *store, const void *userData)
 

Protected Member Functions

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

Detailed Description

How much "money" (Tiberium, Gems, Magic Resource Boxes, whatever) the Player has. This is currently a Very Simple Class but is encapsulated in anticipation of future expansion.

Definition at line 60 of file Money.h.

Constructor & Destructor Documentation

◆ Money()

Money::Money ( )
inline

Definition at line 65 of file Money.h.

Member Function Documentation

◆ amountEqual()

Bool Money::amountEqual ( const Money & that) const
inline

Definition at line 88 of file Money.h.

◆ countMoney()

UnsignedInt Money::countMoney ( ) const
inline

Definition at line 74 of file Money.h.

◆ crc()

void Money::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 105 of file Money.cpp.

◆ deposit()

void Money::deposit ( UnsignedInt amountToDeposit,
Bool playSound = TRUE )

Definition at line 77 of file Money.cpp.

◆ init()

void Money::init ( )
inline

Definition at line 69 of file Money.h.

◆ loadPostProcess()

void Money::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 131 of file Money.cpp.

◆ parseMoneyAmount()

void Money::parseMoneyAmount ( INI * ini,
void * instance,
void * store,
const void * userData )
static

Parse a money amount for the ini file. E.g. DefaultStartingMoney = 10000

Definition at line 140 of file Money.cpp.

◆ setPlayerIndex()

void Money::setPlayerIndex ( Int ndx)
inline

Definition at line 83 of file Money.h.

◆ withdraw()

UnsignedInt Money::withdraw ( UnsignedInt amountToWithdraw,
Bool playSound = TRUE )

returns the actual amount withdrawn, which may be less than you want. (sorry, can't go into debt...)

Definition at line 55 of file Money.cpp.

◆ xfer()

void Money::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 115 of file Money.cpp.


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