Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Player Class Reference

#include <Player.h>

List of all members.

Public Member Functions

 Player (const char *name)
virtual ~Player ()
int operator== (const Player &u) const
int Identity () const
const TextName () const
const TextPassword () const
const TextSquadron () const
const TextSignature () const
const TextChatMacro (int n) const
int CreateDate () const
int Rank () const
int Medal (int n) const
int Points () const
int Medals () const
int FlightTime () const
int Missions () const
int Kills () const
int Losses () const
int Campaigns () const
int Trained () const
int FlightModel () const
int FlyingStart () const
int LandingModel () const
int AILevel () const
int HUDMode () const
int HUDColor () const
int FriendlyFire () const
int GridMode () const
int Gunsight () const
bool ShowAward () const
Text AwardName () const
Text AwardDesc () const
BitmapAwardImage () const
SoundAwardSound () const
bool CanCommand (int ship_class)
void SetName (const char *n)
void SetPassword (const char *p)
void SetSquadron (const char *s)
void SetSignature (const char *s)
void SetChatMacro (int n, const char *m)
void SetCreateDate (int d)
void SetRank (int r)
void SetPoints (int p)
void SetMedals (int m)
void SetCampaigns (int n)
void SetTrained (int n)
void SetFlightTime (int t)
void SetMissions (int m)
void SetKills (int k)
void SetLosses (int l)
void AddFlightTime (int t)
void AddPoints (int p)
void AddMedal (int m)
void AddMissions (int m)
void AddKills (int k)
void AddLosses (int l)
bool HasTrained (int n) const
bool HasCompletedCampaign (int id) const
void SetCampaignComplete (int id)
void SetFlightModel (int n)
void SetFlyingStart (int n)
void SetLandingModel (int n)
void SetAILevel (int n)
void SetHUDMode (int n)
void SetHUDColor (int n)
void SetFriendlyFire (int n)
void SetGridMode (int n)
void SetGunsight (int n)
void ClearShowAward ()
Text EncodeStats ()
void DecodeStats (const char *stats)
int GetMissionPoints (ShipStats *stats, DWORD start_time)
void ProcessStats (ShipStats *stats, DWORD start_time)
bool EarnedAward (AwardInfo *a, ShipStats *s)

Static Public Member Functions

static const char * TYPENAME ()
static const char * RankName (int rank)
static const char * RankAbrv (int rank)
static int RankFromName (const char *name)
static BitmapRankInsignia (int rank, int size)
static const char * RankDescription (int rank)
static const char * MedalName (int medal)
static BitmapMedalInsignia (int medal, int size)
static const char * MedalDescription (int medal)
static int CommandRankRequired (int ship_class)
static List< Player > & GetRoster ()
static PlayerGetCurrentPlayer ()
static void SelectPlayer (Player *p)
static PlayerCreate (const char *name)
static void Destroy (Player *p)
static PlayerFind (const char *name)
static void Initialize ()
static void Close ()
static void Load ()
static void Save ()
static bool ConfigExists ()
static void LoadAwardTables ()

Protected Member Functions

 Player ()
void CreateUniqueID ()

Protected Attributes

int uid
Text name
Text pass
Text squadron
Text signature
Text chat_macros [10]
int mfd [4]
int create_date
int points
int medals
int flight_time
int missions
int kills
int losses
int campaigns
int trained
int flight_model
int flying_start
int landing_model
int ai_level
int hud_mode
int hud_color
int ff_level
int grid
int gunsight
AwardInfoaward

Detailed Description

Definition at line 33 of file Player.h.


Constructor & Destructor Documentation

Player::Player ( const char *  name)

Definition at line 106 of file Player.cpp.

Player::~Player ( )
virtual

Definition at line 136 of file Player.cpp.

Player::Player ( )
protected

Definition at line 121 of file Player.cpp.


Member Function Documentation

void Player::AddFlightTime ( int  t)

Definition at line 286 of file Player.cpp.

void Player::AddKills ( int  k)

Definition at line 307 of file Player.cpp.

void Player::AddLosses ( int  l)

Definition at line 314 of file Player.cpp.

void Player::AddMedal ( int  m)
void Player::AddMissions ( int  m)

Definition at line 300 of file Player.cpp.

void Player::AddPoints ( int  p)

Definition at line 293 of file Player.cpp.

int Player::AILevel ( ) const
inline

Definition at line 64 of file Player.h.

Text Player::AwardDesc ( ) const

Definition at line 407 of file Player.cpp.

Bitmap * Player::AwardImage ( ) const

Definition at line 416 of file Player.cpp.

Text Player::AwardName ( ) const

Definition at line 398 of file Player.cpp.

Sound * Player::AwardSound ( ) const

Definition at line 425 of file Player.cpp.

