wavelength 1.0.0
Loading...
Searching...
No Matches
PlayerInfo Class Reference

One player of the game GameDb sets up, with a copy of the player's profile. More...

#include <playerinfo.h>

Public Member Functions

 PlayerInfo (int nLocal, int nSlot, const Campaign &profile, int nNetOrder)
 Construct a player with no score and no rank.
int GetLocal () const
void SetLocal (int nLocal)
 Set whether the player is on this console.
int GetSlot () const
void SetSlot (int nSlot)
 Set the slot of the player.
int GetScore () const
void SetScore (int nScore)
 Set the score of the player.
int GetRank () const
void SetRank (int nRank)
 Set the rank of the player.
Campaign & GetProfile ()
const Campaign & GetProfile () const
void SetProfile (const Campaign &profile)
 Replace the copy of the profile.
int GetNetOrder () const
void SetNetOrder (int nNetOrder)
 Set the position in the order of the online session.

Detailed Description

One player of the game GameDb sets up, with a copy of the player's profile.

The RTTI includes the name. The record is 0x10c bytes, and GameDb allocates each one on the heap. The constructor has no out-of-line copy.

Constructor & Destructor Documentation

◆ PlayerInfo()

PlayerInfo::PlayerInfo ( int nLocal,
int nSlot,
const Campaign & profile,
int nNetOrder )
inline

Construct a player with no score and no rank.

Parameters
nLocalNon-zero for a player of this console.
nSlotThe slot of the player.
profileThe profile to copy.
nNetOrderThe position of the player in the order of the online session.

Member Function Documentation

◆ GetLocal()

int PlayerInfo::GetLocal ( ) const
inline
Returns
Non-zero for a player of this console.

◆ SetLocal()

void PlayerInfo::SetLocal ( int nLocal)
inline

Set whether the player is on this console.

Parameters
nLocalNon-zero for a player of this console.

◆ GetSlot()

int PlayerInfo::GetSlot ( ) const
inline
Returns
The slot. It selects the player's sounds and colours.

◆ SetSlot()

void PlayerInfo::SetSlot ( int nSlot)
inline

Set the slot of the player.

Parameters
nSlotThe slot.

◆ GetScore()

int PlayerInfo::GetScore ( ) const
inline
Returns
The score GameDb::SetPlayerScore() recorded.

◆ SetScore()

void PlayerInfo::SetScore ( int nScore)
inline

Set the score of the player.

Parameters
nScoreThe score.

◆ GetRank()

int PlayerInfo::GetRank ( ) const
inline
Returns
The rank of the score among the players, 0 for the best, or -1.

◆ SetRank()

void PlayerInfo::SetRank ( int nRank)
inline

Set the rank of the player.

Parameters
nRankThe rank.

◆ GetProfile() [1/2]

Campaign & PlayerInfo::GetProfile ( )
inline
Returns
The copy of the profile.

◆ GetProfile() [2/2]

const Campaign & PlayerInfo::GetProfile ( ) const
inline
Returns
The copy of the profile.

◆ SetProfile()

void PlayerInfo::SetProfile ( const Campaign & profile)
inline

Replace the copy of the profile.

Parameters
profileThe profile to copy.

◆ GetNetOrder()

int PlayerInfo::GetNetOrder ( ) const
inline
Returns
The position in the order of the online session, or -1.

◆ SetNetOrder()

void PlayerInfo::SetNetOrder ( int nNetOrder)
inline

Set the position in the order of the online session.

Parameters
nNetOrderThe position, or -1.

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