From 536b2614e8bd7c3c6e47e686a90596460c5448d1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 9 Jun 2010 09:17:48 +0000 Subject: 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 --- engines/sci/engine/state.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'engines/sci/engine/state.h') 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; @@ -171,6 +162,11 @@ public: uint16 currentRoomNumber() const; 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. -- cgit v1.2.3