aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/state.h
diff options
context:
space:
mode:
authorMax Horn2010-02-03 01:32:27 +0000
committerMax Horn2010-02-03 01:32:27 +0000
commitb2d69649f7e4c484dcf3810e11cd644699b78d2c (patch)
tree153336b52864192ec4cd1b8659273268660f9720 /engines/sci/engine/state.h
parent81f7a55e8cda7093225bd0e574389257b2eaee24 (diff)
downloadscummvm-rg350-b2d69649f7e4c484dcf3810e11cd644699b78d2c.tar.gz
scummvm-rg350-b2d69649f7e4c484dcf3810e11cd644699b78d2c.tar.bz2
scummvm-rg350-b2d69649f7e4c484dcf3810e11cd644699b78d2c.zip
SCI: Rearrange members of class EngineState
svn-id: r47832
Diffstat (limited to 'engines/sci/engine/state.h')
-rw-r--r--engines/sci/engine/state.h71
1 files changed, 43 insertions, 28 deletions
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 2833957bbb..a4232f27b7 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -141,15 +141,11 @@ public:
EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc, SegManager *segMan, SciGui *gui, AudioPlayer *audio);
virtual ~EngineState();
- enum {
- kMemorySegmentMax = 256
- };
-
virtual void saveLoadWithSerializer(Common::Serializer &ser);
- kLanguage getLanguage();
public:
ResourceManager *resMan; /**< The resource manager */
+ SegManager *_segMan; /**< The segment manager */
Kernel *_kernel;
Vocabulary *_voc;
@@ -194,6 +190,7 @@ public:
DirSeeker _dirseeker;
+public:
/* VM Information */
Common::List<ExecStack> _executionStack; /**< The execution stack */
@@ -217,6 +214,34 @@ public:
uint16 currentRoomNumber() const;
void setRoomNumber(uint16 roomNumber);
+ /* Debugger data: */
+ Common::List<Breakpoint> _breakpoints; /**< List of breakpoints */
+ int _activeBreakpointTypes; /**< Bit mask specifying which types of breakpoints are active */
+
+ /* System strings */
+ SegmentId sys_strings_segment;
+ SystemStrings *sys_strings;
+
+ reg_t _gameObj; /**< Pointer to the game object */
+
+ int gc_countdown; /**< Number of kernel calls until next gc */
+
+public:
+ MessageState *_msgState;
+
+ // MemorySegment provides access to a 256-byte block of memory that remains
+ // intact across restarts and restores
+ enum {
+ kMemorySegmentMax = 256
+ };
+ uint _memorySegmentSize;
+ byte _memorySegment[kMemorySegmentMax];
+
+ EngineState *successor; /**< Successor of this state: Used for restoring */
+
+
+public:
+
/**
* Processes a multilanguage string based on the current language settings and
* returns a string that is ready to be displayed.
@@ -227,6 +252,19 @@ public:
*/
Common::String strSplit(const char *str, const char *sep = "\r----------\r");
+ kLanguage getLanguage();
+
+ Common::String getLanguageString(const char *str, kLanguage lang) const;
+
+private:
+ kLanguage charToLanguage(const char c) const;
+
+
+public:
+ // TODO: The following methods and member variables deal with (detecting)
+ // features and capabilities the active game expects to find in the engine.
+ // It should likely be moved to a separate class.
+
/**
* Autodetects the DoSound type
* @return DoSound type, SCI_VERSION_0_EARLY / SCI_VERSION_0_LATE /
@@ -279,28 +317,6 @@ public:
bool usesCdTrack() { return _usesCdTrack; }
- /* Debugger data: */
- Common::List<Breakpoint> _breakpoints; /**< List of breakpoints */
- int _activeBreakpointTypes; /**< Bit mask specifying which types of breakpoints are active */
-
- /* System strings */
- SegmentId sys_strings_segment;
- SystemStrings *sys_strings;
-
- reg_t _gameObj; /**< Pointer to the game object */
-
- SegManager *_segMan;
- int gc_countdown; /**< Number of kernel calls until next gc */
-
- MessageState *_msgState;
-
- uint _memorySegmentSize;
- byte _memorySegment[kMemorySegmentMax];
-
- EngineState *successor; /**< Successor of this state: Used for restoring */
-
- Common::String getLanguageString(const char *str, kLanguage lang) const;
-
private:
bool autoDetectFeature(FeatureDetection featureDetection, int methodNum = -1);
@@ -310,7 +326,6 @@ private:
#endif
MoveCountType _moveCountType;
- kLanguage charToLanguage(const char c) const;
bool _usesCdTrack;
};