mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 03:47:32 +00:00
SUPERNOVA: Change _shown to an array of bytes in order to handle extra values used by dialogs, fix ArsanoMeetup2::onEntrance by using a shown variable
This commit is contained in:
parent
f0d139d519
commit
9bf0a656a6
@ -44,6 +44,9 @@ const int kMaxCarry = 30;
|
||||
//const int kRoomsChap3 = 21;
|
||||
//const int kRoomsNum = kRoomsChap0 + kRoomsChap1 + kRoomsChap2 + kRoomsChap3;
|
||||
|
||||
const byte kShownFalse = 0;
|
||||
const byte kShownTrue = 1;
|
||||
|
||||
enum MessagePosition {
|
||||
kMessageNormal,
|
||||
kMessageLeft,
|
||||
|
@ -93,7 +93,7 @@ Intro::Intro(SupernovaEngine *vm, GameManager *gm) {
|
||||
|
||||
_fileNumber = -1;
|
||||
_id = INTRO;
|
||||
_shown[0] = false;
|
||||
_shown[0] = kShownFalse;
|
||||
|
||||
_objectState[0] =
|
||||
Object(_id, kStringKeycard, kStringKeycardDescription, KEYCARD,
|
||||
@ -1712,7 +1712,9 @@ bool ArsanoEntrance::interact(Action verb, Object &obj1, Object &obj2) {
|
||||
_gm->_state._coins = 5;
|
||||
}
|
||||
}
|
||||
_shown[kMaxSection - 5] = true;
|
||||
// This shown object is an abuse in the original engine as it's not a real shown variable
|
||||
// It's an internal (boolean) status
|
||||
_shown[kMaxSection - 5] = kShownTrue;
|
||||
} else if ((verb == ACTION_USE) && Object::combine(obj1, obj2, COINS, CAR_SLOT)) {
|
||||
if ((_gm->_state._coins < 5) && (getObject(7 - _gm->_state._coins)->_click == 7))
|
||||
_vm->renderMessage("Mach doch zuerst das Fach leer!");
|
||||
@ -1922,10 +1924,11 @@ void ArsanoRemaining::animation() {
|
||||
}
|
||||
|
||||
void ArsanoRoger::onEntrance() {
|
||||
if (!_shown[kMaxSection - 2]) {
|
||||
// This is not a normal shown variable, it's a dialog
|
||||
if (_shown[kMaxSection - 2] = 0) {
|
||||
_gm->say("Darf ich hier Platz nehmen?");
|
||||
_gm->reply("Klar!", 2, 2 + 128);
|
||||
_shown[kMaxSection - 2] = true;
|
||||
_shown[kMaxSection - 2] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2128,17 +2131,18 @@ bool ArsanoGlider::interact(Action verb, Object &obj1, Object &obj2) {
|
||||
}
|
||||
|
||||
void ArsanoMeetup2::onEntrance() {
|
||||
switch (!_gm->_guiEnabled) {
|
||||
// We use 1, 2, 3 because those are dialog status and not "real" _shown
|
||||
switch (_shown[kMaxSection - 1]) {
|
||||
case 1:
|
||||
_gm->shipStart();
|
||||
break;
|
||||
case 2:
|
||||
_vm->renderMessage("Alle Raumschiffe haben|den Planeten verlassen.");
|
||||
_vm->renderMessage("Alle Raumschiffe haben|den Planeten verlassen."); // All spaceships have left the planet
|
||||
break;
|
||||
case 3:
|
||||
_vm->renderMessage("Alle Raumschiffe haben den Planeten|verlassen, bis auf eins ...");
|
||||
_vm->renderMessage("Alle Raumschiffe haben den Planeten|verlassen, bis auf eins ..."); // All spaceships have left the planet, except one ...
|
||||
}
|
||||
_gm->_guiEnabled = true;
|
||||
_shown[kMaxSection - 1] = 0;
|
||||
}
|
||||
|
||||
bool ArsanoMeetup2::interact(Action verb, Object &obj1, Object &obj2) {
|
||||
@ -3123,7 +3127,7 @@ Outro::Outro(SupernovaEngine *vm, GameManager *gm) {
|
||||
|
||||
_fileNumber = -1;
|
||||
_id = OUTRO;
|
||||
_shown[0] = false;
|
||||
_shown[0] = kShownFalse;
|
||||
|
||||
outroText =
|
||||
_vm->getGameString(kStringOutro1) +
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user