diff options
author | Jaromir Wysoglad | 2019-06-04 15:47:49 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | 93561220b741a6f9a604205836a7b10e5af3abe5 (patch) | |
tree | beece218fae99300bfda36fe037807f588b681b4 | |
parent | 856b38764114403f9ecfa56c0c33c10fdca14372 (diff) | |
download | scummvm-rg350-93561220b741a6f9a604205836a7b10e5af3abe5.tar.gz scummvm-rg350-93561220b741a6f9a604205836a7b10e5af3abe5.tar.bz2 scummvm-rg350-93561220b741a6f9a604205836a7b10e5af3abe5.zip |
SUPERNOVA2: Add partialy implemented checkout room
-rw-r--r-- | engines/supernova2/ms2_def.h | 10 | ||||
-rw-r--r-- | engines/supernova2/rooms.cpp | 41 | ||||
-rw-r--r-- | engines/supernova2/rooms.h | 7 | ||||
-rw-r--r-- | engines/supernova2/state.cpp | 4 |
4 files changed, 43 insertions, 19 deletions
diff --git a/engines/supernova2/ms2_def.h b/engines/supernova2/ms2_def.h index a216bba514..c1f3aa86ae 100644 --- a/engines/supernova2/ms2_def.h +++ b/engines/supernova2/ms2_def.h @@ -81,7 +81,7 @@ enum Action { enum RoomId { INTRO,AIRPORT,TAXISTAND,STREET,GAMES,CABIN,KIOSK, - CULTURE_PALACE,CASHBOX,CITY1,CITY2,ELEVATOR,APARTMENT,SHIP, + CULTURE_PALACE,CHECKOUT,CITY1,CITY2,ELEVATOR,APARTMENT,SHIP, PYRAMID,PYR_ENTRANCE,UPSTAIRS1,DOWNSTAIRS1, BOTTOM_RIGHT_DOOR,BOTTOM_LEFT_DOOR,UPSTAIRS2,DOWNSTAIRS2, @@ -209,8 +209,8 @@ kString395, kString396, kString397, kString398, kString399, kString400, kString401, kString402, kString403, kString404, kString405, kString406, kString407, kString408, kString409, kString410, kString411, kString412, kString413, kString414, -kString415, kString416, kString417, kString418, kString419, -kString420, kString421, kString422, kString423, kString424, +kString415, kStringAtMusicContest, kStringNoImitation, kStringGoodJoke, kStringCommon, +kStringIWillProof, kStringIWillPerform, kString422, kString423, kString424, kString425, kString426, kString427, kString428, kString429, kString430, kString431, kString432, kString433, kString434, kString435, kString436, kString437, kString438, kString439, @@ -236,7 +236,7 @@ kString530, kString531, kString532, kString533, kString534, kString535, kString536, kString537, kString538, kString539, kString540, kString541, kString542, kString543, kString544, kString545, kString546, kStringFascinating, kStringTaxis, kStringTaxisDescription, -kStringAxacussan, kStringParticipationCard, kString552, kString553, kString554, +kStringAxacussan, kStringParticipationCard, kStringAxacussian, kString553, kString554, kString555, kString556, kString557, kString558, kString559, kString560, kString561, kString562, kString563, kString564, kString565, kString566, kString567, kString568, kString569, @@ -249,7 +249,7 @@ kStringIntroTV3, kStringIntroTV4, kStringIntroTV5, kStringIntroTV6, kStringIntro kStringIntroTV8, kStringIntroTV9, kStringIntroTV10, kStringIntroTV11, kStringIntroTV12, kStringIntroTV13, kStringIntroTV14, kStringIntroTV15, kStringIntroTV16, kStringIntro9, kStringIntro10, kStringIntro11, kStringIntro12, kStringIntro13, kStringIntro14, -kStringDialogSeparator, kStringForMusicConcert +kStringDialogSeparator }; ObjectType operator|(ObjectType a, ObjectType b); diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp index 6641f6aa3a..a769b8ce26 100644 --- a/engines/supernova2/rooms.cpp +++ b/engines/supernova2/rooms.cpp @@ -1003,7 +1003,7 @@ CulturePalace::CulturePalace(Supernova2Engine *vm, GameManager *gm) { _var2 = false; _var3 = false; - _objectState[0] = Object(_id, kStringExit, kStringDefaultDescription, NULLOBJECT, EXIT, 1, 1, 0, CASHBOX, 6); + _objectState[0] = Object(_id, kStringEntrance, kStringDefaultDescription, NULLOBJECT, EXIT, 1, 1, 0, CHECKOUT, 6); _objectState[1] = Object(_id, kStringCulturePalace, kStringFascinating, NULLOBJECT, NULLTYPE, 0, 0, 0); _objectState[2] = Object(_id, kStringTaxis, kStringTaxisDescription, NULLOBJECT, NULLTYPE, 3, 3, 0); _objectState[3] = Object(_id, kStringAxacussan, kStringDefaultDescription, AXACUSSER, TALK, 4, 4, 0); @@ -1041,11 +1041,10 @@ void CulturePalace::notEnoughMoney() { } bool CulturePalace::interact(Action verb, Object &obj1, Object &obj2) { - static StringId dial1[4] = { + static StringId dial1[3] = { kStringHorstHummel, kStringNiceWeather, kStringTellTicket, - kStringForMusicConcert }; static byte dials1[] = {1, 1, 2}; @@ -1133,7 +1132,7 @@ bool CulturePalace::interact(Action verb, Object &obj1, Object &obj2) { _gm->reply(kStringIdiot, 0, 0); _var2 = false; _var3 = true; - _gm->_rooms[CASHBOX]->addSentence(1,1); + _gm->_rooms[CHECKOUT]->addSentence(1,1); _gm->drawStatus(); _gm->drawInventory(); _gm->drawMapExits(); @@ -1155,23 +1154,45 @@ bool CulturePalace::interact(Action verb, Object &obj1, Object &obj2) { return true; } -Cashbox::Cashbox(Supernova2Engine *vm, GameManager *gm) { +Checkout::Checkout(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; - _id = CASHBOX; + _fileNumber = 21; + _id = CHECKOUT; _shown[0] = kShownTrue; + + _var1 = false; + _var2 = false; + _var3 = false; + + _objectState[0] = Object(_id, kStringEntrance, kStringDefaultDescription, KP_ENTRANCE, EXIT, 0, 0, 0, NULLROOM, 3); + _objectState[1] = Object(_id, kStringExit, kStringDefaultDescription, NULLOBJECT, EXIT, 255, 255, 0, CULTURE_PALACE, 22); + _objectState[2] = Object(_id, kStringAxacussian, kStringDefaultDescription, AXACUSSER, TALK, 1, 1, 0); } -void Cashbox::onEntrance() { +void Checkout::onEntrance() { + if (!_var3) { + _var3 = true; + _gm->reply(kStringAtMusicContest, 1, 1 + 128); + _gm->say(kStringNoImitation); + _gm->reply(kStringGoodJoke, 1, 1 + 128); + _gm->say(kStringIAmHorstHummel); + _gm->reply(kStringCommon, 1, 1 + 128); + _gm->say(kStringIWillProof); + _gm->say(kStringIWillPerform); + _gm->drawStatus(); + _gm->drawInventory(); + _gm->drawMapExits(); + _gm->drawCommandBox(); + } setRoomSeen(true); } -void Cashbox::animation() { +void Checkout::animation() { } -bool Cashbox::interact(Action verb, Object &obj1, Object &obj2) { +bool Checkout::interact(Action verb, Object &obj1, Object &obj2) { return true; } diff --git a/engines/supernova2/rooms.h b/engines/supernova2/rooms.h index 6045fb509d..71c8637fd9 100644 --- a/engines/supernova2/rooms.h +++ b/engines/supernova2/rooms.h @@ -166,14 +166,17 @@ private: bool _var3; }; -class Cashbox : public Room { +class Checkout : public Room { public: - Cashbox(Supernova2Engine *vm, GameManager *gm); + Checkout(Supernova2Engine *vm, GameManager *gm); virtual void onEntrance(); virtual void animation(); virtual bool interact(Action verb, Object &obj1, Object &obj2); private: + bool _var1; + bool _var2; + bool _var3; }; class City1 : public Room { diff --git a/engines/supernova2/state.cpp b/engines/supernova2/state.cpp index db26601a50..4313aade76 100644 --- a/engines/supernova2/state.cpp +++ b/engines/supernova2/state.cpp @@ -237,7 +237,7 @@ void GameManager::destroyRooms() { delete _rooms[CABIN]; delete _rooms[KIOSK]; delete _rooms[CULTURE_PALACE]; - delete _rooms[CASHBOX]; + delete _rooms[CHECKOUT]; delete _rooms[CITY1]; delete _rooms[CITY2]; delete _rooms[ELEVATOR]; @@ -353,7 +353,7 @@ void GameManager::initRooms() { _rooms[CABIN] = new Cabin(_vm, this); _rooms[KIOSK] = new Kiosk(_vm, this); _rooms[CULTURE_PALACE] = new CulturePalace(_vm, this); - _rooms[CASHBOX] = new Cashbox(_vm, this); + _rooms[CHECKOUT] = new Checkout(_vm, this); _rooms[CITY1] = new City1(_vm, this); _rooms[CITY2] = new City2(_vm, this); _rooms[ELEVATOR] = new Elevator(_vm, this); |