Apocalypse mirror
Sourceforge mirror |
News | Info | Characters | Arenas | Screenshots | Forums | Download | ||||
Developer: | Making of | Character-HOWTO | AI Design | Submit a Character | |||
Documentation: | Main Page | Modules | Class Hierarchy | Class List | File List |
#include <PlayerSelect.h>
Public Member Functions | |
CPlayerSelect () | |
const SPlayerInfo & | GetPlayerInfo (int a_iPlayer) |
Returns the info of a given player. | |
SPlayerInfo & | EditPlayerInfo (int a_iPlayer) |
const char * | GetFighterName (int a_iPlayer) |
int | GetFighterNameWidth (int a_iPlayer) |
void | DoPlayerSelect () |
void | SetPlayer (int a_iPlayer, FighterEnum a_enFighter) |
SetPlayer loads the given fighter for the given player. | |
void | SetTint (int a_iPlayer, TintEnum a_enFighter) |
bool | IsFighterAvailable (FighterEnum a_enFighter) |
Returns true if the given fighter can be used. | |
bool | IsLocalFighterAvailable (FighterEnum a_enFighter) |
bool | IsFighterInTeam (FighterEnum a_enFighter) |
Static Protected Member Functions | |
static CRlePack * | LoadFighter (FighterEnum m_enFighter) |
LoadFighter simply looks up the filename associated with the given fighter, loads it, and returns the CRlePack. | |
Protected Attributes | |
SPlayerInfo | m_aoPlayers [MAXPLAYERS] |
int | m_aiFighterNameWidth [MAXPLAYERS] |
It also stores info about which fighter is available, and allows other parts of the program to programmatically assign a fighter to a player, and set fighter tints (this is used by e.g. the "frozen" effect.)
This is the model part model-view-controller architecture of the player selection.
|
|
|
|
|
|
|
|
|
|
|
Returns the info of a given player. The most important piece in the info is the player's CRlePack which is used for drawing the player in the Game, the GameOver and the FighterInfo screens. |
|
Returns true if the given fighter can be used. Some fighters are just not in the data files yet, or not installed. |
|
|
|
|
|
LoadFighter simply looks up the filename associated with the given fighter, loads it, and returns the CRlePack.
|
|
SetPlayer loads the given fighter for the given player. The CRlePack is loaded first. If that succeeds, then the perl backend is set too. The tint and palette of both players are set. |
|
|
|
|
|
|