equal
deleted
inserted
replaced
12 #include "saveload.h" |
12 #include "saveload.h" |
13 #include "command_func.h" |
13 #include "command_func.h" |
14 #include "network/network.h" |
14 #include "network/network.h" |
15 #include "network/network_internal.h" |
15 #include "network/network_internal.h" |
16 #include "variables.h" |
16 #include "variables.h" |
|
17 #include "cheat_func.h" |
17 #include "ai/ai.h" |
18 #include "ai/ai.h" |
18 #include "player_face.h" |
19 #include "player_face.h" |
19 #include "group.h" |
20 #include "group.h" |
20 #include "window_func.h" |
21 #include "window_func.h" |
21 #include "tile_map.h" |
22 #include "tile_map.h" |
954 value = minu(value / 64, lengthof(_endgame_perf_titles) - 1); |
955 value = minu(value / 64, lengthof(_endgame_perf_titles) - 1); |
955 |
956 |
956 return _endgame_perf_titles[value]; |
957 return _endgame_perf_titles[value]; |
957 } |
958 } |
958 |
959 |
959 /** Return true if any cheat has been used, false otherwise */ |
|
960 static bool CheatHasBeenUsed() |
|
961 { |
|
962 const Cheat* cht = (Cheat*)&_cheats; |
|
963 const Cheat* cht_last = &cht[sizeof(_cheats) / sizeof(Cheat)]; |
|
964 |
|
965 for (; cht != cht_last; cht++) { |
|
966 if (cht->been_used) return true; |
|
967 } |
|
968 |
|
969 return false; |
|
970 } |
|
971 |
|
972 /** Save the highscore for the player */ |
960 /** Save the highscore for the player */ |
973 int8 SaveHighScoreValue(const Player *p) |
961 int8 SaveHighScoreValue(const Player *p) |
974 { |
962 { |
975 HighScore *hs = _highscore_table[_opt.diff_level]; |
963 HighScore *hs = _highscore_table[_opt.diff_level]; |
976 uint i; |
964 uint i; |