diff options
author | Paul Gilbert | 2013-09-01 15:55:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-09-01 15:55:42 -0400 |
commit | 25de29386167c2ee16bbd278fca0c7b283ea47b6 (patch) | |
tree | 3fb6d9070f20ad0c3f443dd6e28f09702c18cd10 /engines/tsage/ringworld2 | |
parent | 24fe3f38a52e35326b3abe3e29dd2a22695d4467 (diff) | |
download | scummvm-rg350-25de29386167c2ee16bbd278fca0c7b283ea47b6.tar.gz scummvm-rg350-25de29386167c2ee16bbd278fca0c7b283ea47b6.tar.bz2 scummvm-rg350-25de29386167c2ee16bbd278fca0c7b283ea47b6.zip |
TSAGE: Necessary synchronisation fixes to R2R SceneExt and SceneArea classes
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 16 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index a50dccda03..d06fb5cb65 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -319,11 +319,10 @@ SceneExt::SceneExt(): Scene() { for (int i = 0; i < 256; i++) _field312[i] = 0; - _field372 = _field37A = 0; + _savedPlayerEnabled = false; _savedUiEnabled = false; _savedCanWalk = false; - _focusObject = NULL; // WORKAROUND: In the original, playing animations don't reset the global _animationCtr // counter as scene changes unless the playing animation explicitly finishes. For now, @@ -332,6 +331,13 @@ SceneExt::SceneExt(): Scene() { R2_GLOBALS._animationCtr = 0; } +void SceneExt::synchronize(Serializer &s) { + Scene::synchronize(s); + + s.syncBytes(&_field312[0], 256); + _sceneAreas.synchronize(s); +} + void SceneExt::postInit(SceneObjectList *OwnerList) { Scene::postInit(OwnerList); @@ -445,7 +451,6 @@ void SceneExt::fadeOut() { void SceneExt::startStrip() { SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene; - scene->_field372 = 1; scene->_savedPlayerEnabled = R2_GLOBALS._player._enabled; if (scene->_savedPlayerEnabled) { @@ -461,7 +466,6 @@ void SceneExt::startStrip() { void SceneExt::endStrip() { SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene; - scene->_field372 = 0; if (scene->_savedPlayerEnabled) { R2_GLOBALS._player.enableControl(); @@ -1319,8 +1323,8 @@ void SceneArea::synchronize(Serializer &s) { _bounds.synchronize(s); s.syncAsSint16LE(_enabled); s.syncAsSint16LE(_insideArea); - s.syncAsSint16LE(_cursorNum); - s.syncAsSint16LE(_savedCursorNum); + s.syncAsSint32LE(_cursorNum); + s.syncAsSint32LE(_savedCursorNum); s.syncAsSint16LE(_cursorState); } diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h index 2b2a28aff8..c7e36fc5f0 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.h +++ b/engines/tsage/ringworld2/ringworld2_logic.h @@ -82,21 +82,17 @@ private: static void endStrip(); public: byte _field312[256]; - int _field372; bool _savedPlayerEnabled; bool _savedUiEnabled; bool _savedCanWalk; - int _field37A; - SceneObject *_focusObject; Visage _cursorVisage; SynchronizedList<EventHandler *> _sceneAreas; - - Rect _v51C34; public: SceneExt(); virtual Common::String getClassName() { return "SceneExt"; } + virtual void synchronize(Serializer &s); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void remove(); virtual void process(Event &event); |