aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/vm.h
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-06 23:00:33 +0000
committerFilippos Karapetis2010-06-06 23:00:33 +0000
commit3c82b6578fa3bd4b3d91c1933dd390581dbe08d1 (patch)
tree580cdb0adf071e07d1212009c4a6bc64dedb7710 /engines/sci/engine/vm.h
parent51a897845532cc1fe587352726051e5f420d5d68 (diff)
downloadscummvm-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/vm.h')
-rw-r--r--engines/sci/engine/vm.h32
1 files changed, 1 insertions, 31 deletions
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 42ee55cd06..67a6bd0dc3 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -224,41 +224,11 @@ enum {
VAR_PARAM = 3
};
-/**
- * Structure for storing the current internal state of the VM.
- */
-struct ScriptState {
- ExecStack *xs;
- int16 restAdjust;
- 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
-};
-
-/**
- * The current internal state of the VM.
- */
-extern ScriptState scriptState;
-
-/**
- * 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.
- */
-extern int script_abort_flag;
-
/** Number of kernel calls in between gcs; should be < 50000 */
enum {
GC_INTERVAL = 32768
};
-/** Initially GC_DELAY, can be set at runtime */
-extern int script_gc_interval;
-
-/** Number of steps executed */
-extern int script_step_counter;
-
/**
* Executes function pubfunct of the specified script.
@@ -430,7 +400,7 @@ int game_exit(EngineState *s);
/**
* Instructs the virtual machine to abort
*/
-void quit_vm();
+void quit_vm(EngineState *s);
/**
* Read a PMachine instruction from a memory buffer and return its length.