summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-07 12:11:48 +0000
committerrubidium <rubidium@openttd.org>2007-03-07 12:11:48 +0000
commit24c4d5b06d231785db01500360c26815d8fe4d15 (patch)
tree757477dbdc02025cc29690a4e66e40f872cab02b /src/player.h
parent36bb92ae241403d61dc7a3e5a1696b615be61395 (diff)
downloadopenttd-24c4d5b06d231785db01500360c26815d8fe4d15.tar.xz
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/player.h b/src/player.h
index 2f1d48259..70234dd93 100644
--- a/src/player.h
+++ b/src/player.h
@@ -9,15 +9,15 @@
#include "engine.h"
#include "livery.h"
-typedef struct PlayerEconomyEntry {
+struct PlayerEconomyEntry {
int32 income;
int32 expenses;
int32 delivered_cargo;
int32 performance_history; // player score (scale 0-1000)
int64 company_value;
-} PlayerEconomyEntry;
+};
-typedef struct AiBuildRec {
+struct AiBuildRec {
TileIndex spec_tile;
TileIndex use_tile;
byte rand_rng;
@@ -28,9 +28,9 @@ typedef struct AiBuildRec {
byte buildcmd_b;
byte direction;
CargoID cargo;
-} AiBuildRec;
+};
-typedef struct PlayerAI {
+struct PlayerAI {
byte state;
byte tick; // Used to determine how often to move
uint32 state_counter; // Can hold tile index!
@@ -68,9 +68,9 @@ typedef struct PlayerAI {
TileIndex banned_tiles[16];
byte banned_val[16];
-} PlayerAI;
+};
-typedef struct Ai_PathFinderInfo {
+struct Ai_PathFinderInfo {
TileIndex start_tile_tl; // tl = top-left
TileIndex start_tile_br; // br = bottom-right
TileIndex end_tile_tl; // tl = top-left
@@ -84,17 +84,17 @@ typedef struct Ai_PathFinderInfo {
int position; // Current position in the build-path, needed to build the path
bool rail_or_road; // true = rail, false = road
-} Ai_PathFinderInfo;
+};
// The amount of memory reserved for the AI-special-vehicles
#define AI_MAX_SPECIAL_VEHICLES 100
-typedef struct Ai_SpecialVehicle {
+struct Ai_SpecialVehicle {
VehicleID veh_id;
uint32 flag;
-} Ai_SpecialVehicle;
+};
-typedef struct PlayerAiNew {
+struct PlayerAiNew {
uint8 state;
uint tick;
uint idle;
@@ -144,12 +144,12 @@ typedef struct PlayerAiNew {
int to_ic;
byte to_type;
-} PlayerAiNew;
+};
typedef uint32 PlayerFace;
-typedef struct Player {
+struct Player {
uint32 name_2;
uint16 name_1;
@@ -198,7 +198,7 @@ typedef struct Player {
int16 engine_renew_months;
uint32 engine_renew_money;
uint16 num_engines[TOTAL_NUM_ENGINES]; // caches the number of engines of each type the player owns (no need to save this)
-} Player;
+};
uint16 GetDrawStringPlayerColor(PlayerID player);
@@ -282,11 +282,11 @@ static inline RailType GetBestRailtype(const Player* p)
return RAILTYPE_RAIL;
}
-typedef struct HighScore {
+struct HighScore {
char company[100];
StringID title; // NO_SAVE, has troubles with changing string-numbers.
uint16 score; // do NOT change type, will break hs.dat
-} HighScore;
+};
VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
void SaveToHighScore();