mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 07:39:08 +00:00
TSAGE: R2R - Implement alternate scene 205 used by the demo
This commit is contained in:
parent
662bbfaffe
commit
fd2cbccecb
@ -65,8 +65,12 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
|
||||
// Deck #2 - By Lift
|
||||
return new Scene200();
|
||||
case 205:
|
||||
// Star-field Credits
|
||||
return new Scene205();
|
||||
if (g_vm->getFeatures() & GF_DEMO)
|
||||
// End of Demo
|
||||
return new Scene205Demo();
|
||||
else
|
||||
// Star-field Credits
|
||||
return new Scene205();
|
||||
case 250:
|
||||
// Lift
|
||||
return new Scene250();
|
||||
|
@ -2518,6 +2518,77 @@ void Scene205::handleText() {
|
||||
_textList[_textIndex].setPosition(Common::Point(160 - (width / 2), _yp));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 205 Demo - End of Demo
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene205Demo::Action1::signal() {
|
||||
Scene205Demo *scene = (Scene205Demo *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(2);
|
||||
break;
|
||||
|
||||
case 1: {
|
||||
Common::String mask = g_resourceManager->getMessage(206, 0, true);
|
||||
// Common::String msg = sprintf(mask.c_str(), "1-800-482-3766");
|
||||
MessageDialog::show2(mask, OK_BTN_STRING);
|
||||
setDelay(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
scene->leaveScene();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene205Demo::leaveScene() {
|
||||
if (g_globals->getFlag(85))
|
||||
R2_GLOBALS._sceneManager.changeScene(160);
|
||||
else
|
||||
R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._sceneManager._previousScene);
|
||||
|
||||
BF_GLOBALS._scenePalette.loadPalette(0);
|
||||
BF_GLOBALS._scenePalette.refresh();
|
||||
}
|
||||
|
||||
void Scene205Demo::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._sceneManager._hasPalette = true;
|
||||
R2_GLOBALS._scenePalette.loadPalette(0);
|
||||
|
||||
loadScene(1000);
|
||||
R2_GLOBALS._uiElements._active = false;
|
||||
R2_GLOBALS._player.enableControl();
|
||||
|
||||
SceneExt::postInit();
|
||||
|
||||
_sound1.play(337);
|
||||
_stripManager.addSpeaker(&_animationPlayer);
|
||||
|
||||
setAction(&_action1);
|
||||
}
|
||||
|
||||
void Scene205Demo::remove() {
|
||||
R2_GLOBALS._sound1.fadeOut2(NULL);
|
||||
SceneExt::remove();
|
||||
}
|
||||
|
||||
void Scene205Demo::process(Event &event) {
|
||||
if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
|
||||
event.handled = true;
|
||||
leaveScene();
|
||||
} else {
|
||||
Scene::process(event);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 250 - Lift
|
||||
*
|
||||
|
@ -304,6 +304,24 @@ public:
|
||||
virtual void dispatch();
|
||||
};
|
||||
|
||||
class Scene205Demo: public SceneExt {
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
public:
|
||||
virtual void signal();
|
||||
};
|
||||
private:
|
||||
void leaveScene();
|
||||
public:
|
||||
VisualSpeaker _animationPlayer;
|
||||
ASound _sound1;
|
||||
Action1 _action1;
|
||||
public:
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
virtual void remove();
|
||||
virtual void process(Event &event);
|
||||
};
|
||||
|
||||
class Scene250: public SceneExt {
|
||||
class Button: public SceneActor {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user