int Player::Campaigns ( ) const
inline

Definition at line 58 of file Player.h.

bool Player::CanCommand ( int  ship_class)

Definition at line 606 of file Player.cpp.

const Text & Player::ChatMacro ( int  n) const

Definition at line 174 of file Player.cpp.

void Player::ClearShowAward ( )

Definition at line 392 of file Player.cpp.

void Player::Close ( )
static

Definition at line 908 of file Player.cpp.

int Player::CommandRankRequired ( int  ship_class)
static

Definition at line 622 of file Player.cpp.

bool Player::ConfigExists ( )
static

Definition at line 923 of file Player.cpp.

Player * Player::Create ( const char *  name)
static

Definition at line 854 of file Player.cpp.

int Player::CreateDate ( ) const
inline

Definition at line 49 of file Player.h.

void Player::CreateUniqueID ( )
protected

Definition at line 1542 of file Player.cpp.

void Player::DecodeStats ( const char *  stats)

Definition at line 1246 of file Player.cpp.

void Player::Destroy ( Player p)
static

Definition at line 873 of file Player.cpp.

bool Player::EarnedAward ( AwardInfo a,
ShipStats s 
)

Definition at line 718 of file Player.cpp.

Text Player::EncodeStats ( )

Definition at line 1219 of file Player.cpp.

Player * Player::Find ( const char *  name)
static

Definition at line 842 of file Player.cpp.

int Player::FlightModel ( ) const
inline

Definition at line 61 of file Player.h.

int Player::FlightTime ( ) const
inline

Definition at line 54 of file Player.h.

int Player::FlyingStart ( ) const
inline

Definition at line 62 of file Player.h.

int Player::FriendlyFire ( ) const
inline

Definition at line 67 of file Player.h.

Player * Player::GetCurrentPlayer ( )
static

Definition at line 799 of file Player.cpp.

int Player::GetMissionPoints ( ShipStats stats,
DWORD  start_time 
)

Definition at line 637 of file Player.cpp.

List< Player > & Player::GetRoster ( )
static

Definition at line 793 of file Player.cpp.

int Player::GridMode ( ) const
inline

Definition at line 68 of file Player.h.

int Player::Gunsight ( ) const
inline

Definition at line 69 of file Player.h.

bool Player::HasCompletedCampaign ( int  id) const

Definition at line 231 of file Player.cpp.

bool Player::HasTrained ( int  n) const

Definition at line 222 of file Player.cpp.

int Player::HUDColor ( ) const
inline

Definition at line 66 of file Player.h.

int Player::HUDMode ( ) const
inline

Definition at line 65 of file Player.h.

int Player::Identity ( ) const
inline

Definition at line 43 of file Player.h.

void Player::Initialize ( )
static

Definition at line 893 of file Player.cpp.

int Player::Kills ( ) const
inline

Definition at line 56 of file Player.h.

int Player::LandingModel ( ) const
inline

Definition at line 63 of file Player.h.

void Player::Load ( )
static

Definition at line 935 of file Player.cpp.

void Player::LoadAwardTables ( )
static

Definition at line 1333 of file Player.cpp.

int Player::Losses ( ) const
inline

Definition at line 57 of file Player.h.

int Player::Medal ( int  n) const

Definition at line 534 of file Player.cpp.

const char * Player::MedalDescription ( int  medal)
static

Definition at line 591 of file Player.cpp.

Bitmap * Player::MedalInsignia ( int  medal,
int  size 
)
static

Definition at line 573 of file Player.cpp.

const char * Player::MedalName ( int  medal)
static

Definition at line 560 of file Player.cpp.

int Player::Medals ( ) const
inline

Definition at line 53 of file Player.h.

int Player::Missions ( ) const
inline

Definition at line 55 of file Player.h.

const Text& Player::Name ( ) const
inline

Definition at line 44 of file Player.h.

int Player::operator== ( const Player u) const
inline

Definition at line 41 of file Player.h.

const Text& Player::Password ( ) const
inline

Definition at line 45 of file Player.h.

int Player::Points ( ) const
inline

Definition at line 52 of file Player.h.

void Player::ProcessStats ( ShipStats stats,
DWORD  start_time 
)

Definition at line 671 of file Player.cpp.

int Player::Rank ( ) const

Definition at line 511 of file Player.cpp.

const char * Player::RankAbrv ( int  rank)
static

Definition at line 454 of file Player.cpp.

const char * Player::RankDescription ( int  rank)
static

Definition at line 485 of file Player.cpp.

int Player::RankFromName ( const char *  name)
static

Definition at line 498 of file Player.cpp.

Bitmap * Player::RankInsignia ( int  rank,
int  size 
)
static

Definition at line 467 of file Player.cpp.

const char * Player::RankName ( int  rank)
static

