$treeview $search $mathjax
Stratagus
2.2.7
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <string>
#include "color.h"
#include "upgrade_structs.h"
#include "vec2i.h"
#include "SDL.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 |
#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. | |
CPlayer * | ThisPlayer |
All players. | |
bool | NoRescueCheck |
Player on local computer. | |
std::vector< CColor > | PlayerColorsRGB [PlayerMax] |
Disable rescue check. | |
std::vector< Uint32 > | PlayerColors [PlayerMax] |
Player colors. | |
std::string | PlayerColorNames [PlayerMax] |
Player colors. | |
PlayerRace | PlayerRaces |
Player color names. | |
int | PlayerColorIndexStart |
Player races. | |
int | PlayerColorIndexCount |
void | InitPlayers () |
Init players. | |
void | CleanPlayers () |
Clean up players. | |
void | CleanRaces () |
Clean up races. | |
void | SavePlayers (CFile &file) |
Save players. | |
void | CreatePlayer (int type) |
Create a new player. | |
void | PlayersInitAi () |
Initialize the computer opponent AI. | |
void | PlayersEachCycle () |
Called each game cycle for player handlers (AI). | |
void | PlayersEachSecond (int player) |
Called each second for a given player handler (AI). | |
void | GraphicPlayerPixels (CPlayer &player, const CGraphic &sprite) |
Change current color set to new player of the sprite. | |
void | DebugPlayers () |
Output debug informations for players. | |
void | PlayerCclRegister () |
register ccl features | |
bool | CanSelectMultipleUnits (const CPlayer &player) |
Allowed to select multiple units, maybe not mine. |
#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 controlls 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.
bool CanSelectMultipleUnits | ( | const CPlayer & | player | ) | [inline] |
Allowed to select multiple units, maybe not mine.
void CleanPlayers | ( | ) |
Clean up players.
Clean up players.
void CleanRaces | ( | ) |
Clean up races.
Clean up the PlayerRaces names.
void CreatePlayer | ( | int | type | ) |
Create a new player.
Create a new player.
type | Player type (Computer,Human,...). |
void DebugPlayers | ( | ) |
Output debug informations for players.
Output debug informations for players.
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.
int NumPlayers |
Player races.
Which indexes to replace with player color
std::string PlayerColorNames[PlayerMax] |
Player colors.
std::vector<Uint32> PlayerColors[PlayerMax] |
Player colors.
std::vector<CColor> PlayerColorsRGB[PlayerMax] |
Disable rescue check.
Colors used for minimap.
Player color names.
All players.