| 1 | /* |
| 2 | * PROPRIETARY INFORMATION. This software is proprietary to POWDER |
| 3 | * Development, and is not to be reproduced, transmitted, or disclosed |
| 4 | * in any way without written permission. |
| 5 | * |
| 6 | * Produced by: Jeff Lait |
| 7 | * |
| 8 | * POWDER Development |
| 9 | * |
| 10 | * NAME: hiscore.h ( POWDER Library, C++ ) |
| 11 | * |
| 12 | * COMMENTS: |
| 13 | * Provides routines to manage our high score list. |
| 14 | */ |
| 15 | |
| 16 | #ifndef __hiscore__ |
| 17 | #define __hiscore__ |
| 18 | |
| 19 | class MOB; |
| 20 | class SRAMSTREAM; |
| 21 | struct HISCORE_ENTRY; |
| 22 | |
| 23 | extern bool glbRNGValid; |
| 24 | extern int glbRNGSeed; |
| 25 | |
| 26 | // Inspects the SRAM to determine save version, erases save file |
| 27 | // if necessary. |
| 28 | void |
| 29 | hiscore_init(); |
| 30 | |
| 31 | // Returns version of POWDER. |
| 32 | int |
| 33 | hiscore_getversion(); |
| 34 | |
| 35 | // Returns the current hiscore save count. |
| 36 | // 0 means no save game. |
| 37 | // 1 means a valid save game. |
| 38 | // 2 or higher means a save scummed game! |
| 39 | int |
| 40 | hiscore_savecount(); |
| 41 | |
| 42 | // Sets the save count. |
| 43 | void |
| 44 | hiscore_setsavecount(int newval); |
| 45 | |
| 46 | // Bumps the save count up one. |
| 47 | void |
| 48 | hiscore_bumpsavecount(); |
| 49 | |
| 50 | // Flags as a new game. |
| 51 | void |
| 52 | hiscore_flagnewgame(bool isnewgame); |
| 53 | |
| 54 | // Returns if this is a new game. |
| 55 | bool |
| 56 | hiscore_isnewgame(); |
| 57 | |
| 58 | // Returns if we've got 15 games in high score, this is |
| 59 | // used to activate advanced mode. |
| 60 | bool |
| 61 | hiscore_advancedmode(); |
| 62 | |
| 63 | // Displays hiscore list. |
| 64 | void |
| 65 | hiscore_display(HISCORE_ENTRY *bonus, bool ischeater); |
| 66 | |
| 67 | // Returns true if we add the player to our list. |
| 68 | // Displays the high score, along with the player's place in it. |
| 69 | // If ischeater is set, we will not add to the high score list. |
| 70 | bool |
| 71 | hiscore_addAndDisplayEntry(MOB *player, bool haswon, bool ischeater); |
| 72 | |
| 73 | // This must be loaded first! |
| 74 | void |
| 75 | hiscore_load(SRAMSTREAM &os); |
| 76 | |
| 77 | // This must be saved first! |
| 78 | void |
| 79 | hiscore_save(SRAMSTREAM &is); |
| 80 | |
| 81 | #endif |
| 82 |