aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/state.h
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-09 09:17:48 +0000
committerFilippos Karapetis2010-06-09 09:17:48 +0000
commit536b2614e8bd7c3c6e47e686a90596460c5448d1 (patch)
tree55eb2235bf58831e2397ce39004fc10267675ffe /engines/sci/engine/state.h
parent95b080f60b74fe9b83d71abc9a80038f025845c6 (diff)
downloadscummvm-rg350-536b2614e8bd7c3c6e47e686a90596460c5448d1.tar.gz
scummvm-rg350-536b2614e8bd7c3c6e47e686a90596460c5448d1.tar.bz2
scummvm-rg350-536b2614e8bd7c3c6e47e686a90596460c5448d1.zip
Globals from script 0 are now initialized in script_init_engine(), and are accessed from the relevant variables pointer. Removed direct reference to script 0 from the engine state
svn-id: r49536
Diffstat (limited to 'engines/sci/engine/state.h')
-rw-r--r--engines/sci/engine/state.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index ae81e9393d..aaeb8c49ee 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -79,13 +79,6 @@ enum {
MAX_SAVE_DIR_SIZE = MAXPATHLEN
};
-/** values for EngineState.restarting_flag */
-enum {
- SCI_GAME_IS_NOT_RESTARTING = 0,
- SCI_GAME_WAS_RESTARTED = 1,
- SCI_GAME_IS_RESTARTING_NOW = 2
-};
-
class FileHandle {
public:
Common::String _name;
@@ -145,7 +138,7 @@ public:
bool _executionStackPosChanged; /**< Set to true if the execution stack position should be re-evaluated by the vm */
reg_t r_acc; /**< Accumulator */
- int16 restAdjust; /**< current &rest register (only used for save games) */
+ int16 restAdjust; /**< current &rest register */
reg_t r_prev; /**< previous comparison result */
StackPtr stack_base; /**< Pointer to the least stack element */
@@ -158,8 +151,6 @@ public:
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;
AbortGameState abortScriptProcessing;
@@ -172,6 +163,11 @@ public:
void setRoomNumber(uint16 roomNumber);
/**
+ * Sets global variables from script 0
+ */
+ void initGlobals();
+
+ /**
* Shrink execution stack to size.
* Contains an assert it is not already smaller.
*/