_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <set>
#include <string>
#include <vector>
#include "color.h"
#include "upgrade_structs.h"
#include "vec2i.h"
#include "settings.h"
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 |
enum | _diplomacy_ { DiplomacyAllied, DiplomacyNeutral, DiplomacyEnemy, DiplomacyCrazy } |
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< std::vector< CColor > > | PlayerColorsRGB |
Disable rescue check. More... | |
std::vector< std::vector< SDL_Color > > | PlayerColorsSDL |
Player colors. More... | |
std::vector< std::string > | PlayerColorNames |
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 (PlayerTypes 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 (int colorIndex, const CGraphic &sprite) |
Change current color set to the player color 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 SPEEDUP_FACTOR 100 |
#define STORE_BOTH 2 |
#define STORE_BUILDING 1 |
#define STORE_OVERALL 0 |
enum _diplomacy_ |
enum NotifyType |
|
inline |
Allowed to select multiple units, maybe not mine.
void CleanPlayers | ( | ) |
Clean up players.
whether the player has been revealed (i.e. after losing the last Town Hall)
Clean up players.
void CreatePlayer | ( | PlayerTypes | 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 the player color 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.
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::vector<std::string> PlayerColorNames |
Player colors.
std::vector<std::vector<CColor> > PlayerColorsRGB |
Disable rescue check.
Colors used for minimap.
std::vector<std::vector<SDL_Color> > PlayerColorsSDL |
Player colors.
PlayerRace PlayerRaces |
Player color names.
Player color names.
CPlayer* ThisPlayer |
All players.
All players.