[Scummvm-cvs-logs] SF.net SVN: scummvm:[47832] scummvm/trunk/engines/sci/engine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Feb 3 02:32:27 CET 2010
Revision: 47832
http://scummvm.svn.sourceforge.net/scummvm/?rev=47832&view=rev
Author: fingolfin
Date: 2010-02-03 01:32:27 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
SCI: Rearrange members of class EngineState
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/state.h
scummvm/trunk/engines/sci/engine/vm.cpp
Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h 2010-02-03 01:32:03 UTC (rev 47831)
+++ scummvm/trunk/engines/sci/engine/state.h 2010-02-03 01:32:27 UTC (rev 47832)
@@ -141,15 +141,11 @@
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 @@
DirSeeker _dirseeker;
+public:
/* VM Information */
Common::List<ExecStack> _executionStack; /**< The execution stack */
@@ -217,6 +214,34 @@
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 @@
*/
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 @@
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 @@
#endif
MoveCountType _moveCountType;
- kLanguage charToLanguage(const char c) const;
bool _usesCdTrack;
};
Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp 2010-02-03 01:32:03 UTC (rev 47831)
+++ scummvm/trunk/engines/sci/engine/vm.cpp 2010-02-03 01:32:27 UTC (rev 47832)
@@ -571,7 +571,7 @@
scriptState.variables_seg[VAR_TEMP] = scriptState.variables_seg[VAR_PARAM] = s->stack_segment;
scriptState.variables_base[VAR_TEMP] = scriptState.variables_base[VAR_PARAM] = s->stack_base;
- // SCI code reads the zeroeth argument to determine argc
+ // SCI code reads the zeroth argument to determine argc
if (s->script_000->_localsBlock)
scriptState.variables_base[VAR_GLOBAL] = scriptState.variables[VAR_GLOBAL] = s->script_000->_localsBlock->_locals.begin();
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list