mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
TSAGE: R2R - Implement scene 3700
This commit is contained in:
parent
93173a11ca
commit
4f5a708d7d
@ -224,7 +224,10 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
|
||||
return new Scene3400();
|
||||
case 3500:
|
||||
case 3600:
|
||||
error("Missing scene %d from group 3", sceneNumber);
|
||||
case 3700:
|
||||
// Cutscene - Teleport outside
|
||||
return new Scene3700();
|
||||
case 3800:
|
||||
case 3900:
|
||||
error("Missing scene %d from group 3", sceneNumber);
|
||||
|
@ -1945,5 +1945,78 @@ void Scene3400::signal() {
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 3700 - Cutscene - Teleport outside
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
void Scene3700::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(3700);
|
||||
R2_GLOBALS._v58CE2 = 0;
|
||||
SceneExt::postInit();
|
||||
|
||||
_stripManager.setColors(60, 255);
|
||||
_stripManager.setFontNumber(3);
|
||||
_stripManager.addSpeaker(&_quinnSpeaker);
|
||||
_stripManager.addSpeaker(&_seekerSpeaker);
|
||||
_stripManager.addSpeaker(&_mirandaSpeaker);
|
||||
|
||||
_actor1.postInit();
|
||||
_actor1._moveDiff = Common::Point(3, 2);
|
||||
|
||||
_actor2.postInit();
|
||||
_actor2._numFrames = 7;
|
||||
_actor2._moveDiff = Common::Point(5, 3);
|
||||
_actor2.hide();
|
||||
|
||||
_actor3.postInit();
|
||||
_actor3._moveDiff = Common::Point(3, 2);
|
||||
_actor3.hide();
|
||||
|
||||
_actor4.postInit();
|
||||
_actor4._numFrames = 7;
|
||||
_actor4._moveDiff = Common::Point(5, 3);
|
||||
_actor4.hide();
|
||||
|
||||
_actor5.postInit();
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._sound1.play(332);
|
||||
|
||||
_sceneMode = 3700;
|
||||
setAction(&_sequenceManager, this, 3700, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, NULL);
|
||||
}
|
||||
|
||||
void Scene3700::remove() {
|
||||
R2_GLOBALS._sound1.fadeOut2(NULL);
|
||||
SceneExt::remove();
|
||||
}
|
||||
|
||||
void Scene3700::signal() {
|
||||
switch (_sceneMode) {
|
||||
case 3328:
|
||||
// No break on purpose
|
||||
case 3329:
|
||||
warning("STUB: sub_1D227()");
|
||||
setAction(&_sequenceManager, this, 3701, &_actor2, &_actor3, &_actor4, NULL);
|
||||
break;
|
||||
case 3700:
|
||||
_actor1.setup(10, 6, 1);
|
||||
_actor2.setup(20, 5, 1);
|
||||
if (R2_GLOBALS.getFlag(71)) {
|
||||
_sceneMode = 3329;
|
||||
_stripManager.start(3329, this);
|
||||
} else {
|
||||
_sceneMode = 3328;
|
||||
_stripManager.start(3328, this);
|
||||
}
|
||||
case 3701:
|
||||
R2_GLOBALS._sceneManager.changeScene(1000);
|
||||
break;
|
||||
default:
|
||||
R2_GLOBALS._player.enableControl();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
@ -424,6 +424,23 @@ public:
|
||||
virtual void signal();
|
||||
virtual void synchronize(Serializer &s);
|
||||
};
|
||||
|
||||
class Scene3700 : public SceneExt {
|
||||
public:
|
||||
SpeakerQuinn3700 _quinnSpeaker;
|
||||
SpeakerSeeker3700 _seekerSpeaker;
|
||||
SpeakerMiranda3700 _mirandaSpeaker;
|
||||
SceneActor _actor1;
|
||||
SceneActor _actor2;
|
||||
SceneActor _actor3;
|
||||
SceneActor _actor4;
|
||||
SceneActor _actor5;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
virtual void remove();
|
||||
virtual void signal();
|
||||
};
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
|
@ -1915,5 +1915,222 @@ void SpeakerTeal3400::proc15() {
|
||||
}
|
||||
}
|
||||
|
||||
SpeakerQuinn3700::SpeakerQuinn3700() {
|
||||
_speakerName = "QUINN";
|
||||
_color1 = 60;
|
||||
_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 SpeakerQuinn3700::proc15() {
|
||||
Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
int v = _fieldF6;
|
||||
|
||||
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)
|
||||
_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, 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;
|
||||
}
|
||||
}
|
||||
|
||||
SpeakerSeeker3700::SpeakerSeeker3700() {
|
||||
_speakerName = "SEEKER";
|
||||
_color1 = 35;
|
||||
_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 SpeakerSeeker3700::proc15() {
|
||||
Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
int v = _fieldF6;
|
||||
|
||||
if (!_object2) {
|
||||
_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)
|
||||
_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);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SpeakerMiranda3700::SpeakerMiranda3700() {
|
||||
_speakerName = "MIRANDA";
|
||||
_color1 = 154;
|
||||
_color2 = 0;
|
||||
_fieldF6 = 0;
|
||||
_textWidth = 300;
|
||||
_hideObjects = false;
|
||||
_object2 = NULL;
|
||||
_displayMode = 1;
|
||||
_numFrames = 0;
|
||||
}
|
||||
|
||||
void SpeakerMiranda3700::proc15() {
|
||||
Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
int v = _fieldF6;
|
||||
|
||||
if (!_object2) {
|
||||
_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)
|
||||
_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.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;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
@ -428,6 +428,32 @@ public:
|
||||
virtual Common::String getClassName() { return "SpeakerTeal3400"; }
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerQuinn3700 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerQuinn3700();
|
||||
|
||||
virtual Common::String getClassName() { return "SpeakerQuinn3700"; }
|
||||
virtual void setText(const Common::String &msg);
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerSeeker3700 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerSeeker3700();
|
||||
|
||||
virtual Common::String getClassName() { return "SpeakerSeeker3700"; }
|
||||
virtual void setText(const Common::String &msg);
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerMiranda3700 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerMiranda3700();
|
||||
|
||||
virtual Common::String getClassName() { return "SpeakerMiranda3700"; }
|
||||
virtual void proc15();
|
||||
};
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user