(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer

This commit is contained in:
celestar
2005-06-21 16:28:17 +00:00
parent e2df1d71d5
commit aa7334a3ec
26 changed files with 73 additions and 74 deletions

View File

@@ -197,14 +197,13 @@ void UpdatePlayerMoney32(Player *p);
#define MAX_PLAYERS 8
VARDEF Player _players[MAX_PLAYERS];
#define DEREF_PLAYER(i) (GetPlayer(i))
static inline Player* GetPlayer(uint i)
{
assert(i < lengthof(_players));
return &_players[i];
}
#define IS_HUMAN_PLAYER(p) (!DEREF_PLAYER((byte)(p))->is_ai)
#define IS_HUMAN_PLAYER(p) (!GetPlayer((byte)(p))->is_ai)
#define IS_INTERACTIVE_PLAYER(p) (((byte)p) == _local_player)
typedef struct HighScore {