SUPERNOVA: Extract strings for ShibCabinL3 & R3 and for ShipAirlock

This commit is contained in:
Strangerke 2017-10-15 23:32:22 +02:00 committed by Thierry Crozat
parent a141438e60
commit cb12a88fc5
5 changed files with 54 additions and 26 deletions

View File

@ -459,17 +459,17 @@ const char *gameText[] = {
"Energievorrat ersch\224pft",
"Notstromversorgung aktiv",
"Was?! Keiner im Cockpit!|Die sind wohl verr\201ckt!",
"",
"",
"Du hast die Platte schon aufgelegt.",
"Es ist doch gar keine Platte aufgelegt.",
//355
"",
"",
"",
"",
"",
"Die Platte scheint einen Sprung zu haben.",
"Schneid doch besser ein|l\204ngeres St\201ck Kabel ab!",
"Das ist befestigt.",
"Zu niedriger Luftdruck soll ungesund sein.",
"Er zeigt Null an.",
//360
"",
"",
"Er zeigt Normaldruck an.",
"Komisch, es ist nur|noch ein Raumanzug da.",
"",
"",
"",

View File

@ -482,7 +482,9 @@ enum StringID {
kStringShipCockpit1, kStringShipCockpit2, kStringShipCockpit3, kStringShipCockpit4, kStringShipCockpit5,
kStringShipCockpit6, kStringShipCockpit7, kStringShipCockpit8, kStringShipCockpit9, kStringShipCockpit10,
// 350
kStringShipCockpit11, kStringShipCockpit12, kStringShipCockpit13
kStringShipCockpit11, kStringShipCockpit12, kStringShipCockpit13, kStringShipCabinL3_1, kStringShipCabinL3_2,
kStringShipCabinL3_3, kStringShipCabinL3_4, kStringShipCabinL3_5, kStringShipAirlock1, kStringShipAirlock2,
kStringShipAirlock3, kStringShipAirlock4
};
static StringID guiCommands[] = {

View File

@ -870,7 +870,7 @@ bool ShipCabinL3::interact(Action verb, Object &obj1, Object &obj2) {
if ((verb == ACTION_USE) && Object::combine(obj1, obj2, RECORD, TURNTABLE)) {
if (!_gm->_guiEnabled || isSectionVisible(15))
_vm->renderMessage("Du hast die Platte schon aufgelegt.");
_vm->renderMessage(kStringShipCabinL3_1);
else {
if (!getObject(4)->hasProperty(CARRIED))
_gm->drawImage(_gm->invertSection(8));
@ -881,7 +881,7 @@ bool ShipCabinL3::interact(Action verb, Object &obj1, Object &obj2) {
}
} else if ((verb == ACTION_PRESS) && (obj1._id == TURNTABLE_BUTTON)) {
if (!isSectionVisible(15)) {
_vm->renderMessage("Es ist doch gar keine Platte aufgelegt.");
_vm->renderMessage(kStringShipCabinL3_2);
} else if (!isSectionVisible(10) && !isSectionVisible(11) && isSectionVisible(12)) {
_gm->drawImage(14);
setSectionVisible(15, false);
@ -902,7 +902,7 @@ bool ShipCabinL3::interact(Action verb, Object &obj1, Object &obj2) {
_gm->drawImage(15);
setSectionVisible(14, false);
setSectionVisible(13, false);
_vm->renderMessage("Die Platte scheint einen Sprung zu haben.");
_vm->renderMessage(kStringShipCabinL3_3);
} else if ((verb == ACTION_TAKE) && (obj1._id == RECORD) && (obj1._click != 15)) {
_gm->drawImage(9);
setSectionVisible(13, false);
@ -919,7 +919,7 @@ bool ShipCabinL3::interact(Action verb, Object &obj1, Object &obj2) {
setSectionVisible(10, false);
getObject(10)->_click = 20;
} else if ((verb == ACTION_USE) && Object::combine(obj1, obj2, KNIFE, WIRE2))
_vm->renderMessage("Schneid doch besser ein|l\204ngeres St\201ck Kabel ab!");
_vm->renderMessage(kStringShipCabinL3_4);
else if ((verb == ACTION_USE) && Object::combine(obj1, obj2, KNIFE, WIRE)) {
r = _gm->_rooms[AIRLOCK];
if (!isSectionVisible(10) && !r->getObject(5)->hasProperty(WORN)) {
@ -939,7 +939,7 @@ bool ShipCabinL3::interact(Action verb, Object &obj1, Object &obj2) {
getObject(9)->_click = 255;
getObject(10)->_click = 255;
} else {
_vm->renderMessage("Das ist befestigt.");
_vm->renderMessage(kStringShipCabinL3_5);
}
} else {
return false;
@ -1096,7 +1096,7 @@ bool ShipAirlock::interact(Action verb, Object &obj1, Object &obj2) {
if (!r->getObject(4)->hasProperty(WORN) ||
!r->getObject(5)->hasProperty(WORN) ||
!r->getObject(6)->hasProperty(WORN)) {
_gm->death("Zu niedriger Luftdruck soll ungesund sein.");
_gm->dead(kStringShipAirlock1);
return true;
}
}
@ -1104,9 +1104,9 @@ bool ShipAirlock::interact(Action verb, Object &obj1, Object &obj2) {
}
} else if ((verb == ACTION_LOOK) && (obj1._id == MANOMETER)) {
if (getObject(1)->hasProperty(OPENED))
_vm->renderMessage("Er zeigt Null an.");
_vm->renderMessage(kStringShipAirlock2);
else
_vm->renderMessage("Er zeigt Normaldruck an.");
_vm->renderMessage(kStringShipAirlock3);
} else
return false;
@ -1115,7 +1115,7 @@ bool ShipAirlock::interact(Action verb, Object &obj1, Object &obj2) {
void ShipAirlock::onEntrance() {
if (!hasSeen())
_vm->renderMessage("Komisch, es ist nur|noch ein Raumanzug da.");
_vm->renderMessage(kStringShipAirlock4);
setRoomSeen(true);
}
@ -2508,7 +2508,7 @@ bool AxacussCell::interact(Action verb, Object &obj1, Object &obj2) {
// TODO: wait till sound is played
_vm->playSound(kAudioGunShot);
_vm->playSound(kAudioGunShot);
_gm->death("Bei deinem Fluchtversuch hat|dich der Roboter erschossen.");
_gm->dead("Bei deinem Fluchtversuch hat|dich der Roboter erschossen.");
} else if ((verb == ACTION_USE) && (obj1._id == TRAY))
_vm->renderMessage("Du i\341t etwas, aber|es schmeckt scheu\341lich.");
else if ((verb == ACTION_TAKE) && (obj1._id == MAGNET)) {

View File

@ -1035,7 +1035,7 @@ void GameManager::screenShake() {
void GameManager::shock() {
_vm->playSound(kAudioShock);
death("Du h\204ttest besser vorher|den Stecker rausgezogen.");
dead("Du h\204ttest besser vorher|den Stecker rausgezogen.");
}
void GameManager::showMenu() {
@ -1159,7 +1159,7 @@ void GameManager::shot(int a, int b) {
if (b)
drawImage(b);
death("Der Axacussaner hat dich erwischt.");
dead("Der Axacussaner hat dich erwischt.");
}
void GameManager::takeMoney(int amount) {
@ -1221,7 +1221,32 @@ void GameManager::closeLocker(const Room *room, Object *obj, Object *lock, int s
}
}
void GameManager::death(const char *message) {
void GameManager::dead(StringID messageId) {
_vm->paletteFadeOut();
_guiEnabled = false;
_vm->renderImage(11, 0);
_vm->renderMessage(messageId);
_vm->playSound(kAudioDeath);
_vm->paletteFadeIn();
getInput();
_vm->paletteFadeOut();
_vm->removeMessage();
// TODO: Load screen
destroyRooms();
initRooms();
initState();
initGui();
_inventory.clear();
changeRoom(CABIN_R3);
g_system->fillScreen(kColorBlack);
_vm->paletteFadeIn();
_guiEnabled = true;
}
// TODO: Remove this function when all the texts are properly extracted
void GameManager::dead(const char *message) {
_vm->paletteFadeOut();
_guiEnabled = false;
_vm->renderImage(11, 0);
@ -1480,7 +1505,7 @@ bool GameManager::genericInteract(Action verb, Object &obj1, Object &obj2) {
} else {
if (obj1.hasProperty(WORN)) {
if (airless()) {
death("Den Helm h\204ttest du|besser angelassen!");
dead("Den Helm h\204ttest du|besser angelassen!");
}
obj1.disableProperty(WORN);
_vm->renderMessage("Du ziehst den Helm ab.");
@ -1507,7 +1532,7 @@ bool GameManager::genericInteract(Action verb, Object &obj1, Object &obj2) {
} else {
if (obj1.hasProperty(WORN)) {
if (airless()) {
death("Den Versorgungsteil h\204ttest du|besser nicht abgenommen!");
dead("Den Versorgungsteil h\204ttest du|besser nicht abgenommen!");
}
obj1.disableProperty(WORN);
_vm->renderMessage("Du nimmst den Versorgungsteil ab.");

View File

@ -178,7 +178,8 @@ public:
void handleInput();
void handleTime();
void setAnimationTimer(int ticks);
void death(const char *message);
void dead(const char *message);
void dead(StringID messageId);
int dialog(int num, byte *rowLength[6], const char **text[6], int number);
void sentence(int number, bool brightness);
void removeSentence(int sentence, int number);