diff options
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 12 | ||||
-rw-r--r-- | common/quicktime.cpp | 2 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 5 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 488 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.h | 81 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 86 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.h | 16 |
9 files changed, 666 insertions, 29 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index cfc78cfcac..f2b3168e36 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -318,12 +318,12 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { // only used to ensure that the original pixel size aspect for these // modes is used. // (Non-square pixels on old monitors vs square pixel on new ones). - if (_videoMode.aspectRatioCorrection - && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200) - || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400))) - _videoMode.overlayHeight = _videoMode.hardwareHeight = 240 * scaleFactor; - else - _videoMode.overlayHeight = _videoMode.hardwareHeight = _videoMode.screenHeight * scaleFactor; + if (_videoMode.aspectRatioCorrection) { + if (_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200) + _videoMode.overlayHeight = _videoMode.hardwareHeight = 240 * scaleFactor; + else if (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400) + _videoMode.overlayHeight = _videoMode.hardwareHeight = 480 * scaleFactor; + } } _screenResized = false; diff --git a/common/quicktime.cpp b/common/quicktime.cpp index e16d3f2652..dbec7f7b90 100644 --- a/common/quicktime.cpp +++ b/common/quicktime.cpp @@ -135,7 +135,7 @@ void QuickTimeParser::initParseTable() { { &QuickTimeParser::readDefault, MKTAG('e', 'd', 't', 's') }, { &QuickTimeParser::readELST, MKTAG('e', 'l', 's', 't') }, { &QuickTimeParser::readHDLR, MKTAG('h', 'd', 'l', 'r') }, - { &QuickTimeParser::readDefault, MKTAG('m', 'd', 'a', 't') }, + { &QuickTimeParser::readLeaf, MKTAG('m', 'd', 'a', 't') }, { &QuickTimeParser::readMDHD, MKTAG('m', 'd', 'h', 'd') }, { &QuickTimeParser::readDefault, MKTAG('m', 'd', 'i', 'a') }, { &QuickTimeParser::readDefault, MKTAG('m', 'i', 'n', 'f') }, @@ -137,7 +137,7 @@ _seq_midi=auto _timidity=auto _zlib=auto _sparkle=auto -_png=auto +_png=no _theoradec=auto _faad=auto _fluidsynth=auto @@ -2292,7 +2292,6 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" INCLUDES="$INCLUDES -I/usr/X11R6/include" - LIBS="$LIBS -lpthread" LIBS="$LIBS -lX11" LIBS="$LIBS -L/usr/lib" diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index e060df9fcc..8b68c52d3e 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -871,7 +871,7 @@ void DreamGenContext::helicopter(ReelRoutine &routine) { if (nextReelPointer == 53) { // Before killing helicopter data.byte(kCombatcount)++; - if (data.byte(kCombatcount) != 8) + if (data.byte(kCombatcount) >= 8) data.byte(kMandead) = 2; nextReelPointer = 49; } else if (nextReelPointer == 9) { @@ -898,10 +898,11 @@ void DreamGenContext::helicopter(ReelRoutine &routine) { showGameReel(&routine); routine.mapX = data.byte(kMapx); - if (routine.reelPointer() == 9 && data.byte(kCombatcount) != 7) { + if (routine.reelPointer() < 9 && data.byte(kCombatcount) >= 7) { data.byte(kPointermode) = 2; data.word(kWatchingtime) = 0; } else { + // Not waiting helicopter data.byte(kPointermode) = 0; data.word(kWatchingtime) = 2; } diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 3e0d36be8d..a33a9a5e9e 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -156,6 +156,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Forest Maze return new Scene2700(); case 2750: + // Forest Maze + return new Scene2750(); case 2800: case 2900: error("Missing scene %d from group 2", sceneNumber); diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index a81aee41de..107d7bad04 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -3071,7 +3071,7 @@ void Scene2700::Action4::signal() { void Scene2700::Area1::process(Event &event) { SceneArea::process(event); - if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos.x, event.mousePos.y))) { + if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) { Scene2700 *scene = (Scene2700 *)R2_GLOBALS._sceneManager._scene; R2_GLOBALS._player.disableControl(); scene->_sceneMode = 10; @@ -3121,7 +3121,7 @@ void Scene2700::Area1::process(Event &event) { void Scene2700::Area2::process(Event &event) { SceneArea::process(event); - if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos.x, event.mousePos.y))) { + if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) { Scene2700 *scene = (Scene2700 *)R2_GLOBALS._sceneManager._scene; R2_GLOBALS._player.disableControl(); scene->_sceneMode = 10; @@ -3536,7 +3536,7 @@ void Scene2700::signal() { void Scene2700::process(Event &event) { if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN)) { if (R2_GLOBALS._events.getCursor() == R2_36) { - if (R2_GLOBALS._player._bounds.contains(event.mousePos.x, event.mousePos.y)) { + if (R2_GLOBALS._player._bounds.contains(event.mousePos)) { _sceneMode = 10; _field414 = 2710; R2_GLOBALS._player.disableControl(); @@ -3593,38 +3593,38 @@ void Scene2700::process(Event &event) { SceneItem::display(2700, 3, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); } } else if (R2_GLOBALS._events.getCursor() == R2_NEGATOR_GUN) { - if (_rect1.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect1.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + if (_rect1.contains(event.mousePos)) { + if (!_rect1.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 1; } - } else if (_rect2.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect2.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + } else if (_rect2.contains(event.mousePos)) { + if (!_rect2.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 2; } - } else if (_rect3.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect3.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + } else if (_rect3.contains(event.mousePos)) { + if (!_rect3.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 3; } - } else if (_rect4.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect4.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + } else if (_rect4.contains(event.mousePos)) { + if (!_rect4.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 4; } - } else if (_rect5.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect5.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + } else if (_rect5.contains(event.mousePos)) { + if (!_rect5.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 5; } - } else if (_rect6.contains(event.mousePos.x, event.mousePos.y)) { - if (!_rect6.contains(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y)) { + } else if (_rect6.contains(event.mousePos)) { + if (!_rect6.contains(R2_GLOBALS._player._position)) { event.handled = true; _sceneMode = 10; _field414 = 6; @@ -3633,7 +3633,7 @@ void Scene2700::process(Event &event) { event.handled = true; R2_GLOBALS._player.updateAngle(Common::Point(event.mousePos.x, event.mousePos.y)); } - if (_sceneMode = 10) { + if (_sceneMode == 10) { R2_GLOBALS._player.disableControl(); switch (_field412) { case 0: @@ -3706,5 +3706,461 @@ void Scene2700::process(Event &event) { Scene::process(event); } +/*-------------------------------------------------------------------------- + * Scene 2750 - Forest Maze + * + *--------------------------------------------------------------------------*/ +Scene2750::Scene2750(): SceneExt() { + _field412 = _field414 = _field416 = 0; +} + +void Scene2750::synchronize(Serializer &s) { + SceneExt::synchronize(s); + + s.syncAsSint16LE(_field412); + s.syncAsSint16LE(_field414); + s.syncAsSint16LE(_field416); +} + +void Scene2750::Action1::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + switch (_actionIndex) { + case 1: + setDelay(60 + R2_GLOBALS._randomSource.getRandomNumber(240)); + _actionIndex = 2; + scene->_actor5.show(); + scene->_actor5.animate(ANIM_MODE_8, 1, NULL); + break; + case 2: + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(600)); + _actionIndex = 0; + scene->_actor5.show(); + scene->_actor3.animate(ANIM_MODE_2, NULL); + break; + default: + setDelay(30); + _actionIndex = 1; + scene->_actor3.animate(ANIM_MODE_6, NULL); + scene->_actor4.animate(ANIM_MODE_8, 1, NULL); + break; + } +} + +void Scene2750::Action2::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(300)); + scene->_actor6.animate(ANIM_MODE_8, 1, NULL); +} + +void Scene2750::Action3::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + if (scene->_actor7._position.x <= 320) { + setDelay(1800 + R2_GLOBALS._randomSource.getRandomNumber(600)); + } else { + setDelay(60); + scene->_actor7.setPosition(Common::Point(-10, 25)); + Common::Point pt(330, 45); + NpcMover *mover = new NpcMover(); + scene->_actor7.addMover(mover, &pt, NULL); + } +} + +void Scene2750::Action4::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(300)); + scene->_actor8.animate(ANIM_MODE_8, 1, NULL); +} + +void Scene2750::Action5::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(300)); + scene->_actor9.animate(ANIM_MODE_8, 1, NULL); +} + +void Scene2750::Action6::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(300)); + scene->_actor10.animate(ANIM_MODE_8, 1, NULL); +} + +void Scene2750::Action7::signal() { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + setDelay(600 + R2_GLOBALS._randomSource.getRandomNumber(300)); + scene->_actor11.animate(ANIM_MODE_8, 1, NULL); +} + +void Scene2750::Area1::process(Event &event) { + SceneArea::process(event); + if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + R2_GLOBALS._player.disableControl(); + scene->_sceneMode = 10; + scene->_field414 = 2752; + switch (scene->_field412) { + case 1: { + scene->_sceneMode = 2752; + scene->setAction(&scene->_sequenceManager, scene, 2752, &R2_GLOBALS._player, NULL); + break; + } + case 2: { + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + break; + } + case 3: { + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + break; + } + default: + break; + } + } +} + +void Scene2750::Area2::process(Event &event) { + SceneArea::process(event); + if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) { + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + R2_GLOBALS._player.disableControl(); + scene->_sceneMode = 10; + scene->_field414 = 2753; + switch (scene->_field412) { + case 1: { + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + break; + } + case 2: { + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + break; + } + case 3: { + scene->_sceneMode = 2753; + scene->setAction(&scene->_sequenceManager, scene, 2753, &R2_GLOBALS._player, NULL); + break; + } + default: + break; + } + } +} + +void Scene2750::postInit(SceneObjectList *OwnerList) { + loadScene(2750); + R2_GLOBALS._sound2.stop(); + SceneExt::postInit(); + _area1.setDetails(Rect(0, 90, 20, 135), EXITCURSOR_W); + _area2.setDetails(Rect(300, 90, 320, 135), EXITCURSOR_E); + + _rect1.set(30, 127, 155, 147); + _rect2.set(130, 142, 210, 167); + _rect3.set(-1, 137, 290, 147); + + if (R2_INVENTORY.getObjectScene(36) == 0) { + R2_GLOBALS._sound1.changeSound(235); + _actor2.postInit(); + _actor2.setup(2751, 1, 1); + _actor2.setPosition(Common::Point(104, 158)); + _actor2.animate(ANIM_MODE_2, NULL); + } + + _actor3.postInit(); + _actor3.setup(2750, 1, 1); + _actor3.setPosition(Common::Point(188, 34)); + _actor3.animate(ANIM_MODE_2, NULL); + _actor3._numFrames = 16; + + _actor4.postInit(); + _actor4.setup(2700, 4, 1); + _actor4.setPosition(Common::Point(188, 37)); + _actor4.fixPriority(26); + + _actor5.postInit(); + _actor5.setup(2750, 2, 1); + _actor5.setPosition(Common::Point(188, 34)); + _actor5.hide(); + + _actor3.setAction(&_action1); + + _actor6.postInit(); + _actor6.setup(2750, 3, 1); + _actor6.setPosition(Common::Point(9, 167)); + _actor6.fixPriority(252); + _actor6.setAction(&_action2); + + _actor7.postInit(); + _actor7.setup(2750, 4, 1); + _actor7.setPosition(Common::Point(-10, 25)); + _actor7.animate(ANIM_MODE_1, NULL); + _actor7.setStrip2(4); + _actor7._moveRate = 20; + _actor7.setAction(&_action3); + + _actor8.postInit(); + _actor8.fixPriority(26); + _actor8.setup(2750, 5, 1); + _actor8.setPosition(Common::Point(258, 33)); + _actor8.setAction(&_action4); + + _actor9.postInit(); + _actor9.fixPriority(26); + _actor9.setup(2750, 6, 1); + _actor9.setPosition(Common::Point(61, 38)); + _actor9.setAction(&_action5); + + _actor10.postInit(); + _actor10.fixPriority(26); + _actor10.setup(2750, 7, 1); + _actor10.setPosition(Common::Point(69, 37)); + _actor10.setAction(&_action6); + + _actor11.postInit(); + _actor11.fixPriority(26); + _actor11.setup(2750, 8, 1); + _actor11.setPosition(Common::Point(80, 35)); + _actor11.setAction(&_action7); + + _item2.setDetails(Rect(29, 50, 35, 56), 2750, 3, -1, 5, 1, NULL); + _item3.setDetails(Rect(47, 36, 54, 42), 2750, 3, -1, 5, 1, NULL); + _item4.setDetails(Rect(193, 21, 206, 34), 2750, 3, -1, 5, 1, NULL); + _item5.setDetails(Rect(301, 18, 315, 32), 2750, 3, -1, 5, 1, NULL); + _item1.setDetails(Rect(0, 0, 320, 200), 2700, 0, -1, 2, 1, NULL); + + _stripManager.setColors(60, 255); + _stripManager.setFontNumber(3); + _stripManager.addSpeaker(&_quinnSpeaker); + _stripManager.addSpeaker(&_nejSpeaker); + + if (R2_INVENTORY.getObjectScene(36) == 0) { + _actor1.postInit(); + _actor1.setup(2752, 5, 1); + _actor1.animate(ANIM_MODE_NONE, NULL); + _actor1.setPosition(Common::Point(101, 148)); + } + + R2_GLOBALS._player.postInit(); + R2_GLOBALS._player.setVisage(19); + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); + R2_GLOBALS._player._moveDiff = Common::Point(2, 2); + R2_GLOBALS._player.disableControl(); + + if (R2_GLOBALS._sceneManager._previousScene == 2700) { + if (R2_INVENTORY.getObjectScene(36) == 0) { + R2_GLOBALS._player.setVisage(2752); + R2_GLOBALS._player.setStrip(6); + R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL); + R2_GLOBALS._player.setPosition(Common::Point(81, 165)); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + _field416 = 1204; + _sceneMode = 11; + _stripManager.start(_field416, this); + } else { + _sceneMode = 2750; + _field412 = 1; + R2_GLOBALS._player.setAction(&_sequenceManager, this, 2750, &R2_GLOBALS._player, NULL); + } + } else if (R2_GLOBALS._sceneManager._previousScene == 2800) { + _sceneMode = 2751; + _field412 = 3; + R2_GLOBALS._player.setAction(&_sequenceManager, this, 2751, &R2_GLOBALS._player, NULL); + } else { + _field412 = 1; + R2_GLOBALS._player.setPosition(Common::Point(90, 137)); + R2_GLOBALS._player.setStrip(3); + R2_GLOBALS._player.enableControl(); + } +} +void Scene2750::signal() { + switch (_sceneMode) { + case 10: + switch (_field414) { + case 1: + switch (_field412) { + case 2: { + _sceneMode = _field414; + _field412 = 1; + Common::Point pt(90, 137); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 3: { + _field412 = 2; + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + default: + break; + } + break; + case 2: { + _sceneMode = _field414; + _field412 = 2; + Common::Point pt(170, 162); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 3: + switch (_field412) { + case 1: { + _field412 = 2; + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 2: { + _sceneMode = _field414; + _field412 = 3; + Common::Point pt(270, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + default: + break; + } + break; + case 2752: + switch (_field412) { + case 1: + _sceneMode = _field414; + setAction(&_sequenceManager, this, 2752, &R2_GLOBALS._player, NULL); + break; + case 2: { + _field412 = 1; + Common::Point pt(20, 132); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 3: { + _field412 = 2; + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + default: + break; + } + break; + case 2753: + switch (_field412) { + case 1: { + _field412 = 2; + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 2: { + _field412 = 3; + Common::Point pt(300, 132); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 3: + _sceneMode = _field414; + setAction(&_sequenceManager, this, 2753, &R2_GLOBALS._player, NULL); + break; + default: + break; + } + break; + default: + break; + } + break; + case 11: + // No break on purpose + case 2753: + g_globals->_sceneManager.changeScene(2800); + break; + case 2752: + g_globals->_sceneManager.changeScene(2700); + break; + default: + R2_GLOBALS._player.enableControl(R2_NEGATOR_GUN); + break; + } +} + +void Scene2750::process(Event &event) { + if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == R2_NEGATOR_GUN)) { + if (_rect1.contains(event.mousePos)) { + if (!_rect1.contains(R2_GLOBALS._player._position)) { + event.handled = true; + _sceneMode = 10; + _field414 = 1; + } + } else if (_rect2.contains(event.mousePos)) { + if (!_rect2.contains(R2_GLOBALS._player._position)) { + event.handled = true; + _sceneMode = 10; + _field414 = 2; + } + } else if (_rect3.contains(event.mousePos)) { + if (!_rect3.contains(R2_GLOBALS._player._position)) { + event.handled = true; + _sceneMode = 10; + _field414 = 3; + } + } else { + event.handled = true; + R2_GLOBALS._player.updateAngle(Common::Point(event.mousePos.x, event.mousePos.y)); + } + + if (_sceneMode == 10) { + R2_GLOBALS._player.disableControl(); + switch (_field412) { + case 1: { + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 2: + if (_field414 == 1) { + Common::Point pt(140, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } else { + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + case 3: { + Common::Point pt(210, 142); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, this); + } + break; + default: + break; + } + } + } + Scene::process(event); +} + } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h index 83fb7b3cfb..9b2a8685fc 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.h +++ b/engines/tsage/ringworld2/ringworld2_scenes2.h @@ -517,8 +517,8 @@ class Scene2700 : public SceneExt { void process(Event &event); }; public: - VisualSpeaker _quinnSpeaker; - VisualSpeaker _nejSpeaker; + SpeakerQuinn2700 _quinnSpeaker; + SpeakerNej2700 _nejSpeaker; NamedHotspot _item1; NamedHotspot _item2; NamedHotspot _item3; @@ -547,6 +547,83 @@ public: virtual void process(Event &event); }; +class Scene2750 : public SceneExt { + class Action1: public Action { + public: + void signal(); + }; + class Action2: public Action { + public: + void signal(); + }; + class Action3: public Action { + public: + void signal(); + }; + class Action4: public Action { + public: + void signal(); + }; + class Action5: public Action { + public: + void signal(); + }; + class Action6: public Action { + public: + void signal(); + }; + class Action7: public Action { + public: + void signal(); + }; + + class Area1: public SceneArea { + public: + void process(Event &event); + }; + class Area2: public SceneArea { + public: + void process(Event &event); + }; +public: + SpeakerQuinn2750 _quinnSpeaker; + SpeakerNej2750 _nejSpeaker; + NamedHotspot _item1; + NamedHotspot _item2; + NamedHotspot _item3; + NamedHotspot _item4; + NamedHotspot _item5; + SceneActor _actor1; + SceneActor _actor2; + SceneActor _actor3; + SceneActor _actor4; + SceneActor _actor5; + SceneActor _actor6; + SceneActor _actor7; + SceneActor _actor8; + SceneActor _actor9; + SceneActor _actor10; + SceneActor _actor11; + Action1 _action1; + Action2 _action2; + Action3 _action3; + Action4 _action4; + Action5 _action5; + Action6 _action6; + Action7 _action7; + Area1 _area1; + Area2 _area2; + Rect _rect1, _rect2, _rect3; + SequenceManager _sequenceManager; + int _field412, _field414, _field416; + + Scene2750(); + virtual void synchronize(Serializer &s); + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void signal(); + virtual void process(Event &event); +}; + } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index b3120f8af6..7a3871f9ac 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -829,5 +829,91 @@ void SpeakerNej2700::proc15() { } } +SpeakerQuinn2750::SpeakerQuinn2750() { + _speakerName = "QUINN"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerQuinn2750::proc15() { + int v = _fieldF6; + + if (!_object2) { + _object2 = &R2_GLOBALS._player; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + if (v == 0) { + _object1.animate(ANIM_MODE_2, NULL); + } else { + ((SceneItem *)_action)->_sceneRegionId = 0; + switch (_object2->_visage) { + case 19: + _object1.setup(4022, 5, 1); + break; + case 2752: + _object1.setup(2752, 1, 1); + break; + default: + break; + } + _object1.animate(ANIM_MODE_5, this); + } +} + +SpeakerNej2750::SpeakerNej2750() { + _speakerName = "NEJ"; + _color1 = 171; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerNej2750::proc15() { + int v = _fieldF6; + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + + if (!_object2) { + _object2 = &scene->_actor1; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + if (v == 0) { + _object1.animate(ANIM_MODE_2, NULL); + } else { + ((SceneItem *)_action)->_sceneRegionId = 0; + switch (_object2->_visage) { + case 2705: + _object1.setup(4022, 7, 1); + break; + case 2752: + _object1.setup(2752, 1, 1); + break; + default: + break; + } + _object1.animate(ANIM_MODE_5, this); + } +} } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h index 7ffd24e6e7..115ad580ce 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -221,6 +221,22 @@ public: virtual Common::String getClassName() { return "SpeakerNej2700"; } virtual void proc15(); }; + +class SpeakerQuinn2750 : public VisualSpeaker { +public: + SpeakerQuinn2750(); + + virtual Common::String getClassName() { return "SpeakerQuinn2750"; } + virtual void proc15(); +}; + +class SpeakerNej2750 : public VisualSpeaker { +public: + SpeakerNej2750(); + + virtual Common::String getClassName() { return "SpeakerNej2750"; } + virtual void proc15(); +}; } // End of namespace Ringworld2 } // End of namespace TsAGE |