| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
. |
| 6 |
|
| 7 |
|
| 8 |
#ifndef restorestate_h |
| 9 |
#define restorestate_h |
| 10 |
|
| 11 |
#include <stdint.h> |
| 12 |
#include <stdio.h> |
| 13 |
|
| 14 |
struct SavedState { |
| 15 |
int Counters[16]; |
| 16 |
int RoomSaved[16]; |
| 17 |
long BitFlags; |
| 18 |
int CurrentLoc; |
| 19 |
int CurrentCounter; |
| 20 |
int SavedRoom; |
| 21 |
int LightTime; |
| 22 |
int AutoInventory; |
| 23 |
uint8_t *ItemLocations; |
| 24 |
struct SavedState *previousState; |
| 25 |
struct SavedState *nextState; |
| 26 |
}; |
| 27 |
|
| 28 |
void SaveUndo(void); |
| 29 |
void RestoreUndo(void); |
| 30 |
void RamSave(void); |
| 31 |
void RamRestore(void); |
| 32 |
struct SavedState *SaveCurrentState(void); |
| 33 |
void RestoreState(struct SavedState *state); |
| 34 |
void RecoverFromBadRestore(struct SavedState *state); |
| 35 |
|
| 36 |
#endif |