_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
Go to the source code of this file.
Classes | |
class | CPlayer |
Diplomacy states for CommandDiplomacy. More... | |
class | PlayerRace |
player.h - The player headerfile. | |
#define | STORE_OVERALL 0 |
#define | STORE_BUILDING 1 |
#define | STORE_BOTH 2 |
#define | SPEEDUP_FACTOR 100 |
#define | PlayerNumNeutral (PlayerMax - 1) |
enum | _diplomacy_ { DiplomacyAllied, DiplomacyNeutral, DiplomacyEnemy, DiplomacyCrazy } |
enum | PlayerRacesOld { PlayerRaceHuman = 0, PlayerRaceOrc = 1 } |
enum | PlayerTypes { PlayerNeutral = 2, PlayerNobody = 3, PlayerComputer = 4, PlayerPerson = 5, PlayerRescuePassive = 6, PlayerRescueActive = 7 } |
enum | NotifyType { NotifyRed, NotifyYellow, NotifyGreen } |
int | NumPlayers |
CPlayer | Players [PlayerMax] |
How many player slots used. More... | |
CPlayer * | ThisPlayer |
All players. More... | |
bool | NoRescueCheck |
Player on local computer. More... | |
std::vector< CColor > | PlayerColorsRGB [PlayerMax] |
Disable rescue check. More... | |
std::vector< IntColor > | PlayerColors [PlayerMax] |
Player colors. More... | |
std::string | PlayerColorNames [PlayerMax] |
Player colors. More... | |
PlayerRace | PlayerRaces |
Player color names. More... | |
int | PlayerColorIndexStart |
Player races. More... | |
int | PlayerColorIndexCount |
void | InitPlayers () |
Init players. More... | |
void | CleanPlayers () |
Clean up players. More... | |
void | SavePlayers (CFile &file) |
Save players. More... | |
void | CreatePlayer (int type) |
Create a new player. More... | |
void | PlayersInitAi () |
Initialize the computer opponent AI. More... | |
void | PlayersEachCycle () |
Called each game cycle for player handlers (AI) More... | |
void | PlayersEachSecond (int player) |
Called each second for a given player handler (AI) More... | |
void | GraphicPlayerPixels (CPlayer &player, const CGraphic &sprite) |
Change current color set to new player of the sprite. More... | |
void | DebugPlayers () |
Output debug information for players. More... | |
void | FreePlayerColors () |
void | PlayerCclRegister () |
register ccl features More... | |
bool | CanSelectMultipleUnits (const CPlayer &player) |
Allowed to select multiple units, maybe not mine. More... | |
#define PlayerNumNeutral (PlayerMax - 1) |
#define SPEEDUP_FACTOR 100 |
#define STORE_BOTH 2 |
#define STORE_BUILDING 1 |
#define STORE_OVERALL 0 |
enum _diplomacy_ |
enum NotifyType |
enum PlayerRacesOld |
enum PlayerTypes |
Types for the player
This player is controlled by the computer doing nothing.
This player is unused. Nobody controls this player.
This player is controlled by the computer. CPlayer::AiNum selects the AI strategy.
This player is contolled by a person. This can be the player sitting on the local computer or player playing over the network.
This player does nothing, the game pieces just sit in the game (being passive)... when a person player moves next to a PassiveRescue unit/building, then it is "rescued" and becomes part of that persons team. If the city center is rescued, than all units of this player are rescued.
This player is controlled by the computer. CPlayer::AiNum selects the AI strategy. Until it is rescued it plays like an ally. The first person which reaches units of this player, can rescue them. If the city center is rescued, than all units of this player are rescued.
Enumerator | |
---|---|
PlayerNeutral | |
PlayerNobody |
neutral |
PlayerComputer |
unused slot |
PlayerPerson |
computer player |
PlayerRescuePassive |
human player |
PlayerRescueActive |
rescued passive |
|
inline |
Allowed to select multiple units, maybe not mine.
void CleanPlayers | ( | ) |
Clean up players.
Clean up players.
void CreatePlayer | ( | int | type | ) |
Create a new player.
Create a new player.
type | Player type (Computer,Human,...). |
void DebugPlayers | ( | ) |
Output debug information for players.
Output debug information for players.
void FreePlayerColors | ( | ) |
Change current color set to new player of the sprite.
Change current color set to new player.
FIXME: use function pointer here.
player | Pointer to player. |
sprite | The sprite in which the colors should be changed. |
void InitPlayers | ( | ) |
Init players.
Init players.
void PlayerCclRegister | ( | ) |
register ccl features
Register CCL features for players.
void PlayersEachCycle | ( | ) |
Called each game cycle for player handlers (AI)
Handle AI of all players each game cycle.
void PlayersEachSecond | ( | int | playerIdx | ) |
Called each second for a given player handler (AI)
Handle AI of a player each second.
playerIdx | the player to update AI |
void PlayersInitAi | ( | ) |
Initialize the computer opponent AI.
Initialize the Ai for all players.
void SavePlayers | ( | CFile & | file | ) |
Save players.
Save state of players to file.
file | Output file. |
bool NoRescueCheck |
Player on local computer.
Player on local computer.
int NumPlayers |
int PlayerColorIndexCount |
int PlayerColorIndexStart |
Player races.
Which indexes to replace with player color
std::string PlayerColorNames[PlayerMax] |
Player colors.
PlayerRace PlayerRaces |
Player color names.
Player color names.
CPlayer* ThisPlayer |
All players.
All players.