diff options
author | Filippos Karapetis | 2010-06-06 23:00:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-06 23:00:33 +0000 |
commit | 3c82b6578fa3bd4b3d91c1933dd390581dbe08d1 (patch) | |
tree | 580cdb0adf071e07d1212009c4a6bc64dedb7710 /engines/sci/engine/state.h | |
parent | 51a897845532cc1fe587352726051e5f420d5d68 (diff) | |
download | scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.tar.gz scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.tar.bz2 scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.zip |
Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
Diffstat (limited to 'engines/sci/engine/state.h')
-rw-r--r-- | engines/sci/engine/state.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 431aac884e..68e6a5516a 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -148,8 +148,26 @@ public: StackPtr stack_base; /**< Pointer to the least stack element */ StackPtr stack_top; /**< First invalid stack element */ + // Script state + ExecStack *xs; + reg_t *variables[4]; ///< global, local, temp, param, as immediate pointers + reg_t *variables_base[4]; ///< Used for referencing VM ops + SegmentId variables_seg[4]; ///< Same as above, contains segment IDs + int variables_max[4]; ///< Max. values for all variables + Script *script_000; /**< script 000, e.g. for globals */ + int loadFromLauncher; + + /** + * Set this to 1 to abort script execution immediately. Aborting will + * leave the debug exec stack intact. + * Set it to 2 to force a replay afterwards. + */ + int script_abort_flag; // Set to 1 to abort execution. Set to 2 to force a replay afterwards + int script_step_counter; // Counts the number of steps executed + int script_gc_interval; // Number of steps in between gcs + uint16 currentRoomNumber() const; void setRoomNumber(uint16 roomNumber); |