diff options
author | strangerke | 2011-04-09 10:12:09 +0200 |
---|---|---|
committer | strangerke | 2011-04-09 10:12:09 +0200 |
commit | 8b790e03883ad5ea5c47b9a330a414a2580ec763 (patch) | |
tree | 69296b140fa79d658e4ba718c39e243f40184821 | |
parent | 48542fb364e3fd27d1557b8eb1a86ff330f6a0cb (diff) | |
parent | b912b3662a753e2766bca4fb8a0d666cdebce349 (diff) | |
download | scummvm-rg350-8b790e03883ad5ea5c47b9a330a414a2580ec763.tar.gz scummvm-rg350-8b790e03883ad5ea5c47b9a330a414a2580ec763.tar.bz2 scummvm-rg350-8b790e03883ad5ea5c47b9a330a414a2580ec763.zip |
Merge branch 'tsage' of http://github.com/dreammaster/scummvm
-rw-r--r-- | engines/tsage/converse.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 33 | ||||
-rw-r--r-- | engines/tsage/core.h | 4 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes1.cpp | 14 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes1.h | 5 |
5 files changed, 27 insertions, 31 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index a367ce540c..260308a784 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -252,7 +252,7 @@ void SequenceManager::signal() { break; case 30: v1 = getNextValue(); - _globals->_scrollFollower = (v1 == 0xffff) ? NULL : _objectList[v1]; + _globals->_scrollFollower = (v1 == -1) ? NULL : _objectList[v1]; break; case 31: _sceneObject->setObjectWrapper(new SceneObjectWrapper()); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 130238548e..4ce7513e12 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -145,9 +145,8 @@ InvObjectList::InvObjectList(): } void InvObjectList::synchronise(Serialiser &s) { + SavedObject::synchronise(s); SYNC_POINTER(_selectedItem); - -List<InvObject *> _itemList; } /*--------------------------------------------------------------------------*/ @@ -280,7 +279,7 @@ void ObjectMover::dispatch() { if (dontMove()) return; - _sceneObject->_field6E = NULL; + _sceneObject->_regionIndex = 0; if (_moveDelta.x >= _moveDelta.y) { int xAmount = _moveSign.x * _sceneObject->_moveDiff.x * _sceneObject->_percent / 100; if (!xAmount) @@ -334,8 +333,8 @@ void ObjectMover::dispatch() { _majorDiff -= ABS(yAmount); } -//TODO: _sceneObject->_field6E = _sceneObject->proc1(currPos); - if (!_sceneObject->_field6E) { + _sceneObject->_regionIndex = _sceneObject->checkRegion(currPos); + if (!_sceneObject->_regionIndex) { _sceneObject->setPosition(currPos, yDiff); _sceneObject->getHorizBounds(); @@ -434,7 +433,7 @@ void ObjectMover2::startMove(SceneObject *sceneObj, va_list va) { } void ObjectMover2::endMove() { - _sceneObject->_field6E = 64; + _sceneObject->_regionIndex = 0x40; } /*--------------------------------------------------------------------------*/ @@ -499,7 +498,7 @@ void PlayerMover::endMove() { while (++_routeIndex != 0) { if ((_routeList[_routeIndex].x == ROUTE_END_VAL) || (_routeList[_routeIndex].y == ROUTE_END_VAL) || - (_sceneObject->_field6E)) { + (_sceneObject->_regionIndex)) { // Movement route is completely finished ObjectMover::endMove(); return; @@ -1025,7 +1024,7 @@ void PlayerMover2::startMove(SceneObject *sceneObj, va_list va) { } void PlayerMover2::endMove() { - _sceneObject->_field6E = 0x40; + _sceneObject->_regionIndex = 0x40; } /*--------------------------------------------------------------------------*/ @@ -1065,7 +1064,7 @@ void PaletteRotation::signal() { uint32 frameNumber = _globals->_events.getFrameNumber(); if (frameNumber >= _frameNumber) { - _delayCtr -= frameNumber - _frameNumber; + _delayCtr = frameNumber - _frameNumber; _frameNumber = frameNumber; if (_delayCtr < 0) @@ -1079,7 +1078,8 @@ void PaletteRotation::signal() { if (_disabled) return; - bool flag = true; switch (_rotationMode) { + bool flag = true; + switch (_rotationMode) { case -1: if (--_currIndex < _start) { flag = decDuration(); @@ -1120,7 +1120,7 @@ void PaletteRotation::signal() { g_system->getPaletteManager()->setPalette((const byte *)&_palette[_currIndex], _start, count); if (count2) { - g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start, count2); + g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start + count, count2); } } } @@ -2028,7 +2028,7 @@ void SceneObject::synchronise(Serialiser &s) { s.syncAsSint32LE(_field68); s.syncAsSint32LE(_frameChange); s.syncAsSint32LE(_numFrames); - s.syncAsSint32LE(_field6E); + s.syncAsSint32LE(_regionIndex); SYNC_POINTER(_mover); s.syncAsSint16LE(_moveDiff.x); s.syncAsSint16LE(_moveDiff.y); s.syncAsSint32LE(_field7A); @@ -2055,7 +2055,7 @@ void SceneObject::postInit(SceneObjectList *OwnerList) { _moveDiff.x = 5; _moveDiff.y = 3; _field7A = 10; - _field6E = 64; + _regionIndex = 0x40; _numFrames = 10; _regionBitList = 0; @@ -3513,9 +3513,14 @@ void SceneHandler::dispatch() { while (_globals->_events.getEvent(event)) process(event); + // Handle drawing the contents of the scene + if (_globals->_sceneManager._scene) + _globals->_sceneObjects->draw(); + + // Check to see if any scene change is required _globals->_sceneManager.checkScene(); - _globals->_sceneObjects->draw(); + // Signal the ScummVM debugger _vm->_debugger->onFrame(); // Delay between frames diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 84042f790a..be3dde15fc 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -501,7 +501,7 @@ private: int getNewFrame(); void animEnded(); int changeFrame(); - bool isNoMover() const { return !_mover || (_field6E > 0); } + bool isNoMover() const { return !_mover || (_regionIndex > 0); } public: uint32 _updateStartFrame; uint32 _walkStartFrame; @@ -521,7 +521,7 @@ public: int _field68; int _frameChange; int _numFrames; - int _field6E; + int _regionIndex; EventHandler *_mover; Common::Point _moveDiff; int _field7A; diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index 3facab40ea..033c684aeb 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -2108,11 +2108,6 @@ void Scene60::Object6::doAction(int action) { } } -void Scene60::SceneObjectExt::synchronise(Serialiser &s) { - s.syncAsUint16LE(_state); -} - - void Scene60::SlaveObject::doAction(int action) { Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene; @@ -2931,8 +2926,8 @@ void Scene6100::Action5::dispatch() { for (int idx = 0; idx < 4; ++idx) { FloatSet tempSet = scene->_objList[idx]->_floats; - tempSet.add(scene->_object5._floats._float1, scene->_object5._floats._float2, - scene->_object5._floats._float3); + tempSet.add(-scene->_object5._floats._float1, -scene->_object5._floats._float2, + -scene->_object5._floats._float3); tempSet.proc1(scene->_angle * MULTIPLY_FACTOR); @@ -2943,7 +2938,7 @@ void Scene6100::Action5::dispatch() { } scene->_objList[idx]->_position.x = static_cast<int>( - (tempSet._float2 + 330.0) / 330.0 * tempSet._float1 - 160.0); + 160.0 - ((tempSet._float2 + 330.0) / 330.0 * tempSet._float1)); if (tempSet._float2 < 0) { scene->_objList[idx]->_position.y = 300; @@ -2970,7 +2965,7 @@ void Scene6100::Action5::dispatch() { } scene->_objList[idx]->_flags |= OBJFLAG_PANES; - +/* if ((idx != 3) && (scene->_fadePercent == 100) && (tempSet.sqrt(floatSet) < 150.0)) { switch (scene->_field_312++) { @@ -3002,6 +2997,7 @@ void Scene6100::Action5::dispatch() { _globals->_scenePalette.clearListeners(); scene->_fadePercent = 0; } + */ } } diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h index 95cf603728..cc3d472fab 100644 --- a/engines/tsage/ringworld_scenes1.h +++ b/engines/tsage/ringworld_scenes1.h @@ -368,11 +368,6 @@ class Scene60: public Scene { public: virtual void doAction(int action); }; - class SceneObjectExt: public SceneObject { - public: - int _state; - virtual void synchronise(Serialiser &s); - }; class Object8: public SceneObjectExt { public: virtual void doAction(int action); |