equal
deleted
inserted
replaced
215 |
215 |
216 VARDEF Player _players[MAX_PLAYERS]; |
216 VARDEF Player _players[MAX_PLAYERS]; |
217 // NOSAVE: can be determined from player structs |
217 // NOSAVE: can be determined from player structs |
218 VARDEF byte _player_colors[MAX_PLAYERS]; |
218 VARDEF byte _player_colors[MAX_PLAYERS]; |
219 |
219 |
220 static inline byte ActivePlayerCount(void) |
220 static inline byte ActivePlayerCount() |
221 { |
221 { |
222 const Player *p; |
222 const Player *p; |
223 byte count = 0; |
223 byte count = 0; |
224 |
224 |
225 FOR_ALL_PLAYERS(p) { |
225 FOR_ALL_PLAYERS(p) { |
233 { |
233 { |
234 assert(IS_INSIDE_1D(i, PLAYER_FIRST, lengthof(_players))); |
234 assert(IS_INSIDE_1D(i, PLAYER_FIRST, lengthof(_players))); |
235 return &_players[i]; |
235 return &_players[i]; |
236 } |
236 } |
237 |
237 |
238 static inline bool IsLocalPlayer(void) |
238 static inline bool IsLocalPlayer() |
239 { |
239 { |
240 return _local_player == _current_player; |
240 return _local_player == _current_player; |
241 } |
241 } |
242 |
242 |
243 static inline bool IsValidPlayer(PlayerID pi) |
243 static inline bool IsValidPlayer(PlayerID pi) |
287 StringID title; // NO_SAVE, has troubles with changing string-numbers. |
287 StringID title; // NO_SAVE, has troubles with changing string-numbers. |
288 uint16 score; // do NOT change type, will break hs.dat |
288 uint16 score; // do NOT change type, will break hs.dat |
289 } HighScore; |
289 } HighScore; |
290 |
290 |
291 VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 |
291 VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 |
292 void SaveToHighScore(void); |
292 void SaveToHighScore(); |
293 void LoadFromHighScore(void); |
293 void LoadFromHighScore(); |
294 int8 SaveHighScoreValue(const Player *p); |
294 int8 SaveHighScoreValue(const Player *p); |
295 int8 SaveHighScoreValueNetwork(void); |
295 int8 SaveHighScoreValueNetwork(); |
296 |
296 |
297 /* Engine Replacement Functions */ |
297 /* Engine Replacement Functions */ |
298 |
298 |
299 /** |
299 /** |
300 * Remove all engine replacement settings for the given player. |
300 * Remove all engine replacement settings for the given player. |