22 #ifndef SCI_ENGINE_STATE_H 23 #define SCI_ENGINE_STATE_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/serializer.h" 28 #include "common/str-array.h" 31 class SeekableReadStream;
36 #include "sci/engine/file.h" 37 #include "sci/engine/seg_manager.h" 39 #include "sci/parser/vocabulary.h" 41 #include "sci/sound/soundcmd.h" 49 class SoundCommandParser;
50 class VirtualIndexFile;
55 kAbortRestartGame = 2,
62 SAVEGAMEID_OFFICIALRANGE_START = 100,
63 SAVEGAMEID_OFFICIALRANGE_END = 199
67 GAMEISRESTARTING_NONE = 0,
68 GAMEISRESTARTING_RESTART = 1,
69 GAMEISRESTARTING_RESTORE = 2
79 kHoldBlackFrame = 1 << 5,
80 kHoldLastFrame = 1 << 6,
96 return Common::String::format(
"method %s::%s (room %d, script %d, localCall %x)", objectName.c_str(), methodName.c_str(), roomNr, scriptNr, localCallOffset);
113 void speedThrottler(uint32 neededSleep);
114 uint16 wait(uint16 ticks);
115 void sleep(uint16 ticks);
120 bool _throttleTrigger;
128 int16 _lastSaveVirtualId;
129 int16 _lastSaveNewId;
132 int _delayedRestoreGameId;
135 int _kq7MacSaveGameId;
138 uint _chosenQfGImportItem;
140 bool _cursorWorkaroundActive;
141 int16 _cursorWorkaroundPosCount;
167 SegmentId variablesSegment[4];
170 AbortGameState abortScriptProcessing;
171 int16 gameIsRestarting;
173 int scriptStepCounter;
174 int scriptGCInterval;
176 uint16 currentRoomNumber()
const;
177 void setRoomNumber(uint16 roomNumber);
188 void shrinkStackToBase();
193 void initMessageState();
198 kMemorySegmentMax = 256
200 uint16 _memorySegmentSize;
201 byte _memorySegment[kMemorySegmentMax];
206 void reset(
bool isRestoring);
216 bool callInStack(
const reg_t object,
const Selector selector)
const;
228 #endif // SCI_ENGINE_STATE_H
SegManager * _segMan
Definition: state.h:106
static String format(MSVC_PRINTF const char *fmt,...) GCC_PRINTF(1
reg_t r_acc
Definition: state.h:156
int executionStackBase
Definition: state.h:152
int gcCountDown
Definition: state.h:190
Definition: serializer.h:79
int16 r_rest
Definition: state.h:158
uint32 _screenUpdateTime
Definition: state.h:111
StackPtr stack_base
Definition: state.h:160
reg_t r_prev
Definition: state.h:157
Definition: algorithm.h:29
uint32 _paletteSetIntensityCounter
Definition: state.h:118
Definition: serializer.h:308
Common::Array< FileHandle > _fileHandles
Definition: state.h:124
Definition: seg_manager.h:48
uint32 _throttleLastTime
Definition: state.h:119
uint32 _eventCounter
Definition: state.h:117
uint32 lastWaitTime
Definition: state.h:110
Common::List< ExecStack > _executionStack
Definition: state.h:147
bool _executionStackPosChanged
Definition: state.h:153
Definition: vm_types.h:39
StackPtr stack_top
Definition: state.h:161