Debian Codegraph @

terps/scott/restorestate.h

raw symbols SCIP
1 //
2 // restorestate.h
3 // part of ScottFree, an interpreter for adventures in Scott Adams format
4 //
5 // Created by Petter Sjölund on 2022-01-10.
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 /* restorestate_h */