diff options
author | Strangerke | 2011-12-30 12:08:41 +0100 |
---|---|---|
committer | Strangerke | 2011-12-30 16:56:18 +0100 |
commit | 211eb00e8725e36b8c802a9b7b9b9812e9c3053e (patch) | |
tree | 563fb105428389da6dda05ef82683c4cb3bcea6d /engines/tsage/ringworld2/ringworld2_speakers.cpp | |
parent | a473934abd2dc4d402963c6f43cec4147ab71e82 (diff) | |
download | scummvm-rg350-211eb00e8725e36b8c802a9b7b9b9812e9c3053e.tar.gz scummvm-rg350-211eb00e8725e36b8c802a9b7b9b9812e9c3053e.tar.bz2 scummvm-rg350-211eb00e8725e36b8c802a9b7b9b9812e9c3053e.zip |
TSAGE: R2R - Cleanup: reorganise speakers, add ancestor classes where speaker declaration is common to several speakers.
Diffstat (limited to 'engines/tsage/ringworld2/ringworld2_speakers.cpp')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 2102 |
1 files changed, 844 insertions, 1258 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index b8773192b0..7f5cdc1328 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -191,11 +191,13 @@ void VisualSpeaker::setDelay(int delay) { _frameNumber = R2_GLOBALS._events.getFrameNumber(); } -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- +// Classes related to CAPTAIN +//---------------------------------------------------------------------------- -SpeakerMiranda300::SpeakerMiranda300(): VisualSpeaker() { - _speakerName = "MIRANDA"; - _color1 = 154; +SpeakerCaptain3210::SpeakerCaptain3210() { + _speakerName = "Captain"; + _color1 = 5; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -205,17 +207,12 @@ SpeakerMiranda300::SpeakerMiranda300(): VisualSpeaker() { _numFrames = 0; } -void SpeakerMiranda300::proc15() { +void SpeakerCaptain3210::proc15() { int v = _fieldF6; + Scene3210 *scene = (Scene3210 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) { - _object2 = &R2_GLOBALS._player; - } else { - Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_miranda; - } - + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -226,30 +223,20 @@ void SpeakerMiranda300::proc15() { if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - } else if (v == 100) { - _numFrames = 0; - ((SceneItem *)_action)->_sceneRegionId = 0; - - _object1.setStrip(_object1._strip - 1); - _object1.setFrame(_object1.getFrameCount()); - _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - - if (v == 4) { - _object1.setup(304, 5, 1); - } else { - _object1.setup(305, v * 2 - 1, 1); - } + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- +// Classes related to CARETAKER +//---------------------------------------------------------------------------- -SpeakerSeeker300::SpeakerSeeker300(): VisualSpeaker() { - _speakerName = "SEEKER"; - _color1 = 35; +SpeakerCaretaker2450::SpeakerCaretaker2450() { + _speakerName = "CARETAKER"; + _color1 = 43; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -259,20 +246,30 @@ SpeakerSeeker300::SpeakerSeeker300(): VisualSpeaker() { _numFrames = 0; } -void SpeakerSeeker300::proc15() { +//---------------------------------------------------------------------------- +// Classes related to GUARD +//---------------------------------------------------------------------------- + +SpeakerGuard::SpeakerGuard() { + _speakerName = "GUARD"; + _color1 = 5; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerGuard2800::proc15() { int v = _fieldF6; + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) { - _object2 = &R2_GLOBALS._player; - } else { - Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_seeker; - } - + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); - _object1.fixPriority(140); _object1.setPosition(_object2->_position); if (_object2->_mover) @@ -281,55 +278,21 @@ void SpeakerSeeker300::proc15() { if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - } else if (v == 100) { - _numFrames = 0; - ((SceneItem *)_action)->_sceneRegionId = 0; - - _object1.setStrip(_object1._strip - 1); - _object1.setFrame(_object1.getFrameCount()); - _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(306, v * 2 - 1, 1); + _object1.setZoom(75); + _object1.setup(4060, 3, 1); _object1.animate(ANIM_MODE_5, this); } } -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- +// Classes related to JOCKO +//---------------------------------------------------------------------------- -SpeakerSeekerL::SpeakerSeekerL(): VisualSpeaker() { - _speakerName = "SEEKERL"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; - _fontNumber = 10; -} - -/*--------------------------------------------------------------------------*/ - -SpeakerQuinnL::SpeakerQuinnL(): VisualSpeaker() { - _speakerName = "QUINNL"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; - _fontNumber = 10; -} - -/*--------------------------------------------------------------------------*/ - -SpeakerQuinn300::SpeakerQuinn300(): VisualSpeaker() { - _speakerName = "QUINN"; - _color1 = 60; +SpeakerJocko::SpeakerJocko() { + _speakerName = "Jocko"; + _color1 = 45; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -339,17 +302,12 @@ SpeakerQuinn300::SpeakerQuinn300(): VisualSpeaker() { _numFrames = 0; } -void SpeakerQuinn300::proc15() { +void SpeakerJocko3200::proc15() { int v = _fieldF6; + Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) { - _object2 = &R2_GLOBALS._player; - } else { - Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_quinn; - } - + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -360,54 +318,20 @@ void SpeakerQuinn300::proc15() { if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - } else if (v == 100) { - _numFrames = 0; - ((SceneItem *)_action)->_sceneRegionId = 0; - - _object1.setStrip(_object1._strip - 1); - _object1.setFrame(_object1.getFrameCount()); - _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - - switch (_object2->_visage) { - case 10: - _object1.setup((v - 1) / 4 + 4010, ((v - ((v - 1) / 4 * 4) - 1) % 8) * 2 + 1, 1); - break; - case 302: - _object1.setup(308, (v - 1) % 8 + 1, 1); - break; - case 308: - _object1.setup(308, 5, 1); - break; - } - + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -/*--------------------------------------------------------------------------*/ - -SpeakerTeal300::SpeakerTeal300(): VisualSpeaker() { - _speakerName = "TEAL"; - _color1 = 22; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerTeal300::proc15() { +void SpeakerJocko3220::proc15() { int v = _fieldF6; + Scene3220 *scene = (Scene3220 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_teal; + _object2 = &scene->_actor2; _object2->hide(); - _object1.postInit(); _object1.setPosition(_object2->_position); @@ -419,34 +343,18 @@ void SpeakerTeal300::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(303, 1, 1); + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } - -/*--------------------------------------------------------------------------*/ - -SpeakerSoldier300::SpeakerSoldier300(): VisualSpeaker() { - _speakerName = "SOLDIER"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerSoldier300::proc15() { +void SpeakerJocko3230::proc15() { int v = _fieldF6; + Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_teal; + _object2 = &scene->_actor2; _object2->hide(); - _object1.postInit(); _object1.setPosition(_object2->_position); @@ -458,28 +366,18 @@ void SpeakerSoldier300::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(303, 3, 1); + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -/*--------------------------------------------------------------------------*/ +//---------------------------------------------------------------------------- +// Classes related to MIRANDA +//---------------------------------------------------------------------------- -SpeakerQuinn2350::SpeakerQuinn2350(): VisualSpeaker() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerPharisha2350::SpeakerPharisha2350(): VisualSpeaker() { - _speakerName = "PHARISHA"; - _color1 = 151; +SpeakerMiranda::SpeakerMiranda(): VisualSpeaker() { + _speakerName = "MIRANDA"; + _color1 = 154; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -489,70 +387,55 @@ SpeakerPharisha2350::SpeakerPharisha2350(): VisualSpeaker() { _numFrames = 0; } -/*--------------------------------------------------------------------------*/ - -SpeakerQuinn2435::SpeakerQuinn2435() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} -void SpeakerQuinn2435::proc15() { +void SpeakerMiranda300::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) { + if (R2_GLOBALS._player._characterIndex == 3) { _object2 = &R2_GLOBALS._player; } else { - Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_actor1; + Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_miranda; } _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); } if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); + } else if (v == 100) { + _numFrames = 0; + ((SceneItem *)_action)->_sceneRegionId = 0; + + _object1.setStrip(_object1._strip - 1); + _object1.setFrame(_object1.getFrameCount()); + _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object2->setStrip(7); - _object1.setup(2020, 5, 1); + + if (v == 4) { + _object1.setup(304, 5, 1); + } else { + _object1.setup(305, v * 2 - 1, 1); + } _object1.animate(ANIM_MODE_5, this); } } -SpeakerSeeker2435::SpeakerSeeker2435() { - _speakerName = "SEEKER"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerSeeker2435::proc15() { +void SpeakerMiranda3255::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) { - _object2 = &R2_GLOBALS._player; - } else { - Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_actor1; - } - + _object2 = &R2_GLOBALS._player; _object2->hide(); _object1.postInit(); + _object1._effect = _object2->_effect; + _object1._shade = _object2->_shade; _object1.setPosition(_object2->_position); } @@ -560,230 +443,211 @@ void SpeakerSeeker2435::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object2->setStrip(7); - _object1.setup(4099, 1, 1); + _object1.setup(3257, 5, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerPharisha2435::SpeakerPharisha2435() { - _speakerName = "PHARISHA"; - _color1 = 151; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerMiranda3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; -void SpeakerPharisha2435::proc15() { int v = _fieldF6; - Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + if (R2_GLOBALS._player._characterIndex == 3) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor2; + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + R2_GLOBALS._player.disableControl(); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); } + - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4098, 5, 1); + _object1.setup(4051, 5, 1); _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; } } -/*--------------------------------------------------------------------------*/ +void SpeakerMiranda3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; -SpeakerQuinn2450::SpeakerQuinn2450() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} -void SpeakerQuinn2450::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) { + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; - } else { - Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_actor1; - } + else + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); } + - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - if (R2_GLOBALS.getFlag(61)) - _object1.setup(2020, 3, 1); - else - _object1.setup(2020, 1, 1); + _object1.setup(4051, 5, 1); _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; } } -SpeakerSeeker2450::SpeakerSeeker2450() { - _speakerName = "SEEKER"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerMiranda3400::proc15() { + Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; -void SpeakerSeeker2450::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) { + if (R2_GLOBALS._player._characterIndex == 3) _object2 = &R2_GLOBALS._player; - } else { - Scene2450 *scene = (Scene2450 *)R2_GLOBALS._sceneManager._scene; - _object2 = &scene->_actor1; - } + else + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); } - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4099, 3, 1); - _object1.animate(ANIM_MODE_5, this); + _object1.setup(4051, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4050, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; } } -SpeakerCaretaker2450::SpeakerCaretaker2450() { - _speakerName = "CARETAKER"; - _color1 = 43; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -/*--------------------------------------------------------------------------*/ - -SpeakerQuinn2500::SpeakerQuinn2500() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerSeeker2500::SpeakerSeeker2500() { - _speakerName = "SEEKER"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerMiranda2500::SpeakerMiranda2500() { - // Not in uppercase in the original - _speakerName = "Miranda"; - _color1 = 154; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerWebbster2500::SpeakerWebbster2500() { - // Not in uppercase in the original - _speakerName = "Webbster"; - _color1 = 27; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerQuinn2700::SpeakerQuinn2700() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerMiranda3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; -void SpeakerQuinn2700::proc15() { int v = _fieldF6; if (!_object2) { - _object2 = &R2_GLOBALS._player; + _object2 = &scene->_actor3; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - if (v == 0) { + _object1.setPosition(_object2->_position); + + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - switch (_object2->_visage) { - case 19: - _object1.setup(4022, 5, 1); - break; - case 2701: - _object1.setup(4022, 1, 1); - break; - default: - break; - } - _object1.animate(ANIM_MODE_5, this); + scene->_actor1.setup(10, 6, 1); + scene->_actor2.setup(20, 5, 1); + _object2->setup(30, 1, 1); + scene->_actor4.setup(40, 1, 1); + _object1.setup(4050, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor3.setup(30, 8, 1); + _object1.setup(4052, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4051, 7, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; } } -SpeakerNej2700::SpeakerNej2700() { +//---------------------------------------------------------------------------- +// Classes related to NEJ +//---------------------------------------------------------------------------- + +SpeakerNej::SpeakerNej() { _speakerName = "NEJ"; _color1 = 171; _color2 = 0; @@ -830,23 +694,12 @@ 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() { +void SpeakerNej2750::proc15() { int v = _fieldF6; + Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &R2_GLOBALS._player; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -860,8 +713,8 @@ void SpeakerQuinn2750::proc15() { } else { ((SceneItem *)_action)->_sceneRegionId = 0; switch (_object2->_visage) { - case 19: - _object1.setup(4022, 5, 1); + case 2705: + _object1.setup(4022, 7, 1); break; case 2752: _object1.setup(2752, 1, 1); @@ -873,24 +726,12 @@ void SpeakerQuinn2750::proc15() { } } -SpeakerNej2750::SpeakerNej2750() { - _speakerName = "NEJ"; - _color1 = 171; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerNej2750::proc15() { +void SpeakerNej2800::proc15() { int v = _fieldF6; Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -903,23 +744,20 @@ void SpeakerNej2750::proc15() { _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.setup(4023, 3, 1); + if (_object2->_visage == 2801) + _object1.setPosition(Common::Point(R2_GLOBALS._player._position.x - 12, R2_GLOBALS._player._position.y)); _object1.animate(ANIM_MODE_5, this); } } -SpeakerQuinn2800::SpeakerQuinn2800() { - _speakerName = "QUINN"; - _color1 = 60; +//---------------------------------------------------------------------------- +// Classes related to PHARISHA +//---------------------------------------------------------------------------- + +SpeakerPharisha::SpeakerPharisha(): VisualSpeaker() { + _speakerName = "PHARISHA"; + _color1 = 151; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -929,48 +767,33 @@ SpeakerQuinn2800::SpeakerQuinn2800() { _numFrames = 0; } -void SpeakerQuinn2800::proc15() { +void SpeakerPharisha2435::proc15() { int v = _fieldF6; + Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &R2_GLOBALS._player; + _object2 = &scene->_actor2; _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 16: - _object1.setZoom(75); - _object1.setup(4023, 5, 1); - break; - case 19: - _object1.setup(4023, 1, 1); - break; - case 3110: - _object1.setZoom(75); - if (_object2->_strip == 1) - _object1.setup(4061 , 1, 1); - else - _object1.setup(4061 , 3, 1); - break; - default: - break; - } + _object1.setup(4098, 5, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerNej2800::SpeakerNej2800() { - _speakerName = "NEJ"; - _color1 = 171; +//---------------------------------------------------------------------------- +// Classes related to PRIVATE +//---------------------------------------------------------------------------- + +SpeakerPrivate3210::SpeakerPrivate3210() { + _speakerName = "Private"; + _color1 = 45; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -980,9 +803,9 @@ SpeakerNej2800::SpeakerNej2800() { _numFrames = 0; } -void SpeakerNej2800::proc15() { +void SpeakerPrivate3210::proc15() { int v = _fieldF6; - Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; + Scene3210 *scene = (Scene3210 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { _object2 = &scene->_actor2; @@ -998,16 +821,18 @@ void SpeakerNej2800::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4023, 3, 1); - if (_object2->_visage == 2801) - _object1.setPosition(Common::Point(R2_GLOBALS._player._position.x - 12, R2_GLOBALS._player._position.y)); + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerGuard2800::SpeakerGuard2800() { - _speakerName = "GUARD"; - _color1 = 5; +//---------------------------------------------------------------------------- +// Classes related to QUINN +//---------------------------------------------------------------------------- + +SpeakerQuinn::SpeakerQuinn(): VisualSpeaker() { + _speakerName = "QUINN"; + _color1 = 60; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -1017,12 +842,17 @@ SpeakerGuard2800::SpeakerGuard2800() { _numFrames = 0; } -void SpeakerGuard2800::proc15() { +void SpeakerQuinn300::proc15() { int v = _fieldF6; - Scene2750 *scene = (Scene2750 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + if (R2_GLOBALS._player._characterIndex == 3) { + _object2 = &R2_GLOBALS._player; + } else { + Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_quinn; + } + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1033,114 +863,91 @@ void SpeakerGuard2800::proc15() { if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); + } else if (v == 100) { + _numFrames = 0; + ((SceneItem *)_action)->_sceneRegionId = 0; + + _object1.setStrip(_object1._strip - 1); + _object1.setFrame(_object1.getFrameCount()); + _object1.animate(ANIM_MODE_6, this); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setZoom(75); - _object1.setup(4060, 3, 1); + + switch (_object2->_visage) { + case 10: + _object1.setup((v - 1) / 4 + 4010, ((v - ((v - 1) / 4 * 4) - 1) % 8) * 2 + 1, 1); + break; + case 302: + _object1.setup(308, (v - 1) % 8 + 1, 1); + break; + case 308: + _object1.setup(308, 5, 1); + break; + } + _object1.animate(ANIM_MODE_5, this); } } -SpeakerGuard3100::SpeakerGuard3100() { - _speakerName = "GUARD"; - _color1 = 5; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -SpeakerRocko3200::SpeakerRocko3200() { - _speakerName = "Rocko"; - _color1 = 5; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerRocko3200::proc15() { +void SpeakerQuinn2435::proc15() { int v = _fieldF6; - Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + if (R2_GLOBALS._player._characterIndex == 1) { + _object2 = &R2_GLOBALS._player; + } else { + Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; + _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; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + _object2->setStrip(7); + _object1.setup(2020, 5, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerJocko3200::SpeakerJocko3200() { - _speakerName = "Jocko"; - _color1 = 45; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerJocko3200::proc15() { +void SpeakerQuinn2450::proc15() { int v = _fieldF6; - Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + if (R2_GLOBALS._player._characterIndex == 1) { + _object2 = &R2_GLOBALS._player; + } else { + Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; + _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; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + if (R2_GLOBALS.getFlag(61)) + _object1.setup(2020, 3, 1); + else + _object1.setup(2020, 1, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerSocko3200::SpeakerSocko3200() { - _speakerName = "Socko"; - _color1 = 10; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerSocko3200::proc15() { +void SpeakerQuinn2700::proc15() { int v = _fieldF6; - Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor3; + _object2 = &R2_GLOBALS._player; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1153,29 +960,25 @@ void SpeakerSocko3200::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + switch (_object2->_visage) { + case 19: + _object1.setup(4022, 5, 1); + break; + case 2701: + _object1.setup(4022, 1, 1); + break; + default: + break; + } _object1.animate(ANIM_MODE_5, this); } } -SpeakerCaptain3210::SpeakerCaptain3210() { - _speakerName = "Captain"; - _color1 = 5; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerCaptain3210::proc15() { +void SpeakerQuinn2750::proc15() { int v = _fieldF6; - Scene3210 *scene = (Scene3210 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + _object2 = &R2_GLOBALS._player; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1188,29 +991,25 @@ void SpeakerCaptain3210::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + 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); } } -SpeakerPrivate3210::SpeakerPrivate3210() { - _speakerName = "Private"; - _color1 = 45; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerPrivate3210::proc15() { +void SpeakerQuinn2800::proc15() { int v = _fieldF6; - Scene3210 *scene = (Scene3210 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + _object2 = &R2_GLOBALS._player; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1223,189 +1022,283 @@ void SpeakerPrivate3210::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + switch (_object2->_visage) { + case 16: + _object1.setZoom(75); + _object1.setup(4023, 5, 1); + break; + case 19: + _object1.setup(4023, 1, 1); + break; + case 3110: + _object1.setZoom(75); + if (_object2->_strip == 1) + _object1.setup(4061 , 1, 1); + else + _object1.setup(4061 , 3, 1); + break; + default: + break; + } _object1.animate(ANIM_MODE_5, this); } } -SpeakerRocko3220::SpeakerRocko3220() { - _speakerName = "Rocko"; - _color1 = 5; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerQuinn3255::proc15() { + Scene3255 *scene = (Scene3255 *)R2_GLOBALS._sceneManager._scene; -void SpeakerRocko3220::proc15() { int v = _fieldF6; - Scene3220 *scene = (Scene3220 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + _object2 = &scene->_actor4; _object2->hide(); _object1.postInit(); + _object1._effect = _object2->_effect; + _object1._shade = _object2->_shade; _object1.setPosition(_object2->_position); - - if (_object2->_mover) - _object2->addMover(NULL); } if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + _object1.setup(3257, 3, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerJocko3220::SpeakerJocko3220() { - _speakerName = "Jocko"; - _color1 = 45; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerQuinn3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; -void SpeakerJocko3220::proc15() { int v = _fieldF6; - Scene3220 *scene = (Scene3220 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + if (R2_GLOBALS._player._characterIndex == 1) + _object2 = &R2_GLOBALS._player; + else if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &scene->_actor1; + else + _object2 = &scene->_actor2; + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); - if (_object2->_mover) + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) _object2->addMover(NULL); } + - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + _object1.setup(4010, 5, 1); _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; } } -SpeakerRocko3230::SpeakerRocko3230() { - _speakerName = "Rocko"; - _color1 = 5; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerQuinn3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; -void SpeakerRocko3230::proc15() { int v = _fieldF6; - Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + if (R2_GLOBALS._player._characterIndex == 1) + _object2 = &R2_GLOBALS._player; + else if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &scene->_actor1; + else + _object2 = &scene->_actor2; + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); - if (_object2->_mover) + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) _object2->addMover(NULL); } + - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4111, (_object2->_strip * 2) - 1, 1); + if (R2_GLOBALS._player._characterIndex == 2) + _object1.setup(4010, 3, 1); + else + _object1.setup(4010, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; } } -SpeakerJocko3230::SpeakerJocko3230() { - _speakerName = "Jocko"; - _color1 = 45; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} +void SpeakerQuinn3400::proc15() { + Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; -void SpeakerJocko3230::proc15() { int v = _fieldF6; - Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + if (R2_GLOBALS._player._characterIndex == 1) + _object2 = &R2_GLOBALS._player; + else if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &scene->_actor1; + else + _object2 = &scene->_actor2; + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - - if (_object2->_mover) + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + R2_GLOBALS._player.disableControl(); + if (_object2->_mover) _object2->addMover(NULL); } - if (v == 0) { + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4060, (_object2->_strip * 2) - 1, 1); - _object1.animate(ANIM_MODE_5, this); + _object1.setup(4010, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4010, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4012, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; } } -SpeakerTeal3240::SpeakerTeal3240() { - _speakerName = "Teal"; - _color1 = 22; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; +void SpeakerQuinn3700::setText(const Common::String &msg) { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + switch (_fieldF6) { + case 2: + scene->_actor3.setup(30, 1, 1); + R2_GLOBALS._sound2.play(44); + break; + case 3: + scene->_actor3.setup(30, 1, 1); + break; + default: + scene->_actor3.setup(30, 7, 1); + break; + } + VisualSpeaker::setText(msg); } -void SpeakerTeal3240::proc15() { +void SpeakerQuinn3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + int v = _fieldF6; - Scene3240 *scene = (Scene3240 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - if (v == 0) { + _object1.setPosition(_object2->_position); + + switch (v) { + case 0: _object1.animate(ANIM_MODE_2, NULL); - } else { + break; + case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4070, (_object2->_strip * 2) - 1, 1); - _object1.animate(ANIM_MODE_5, this); + R2_GLOBALS._sound2.stop(); + scene->_actor1.setup(10, 4, 1); + scene->_actor3.setup(30, 7, 1); + _object1.setup(3701, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(3701, 2, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor1.setup(10, 2, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4011, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; } } -SpeakerWebbster3240::SpeakerWebbster3240() { - _speakerName = "Webbster"; - _color1 = 10; +//---------------------------------------------------------------------------- +// Classes related to QUINNL +//---------------------------------------------------------------------------- + +SpeakerQuinnL::SpeakerQuinnL(): VisualSpeaker() { + _speakerName = "QUINNL"; + _color1 = 35; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -1413,30 +1306,12 @@ SpeakerWebbster3240::SpeakerWebbster3240() { _object2 = NULL; _displayMode = 1; _numFrames = 0; + _fontNumber = 10; } -void SpeakerWebbster3240::proc15() { - int v = _fieldF6; - Scene3240 *scene = (Scene3240 *)R2_GLOBALS._sceneManager._scene; - - if (!_object2) { - _object2 = &scene->_actor2; - _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; - _object1.setup(4110, 5, 1); - _object1.animate(ANIM_MODE_5, this); - } -} +//---------------------------------------------------------------------------- +// Classes related to RALF +//---------------------------------------------------------------------------- SpeakerRalf3245::SpeakerRalf3245() { _speakerName = "Ralf"; @@ -1486,9 +1361,13 @@ void SpeakerRalf3245::proc15() { } } -SpeakerTomko3245::SpeakerTomko3245() { - _speakerName = "Tomko"; - _color1 = 10; +//---------------------------------------------------------------------------- +// Classes related to ROCKO +//---------------------------------------------------------------------------- + +SpeakerRocko::SpeakerRocko() { + _speakerName = "Rocko"; + _color1 = 5; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -1498,12 +1377,12 @@ SpeakerTomko3245::SpeakerTomko3245() { _numFrames = 0; } -void SpeakerTomko3245::proc15() { +void SpeakerRocko3200::proc15() { int v = _fieldF6; - Scene3245 *scene = (Scene3245 *)R2_GLOBALS._sceneManager._scene; + Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor2; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1516,95 +1395,64 @@ void SpeakerTomko3245::proc15() { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - switch (_object2->_visage) { - case 3100: - _object1.setup(4105, (_object2->_strip * 2) - 1, 1); - break; - case 3101: - _object1.setup(4108, (_object2->_strip * 2) - 1, 1); - break; - case 3102: - _object1.setup(4109, (_object2->_strip * 2) - 1, 1); - break; - default: - break; - } - + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerQuinn3255::SpeakerQuinn3255() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerQuinn3255::proc15() { - Scene3255 *scene = (Scene3255 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerRocko3220::proc15() { int v = _fieldF6; + Scene3220 *scene = (Scene3220 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor4; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); - _object1._effect = _object2->_effect; - _object1._shade = _object2->_shade; _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); } if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(3257, 3, 1); + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerMiranda3255::SpeakerMiranda3255() { - _speakerName = "MIRANDA"; - _color1 = 154; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerMiranda3255::proc15() { +void SpeakerRocko3230::proc15() { int v = _fieldF6; + Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &R2_GLOBALS._player; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); - _object1._effect = _object2->_effect; - _object1._shade = _object2->_shade; _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); } if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(3257, 5, 1); + _object1.setup(4111, (_object2->_strip * 2) - 1, 1); _object1.animate(ANIM_MODE_5, this); } } -SpeakerQuinn3375::SpeakerQuinn3375() { - _speakerName = "QUINN"; - _color1 = 60; +//---------------------------------------------------------------------------- +// Classes related to SEEKER +//---------------------------------------------------------------------------- + +SpeakerSeeker::SpeakerSeeker(): VisualSpeaker() { + _speakerName = "SEEKER"; + _color1 = 35; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -1614,199 +1462,104 @@ SpeakerQuinn3375::SpeakerQuinn3375() { _numFrames = 0; } -void SpeakerQuinn3375::proc15() { - Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerSeeker300::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 3) { _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) - _object2 = &scene->_actor1; - else - _object2 = &scene->_actor2; + } else { + Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_seeker; + } _object2->hide(); _object1.postInit(); + _object1.fixPriority(140); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - - if (scene->_actor1._position.y != 163) - R2_GLOBALS._player.setStrip(8); - else - R2_GLOBALS._player.setStrip(2); - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._player.disableControl(CURSOR_TALK); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: + } else if (v == 100) { + _numFrames = 0; ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4010, 5, 1); + + _object1.setStrip(_object1._strip - 1); + _object1.setFrame(_object1.getFrameCount()); + _object1.animate(ANIM_MODE_6, this); + } else { + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(306, v * 2 - 1, 1); _object1.animate(ANIM_MODE_5, this); - break; - default: - signal(); - break; } } -SpeakerSeeker3375::SpeakerSeeker3375() { - _speakerName = "SEEKER"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerSeeker3375::proc15() { - Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerSeeker2435::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) + if (R2_GLOBALS._player._characterIndex == 2) { _object2 = &R2_GLOBALS._player; - else + } else { + Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; _object2 = &scene->_actor1; + } _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - - if (scene->_actor1._position.y != 163) - R2_GLOBALS._player.setStrip(8); - else - R2_GLOBALS._player.setStrip(2); - - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._player.disableControl(CURSOR_TALK); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - - if (_object2->_mover) - _object2->addMover(NULL); } - - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4031, 1, 1); + _object2->setStrip(7); + _object1.setup(4099, 1, 1); _object1.animate(ANIM_MODE_5, this); - break; - default: - signal(); - break; } } -SpeakerMiranda3375::SpeakerMiranda3375() { - _speakerName = "MIRANDA"; - _color1 = 154; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerMiranda3375::proc15() { - Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerSeeker2450::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) + if (R2_GLOBALS._player._characterIndex == 2) { _object2 = &R2_GLOBALS._player; - else - _object2 = &scene->_actor2; + } else { + Scene2450 *scene = (Scene2450 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_actor1; + } _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - - if (scene->_actor1._position.y != 163) - R2_GLOBALS._player.setStrip(8); - else - R2_GLOBALS._player.setStrip(2); - - R2_GLOBALS._player.disableControl(); - - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - - if (_object2->_mover) - _object2->addMover(NULL); } - - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4051, 5, 1); + _object1.setup(4099, 3, 1); _object1.animate(ANIM_MODE_5, this); - break; - default: - signal(); - break; } } -SpeakerWebbster3375::SpeakerWebbster3375() { - _speakerName = "WEBBSTER"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerWebbster3375::proc15() { +void SpeakerSeeker3375::proc15() { Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; if (!_object2) { - _object2 = &scene->_actor3; + if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor1; + _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); @@ -1822,7 +1575,7 @@ void SpeakerWebbster3375::proc15() { if (R2_GLOBALS._player._mover) R2_GLOBALS._player.addMover(NULL); - R2_GLOBALS._player.disableControl(); + R2_GLOBALS._player.disableControl(CURSOR_TALK); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); if (_object2->_mover) @@ -1836,7 +1589,7 @@ void SpeakerWebbster3375::proc15() { break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4110, 5, 1); + _object1.setup(4031, 1, 1); _object1.animate(ANIM_MODE_5, this); break; default: @@ -1845,29 +1598,16 @@ void SpeakerWebbster3375::proc15() { } } -SpeakerQuinn3385::SpeakerQuinn3385() { - _speakerName = "QUINN"; - _color1 = 60; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} -void SpeakerQuinn3385::proc15() { +void SpeakerSeeker3385::proc15() { Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) + if (R2_GLOBALS._player._characterIndex == 2) _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) - _object2 = &scene->_actor1; else - _object2 = &scene->_actor2; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); @@ -1898,11 +1638,7 @@ void SpeakerQuinn3385::proc15() { break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - if (R2_GLOBALS._player._characterIndex == 2) - _object1.setup(4010, 3, 1); - else - _object1.setup(4010, 5, 1); - + _object1.setup(4031, 3, 1); _object1.animate(ANIM_MODE_5, this); break; default: @@ -1911,20 +1647,8 @@ void SpeakerQuinn3385::proc15() { } } -SpeakerSeeker3385::SpeakerSeeker3385() { - _speakerName = "SEEKER"; - _color1 = 35; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerSeeker3385::proc15() { - Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; +void SpeakerSeeker3400::proc15() { + Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; @@ -1940,22 +1664,12 @@ void SpeakerSeeker3385::proc15() { _object1._numFrames = 7; _object1._effect = 1; _object1.changeZoom(-1); - - if (R2_GLOBALS._sceneManager._previousScene == 3375) - R2_GLOBALS._player.setStrip(4); - else - R2_GLOBALS._player.setStrip(3); - - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); if (_object2->_mover) _object2->addMover(NULL); } - switch (v) { case 0: @@ -1963,8 +1677,28 @@ void SpeakerSeeker3385::proc15() { break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4031, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; _object1.setup(4031, 3, 1); - _object1.animate(ANIM_MODE_5, this); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4030, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 4: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4031, 7, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 5: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4033, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); break; default: signal(); @@ -1972,51 +1706,37 @@ void SpeakerSeeker3385::proc15() { } } -SpeakerMiranda3385::SpeakerMiranda3385() { - _speakerName = "MIRANDA"; - _color1 = 154; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; +void SpeakerSeeker3700::setText(const Common::String &msg) { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + if (_fieldF6 == 1) { + R2_GLOBALS._sound2.play(44); + scene->_actor3.setup(30, 8, 1); + } else { + scene->_actor3.setup(30, 2, 1); + } + VisualSpeaker::setText(msg); } -void SpeakerMiranda3385::proc15() { - Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; +void SpeakerSeeker3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) - _object2 = &R2_GLOBALS._player; - else - _object2 = &scene->_actor2; - + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - - if (R2_GLOBALS._sceneManager._previousScene == 3375) - R2_GLOBALS._player.setStrip(4); - else - R2_GLOBALS._player.setStrip(3); - - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); if (_object2->_mover) _object2->addMover(NULL); } - + + _object1.setPosition(_object2->_position); switch (v) { case 0: @@ -2024,8 +1744,20 @@ void SpeakerMiranda3385::proc15() { break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4051, 5, 1); - _object1.animate(ANIM_MODE_5, this); + R2_GLOBALS._sound2.stop(); + scene->_actor1.setup(10, 8, 1); + scene->_actor2.setup(20, 7, 1); + scene->_actor3.setup(30, 8, 1); + _object1.setup(3701, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor1.setup(10, 2, 1); + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4031, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); break; default: signal(); @@ -2033,9 +1765,13 @@ void SpeakerMiranda3385::proc15() { } } -SpeakerWebbster3385::SpeakerWebbster3385() { - _speakerName = "WEBBSTER"; - _color1 = 60; +//---------------------------------------------------------------------------- +// Classes related to SEEKERL +//---------------------------------------------------------------------------- + +SpeakerSeekerL::SpeakerSeekerL(): VisualSpeaker() { + _speakerName = "SEEKERL"; + _color1 = 35; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2043,55 +1779,16 @@ SpeakerWebbster3385::SpeakerWebbster3385() { _object2 = NULL; _displayMode = 1; _numFrames = 0; + _fontNumber = 10; } -void SpeakerWebbster3385::proc15() { - Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; - - int v = _fieldF6; - - if (!_object2) { - _object2 = &scene->_actor3; - _object2->hide(); - _object1.postInit(); - _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - - if (R2_GLOBALS._sceneManager._previousScene == 3375) - R2_GLOBALS._player.setStrip(4); - else - R2_GLOBALS._player.setStrip(3); - - if (R2_GLOBALS._player._mover) - R2_GLOBALS._player.addMover(NULL); - - R2_GLOBALS._player.disableControl(CURSOR_TALK); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); +//---------------------------------------------------------------------------- +// Classes related to SOCKO +//---------------------------------------------------------------------------- - if (_object2->_mover) - _object2->addMover(NULL); - } - - switch (v) { - case 0: - _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4110, 5, 1); - _object1.animate(ANIM_MODE_5, this); - break; - default: - signal(); - break; - } -} - -SpeakerQuinn3400::SpeakerQuinn3400() { - _speakerName = "QUINN"; - _color1 = 60; +SpeakerSocko3200::SpeakerSocko3200() { + _speakerName = "Socko"; + _color1 = 10; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2100,58 +1797,37 @@ SpeakerQuinn3400::SpeakerQuinn3400() { _displayMode = 1; _numFrames = 0; } -void SpeakerQuinn3400::proc15() { - Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; +void SpeakerSocko3200::proc15() { int v = _fieldF6; + Scene3200 *scene = (Scene3200 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 1) - _object2 = &R2_GLOBALS._player; - else if (R2_GLOBALS._player._characterIndex == 2) - _object2 = &scene->_actor1; - else - _object2 = &scene->_actor2; - + _object2 = &scene->_actor3; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - R2_GLOBALS._player.disableControl(); - if (_object2->_mover) + + if (_object2->_mover) _object2->addMover(NULL); } - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4010, 5, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4010, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 3: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4012, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - default: - signal(); - break; + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + _object1.animate(ANIM_MODE_5, this); } } -SpeakerSeeker3400::SpeakerSeeker3400() { - _speakerName = "SEEKER"; - _color1 = 35; +//---------------------------------------------------------------------------- +// Classes related to SOLDIER +//---------------------------------------------------------------------------- + +SpeakerSoldier300::SpeakerSoldier300(): VisualSpeaker() { + _speakerName = "SOLDIER"; + _color1 = 60; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2161,68 +1837,37 @@ SpeakerSeeker3400::SpeakerSeeker3400() { _numFrames = 0; } -void SpeakerSeeker3400::proc15() { - Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerSoldier300::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 2) - _object2 = &R2_GLOBALS._player; - else - _object2 = &scene->_actor1; - + Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_teal; _object2->hide(); + _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - R2_GLOBALS._player.disableControl(); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4031, 1, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4031, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 3: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4030, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 4: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4031, 7, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 5: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4033, 1, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - default: - signal(); - break; + _object1.setup(303, 3, 1); + _object1.animate(ANIM_MODE_5, this); } } -SpeakerMiranda3400::SpeakerMiranda3400() { - _speakerName = "MIRANDA"; - _color1 = 154; +//---------------------------------------------------------------------------- +// Classes related to TEAL +//---------------------------------------------------------------------------- + +SpeakerTeal::SpeakerTeal(): VisualSpeaker() { + _speakerName = "TEAL"; + _color1 = 22; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2232,119 +1877,53 @@ SpeakerMiranda3400::SpeakerMiranda3400() { _numFrames = 0; } -void SpeakerMiranda3400::proc15() { - Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerTeal300::proc15() { int v = _fieldF6; if (!_object2) { - if (R2_GLOBALS._player._characterIndex == 3) - _object2 = &R2_GLOBALS._player; - else - _object2 = &scene->_actor2; - + Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_teal; _object2->hide(); + _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - R2_GLOBALS._player.disableControl(); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4051, 5, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4050, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - default: - signal(); - break; + _object1.setup(303, 1, 1); + _object1.animate(ANIM_MODE_5, this); } } -SpeakerWebbster3400::SpeakerWebbster3400() { - _speakerName = "WEBBSTER"; - _color1 = 27; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - -void SpeakerWebbster3400::proc15() { - Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerTeal3240::proc15() { int v = _fieldF6; + Scene3240 *scene = (Scene3240 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor3; + _object2 = &scene->_actor1; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - _object1._effect = 1; - _object1.changeZoom(-1); - R2_GLOBALS._player.disableControl(); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4110, 5, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: - ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4110, 7, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 3: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - _object1.setup(4110, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - default: - signal(); - break; + _object1.setup(4070, (_object2->_strip * 2) - 1, 1); + _object1.animate(ANIM_MODE_5, this); } } -SpeakerTeal3400::SpeakerTeal3400() { - _speakerName = "TEAL"; - _color1 = 22; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; -} - void SpeakerTeal3400::proc15() { Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; @@ -2402,9 +1981,13 @@ void SpeakerTeal3400::proc15() { } } -SpeakerQuinn3700::SpeakerQuinn3700() { - _speakerName = "QUINN"; - _color1 = 60; +//---------------------------------------------------------------------------- +// Classes related to TOMKO +//---------------------------------------------------------------------------- + +SpeakerTomko3245::SpeakerTomko3245() { + _speakerName = "Tomko"; + _color1 = 10; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2414,79 +1997,49 @@ SpeakerQuinn3700::SpeakerQuinn3700() { _numFrames = 0; } -void SpeakerQuinn3700::setText(const Common::String &msg) { - Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; - - switch (_fieldF6) { - case 2: - scene->_actor3.setup(30, 1, 1); - R2_GLOBALS._sound2.play(44); - break; - case 3: - scene->_actor3.setup(30, 1, 1); - break; - default: - scene->_actor3.setup(30, 7, 1); - break; - } - VisualSpeaker::setText(msg); -} - -void SpeakerQuinn3700::proc15() { - Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; - +void SpeakerTomko3245::proc15() { int v = _fieldF6; + Scene3245 *scene = (Scene3245 *)R2_GLOBALS._sceneManager._scene; if (!_object2) { - _object2 = &scene->_actor1; + _object2 = &scene->_actor2; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); - _object1._numFrames = 7; - R2_GLOBALS._player.disableControl(); - R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); - if (_object2->_mover) + if (_object2->_mover) _object2->addMover(NULL); } - _object1.setPosition(_object2->_position); - - switch (v) { - case 0: + if (v == 0) { _object1.animate(ANIM_MODE_2, NULL); - break; - case 1: - ((SceneItem *)_action)->_sceneRegionId = 0; - R2_GLOBALS._sound2.stop(); - scene->_actor1.setup(10, 4, 1); - scene->_actor3.setup(30, 7, 1); - _object1.setup(3701, 1, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: - ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor2.setup(20, 1, 1); - scene->_actor3.setup(30, 1, 1); - _object1.setup(3701, 2, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 3: + } else { ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor1.setup(10, 2, 1); - scene->_actor3.setup(30, 1, 1); - _object1.setup(4011, 1, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - default: - signal(); - break; + switch (_object2->_visage) { + case 3100: + _object1.setup(4105, (_object2->_strip * 2) - 1, 1); + break; + case 3101: + _object1.setup(4108, (_object2->_strip * 2) - 1, 1); + break; + case 3102: + _object1.setup(4109, (_object2->_strip * 2) - 1, 1); + break; + default: + break; + } + + _object1.animate(ANIM_MODE_5, this); } } -SpeakerSeeker3700::SpeakerSeeker3700() { - _speakerName = "SEEKER"; - _color1 = 35; +//---------------------------------------------------------------------------- +// Classes related to WEBBSTER +//---------------------------------------------------------------------------- + +SpeakerWebbster::SpeakerWebbster(int colour) { + _speakerName = "WEBBSTER"; + _color1 = colour; _color2 = 0; _fieldF6 = 0; _textWidth = 300; @@ -2496,29 +2049,51 @@ SpeakerSeeker3700::SpeakerSeeker3700() { _numFrames = 0; } -void SpeakerSeeker3700::setText(const Common::String &msg) { - Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; +void SpeakerWebbster3240::proc15() { + int v = _fieldF6; + Scene3240 *scene = (Scene3240 *)R2_GLOBALS._sceneManager._scene; - if (_fieldF6 == 1) { - R2_GLOBALS._sound2.play(44); - scene->_actor3.setup(30, 8, 1); + if (!_object2) { + _object2 = &scene->_actor2; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + if (v == 0) { + _object1.animate(ANIM_MODE_2, NULL); } else { - scene->_actor3.setup(30, 2, 1); + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4110, 5, 1); + _object1.animate(ANIM_MODE_5, this); } - VisualSpeaker::setText(msg); } -void SpeakerSeeker3700::proc15() { - Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; +void SpeakerWebbster3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; if (!_object2) { - _object2 = &scene->_actor2; + _object2 = &scene->_actor3; _object2->hide(); _object1.postInit(); _object1.setPosition(_object2->_position); _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); @@ -2526,28 +2101,14 @@ void SpeakerSeeker3700::proc15() { _object2->addMover(NULL); } - _object1.setPosition(_object2->_position); - switch (v) { case 0: _object1.animate(ANIM_MODE_2, NULL); break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - R2_GLOBALS._sound2.stop(); - scene->_actor1.setup(10, 8, 1); - scene->_actor2.setup(20, 7, 1); - scene->_actor3.setup(30, 8, 1); - _object1.setup(3701, 3, 1); - _object1.animate(ANIM_MODE_5, NULL); - break; - case 2: - ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor1.setup(10, 2, 1); - scene->_actor2.setup(20, 1, 1); - scene->_actor3.setup(30, 1, 1); - _object1.setup(4031, 1, 1); - _object1.animate(ANIM_MODE_5, NULL); + _object1.setup(4110, 5, 1); + _object1.animate(ANIM_MODE_5, this); break; default: signal(); @@ -2555,20 +2116,52 @@ void SpeakerSeeker3700::proc15() { } } -SpeakerMiranda3700::SpeakerMiranda3700() { - _speakerName = "MIRANDA"; - _color1 = 154; - _color2 = 0; - _fieldF6 = 0; - _textWidth = 300; - _hideObjects = false; - _object2 = NULL; - _displayMode = 1; - _numFrames = 0; +void SpeakerWebbster3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor3; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4110, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } } -void SpeakerMiranda3700::proc15() { - Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; +void SpeakerWebbster3400::proc15() { + Scene3400 *scene = (Scene3400 *)R2_GLOBALS._sceneManager._scene; int v = _fieldF6; @@ -2578,6 +2171,8 @@ void SpeakerMiranda3700::proc15() { _object1.postInit(); _object1.setPosition(_object2->_position); _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); R2_GLOBALS._player.disableControl(); R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); @@ -2585,32 +2180,23 @@ void SpeakerMiranda3700::proc15() { _object2->addMover(NULL); } - _object1.setPosition(_object2->_position); - switch (v) { case 0: _object1.animate(ANIM_MODE_2, NULL); break; case 1: ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor1.setup(10, 6, 1); - scene->_actor2.setup(20, 5, 1); - _object2->setup(30, 1, 1); - scene->_actor4.setup(40, 1, 1); - _object1.setup(4050, 5, 1); + _object1.setup(4110, 5, 1); _object1.animate(ANIM_MODE_5, NULL); break; case 2: ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor3.setup(30, 8, 1); - _object1.setup(4052, 3, 1); + _object1.setup(4110, 7, 1); _object1.animate(ANIM_MODE_5, NULL); break; case 3: ((SceneItem *)_action)->_sceneRegionId = 0; - scene->_actor2.setup(20, 1, 1); - scene->_actor3.setup(30, 1, 1); - _object1.setup(4051, 7, 1); + _object1.setup(4110, 3, 1); _object1.animate(ANIM_MODE_5, NULL); break; default: |