Definition at line 441 of file Player.cpp.

void Player::Save ( )
static

Definition at line 1131 of file Player.cpp.

void Player::SelectPlayer ( Player p)
static

Definition at line 805 of file Player.cpp.

void Player::SetAILevel ( int  n)

Definition at line 347 of file Player.cpp.

void Player::SetCampaignComplete ( int  id)

Definition at line 240 of file Player.cpp.

void Player::SetCampaigns ( int  n)

Definition at line 203 of file Player.cpp.

void Player::SetChatMacro ( int  n,
const char *  m 
)

Definition at line 183 of file Player.cpp.

void Player::SetCreateDate ( int  d)

Definition at line 249 of file Player.cpp.

void Player::SetFlightModel ( int  n)

Definition at line 323 of file Player.cpp.

void Player::SetFlightTime ( int  t)

Definition at line 256 of file Player.cpp.

void Player::SetFlyingStart ( int  n)

Definition at line 332 of file Player.cpp.

void Player::SetFriendlyFire ( int  n)

Definition at line 367 of file Player.cpp.

void Player::SetGridMode ( int  n)

Definition at line 376 of file Player.cpp.

void Player::SetGunsight ( int  n)

Definition at line 384 of file Player.cpp.

void Player::SetHUDColor ( int  n)

Definition at line 360 of file Player.cpp.

void Player::SetHUDMode ( int  n)

Definition at line 353 of file Player.cpp.

void Player::SetKills ( int  k)

Definition at line 270 of file Player.cpp.

void Player::SetLandingModel ( int  n)

Definition at line 338 of file Player.cpp.

void Player::SetLosses ( int  l)

Definition at line 277 of file Player.cpp.

void Player::SetMedals ( int  m)

Definition at line 197 of file Player.cpp.

void Player::SetMissions ( int  m)

Definition at line 263 of file Player.cpp.

void Player::SetName ( const char *  n)

Definition at line 142 of file Player.cpp.

void Player::SetPassword ( const char *  p)

Definition at line 149 of file Player.cpp.

void Player::SetPoints ( int  p)

Definition at line 190 of file Player.cpp.

void Player::SetRank ( int  r)

Definition at line 523 of file Player.cpp.

void Player::SetSignature ( const char *  s)

Definition at line 167 of file Player.cpp.

void Player::SetSquadron ( const char *  s)

Definition at line 160 of file Player.cpp.

void Player::SetTrained ( int  n)

Definition at line 209 of file Player.cpp.

bool Player::ShowAward ( ) const
inline

Definition at line 71 of file Player.h.

const Text& Player::Signature ( ) const
inline

Definition at line 47 of file Player.h.

const Text& Player::Squadron ( ) const
inline

Definition at line 46 of file Player.h.

int Player::Trained ( ) const
inline

Definition at line 59 of file Player.h.

static const char* Player::TYPENAME ( )
inlinestatic

Definition at line 36 of file Player.h.


Member Data Documentation

int Player::ai_level
protected

Definition at line 176 of file Player.h.

AwardInfo* Player::award
protected

Definition at line 184 of file Player.h.

int Player::campaigns
protected

Definition at line 169 of file Player.h.

Text Player::chat_macros[10]
protected

Definition at line 158 of file Player.h.

int Player::create_date
protected

Definition at line 162 of file Player.h.

int Player::ff_level
protected

Definition at line 179 of file Player.h.

int Player::flight_model
protected

Definition at line 173 of file Player.h.

int Player::flight_time
protected

Definition at line 165 of file Player.h.

int Player::flying_start
protected

Definition at line 174 of file Player.h.

int Player::grid
protected

Definition at line 180 of file Player.h.

int Player::gunsight
protected

Definition at line 181 of file Player.h.

int Player::hud_color
protected

Definition at line 178 of file Player.h.

int Player::hud_mode
protected

Definition at line 177 of file Player.h.

int Player::kills
protected

Definition at line 167 of file Player.h.

int Player::landing_model
protected

Definition at line 175 of file Player.h.

int Player::losses
protected

Definition at line 168 of file Player.h.

int Player::medals
protected

Definition at line 164 of file Player.h.

int Player::mfd[4]
protected

Definition at line 159 of file Player.h.

int Player::missions
protected

Definition at line 166 of file Player.h.

Text Player::name
protected

Definition at line 154 of file Player.h.

Text Player::pass
protected

Definition at line 155 of file Player.h.

int Player::points
protected

Definition at line 163 of file Player.h.

Text Player::signature
protected

Definition at line 157 of file Player.h.

Text Player::squadron
protected

Definition at line 156 of file Player.h.

int Player::trained
protected

Definition at line 170 of file Player.h.

int Player::uid
protected

Definition at line 153 of file Player.h.


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