diff options
author | Strangerke | 2011-12-22 20:23:48 +0100 |
---|---|---|
committer | Strangerke | 2011-12-22 20:23:48 +0100 |
commit | 014536cf3f8d619c257698ebd50b94c950cfca13 (patch) | |
tree | 5c3bba4f67726d2f4cf70bb010f636d48f1aa530 | |
parent | 2811d83670f63cbda6ff058d343be692f9c3ddbe (diff) | |
download | scummvm-rg350-014536cf3f8d619c257698ebd50b94c950cfca13.tar.gz scummvm-rg350-014536cf3f8d619c257698ebd50b94c950cfca13.tar.bz2 scummvm-rg350-014536cf3f8d619c257698ebd50b94c950cfca13.zip |
TSAGE: R2R - Fix a couple of bugs in scene 2000, Fix calls to disableControl() with parameters
Also remove several obsolete warnings
-rw-r--r-- | engines/tsage/globals.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/globals.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 42 |
3 files changed, 14 insertions, 32 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index c9518fa688..740d9b91fd 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -388,6 +388,7 @@ void Ringworld2Globals::reset() { _v56605[i] = 0; _v56AA0 = 0; _v56AA1 = 0; + _v56AAB = 0; _v57C2C = 0; _v58CE2 = 0; Common::fill(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 0); @@ -420,6 +421,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsSint16LE(_v5657C); s.syncAsSint16LE(_v565F5); + s.syncAsSint16LE(_v56AAB); s.syncAsSint16LE(_v57C2C); s.syncAsSint16LE(_v58CE2); s.syncAsSint16LE(_speechSubtitles); @@ -430,6 +432,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsByte(_v565AE); s.syncAsByte(_v56AA0); s.syncAsByte(_v56AA1); + for (i = 0; i < 14; ++i) s.syncAsByte(_v56605[i]); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 89ad418baa..fb892c6cf7 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -254,6 +254,7 @@ public: byte _v56605[14]; byte _v56AA0; byte _v56AA1; + int _v56AAB; int _v57C2C; int _v58CE2; int _speechSubtitles; diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index b851ed4e22..1fe920e65c 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -35,9 +35,7 @@ namespace Ringworld2 { *--------------------------------------------------------------------------*/ void Scene2000::initPlayer() { R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); - warning("initPlayer: %d", _mazePlayerMode); switch (_mazePlayerMode) { case 0: R2_GLOBALS._player.setStrip(5); @@ -49,7 +47,6 @@ void Scene2000::initPlayer() { } else R2_GLOBALS._player.setPosition(Common::Point(245, 129)); R2_GLOBALS._player.enableControl(); - warning("EnableControl, with 2 arguments?"); break; case 1: if (R2_GLOBALS._player._characterIndex == 1) @@ -179,8 +176,6 @@ void Scene2000::initExits() { _object1.remove(); - warning("initExits: %d", R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]); - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { case 3: case 10: @@ -395,7 +390,6 @@ void Scene2000::Action1::signal() { case 0: { _actionIndex = 1; Common::Point pt(-20, 127); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, scene); break; @@ -439,7 +433,6 @@ void Scene2000::Action1::signal() { case 5: { _actionIndex = 6; Common::Point pt(340, 127); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, this); break; @@ -482,7 +475,6 @@ void Scene2000::Action1::signal() { break; case 10: { Common::Point pt(290, 127); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, this); _actionIndex = 11; @@ -508,13 +500,11 @@ void Scene2000::Action1::signal() { case 15: if ((R2_GLOBALS._v56605[3 + _state] == 13) || (R2_GLOBALS._v56605[3 + _state] == 22) || (R2_GLOBALS._v56605[3 + _state] == 27)) { Common::Point pt(30, 127); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, this); _actionIndex = 16; } else { Common::Point pt(120, 127); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, this); _actionIndex = 16; @@ -546,15 +536,12 @@ void Scene2000::Action1::signal() { void Scene2000::Exit1::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - warning("exit1"); scene->_exitingFlag = true; scene->_sceneMode = 0; - R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); + R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 10; - warning("TODO: Check sub_22D26"); Common::Point pt(-10, 129); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -564,15 +551,12 @@ void Scene2000::Exit1::changeScene() { void Scene2000::Exit2::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - warning("exit2"); scene->_exitingFlag = true; scene->_sceneMode = 0; - R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); + R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 11; - warning("TODO: Check sub_22D26"); Common::Point pt(330, 129); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -580,12 +564,10 @@ void Scene2000::Exit2::changeScene() { void Scene2000::Exit3::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - warning("exit13"); scene->_exitingFlag = true; scene->_sceneMode = 0; - R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); + R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 12; switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { @@ -650,12 +632,10 @@ void Scene2000::Exit3::changeScene() { } void Scene2000::Exit4::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - warning("exit4"); scene->_exitingFlag = true; scene->_sceneMode = 0; - R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); + R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 13; switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { @@ -709,11 +689,9 @@ void Scene2000::Exit4::changeScene() { void Scene2000::Exit5::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - warning("exit5"); scene->_sceneMode = 0; - R2_GLOBALS._player.disableControl(); - warning("DisableControl, with arguments?"); + R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 14; switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { @@ -1009,6 +987,9 @@ void Scene2000::signal() { g_globals->_sceneManager.changeScene(2535); break; default: + if (R2_GLOBALS._v56AAB != 0) + R2_GLOBALS._v56AAB = 0; + R2_GLOBALS._player.enableControl(CURSOR_ARROW); break; } break; @@ -1024,7 +1005,6 @@ void Scene2000::signal() { void Scene2000::process(Event &event) { if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_CROSSHAIRS)) { - warning("TODO: Check sub_22D26"); Common::Point pt(event.mousePos.x, 129); PlayerMover *mover = new PlayerMover(); @@ -1069,7 +1049,7 @@ bool Scene2350::Actor3::startAction(CursorType action, Event &event) { void Scene2350::ExitUp::changeScene() { Scene2350 *scene = (Scene2350 *)R2_GLOBALS._sceneManager._scene; - R2_GLOBALS._player.disableControl(); + R2_GLOBALS._player.disableControl(CURSOR_CROSSHAIRS); scene->_sceneMode = 12; if (R2_GLOBALS._player._characterIndex == 1) scene->setAction(&scene->_sequenceManager, scene, 2350, &R2_GLOBALS._player, NULL); @@ -1080,11 +1060,10 @@ void Scene2350::ExitUp::changeScene() { void Scene2350::ExitWest::changeScene() { Scene2350 *scene = (Scene2350 *)R2_GLOBALS._sceneManager._scene; - R2_GLOBALS._player.disableControl(); + R2_GLOBALS._player.disableControl(CURSOR_CROSSHAIRS); scene->_sceneMode = 11; Common::Point pt(-10, 129); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); @@ -1157,7 +1136,6 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { _sceneMode = 10; R2_GLOBALS._player.setPosition(Common::Point(-20, 129)); Common::Point pt(20, 129); - warning("TODO: Check sub_22D26"); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, this); |