diff options
Diffstat (limited to 'engines/supernova2')
-rw-r--r-- | engines/supernova2/ms2_def.h | 20 | ||||
-rw-r--r-- | engines/supernova2/resman.cpp | 2 | ||||
-rw-r--r-- | engines/supernova2/rooms.cpp | 119 | ||||
-rw-r--r-- | engines/supernova2/sound.h | 1 |
4 files changed, 130 insertions, 12 deletions
diff --git a/engines/supernova2/ms2_def.h b/engines/supernova2/ms2_def.h index e23a3a2c8e..ba7133997c 100644 --- a/engines/supernova2/ms2_def.h +++ b/engines/supernova2/ms2_def.h @@ -170,16 +170,16 @@ kStringAirportEntrance, kStringAirport, kStringDowntown, kStringCulturePalace, k kStringPrivateApartment, kStringLeaveTaxi, kStringPay, kStringAddress, kStringCheater, kStringNotEnoughMoney, kStringTaxiAccelerating, kString5MinutesLater, kStringAlreadyHavePole, kStringSawPole, kStringOnlyShop, kStringCabinOccupiedSay, kStringTakeMoney, kStringAlreadyPaid, kStringNoMoney, -kStringPay10Xa, kStringWillPassOut, kStringRest, kString223, kString224, -kString225, kString226, kString227, kString228, kString229, -kString230, kString231, kString232, kString233, kString234, -kString235, kString236, kString237, kString238, kString239, -kString240, kString241, kString242, kString243, kString244, -kString245, kString246, kString247, kString248, kString249, -kString250, kString251, kString252, kString253, kString254, -kString255, kString256, kString257, kString258, kString259, -kString260, kString261, kString262, kString263, kString264, -kString265, kString266, kString267, kString268, kStringKnife, +kStringPay10Xa, kStringWillPassOut, kStringRest, kString223, kStringWillTakeIt, +kStringTooExpensive, kStringWouldBuy, kStringMeHorstHummel, kStringHaveMusicChip, kStringGreatMask, +kStringThreeYears, kStringStrongDrink, kStringMusicDevice, kStringArtusToothbrush, kStringSellInBulk, +kStringRarityBooks, kStringEncyclopedia, kStringLargestDictionary, kStringOver400Words, kStringNotSale, +kStringGaveOne, kStringExcited, kStringFromGame, kStringRobust, kStringCheapSwill, +kStringStickers, kStringDishes, kStringUgly, kStringSellsWell, kStringThatCosts, +kStringTakeALook, kStringNonsense, kStringImSorry, kStringGoodEvening, kStringHello, +kStringScaredMe, kStringHowSo, kStringDisguise, kStringWhatDisguise, kStringStopPretending, +kStringYouDisguised, kStringIAmHorstHummel, kStringGiveItUp, kStringGestures, kStringMovesDifferently, +kStringHeIsRobot, kStringYouAreCrazy, kStringYouIdiot, kStringShutUp, kStringKnife, kStringKnifeDescription, kStringMoney, kStringDiscman, kStringDiscmanDescription, kStringSuctionCupDescription, kStringSpecialCard, kStringSpecialCardDescription, kStringAlarmCracker, kStringAlarmCrackerDescription, kStringKeycard, kStringSpaceship, kStringSpaceshipDescription, kStringVehicles, kStringVehiclesDescription, kStringVehicle, diff --git a/engines/supernova2/resman.cpp b/engines/supernova2/resman.cpp index ac060ac0c8..b3c0e11dae 100644 --- a/engines/supernova2/resman.cpp +++ b/engines/supernova2/resman.cpp @@ -50,7 +50,7 @@ static const AudioInfo audioInfo[kAudioNumSamples] = { {47, 16010, -1}, {49, 8010, -1}, {49, 0, 8010}, - {52, 0, -1}, + {53, 30020, -1}, {53, 0, -1}, {54, 0, -1}, {55, 0, -1}, diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp index f46ee56512..329f529877 100644 --- a/engines/supernova2/rooms.cpp +++ b/engines/supernova2/rooms.cpp @@ -864,13 +864,130 @@ Kiosk::Kiosk(Supernova2Engine *vm, GameManager *gm) { } void Kiosk::onEntrance() { - setRoomSeen(true); + static StringId dialEntry[2] = { + kStringGoodEvening, + kStringHello + }; + + if (!hasSeen()) { + _gm->dialog(2, _gm->_dials, dialEntry, 0); + _vm->renderImage(6); + _vm->playSound(kAudioKiosk); + _gm->wait(8); + _vm->renderImage(6 + 128); + _gm->reply(kStringScaredMe, 1, 1 +128); + _gm->say(kStringHowSo); + _gm->reply(kStringDisguise, 1, 1 +128); + _gm->say(kStringWhatDisguise); + _gm->reply(kStringStopPretending, 1, 1 +128); + _gm->reply(kStringYouDisguised, 1, 1 +128); + _gm->say(kStringIAmHorstHummel); + _gm->reply(kStringGiveItUp, 1, 1 +128); + _gm->reply(kStringGestures, 1, 1 +128); + _gm->reply(kStringMovesDifferently, 1, 1 +128); + _gm->say(kStringHeIsRobot); + _gm->reply(kStringYouAreCrazy, 1, 1 +128); + _gm->say(kStringYouIdiot); + _gm->reply(kStringShutUp, 1, 1 +128); + _gm->drawStatus(); + _gm->drawInventory(); + _gm->drawMapExits(); + _gm->drawCommandBox(); + setRoomSeen(true); + } } void Kiosk::animation() { } bool Kiosk::interact(Action verb, Object &obj1, Object &obj2) { + static StringId dialPrice[2] = { + kStringWillTakeIt, + kStringTooExpensive + }; + static StringId dialSay[3] = { + kStringWouldBuy, + kStringMeHorstHummel, + kStringHaveMusicChip + }; + static StringId dialSeller[16][3] = { + {kStringGreatMask, kStringThreeYears, kNoString}, + {kStringStrongDrink, kNoString, kNoString}, + {kStringMusicDevice, kNoString, kNoString}, + {kStringArtusToothbrush, kStringSellInBulk, kNoString}, + {kStringRarityBooks, kNoString, kNoString}, + {kStringEncyclopedia, kStringLargestDictionary, kStringOver400Words}, + {kStringNotSale, kNoString, kNoString}, + {kStringGaveOne, kStringExcited, kNoString}, + {kStringFromGame, kNoString, kNoString}, + {kStringRobust, kNoString, kNoString}, + {kStringCheapSwill, kNoString, kNoString}, + {kStringCheapSwill, kNoString, kNoString}, + {kStringCheapSwill, kNoString, kNoString}, + {kStringCheapSwill, kNoString, kNoString}, + {kStringStickers, kNoString, kNoString}, + {kStringDishes, kStringUgly, kStringSellsWell} + }; + + if (verb == ACTION_TAKE && !(obj1._type & CARRIED) && + obj1._id >= BOTTLE && obj1._id <= TOOTHBRUSH) { + int price; + switch (obj1._id) { + case BOTTLE: + price = 30; + break; + case PLAYER: + price = 50; + break; + case TOOTHBRUSH: + price = 5; + break; + default: + break; + } + Common::String format = _vm->getGameString(kStringThatCosts); + Common::String cost = Common::String::format(format.c_str(), price); + _vm->renderMessage(cost, kMessageTop); + _gm->reply(cost.c_str(), 1, 1 +128); + + if (_gm->_state._money < price) + _gm->say(dialPrice[1]); + else if (_gm->dialog(2, _gm->_dials, dialPrice, 0) == 0) { + _gm->takeObject(obj1); + _gm->takeMoney(-price); + } + _gm->drawStatus(); + _gm->drawInventory(); + _gm->drawMapExits(); + _gm->drawCommandBox(); + } + else if (verb == ACTION_LOOK && obj1._id >= BMASK && obj1._id <= FACES) { + for(int i = 0; i < 3; i++) { + _gm->reply(dialSeller[obj1._id - BMASK][i], 1, 1 + 128); + } + } + else if (verb == ACTION_TALK && obj1._id >= SELLER) { + int i = 2; + if (getObject(9)->_type & CARRIED) + i++; + switch (_gm->dialog(i, _gm->_dials, dialSay, 0)) { + case 0: + _gm->reply(kStringTakeALook, 1, 1 + 128); + break; + case 1: + _gm->reply(kStringNonsense, 1, 1 + 128); + break; + case 2: + _gm->reply(kStringImSorry, 1, 1 + 128); + break; + } + _gm->drawStatus(); + _gm->drawInventory(); + _gm->drawMapExits(); + _gm->drawCommandBox(); + } + else + return false; return true; } diff --git a/engines/supernova2/sound.h b/engines/supernova2/sound.h index 30c05eea2c..877f3fa992 100644 --- a/engines/supernova2/sound.h +++ b/engines/supernova2/sound.h @@ -36,6 +36,7 @@ enum AudioId { kAudioTaxiOpen, kAudioTaxiLeaving, kAudioTaxiArriving, + kAudioKiosk, kAudioNumSamples = 10 //TODO find out how many samples there are }; |