From ee905b762a6356a6313aa9c150338991fc0dc6ed Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Nov 2017 23:47:42 +0000 Subject: SUPERNOVA: Implement shipstart cutscene --- engines/supernova/rooms.cpp | 17 +++++++++++++++-- engines/supernova/rooms.h | 2 ++ engines/supernova/state.cpp | 4 ---- engines/supernova/state.h | 1 - 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index b598b0dc4a..6e3c7f0e75 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2138,7 +2138,7 @@ void ArsanoMeetup2::onEntrance() { if (sentenceRemoved(1, 1)) _vm->renderMessage(kStringArsanoMeetup2_2); // All spaceships have left the planet, except one ... else - _gm->shipStart(); + shipStart(); } else if (sentenceRemoved(1, 1)) _vm->renderMessage(kStringArsanoMeetup2_1); // All spaceships have left the planet @@ -2189,7 +2189,7 @@ bool ArsanoMeetup2::interact(Action verb, Object &obj1, Object &obj2) { _gm->_rooms[MEETUP2]->getObject(1)->_click = 255; _vm->renderRoom(*this); _vm->paletteBrightness(); - _gm->shipStart(); + shipStart(); if (flight) { _vm->renderImage(13, 0); _vm->paletteBrightness(); @@ -2247,6 +2247,19 @@ bool ArsanoMeetup2::interact(Action verb, Object &obj1, Object &obj2) { return true; } +void ArsanoMeetup2::shipStart() { + _gm->wait2(12); + for (int i = 2; i <= 11; ++i) { + if (i >= 9) + _gm->drawImage(i - 1 + 128); + else + setSectionVisible(i - 1, false); + _gm->drawImage(i); + _gm->wait2(2); + } + _gm->drawImage(11 + 128); +} + bool ArsanoMeetup3::interact(Action verb, Object &obj1, Object &obj2) { byte row2[6] = {1, 1, 1, 1, 0, 0}; byte row3[6] = {1, 1, 0, 0, 0, 0}; diff --git a/engines/supernova/rooms.h b/engines/supernova/rooms.h index 164248c24c..402c4d6414 100644 --- a/engines/supernova/rooms.h +++ b/engines/supernova/rooms.h @@ -805,6 +805,8 @@ public: virtual void onEntrance(); virtual bool interact(Action verb, Object &obj1, Object &obj2); + void shipStart(); + private: // TODO: change to 6, fix initialization StringID _dialog1[2]; diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 7291152f48..7b72e58801 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -918,10 +918,6 @@ bool GameManager::airless() { (_currentRoom->getId() == AIRLOCK && _rooms[AIRLOCK]->getObject(1)->hasProperty(OPENED))); } -void GameManager::shipStart() { - warning("STUB: shipStart"); -} - void GameManager::sentence(int number, bool brightness) { if (number < 0) return; diff --git a/engines/supernova/state.h b/engines/supernova/state.h index 91a066e71c..a979d228f5 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -196,7 +196,6 @@ public: void reply(StringID textId, int aus1, int aus2); void reply(const char *text, int aus1, int aus2); void mousePosDialog(int x, int y); - void shipStart(); void shot(int a, int b); void takeMoney(int amount); void search(int time); -- cgit v1.2.3