diff options
author | Paul Gilbert | 2011-10-25 20:45:38 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-26 20:13:05 +1100 |
commit | 9ccb2eea32e4b85394295f4eed9884f05bf75c08 (patch) | |
tree | d2bd36dce81cd8ba38a7c6029b519e57d9c4e6a1 /engines/tsage | |
parent | ac559b0212c21c7f4a3a10455b8dff211d7ebb87 (diff) | |
download | scummvm-rg350-9ccb2eea32e4b85394295f4eed9884f05bf75c08.tar.gz scummvm-rg350-9ccb2eea32e4b85394295f4eed9884f05bf75c08.tar.bz2 scummvm-rg350-9ccb2eea32e4b85394295f4eed9884f05bf75c08.zip |
TSAGE: Added R2 _shade and _effect fields to scene objects class.
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/core.cpp | 15 | ||||
-rw-r--r-- | engines/tsage/core.h | 6 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 5 |
5 files changed, 23 insertions, 7 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 9cfa817946..ea6cc9f795 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1835,6 +1835,8 @@ SceneObject::SceneObject() : SceneHotspot() { _visage = 0; _strip = 0; _frame = 0; + _effect = 0; + _shade = 0; } SceneObject::SceneObject(const SceneObject &so) : SceneHotspot() { @@ -2137,6 +2139,14 @@ SceneObject *SceneObject::clone() const { return obj; } +void SceneObject::copy(SceneObject *src) { + *this = *src; + + _objectWrapper = NULL; + _mover = NULL; + _endAction = NULL; +} + void SceneObject::checkAngle(const SceneObject *obj) { checkAngle(obj->_position); } @@ -2203,6 +2213,11 @@ void SceneObject::synchronize(Serializer &s) { s.syncAsSint32LE(_moveRate); SYNC_POINTER(_endAction); s.syncAsUint32LE(_regionBitList); + + if (g_vm->getGameID() == GType_Ringworld2) { + s.syncAsSint16LE(_effect); + s.syncAsSint16LE(_shade); + } } void SceneObject::postInit(SceneObjectList *OwnerList) { diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 0137134583..40a33b49b3 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -530,6 +530,10 @@ public: int _moveRate; Action *_endAction; uint32 _regionBitList; + + // Ringworld 2 specific fields + int _shade; + int _effect; public: SceneObject(); SceneObject(const SceneObject &so); @@ -577,6 +581,8 @@ public: // New methods introduced by Blue Force virtual void updateAngle(const Common::Point &pt); virtual void changeAngle(int angle); + // New methods introduced by Ringworld 2 + virtual void copy(SceneObject *src); void setup(int visage, int stripFrameNum, int frameNum, int posX, int posY, int priority); void setup(int visage, int stripFrameNum, int frameNum); diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index ce29ae7235..d033627ae9 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -690,9 +690,6 @@ void SceneActor::synchronize(Serializer &s) { s.syncAsSint16LE(_lookLineNum); s.syncAsSint16LE(_talkLineNum); s.syncAsSint16LE(_useLineNum); - - s.syncAsSint16LE(_effect); - s.syncAsSint16LE(_shade); } bool SceneActor::startAction(CursorType action, Event &event) { diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h index 13f230c78f..b12978344c 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.h +++ b/engines/tsage/ringworld2/ringworld2_logic.h @@ -219,7 +219,6 @@ class SceneActor: public SceneObject { public: int _resNum; int _lookLineNum, _talkLineNum, _useLineNum; - int _effect, _shade; virtual Common::String getClassName() { return "SceneActor"; } virtual void synchronize(Serializer &s); diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 004c6c2b2b..edc3f06aa2 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -316,14 +316,13 @@ void Scene100::signal() { } void Scene100::dispatch() { -/* int regionIndex = R2_GLOBALS._player.getRegionIndex(); if (regionIndex == 13) R2_GLOBALS._player._shade = 4; if ((R2_GLOBALS._player._visage == 13) || (R2_GLOBALS._player._visage == 101)) - (R2_GLOBALS._player._shade = 0; -*/ + R2_GLOBALS._player._shade = 0; + SceneExt::dispatch(); if ((_sceneMode == 101) && (_object7._frame == 2) && (_table._strip == 5)) { |