[Scummvm-git-logs] scummvm master -> e9300f33d5494279ea043adab64c7d6d11c046a9
bluegr
bluegr at gmail.com
Mon Feb 8 01:12:20 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
748aec5783 STARTREK: Refactor room text handling to use offsets (first part)
2c4b4c6cd5 SCI: Add missing class member initializers
e9300f33d5 STARTREK: Fix the text scanner and convert 3 rooms to the new format
Commit: 748aec5783637e93c14af004dc46cad356ab5954
https://github.com/scummvm/scummvm/commit/748aec5783637e93c14af004dc46cad356ab5954
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-02-08T03:11:46+02:00
Commit Message:
STARTREK: Refactor room text handling to use offsets (first part)
This is a major change, which allows us to read room texts directly
from RDF files in a deterministic way. The previous attempt to read
texts on the fly failed with some texts at runtime, which made it
unreliable. Additionally, the scope of all room text IDs has been
reduced to each room.
With this change, it's now possible to support text in CD and floppy
versions and support multiple game languages, without hardcoding all
of the game texts in the engine source.
This is 50% done (29 out of 55 rooms), with the following left to be
done:
- MUDD mission rooms (need to improve the text reader for these)
- TRIAL mission rooms (need to improve the text reader for these)
- SINS mission rooms (need to improve the text reader for these)
- The rest of VENG mission rooms
The DEMON, TUG, LOVE, FEATHER and part of the VENG mission rooms have
been converted.
Changed paths:
engines/startrek/bridge.cpp
engines/startrek/console.cpp
engines/startrek/console.h
engines/startrek/room.cpp
engines/startrek/room.h
engines/startrek/rooms/demon0.cpp
engines/startrek/rooms/demon1.cpp
engines/startrek/rooms/demon2.cpp
engines/startrek/rooms/demon3.cpp
engines/startrek/rooms/demon4.cpp
engines/startrek/rooms/demon5.cpp
engines/startrek/rooms/demon6.cpp
engines/startrek/rooms/feather0.cpp
engines/startrek/rooms/feather1.cpp
engines/startrek/rooms/feather2.cpp
engines/startrek/rooms/feather3.cpp
engines/startrek/rooms/feather4.cpp
engines/startrek/rooms/feather5.cpp
engines/startrek/rooms/feather6.cpp
engines/startrek/rooms/feather7.cpp
engines/startrek/rooms/function_map.h
engines/startrek/rooms/love0.cpp
engines/startrek/rooms/love1.cpp
engines/startrek/rooms/love2.cpp
engines/startrek/rooms/love3.cpp
engines/startrek/rooms/love4.cpp
engines/startrek/rooms/love5.cpp
engines/startrek/rooms/lovea.cpp
engines/startrek/rooms/mudd0.cpp
engines/startrek/rooms/mudd1.cpp
engines/startrek/rooms/mudd2.cpp
engines/startrek/rooms/mudd3.cpp
engines/startrek/rooms/mudd4.cpp
engines/startrek/rooms/mudd5.cpp
engines/startrek/rooms/mudda.cpp
engines/startrek/rooms/sins0.cpp
engines/startrek/rooms/sins1.cpp
engines/startrek/rooms/sins2.cpp
engines/startrek/rooms/sins3.cpp
engines/startrek/rooms/sins4.cpp
engines/startrek/rooms/sins5.cpp
engines/startrek/rooms/trial0.cpp
engines/startrek/rooms/trial1.cpp
engines/startrek/rooms/trial2.cpp
engines/startrek/rooms/trial3.cpp
engines/startrek/rooms/trial4.cpp
engines/startrek/rooms/trial5.cpp
engines/startrek/rooms/tug0.cpp
engines/startrek/rooms/tug1.cpp
engines/startrek/rooms/tug2.cpp
engines/startrek/rooms/tug3.cpp
engines/startrek/rooms/veng0.cpp
engines/startrek/rooms/veng1.cpp
engines/startrek/rooms/veng2.cpp
engines/startrek/rooms/veng3.cpp
engines/startrek/rooms/veng4.cpp
engines/startrek/rooms/veng5.cpp
engines/startrek/rooms/veng6.cpp
engines/startrek/rooms/veng7.cpp
engines/startrek/rooms/veng8.cpp
engines/startrek/rooms/venga.cpp
engines/startrek/text.cpp
engines/startrek/text.h
diff --git a/engines/startrek/bridge.cpp b/engines/startrek/bridge.cpp
index 14b12e7d29..c79bc40e6f 100644
--- a/engines/startrek/bridge.cpp
+++ b/engines/startrek/bridge.cpp
@@ -1143,7 +1143,7 @@ void StarTrekEngine::handleBridgeMenu(int menuEvent) {
const char *lowerShieldsText = "#BRID\\B_337#Lowering shields, Captain.";
const char *armWeaponsText = "#BRID\\B_351#Arming weapons.";
const char *disarmWeaponsText = "#BRID\\B_354#Disarming weapons.";
- const char *emergencyPowerText = "#BRID\\BRID_S32#I don't know how long she can take it, Captain.";
+ //const char *emergencyPowerText = "#BRID\\BRID_S32#I don't know how long she can take it, Captain.";
const char *noEmergencyPowerText = "#BRID\\BRID_S41#She can't take it, Captain.";
const char *targetAnalysisOnText = "#BRID\\B_344#Target Analysis On.";
const char *targetAnalysisOffText = "#BRID\\B_343#Target Analysis Off.";
diff --git a/engines/startrek/console.cpp b/engines/startrek/console.cpp
index 140150d440..c0fd522f34 100644
--- a/engines/startrek/console.cpp
+++ b/engines/startrek/console.cpp
@@ -36,8 +36,9 @@ Console::Console(StarTrekEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("bg", WRAP_METHOD(Console, Cmd_Bg));
registerCmd("filedump", WRAP_METHOD(Console, Cmd_DumpFile));
registerCmd("filesearch", WRAP_METHOD(Console, Cmd_SearchFile));
- registerCmd("score", WRAP_METHOD(Console, Cmd_Score));
- registerCmd("bridgeseq", WRAP_METHOD(Console, Cmd_BridgeSequence));
+ registerCmd("score", WRAP_METHOD(Console, Cmd_Score));
+ registerCmd("bridgeseq", WRAP_METHOD(Console, Cmd_BridgeSequence));
+ registerCmd("dumptext", WRAP_METHOD(Console, Cmd_DumpText));
}
Console::~Console() {
@@ -93,25 +94,18 @@ bool Console::Cmd_Actions(int argc, const char **argv) {
}
bool Console::Cmd_Text(int argc, const char **argv) {
- typedef Common::HashMap<int, Common::String>::iterator MessageIterator;
-
- debugPrintf("\nLook messages\n");
- debugPrintf("-------------\n");
- for (MessageIterator i = _vm->_room->_lookMessages.begin(); i != _vm->_room->_lookMessages.end(); ++i) {
- debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
- }
-
- debugPrintf("\nLook with talker messages\n");
- debugPrintf("-------------------------\n");
- for (MessageIterator i = _vm->_room->_lookWithTalkerMessages.begin(); i != _vm->_room->_lookWithTalkerMessages.end(); ++i) {
- debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
- }
+ const RoomTextOffsets *textList = _vm->_room->_roomTextList;
+ Common::String screenName = _vm->getScreenName();
+ byte *rdfData = _vm->_room->loadRoomRDF(screenName);
+ int index = 0;
+
+ do {
+ uint16 offset = textList[index].offsetEnglishCD;
+ debugPrintf("%i - %i: %s\n", textList[index].id, offset, rdfData[offset]);
+ index++;
+ } while (textList[index].id != -1);
- debugPrintf("\nTalk messages\n");
- debugPrintf("-------------\n");
- for (MessageIterator i = _vm->_room->_talkMessages.begin(); i != _vm->_room->_talkMessages.end(); ++i) {
- debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
- }
+ delete[] rdfData;
return true;
}
@@ -212,6 +206,141 @@ bool Console::Cmd_BridgeSequence(int argc, const char **argv) {
}
}
+struct MessageInfo {
+ Common::String key;
+ Common::String value;
+ uint16 pos;
+};
+
+struct MessageInfoComparator {
+ bool operator()(const MessageInfo &x, const MessageInfo &y) const {
+ return x.key < y.key;
+ }
+};
+
+bool Console::Cmd_DumpText(int argc, const char **argv) {
+ if (argc < 2) {
+ debugPrintf("Dumps room text messages from CD-ROM versions of ST25\n");
+ debugPrintf("Usage: %s <room RDF file name> <table format>\n", argv[0]);
+ } else {
+ Common::String fileName = argv[1];
+ bool tableFormat = false;
+ Common::List<MessageInfo> keys;
+
+ if (argc > 2)
+ tableFormat = !scumm_stricmp(argv[2], "true") || !strcmp(argv[2], "1");
+
+ Common::MemoryReadStreamEndian *rdfFile = _vm->_resource->loadFile(fileName + ".RDF");
+ rdfFile->seek(32, SEEK_SET);
+ uint16 messageOffset = rdfFile->readUint16LE();
+ rdfFile->seek(messageOffset, SEEK_SET);
+
+ while (!rdfFile->eos() && !rdfFile->err()) {
+ Common::String message;
+ uint16 pos = rdfFile->pos();
+ byte c = rdfFile->readByte();
+ while (c != '\0') {
+ message += c;
+ c = rdfFile->readByte();
+ }
+
+ if (!message.empty()) {
+ if (!tableFormat) {
+ debug("%s, %d", message.c_str(), pos);
+ } else {
+ MessageInfo m;
+ m.key = message.size() >= 14 ? message.substr(6, 8) : message;
+ m.value = message;
+ m.pos = pos;
+ keys.push_back(m);
+ }
+ }
+ }
+
+ int size = rdfFile->size();
+ rdfFile->seek(14, SEEK_SET);
+ uint16 startOffset = rdfFile->readUint16LE();
+ uint16 offset = startOffset;
+ rdfFile->seek(startOffset, SEEK_SET);
+ const char *validPrefixes[] = {
+ "BRI", "COM", "DEM", "FEA", "GEN", "LOV", "MUD", "SIN", "TRI", "TUG", "VEN"};
+
+ while (!rdfFile->eos() && !rdfFile->err()) {
+ rdfFile->skip(4);
+ uint16 nextOffset = rdfFile->readUint16LE();
+ if (nextOffset >= size || offset >= nextOffset)
+ break;
+
+ while (offset < nextOffset) {
+ int pos = rdfFile->pos();
+ byte c = rdfFile->readByte();
+ bool found = false;
+
+ if (c == '#') {
+ rdfFile->skip(4);
+ c = rdfFile->readByte();
+
+ if (c == '\\') {
+ found = true;
+ rdfFile->seek(pos, SEEK_SET);
+ Common::String message;
+ c = rdfFile->readByte();
+ while (c != '\0') {
+ message += c;
+ c = rdfFile->readByte();
+ }
+
+ Common::String prefix = message.substr(1, 3);
+
+ for (uint i = 0; i < ARRAYSIZE(validPrefixes); i++) {
+ if (prefix == validPrefixes[i]) {
+ MessageInfo m;
+ m.key = message.size() >= 14 ? message.substr(6, 8) : message;
+ m.value = message;
+ m.pos = pos;
+ keys.push_back(m);
+
+ break;
+ }
+ }
+ }
+ }
+
+ if (!found)
+ rdfFile->seek(pos + 1, SEEK_SET);
+
+ offset = rdfFile->pos();
+ }
+ }
+
+ if (tableFormat) {
+ int index = 0;
+ Common::String line;
+
+ Common::sort(keys.begin(), keys.end(), MessageInfoComparator());
+
+ for (Common::List<MessageInfo>::const_iterator i = keys.begin(), end = keys.end(); i != end; ++i) {
+ line += "TX_" + (*i).key + ", ";
+ index++;
+ if (index % 5 == 0) {
+ debug(line.c_str());
+ line = "";
+ }
+ }
+
+ debug(line.c_str());
+
+ for (Common::List<MessageInfo>::const_iterator i = keys.begin(), end = keys.end(); i != end; ++i) {
+ debug("{ TX_%s, %d, 0 },", (*i).key.c_str(), (*i).pos);
+ }
+ }
+
+ delete rdfFile;
+ }
+
+ return true;
+}
+
Common::String Console::EventToString(uint32 action) {
const char *actions[] = {
"Tick",
diff --git a/engines/startrek/console.h b/engines/startrek/console.h
index a5068bc6ee..b4fe063c0d 100644
--- a/engines/startrek/console.h
+++ b/engines/startrek/console.h
@@ -45,6 +45,7 @@ private:
bool Cmd_SearchFile(int argc, const char **argv);
bool Cmd_Score(int argc, const char **argv);
bool Cmd_BridgeSequence(int argc, const char **argv);
+ bool Cmd_DumpText(int argc, const char **argv);
Common::String EventToString(uint32 action);
Common::String ItemToString(byte index);
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 0ff0c400e9..e8853a463b 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -28,288 +28,111 @@
#include "rooms/function_map.h"
-#define ADD_ROOM(ROOM) {\
- if (name.equalsIgnoreCase(#ROOM)) {\
- _roomActionList = ROOM##ActionList;\
- }\
+#define ADD_ROOM(ROOM) { \
+ if (name.equalsIgnoreCase(#ROOM)) { \
+ _roomActionList = ROOM##ActionList; \
+ _roomTextList = ROOM##TextOffsets; \
+ _roomStaticTextList = ROOM##Texts; \
+ } \
+ }
+
+#define ADD_ROOM_COMMON(PREFIX) { \
+ if (name.hasPrefixIgnoreCase(#PREFIX)) { \
+ _roomCommonTextList = PREFIX##TextOffsets; \
+ _commonTextRdf = #PREFIX; \
+ } \
}
namespace StarTrek {
Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm), _awayMission(&vm->_awayMission) {
- Common::MemoryReadStreamEndian *rdfFile = _vm->_resource->loadFile(name + ".RDF");
-
- int size = rdfFile->size();
- _rdfData = new byte[size];
- _rdfSize = size;
- rdfFile->read(_rdfData, size);
- delete rdfFile;
-
_roomActionList = nullptr;
-
- ADD_ROOM(demon0);
- ADD_ROOM(demon1);
- ADD_ROOM(demon2);
- ADD_ROOM(demon3);
- ADD_ROOM(demon4);
- ADD_ROOM(demon5);
- ADD_ROOM(demon6);
- ADD_ROOM(tug0);
- ADD_ROOM(tug1);
- ADD_ROOM(tug2);
- ADD_ROOM(tug3);
- ADD_ROOM(love0);
- ADD_ROOM(love1);
- ADD_ROOM(love2);
- ADD_ROOM(love3);
- ADD_ROOM(love4);
- ADD_ROOM(love5);
- ADD_ROOM(mudd0);
- ADD_ROOM(mudd1);
- ADD_ROOM(mudd2);
- ADD_ROOM(mudd3);
- ADD_ROOM(mudd4);
- ADD_ROOM(mudd5);
- ADD_ROOM(feather0);
- ADD_ROOM(feather1);
- ADD_ROOM(feather2);
- ADD_ROOM(feather3);
- ADD_ROOM(feather4);
- ADD_ROOM(feather5);
- ADD_ROOM(feather6);
- ADD_ROOM(feather7);
- ADD_ROOM(trial0);
- ADD_ROOM(trial1);
- ADD_ROOM(trial2);
- ADD_ROOM(trial3);
- ADD_ROOM(trial4);
- ADD_ROOM(trial5);
- ADD_ROOM(sins0);
- ADD_ROOM(sins1);
- ADD_ROOM(sins2);
- ADD_ROOM(sins3);
- ADD_ROOM(sins4);
- ADD_ROOM(sins5);
- ADD_ROOM(veng0);
- ADD_ROOM(veng1);
- ADD_ROOM(veng2);
- ADD_ROOM(veng3);
- ADD_ROOM(veng4);
- ADD_ROOM(veng5);
- ADD_ROOM(veng6);
- ADD_ROOM(veng7);
- ADD_ROOM(veng8);
+ _roomTextList = nullptr;
+ _roomCommonTextList = nullptr;
+ _roomStaticTextList = nullptr;
+ _commonTextRdf = "";
+
+ ADD_ROOM(demon0)
+ ADD_ROOM(demon1)
+ ADD_ROOM(demon2)
+ ADD_ROOM(demon3)
+ ADD_ROOM(demon4)
+ ADD_ROOM(demon5)
+ ADD_ROOM(demon6)
+ ADD_ROOM(tug0)
+ ADD_ROOM(tug1)
+ ADD_ROOM(tug2)
+ ADD_ROOM(tug3)
+ ADD_ROOM(love0)
+ ADD_ROOM(love1)
+ ADD_ROOM(love2)
+ ADD_ROOM(love3)
+ ADD_ROOM(love4)
+ ADD_ROOM(love5)
+ ADD_ROOM_COMMON(love)
+ //ADD_ROOM(mudd0)
+ //ADD_ROOM(mudd1)
+ //ADD_ROOM(mudd2)
+ //ADD_ROOM(mudd3)
+ //ADD_ROOM(mudd4)
+ //ADD_ROOM(mudd5)
+ //ADD_ROOM_COMMON(mudd)
+ ADD_ROOM(feather0)
+ ADD_ROOM(feather1)
+ ADD_ROOM(feather2)
+ ADD_ROOM(feather3)
+ ADD_ROOM(feather4)
+ ADD_ROOM(feather5)
+ ADD_ROOM(feather6)
+ ADD_ROOM(feather7)
+ //ADD_ROOM(trial0)
+ //ADD_ROOM(trial1)
+ //ADD_ROOM(trial2)
+ //ADD_ROOM(trial3)
+ //ADD_ROOM(trial4)
+ //ADD_ROOM(trial5)
+ //ADD_ROOM(sins0)
+ //ADD_ROOM(sins1)
+ //ADD_ROOM(sins2)
+ //ADD_ROOM(sins3)
+ //ADD_ROOM(sins4)
+ //ADD_ROOM(sins5)
+ ADD_ROOM(veng0)
+ ADD_ROOM(veng1)
+ ADD_ROOM(veng2)
+ //ADD_ROOM(veng3)
+ //ADD_ROOM(veng4)
+ //ADD_ROOM(veng5)
+ //ADD_ROOM(veng6)
+ //ADD_ROOM(veng7)
+ //ADD_ROOM(veng8)
+ //ADD_ROOM_COMMON(veng)
if (_roomActionList == nullptr) {
warning("Room \"%s\" unimplemented", name.c_str());
}
- bool isDemo = _vm->getFeatures() & GF_DEMO;
- bool isFloppy = !(_vm->getFeatures() & GF_CDROM);
- if (!isDemo && !isFloppy) {
- loadRoomMessages();
- loadOtherRoomMessages();
- }
+ _rdfData = loadRoomRDF(name);
+ _commonRdfData = !_commonTextRdf.empty() ? loadRoomRDF(_commonTextRdf + "0") : nullptr;
+
memset(&_roomVar, 0, sizeof(_roomVar));
}
Room::~Room() {
- _lookMessages.clear();
- _lookWithTalkerMessages.clear();
- _talkMessages.clear();
delete[] _rdfData;
+ delete[] _commonRdfData;
}
-void Room::loadRoomMessages() {
- // TODO: There are some more messages which are not stored in that offset
- uint16 messagesOffset = readRdfWord(32);
- uint16 offset = messagesOffset;
- const char *text = (const char *)_rdfData + messagesOffset;
- const char roomIndexChar = '0' + _vm->_roomIndex;
-
- do {
- while ((text[0] != '#' || (text[1] != _vm->_missionName[0] && text[4] != roomIndexChar)) && offset < _rdfSize) {
- text++;
- offset++;
- }
-
- if (text[5] == '\\')
- loadRoomMessage(text);
-
- while (*text != '\0' && offset < _rdfSize) {
- text++;
- offset++;
- }
-
- // Peek the next byte, in case there's a filler text
- if (Common::isAlpha(*(text + 1))) {
- while (*text != '\0' && offset < _rdfSize) {
- text++;
- offset++;
- }
- }
- } while (*(text + 1) == '#' && offset < _rdfSize);
-}
-
-void Room::loadRoomMessage(const char *text) {
- int messageNum;
- bool isTalkMessage;
- bool isLookMessage;
- bool isLookWithTalkerMessage;
-
- Common::String patchedText = patchRoomMessage(text);
- text = patchedText.c_str();
-
- char textType = text[10]; // _, U and S: talk message, N: look message, L: look with talker message
- char numberType = text[11]; // Sxx: Scotty
-
- if (text[5] != '\\')
- error("loadRoomMessage: Invalid message");
-
- isTalkMessage = (textType == '_' || textType == 'U' || numberType == 'S' || numberType == 'F'); // U = Uhura, S = Scotty, F = followup
- isLookMessage = (textType == 'N');
- isLookWithTalkerMessage = (textType == 'L');
-
- sscanf((const char *)(text + 11), "%3d", &messageNum);
- if (text[14] != '#')
- error("loadRoomMessage: Invalid message");
-
- if (memcmp(text + 1, _vm->_missionName.c_str(), 3) || text[4] != _vm->_roomIndex + '0') {
- // String with a prefix of another mission, separate it
- messageNum += COMMON_MESSAGE_OFFSET;
- } else if (numberType == 'S') {
- // For some reason, Uhura's messages (Uxx) follow the same numbering as the
- // rest, but Scott's don't, and start from one.
- messageNum += SCOTTY_MESSAGE_OFFSET;
- } else if (numberType == 'F') {
- messageNum += FOLLOWUP_MESSAGE_OFFSET;
- }
-
- if (isTalkMessage)
- _talkMessages[messageNum] = text;
- else if (isLookMessage)
- _lookMessages[messageNum] = text;
- else if (isLookWithTalkerMessage)
- _lookWithTalkerMessages[messageNum] = text;
-}
-
-struct TypoFix {
- Common::String prefix;
- Common::String origText;
- Common::String newText;
-};
-
-Common::String Room::patchRoomMessage(const char *text) {
- Common::String txt = text;
- int i = 0;
-
- TypoFix typoFixes[] = {
- { "#LOV2\\LOV2_012#", "#LOV2\\LOV2_012#", "#LOV1\\LOV1_010#" }, // Audio file missing
- { "#LOV3\\LOV3_#", "#LOV3\\LOV3_#", "#LOV3\\LOV3_000#"}, // Message index missing
- { "#LOVA\\LOVA_F08#", "spock", "Spock" },
- { "#LOVA\\LOVA_F55#", "sysnthesize", "synthesize" },
- { "#FEA3\\FEA3_030#", "#FEA3\\FEA3_030#", "#LOVA\\LOVA_100#" }, // Wrong voice actor
- { "#MUD0\\MUD0_023#", "gullability", "gullibility" },
- { "#MUD2\\MUD2_002#", "Well, now! I think", "Well, now I think" },
- { "#MUD2\\MUD2_014#", "I don't understand enough of the alien's thinking", "I don't understand enough of how the aliens thought," },
- { "#MUD3\\MUD3_011#", "to think after all the stunts that Harry has pulled", "to think that after all the stunts that Harry has pulled," },
- { "#MUD3\\MUD3_022#", "and they were certain", "and they are certain" },
- { "#MUD3\\MUD4_008#", "DId you know", "Did you know" },
- { "#FEA1\\FEA1_035#", "before it retreats Captain", "before it retreats, Captain" },
- { "#FEA1\\FEA1_041#", "it must have a nasty bite", "it may have a nasty bite" },
- { "#FEA3\\FEA3_012#", "he'll be up in about an hour", "he'll be up in about a half hour" },
- { "#FEA3\\FEA3_030#", "sHe's dead, Jim!", "He's dead, Jim!" },
- { "#FEA5\\FEA5_009#", "those thorns.You might", "those thorns. You might" },
- { "#FEA5\\FEA5_018#", "with our phaser not working", "with our phasers not working" },
- { "#FEA5\\FEA5_020#", "in a previous life", "in your previous life" },
- { "#FEA6\\FEA6_017#", "isn't that just great", "isn't this just great" },
- { "#FEA6\\FEA6_019#", "that action, Captain It may", "that action, Captain. It may" },
- { "#FEA6\\FEA6N016#", "that attack you", "that attacked you" },
- { "#SIN2\\SIN2_012#", "I'm a surgeon not a alien", "I'm a surgeon, not an alien" },
- { "#SIN4\\SIN4_023#", "to bypass it's lock system", "to bypass its lock system" },
- { "#SIN5\\SIN5N012#", "Sparks explode and", "Sparks fly and" },
- { "#TRI0\\TRI0_036#", "the Enterprise!We've", "the Enterprise! We've" },
- { "#TRI1\\TRI1_025#", "Male Human-Vulcan", "One male Human-Vulcan" },
- { "#TRI1\\TRI1_048#", "with a phaser", "with your phaser" },
- { "#TRI2\\TRI2_015#", "Male Human,", "He's a male Human," },
- { "#TRI2\\TRI2_017#", "Male Human-Vulcan", "One male Human-Vulcan" },
- { "#TRI3\\TRI3_013#", "He's a Male Human", "One male Human" },
- { "#TRI3\\TRI3_014#", "Male Human,", "He's a male Human," },
- { "#TRI3\\TRI3_016#", "Male Human-Vulcan", "One male Human-Vulcan" },
- { "#TRI3\\TRI3U084#", "Captain, come in please!", "Captain, please come in!" },
- { "#TRI4\\TRI4_003#", "I didn't want it", "I don't want it" },
- { "#TRI4\\TRI4_024#", "a fair trail", "a fair trial" },
- { "#TRI4\\TRI4_039#", "what an enemy does not expect", "what the enemy does not expect" },
- { "#TRI4\\TRI4_057#", "will believe you", "to believe you" },
- { "#TRI5\\TRI5_045#", "at which to transport you", "to which to transport you" },
- { "#TRI5\\TRI5N002#", "a beam light", "a beam of light" },
- { "#TRI5\\TRI5N016#", "saphire", "sapphire" },
- { "#TRI5\\TRI5N017#", "saphire", "sapphire" },
- { "#TRI5\\TRI5N018#", "saphire", "sapphire" },
- { "#TRI5\\TRI5N019#", "a emerald", "an emerald" },
- { "#TRI5\\TRI5N020#", "a emerald", "an emerald" },
- { "#TRI5\\TRI5N021#", "a emerald", "an emerald" },
- { "#VEN2\\VEN2_050#", "torpedo is loaded", "torpedoes are loaded" },
- { "#VEN6\\VEN6_005#", "><upon", "upon" },
- { "#VEN8\\VEN8_037#", "Its not", "It's not" },
- { "", "", "" }
- };
-
- // Fix typos where some messages contain a hyphen instead of an underscore
- // (e.g in LOV2)
- if (txt[10] == '-')
- txt.replace(10, 1, "_");
-
- // Fix typos where some messages contain double spacing (e.g. in FEA3_020)
- int32 spacePos = txt.find(" ");
- if (spacePos > 0)
- txt.deleteChar(spacePos);
-
- // Fix typos
- do {
- const Common::String origText = typoFixes[i].origText;
- const Common::String newText = typoFixes[i].newText;
-
- int32 pos = txt.find(origText);
- if (pos > 0)
- txt.replace(pos, origText.size(), newText, pos, newText.size());
-
- i++;
- } while (typoFixes[i].prefix != "");
-
- return txt;
-}
-
-void Room::loadOtherRoomMessages() {
- uint16 startOffset = readRdfWord(14);
- // Some RDF files, lile MUDD0, contain text beyond the end offset,
- // so we read up to the end of the file
- uint16 endOffset = _rdfSize; // readRdfWord(16);
- uint16 offset = startOffset;
- const char *validPrefixes[] = {
- "BRI", "COM", "DEM", "FEA", "GEN", "LOV", "MUD", "SIN", "TRI", "TUG", "VEN"
- };
+byte *Room::loadRoomRDF(Common::String fileName) {
+ Common::MemoryReadStreamEndian *rdfFile = _vm->_resource->loadFile(fileName + ".RDF");
- while (offset < endOffset) {
- uint16 nextOffset = readRdfWord(offset + 4);
- if (nextOffset >= endOffset || offset >= nextOffset)
- break;
-
- while (offset < nextOffset) {
- const char *text = (const char *)_rdfData + offset;
-
- if (text[0] == '#' && text[5] == '\\') {
- for (uint i = 0; i < ARRAYSIZE(validPrefixes); i++) {
- if (!memcmp(text + 1, validPrefixes[i], 3)) {
- loadRoomMessage(text);
- break;
- }
- }
- }
+ int size = rdfFile->size();
+ byte *buffer = new byte[size];
+ //_rdfSize = size;
+ rdfFile->read(buffer, size);
+ delete rdfFile;
- offset++;
- }
- }
+ return buffer;
}
uint16 Room::readRdfWord(int offset) {
@@ -494,43 +317,79 @@ int Room::showRoomSpecificText(const char **array) {
return _vm->showText(&StarTrekEngine::readTextFromArrayWithChoices, (uintptr)array, 20, 20, textColor, true, false, false);
}
-int Room::showMultipleTexts(const TextRef *textIDs, bool fromRDF, bool lookWithTalker) {
+const char *Room::getText(uint16 textId) {
+ uint16 offset;
+ bool isCD = _vm->getFeatures() & GF_CDROM;
+ int index = 0;
+ const RoomTextOffsets *textList = textId < 5000 ? _roomTextList : _roomCommonTextList;
+ const RoomTextOffsets *offsets = nullptr;
+
+ // Check for text indices that point inside the RDF file
+ do {
+ if (textList[index].id == textId) {
+ offsets = &textList[index];
+ break;
+ }
+ index++;
+ } while (textList[index].id != -1);
+
+ // Check if we got a hardcoded text
+ index = 0;
+ if (offsets == nullptr && _roomStaticTextList != nullptr) {
+ do {
+ if (_roomStaticTextList[index].id == textId) {
+ // TODO: Add non-English languages
+ return _roomStaticTextList[index].text;
+ }
+ index++;
+ } while (_roomStaticTextList[index].id != -1);
+ }
+
+ if (offsets == nullptr)
+ error("Missing text ID: %d", textId);
+
+ switch (_vm->getLanguage()) {
+ // TODO: Add non-English languages
+ default:
+ offset = isCD ? offsets->offsetEnglishCD : offsets->offsetEnglishFloppy;
+ break;
+ }
+
+ const char *text = textId < 5000 ? (const char *)_rdfData + offset : (const char *)_commonRdfData + offset;
+ //return patchRoomMessage(text).c_str(); // TODO
+ return text;
+}
+
+int Room::showMultipleTexts(const TextRef *textIDs) {
int numIDs = 0;
int retval;
- while (textIDs[numIDs] != TX_BLANK)
+ while (textIDs[numIDs] != TX_END)
numIDs++;
const char **text = (const char **)malloc(sizeof(const char *) * (numIDs + 1));
- for (int i = 0; i <= numIDs; i++) {
- // TODO: This isn't nice, but it's temporary till we migrate to reading text from RDF files
- if (i > 0 && fromRDF) {
- if (textIDs[0] == TX_NULL)
- text[i] = _lookMessages.contains(textIDs[i]) ? _lookMessages[textIDs[i]].c_str() : _lookMessages[textIDs[i] - COMMON_MESSAGE_OFFSET].c_str();
- else if (lookWithTalker)
- text[i] = _lookWithTalkerMessages.contains(textIDs[i]) ? _lookWithTalkerMessages[textIDs[i]].c_str() : _lookWithTalkerMessages[textIDs[i] - COMMON_MESSAGE_OFFSET].c_str();
- else
- text[i] = _talkMessages.contains(textIDs[i]) ? _talkMessages[textIDs[i]].c_str() : _talkMessages[textIDs[i] - COMMON_MESSAGE_OFFSET].c_str();
- } else
- text[i] = g_gameStrings[textIDs[i]];
+ for (int i = 0; i < numIDs; i++) {
+ text[i] = textIDs[i] == TX_EMPTY ? "" : getText(textIDs[i]);
}
+ text[numIDs] = ""; // terminator
+
retval = showRoomSpecificText(text);
free(text);
return retval;
}
-int Room::showText(TextRef speaker, TextRef text, bool fromRDF, bool lookWithTalker) {
+int Room::showText(TextRef speaker, TextRef text) {
TextRef textIDs[3];
textIDs[0] = speaker;
textIDs[1] = text;
- textIDs[2] = TX_BLANK;
- return showMultipleTexts(textIDs, fromRDF, lookWithTalker);
+ textIDs[2] = TX_END;
+ return showMultipleTexts(textIDs);
}
-int Room::showDescription(TextRef text, bool fromRDF, bool lookWithTalker) {
- return showText(TX_NULL, text, fromRDF, lookWithTalker);
+int Room::showDescription(TextRef text) {
+ return showText(TX_EMPTY, text);
}
void Room::giveItem(int item) {
@@ -735,7 +594,7 @@ Common::String Room::getCrewmanAnimFilename(int object, const Common::String &st
return _vm->getCrewmanAnimFilename(object, str);
}
-void Room::spockScan(int direction, TextRef text, bool changeDirection, bool fromRDF) {
+void Room::spockScan(int direction, TextRef speaker, TextRef text, bool changeDirection) {
const char *dirs = "nsew";
Common::String anim = "sscan_";
anim.setChar(dirs[direction], 5);
@@ -747,10 +606,10 @@ void Room::spockScan(int direction, TextRef text, bool changeDirection, bool fro
playSoundEffectIndex(kSfxTricorder);
if (text != -1)
- showText(TX_SPEAKER_SPOCK, text, fromRDF);
+ showText(speaker, text);
}
-void Room::mccoyScan(int direction, TextRef text, bool changeDirection, bool fromRDF) {
+void Room::mccoyScan(int direction, TextRef speaker, TextRef text, bool changeDirection) {
const char *dirs = "nsew";
Common::String anim = "mscan_";
anim.setChar(dirs[direction], 5);
@@ -762,7 +621,7 @@ void Room::mccoyScan(int direction, TextRef text, bool changeDirection, bool fro
playSoundEffectIndex(kSfxTricorder);
if (text != -1)
- showText(TX_SPEAKER_MCCOY, text, fromRDF);
+ showText(speaker, text);
}
bool Room::isPointInPolygon(int offset, int16 x, int16 y) {
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 59067685b4..94358eb57f 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -163,21 +163,23 @@ public:
byte *_rdfData;
private:
- uint16 _rdfSize;
+ //uint16 _rdfSize;
StarTrekEngine *_vm;
AwayMission *_awayMission;
const RoomAction *_roomActionList;
+ const RoomTextOffsets *_roomTextList;
+ const RoomTextOffsets *_roomCommonTextList;
+ const RoomText *_roomStaticTextList;
+ Common::String _commonTextRdf;
+ byte *_commonRdfData;
- Common::HashMap<int, Common::String> _lookMessages;
- Common::HashMap<int, Common::String> _lookWithTalkerMessages;
- Common::HashMap<int, Common::String> _talkMessages;
-
+ byte *loadRoomRDF(Common::String fileName);
void loadRoomMessages();
void loadOtherRoomMessages();
void loadRoomMessage(const char *text);
- Common::String patchRoomMessage(const char *text);
+ const char *getText(uint16 textId);
Common::MemoryReadStreamEndian *loadBitmapFile(Common::String baseName);
Common::MemoryReadStreamEndian *loadFileWithParams(Common::String filename, bool unk1, bool unk2, bool unk3);
@@ -207,9 +209,9 @@ private:
* Cmd 0x03
*/
int showRoomSpecificText(const char **textAddr);
- int showMultipleTexts(const TextRef *text, bool fromRDF = false, bool lookWithTalker = false);
- int showDescription(TextRef text, bool fromRDF = false, bool lookWithTalker = false);
- int showText(TextRef speaker, TextRef text, bool fromRDF = false, bool lookWithTalker = false);
+ int showMultipleTexts(const TextRef *text);
+ int showDescription(TextRef text);
+ int showText(TextRef speaker, TextRef text);
/**
* Cmd 0x04
@@ -301,8 +303,8 @@ private:
* If "changeDirection" is true, they remain facing that direction even after their
* animation is finished. The game is inconsistent about doing this.
*/
- void spockScan(int direction, TextRef text, bool changeDirection = false, bool fromRDF = false);
- void mccoyScan(int direction, TextRef text, bool changeDirection = false, bool fromRDF = false);
+ void spockScan(int direction, TextRef speaker, TextRef text, bool changeDirection = false);
+ void mccoyScan(int direction, TextRef speaker, TextRef text, bool changeDirection = false);
// Room-specific code
public:
diff --git a/engines/startrek/rooms/demon0.cpp b/engines/startrek/rooms/demon0.cpp
index 8fa1f06fc6..cb21c69d00 100644
--- a/engines/startrek/rooms/demon0.cpp
+++ b/engines/startrek/rooms/demon0.cpp
@@ -82,6 +82,94 @@ extern const RoomAction demon0ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum demon0TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_ANGIVEN, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_SIGN,
+ TX_DEM0_001, TX_DEM0_002, TX_DEM0_003, TX_DEM0_004, TX_DEM0_005,
+ TX_DEM0_006, TX_DEM0_007, TX_DEM0_008, TX_DEM0_009, TX_DEM0_010,
+ TX_DEM0_011, TX_DEM0_012, TX_DEM0_013, TX_DEM0_014, TX_DEM0_015,
+ TX_DEM0_016, TX_DEM0_017, TX_DEM0_018, TX_DEM0_019, TX_DEM0_020,
+ TX_DEM0_021, TX_DEM0_022, TX_DEM0_023, TX_DEM0_024, TX_DEM0_025,
+ TX_DEM0_026, TX_DEM0_027, TX_DEM0_028, TX_DEM0_029, TX_DEM0_030,
+ TX_DEM0_031, TX_DEM0_032, TX_DEM0_033, TX_DEM0_034, TX_DEM0_035,
+ TX_DEM0_036, TX_DEM0_037, TX_DEM0_038, TX_DEM0_039, TX_DEM0_040,
+ TX_DEM0_041, TX_DEM0_042, TX_DEM0_043, TX_DEM0_044, TX_DEM0N000,
+ TX_DEM0N001, TX_DEM0N002, TX_DEM0N003, TX_DEM0N004, TX_DEM0N005,
+ TX_DEM0N006, TX_DEM0N007, TX_DEM0N008, TX_DEM0N009, TX_DEM0N010,
+ TX_DEM0C001
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon0TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 2597, 2480 },
+ { TX_SPEAKER_ANGIVEN, 2608, 2491 },
+ { TX_SPEAKER_MCCOY, 2622, 2505 },
+ { TX_SPEAKER_SPOCK, 2632, 2515 },
+ { TX_SPEAKER_EVERTS, 2642, 2525 },
+ { TX_SPEAKER_SIGN, 2661, 0 },
+ { TX_DEM0_001, 7829, 7085 },
+ { TX_DEM0_002, 3960, 3739 },
+ { TX_DEM0_003, 3148, 2987 },
+ { TX_DEM0_004, 7588, 6889 },
+ { TX_DEM0_005, 4061, 3825 },
+ { TX_DEM0_006, 2797, 2665 },
+ { TX_DEM0_007, 7380, 6741 },
+ { TX_DEM0_008, 2988, 2842 },
+ { TX_DEM0_009, 7460, 6791 },
+ { TX_DEM0_010, 4303, 4052 },
+ { TX_DEM0_011, 6827, 6304 },
+ { TX_DEM0_012, 4362, 4096 },
+ { TX_DEM0_013, 1334, 0 },
+ { TX_DEM0_014, 6593, 6085 },
+ { TX_DEM0_015, 1233, 0 },
+ { TX_DEM0_016, 473, 0 },
+ { TX_DEM0_017, 1167, 0 },
+ { TX_DEM0_018, 8094, 7320 },
+ { TX_DEM0_019, 6427, 5934 },
+ { TX_DEM0_020, 8648, 7829 },
+ { TX_DEM0_021, 8180, 7391 },
+ { TX_DEM0_022, 8050, 7291 },
+ { TX_DEM0_023, 6871, 0 },
+ { TX_DEM0_024, 7656, 0 },
+ { TX_DEM0_025, 7357, 0 },
+ { TX_DEM0_026, 7213, 0 },
+ { TX_DEM0_027, 7526, 0 },
+ { TX_DEM0_028, 8405, 7601 },
+ { TX_DEM0_029, 6995, 0 },
+ { TX_DEM0_030, 7709, 6980 },
+ { TX_DEM0_031, 4125, 0 },
+ { TX_DEM0_032, 3563, 0 },
+ { TX_DEM0_033, 3743, 0 },
+ { TX_DEM0_034, 5325, 0 },
+ { TX_DEM0_035, 4533, 0 },
+ { TX_DEM0_036, 2666, 2549 },
+ { TX_DEM0_037, 5196, 4898 },
+ { TX_DEM0_038, 3237, 3061 },
+ { TX_DEM0_039, 1058, 0 },
+ { TX_DEM0_040, 1400, 0 },
+ { TX_DEM0_041, 7080, 0 },
+ { TX_DEM0_042, 7275, 0 },
+ { TX_DEM0_043, 7144, 0 },
+ { TX_DEM0_044, 7429, 0 },
+ { TX_DEM0N000, 5591, 0 },
+ { TX_DEM0N001, 5805, 0 },
+ { TX_DEM0N002, 6184, 0 },
+ { TX_DEM0N003, 6290, 0 },
+ { TX_DEM0N004, 5467, 0 },
+ { TX_DEM0N005, 6076, 0 },
+ { TX_DEM0N006, 5678, 0 },
+ { TX_DEM0N007, 5897, 0 },
+ { TX_DEM0N008, 5560, 0 },
+ { TX_DEM0N009, 6036, 0 },
+ { TX_DEM0N010, 5960, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon0Texts[] = {
+ { TX_DEM0C001, Common::EN_ANY, "All mining equipment use this road." },
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::demon0Tick1() {
playVoc("DEM0LOOP");
loadActorAnim(9, "s0r0d3", 252, 153, 0);
@@ -104,14 +192,14 @@ void Room::demon0Tick100() {
if (_awayMission->demon.talkedToPrelate || _awayMission->demon.prelateWelcomedCrew)
return;
_awayMission->demon.prelateWelcomedCrew = true;
- showText(TX_SPEAKER_ANGIVEN, 36, true);
+ showText(TX_SPEAKER_ANGIVEN, TX_DEM0_036);
}
void Room::demon0Tick140() {
if (_awayMission->demon.mccoyMentionedFlora)
return;
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_016);
_awayMission->demon.mccoyMentionedFlora = true;
}
@@ -163,53 +251,53 @@ void Room::demon0ReachedTopDoor() {
void Room::demon0TalkToPrelate() {
const TextRef options1[] = {
- TX_SPEAKER_KIRK,
- 6,
- 8,
- 3,
- TX_BLANK
+ TX_SPEAKER_KIRK,
+ TX_DEM0_006,
+ TX_DEM0_008,
+ TX_DEM0_003,
+ TX_END
};
const TextRef firstResponse0[] = {
- TX_SPEAKER_ANGIVEN,
- 38,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_038,
+ TX_END
};
const TextRef firstResponse1[] = {
- TX_SPEAKER_ANGIVEN,
- 32,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_032,
+ TX_END
};
const TextRef options2[] = {
- TX_SPEAKER_KIRK,
- 2,
- 5,
- TX_BLANK
+ TX_SPEAKER_KIRK,
+ TX_DEM0_002,
+ TX_DEM0_005,
+ TX_END
};
const TextRef secondResponse[] = {
- TX_SPEAKER_ANGIVEN,
- 31,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_031,
+ TX_END
};
const TextRef options3[] = {
- TX_SPEAKER_KIRK,
- 10,
- 12,
- TX_BLANK
+ TX_SPEAKER_KIRK,
+ TX_DEM0_010,
+ TX_DEM0_012,
+ TX_END
};
const TextRef thirdResponse[] = {
- TX_SPEAKER_ANGIVEN,
- 35,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_035,
+ TX_END
};
const TextRef badConclusion[] = {
- TX_SPEAKER_ANGIVEN,
- 37,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_037,
+ TX_END
};
const TextRef goodConclusion[] = {
- TX_SPEAKER_ANGIVEN,
- 34,
- TX_BLANK
+ TX_SPEAKER_ANGIVEN,
+ TX_DEM0_034,
+ TX_END
};
if (_awayMission->demon.talkedToPrelate)
@@ -220,7 +308,7 @@ void Room::demon0TalkToPrelate() {
const TextRef *response = nullptr;
- switch (showMultipleTexts(options1, true)) {
+ switch (showMultipleTexts(options1)) {
case 0:
response = firstResponse0;
break;
@@ -235,46 +323,46 @@ void Room::demon0TalkToPrelate() {
}
if (response != nullptr)
- showMultipleTexts(response, true);
+ showMultipleTexts(response);
- if (showMultipleTexts(options2, true) == 1)
+ if (showMultipleTexts(options2) == 1)
demon0BadResponse();
- showMultipleTexts(secondResponse, true);
+ showMultipleTexts(secondResponse);
- if (showMultipleTexts(options3, true) == 1)
+ if (showMultipleTexts(options3) == 1)
demon0BadResponse();
- showMultipleTexts(thirdResponse, true);
+ showMultipleTexts(thirdResponse);
if (_awayMission->demon.wasRudeToPrelate)
- showMultipleTexts(badConclusion, true);
+ showMultipleTexts(badConclusion);
else
- showMultipleTexts(goodConclusion, true);
+ showMultipleTexts(goodConclusion);
}
void Room::demon0LookAtPrelate() {
- showDescription(4, true);
+ showDescription(TX_DEM0N004);
}
void Room::demon0UsePhaserOnSnow() {
// BUG: doesn't check if redshirt is dead.
- showText(TX_SPEAKER_EVERTS, 39, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_039);
}
void Room::demon0UsePhaserOnSign() {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_017);
}
void Room::demon0UsePhaserOnShelter() {
- showText(TX_SPEAKER_MCCOY, 15, true);
- showText(TX_SPEAKER_SPOCK, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_015);
+ showText(TX_SPEAKER_SPOCK, TX_DEM0_013);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_EVERTS, 40, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_040);
}
void Room::demon0UsePhaserOnPrelate() {
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_020);
}
void Room::demon0LookAtSign() {
@@ -282,66 +370,66 @@ void Room::demon0LookAtSign() {
}
void Room::demon0LookAtTrees() {
- showDescription(6, true);
+ showDescription(TX_DEM0N006);
}
void Room::demon0LookAtSnow() {
- showDescription(7, true);
+ showDescription(TX_DEM0N007);
}
void Room::demon0LookAnywhere() {
- showDescription(0, true);
+ showDescription(TX_DEM0N000);
}
void Room::demon0LookAtBushes() {
- showDescription(10, true);
+ showDescription(TX_DEM0N010);
}
void Room::demon0LookAtKirk() {
- showDescription(5, true);
+ showDescription(TX_DEM0N005);
}
void Room::demon0LookAtMcCoy() {
- showDescription(2, true);
+ showDescription(TX_DEM0N002);
}
void Room::demon0LookAtRedShirt() {
- showDescription(3, true);
+ showDescription(TX_DEM0N003);
}
void Room::demon0LookAtSpock() {
- showDescription(9, true);
+ showDescription(TX_DEM0N009);
}
void Room::demon0LookAtShelter() {
- showDescription(1, true);
+ showDescription(TX_DEM0N001);
}
void Room::demon0TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 9, true);
- showText(TX_SPEAKER_MCCOY, 27, true);
- showText(TX_SPEAKER_KIRK, 4, true);
- showText(TX_SPEAKER_MCCOY, 24, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM0_009);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_027);
+ showText(TX_SPEAKER_KIRK, TX_DEM0_004);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_024);
}
void Room::demon0TalkToRedshirt() {
- showText(TX_SPEAKER_EVERTS, 43, true);
- showText(TX_SPEAKER_MCCOY, 26, true);
- showText(TX_SPEAKER_EVERTS, 42, true);
- showText(TX_SPEAKER_MCCOY, 25, true);
- showText(TX_SPEAKER_KIRK, 7, true);
- showText(TX_SPEAKER_EVERTS, 44, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_043);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_026);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_042);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_025);
+ showText(TX_SPEAKER_KIRK, TX_DEM0_007);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_044);
}
void Room::demon0TalkToMcCoy() {
if (_awayMission->demon.talkedToPrelate) {
- showText(TX_SPEAKER_KIRK, 11, true);
- showText(TX_SPEAKER_MCCOY, 23, true);
- showText(TX_SPEAKER_SPOCK, 29, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM0_011);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_023);
+ showText(TX_SPEAKER_SPOCK, TX_DEM0_029);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_EVERTS, 41, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM0_041);
} else {
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_019);
if (!_awayMission->demon.askedPrelateAboutSightings) {
demon0AskPrelateAboutSightings();
}
@@ -349,15 +437,15 @@ void Room::demon0TalkToMcCoy() {
}
void Room::demon0TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 14, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM0_014);
if (!_awayMission->demon.talkedToPrelate && !_awayMission->demon.askedPrelateAboutSightings)
demon0AskPrelateAboutSightings();
}
void Room::demon0AskPrelateAboutSightings() {
- showText(TX_SPEAKER_KIRK, 1, true);
- showText(TX_SPEAKER_ANGIVEN, 30, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM0_001);
+ showText(TX_SPEAKER_ANGIVEN, TX_DEM0_030);
_awayMission->demon.askedPrelateAboutSightings = true;
}
@@ -365,13 +453,13 @@ void Room::demon0AskPrelateAboutSightings() {
void Room::demon0UseSTricorderAnywhere() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM0_028);
}
void Room::demon0UseMTricorderAnywhere() {
loadActorAnim2(OBJECT_MCCOY, "mscans", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_021);
}
void Room::demon0UseMTricorderOnPrelate() {
@@ -379,9 +467,9 @@ void Room::demon0UseMTricorderOnPrelate() {
playSoundEffectIndex(0x04);
if (_awayMission->demon.talkedToPrelate)
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_018);
else
- showText(TX_SPEAKER_MCCOY, 22, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM0_022);
}
// Helper functions
@@ -392,7 +480,7 @@ void Room::demon0BadResponse() {
_awayMission->demon.missionScore -= 3;
_awayMission->demon.wasRudeToPrelate = true;
- showText(TX_SPEAKER_ANGIVEN, 33, true);
+ showText(TX_SPEAKER_ANGIVEN, TX_DEM0_033);
}
}
diff --git a/engines/startrek/rooms/demon1.cpp b/engines/startrek/rooms/demon1.cpp
index 1c89e9bc5e..bdcfe88744 100644
--- a/engines/startrek/rooms/demon1.cpp
+++ b/engines/startrek/rooms/demon1.cpp
@@ -110,8 +110,89 @@ extern const RoomAction demon1ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
-// BUG: under certain circumstances, the klingons just stop firing?
+enum demon1TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_SPOCK, TX_SPEAKER_MCCOY, TX_SPEAKER_EVERTS, TX_SPEAKER_UHURA,
+ TX_SPEAKER_KLINGON,
+ TX_DEM1_001, TX_DEM1_002, TX_DEM1_003, TX_DEM1_004, TX_DEM1_005,
+ TX_DEM1_006, TX_DEM1_007, TX_DEM1_008, TX_DEM1_009, TX_DEM1_011,
+ TX_DEM1_012, TX_DEM1_013, TX_DEM1_014, TX_DEM1_015, TX_DEM1_016,
+ TX_DEM1_017, TX_DEM1_018, TX_DEM1_019, TX_DEM1_020, TX_DEM1_021,
+ TX_DEM1_022, TX_DEM1_023, TX_DEM1_024, TX_DEM1_025, TX_DEM1_026,
+ TX_DEM1_F23, TX_DEM1N000, TX_DEM1N001, TX_DEM1N002, TX_DEM1N003,
+ TX_DEM1N004, TX_DEM1N005, TX_DEM1N006, TX_DEM1N007, TX_DEM1N008,
+ TX_DEM1N009, TX_DEM1N010, TX_DEM1N011, TX_DEM1N012, TX_DEM1N013,
+ TX_DEM1N014, TX_DEM1N015, TX_DEM1N016, TX_DEM1N017, TX_DEM1N018,
+ TX_DEM1N019, TX_DEM1N020, TX_DEM1N021, TX_DEM1N023, TX_DEM1U077,
+ TX_DEM1U078
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon1TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 5869, 0 },
+ { TX_SPEAKER_SPOCK, 5880, 0 },
+ { TX_SPEAKER_MCCOY, 5890, 0 },
+ { TX_SPEAKER_EVERTS, 5900, 0 },
+ { TX_SPEAKER_UHURA, 5914, 0 },
+ { TX_SPEAKER_KLINGON, 5924, 0 },
+ { TX_DEM1_001, 7374, 0 },
+ { TX_DEM1_002, 2710, 0 },
+ { TX_DEM1_003, 2566, 0 },
+ { TX_DEM1_004, 2906, 0 },
+ { TX_DEM1_005, 3458, 0 },
+ { TX_DEM1_006, 3669, 0 },
+ { TX_DEM1_007, 3142, 0 },
+ { TX_DEM1_008, 3285, 0 },
+ { TX_DEM1_009, 4222, 0 },
+ { TX_DEM1_011, 1492, 0 },
+ { TX_DEM1_012, 6779, 0 },
+ { TX_DEM1_013, 7645, 0 },
+ { TX_DEM1_014, 7779, 0 },
+ { TX_DEM1_015, 7904, 0 },
+ { TX_DEM1_016, 7111, 0 },
+ { TX_DEM1_017, 6837, 0 },
+ { TX_DEM1_018, 6358, 0 },
+ { TX_DEM1_019, 6926, 0 },
+ { TX_DEM1_020, 2764, 0 },
+ { TX_DEM1_021, 2951, 0 },
+ { TX_DEM1_022, 7478, 0 },
+ { TX_DEM1_023, 7983, 0 },
+ { TX_DEM1_024, 7735, 0 },
+ { TX_DEM1_025, 1937, 0 },
+ { TX_DEM1_026, 8115, 0 },
+ { TX_DEM1_F23, 2028, 0 },
+ { TX_DEM1N000, 6289, 0 },
+ { TX_DEM1N001, 6015, 0 },
+ { TX_DEM1N002, 6209, 0 },
+ { TX_DEM1N003, 5933, 0 },
+ { TX_DEM1N004, 7334, 0 },
+ { TX_DEM1N005, 7222, 0 },
+ { TX_DEM1N006, 6742, 0 },
+ { TX_DEM1N007, 7281, 0 },
+ { TX_DEM1N008, 6118, 0 },
+ { TX_DEM1N009, 4721, 0 },
+ { TX_DEM1N010, 4561, 0 },
+ { TX_DEM1N011, 4772, 0 },
+ { TX_DEM1N012, 5145, 0 },
+ { TX_DEM1N013, 5298, 0 },
+ { TX_DEM1N014, 5373, 0 },
+ { TX_DEM1N015, 5223, 0 },
+ { TX_DEM1N016, 4917, 0 },
+ { TX_DEM1N017, 5044, 0 },
+ { TX_DEM1N018, 4486, 0 },
+ { TX_DEM1N019, 4630, 0 },
+ { TX_DEM1N020, 1814, 0 },
+ { TX_DEM1N021, 4851, 0 },
+ { TX_DEM1N023, 4977, 0 },
+ { TX_DEM1U077, 2462, 0 },
+ { TX_DEM1U078, 2641, 0 },
+ { -1, 0, 0 }
+};
+extern const RoomText demon1Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
+// BUG: under certain circumstances, the klingons just stop firing?
void Room::demon1Tick1() {
playVoc("DEM1LOOP");
@@ -283,13 +364,13 @@ void Room::demon1KlingonFinishedAimingWeapon() {
}
void Room::demon1KirkShot() {
- showDescription(0, true);
+ showDescription(TX_DEM1N000);
showGameOverMenu();
}
void Room::demon1UsePhaserOnAnything() {
if (_roomVar.demon.numKlingonsKilled == 3)
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_011);
}
void Room::demon1UsePhaserOnKlingon1() {
@@ -325,17 +406,17 @@ void Room::demon1KlingonDropsHand() {
loadActorAnim(13, "klghnd", 0x10b, 0x8e, 0);
_awayMission->disableInput = 0;
_awayMission->timers[1] = 0;
- showDescription(20, true);
+ showDescription(TX_DEM1N020);
if (_awayMission->crewDownBitset & (1 << OBJECT_REDSHIRT))
return;
- showText(TX_SPEAKER_EVERTS, 25, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM1_025);
if (_roomVar.demon.numKlingonsKilled == 3)
return;
- showText(TX_SPEAKER_KLINGON, 23 + FOLLOWUP_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_KLINGON, TX_DEM1_F23);
_awayMission->timers[1] = 1;
}
@@ -410,50 +491,49 @@ void Room::demon1Timer5Expired() {
if (_awayMission->crewDownBitset != 0)
return;
- showText(TX_SPEAKER_UHURA, 77, true);
- showText(TX_SPEAKER_KIRK, 3, true);
- showText(TX_SPEAKER_UHURA, 78, true);
- showText(TX_SPEAKER_KIRK, 2, true);
- showText(TX_SPEAKER_SPOCK, 20, true);
- showText(TX_SPEAKER_KIRK, 4, true);
- showText(TX_SPEAKER_SPOCK, 21, true);
+ showText(TX_SPEAKER_UHURA, TX_DEM1U077);
+ showText(TX_SPEAKER_KIRK, TX_DEM1_003);
+ showText(TX_SPEAKER_UHURA, TX_DEM1U078);
+ showText(TX_SPEAKER_KIRK, TX_DEM1_002);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_020);
+ showText(TX_SPEAKER_KIRK, TX_DEM1_004);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_021);
}
-
void Room::demon1UseMTricorderOnKlingon() {
loadActorAnim2(OBJECT_MCCOY, "mscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_012);
}
void Room::demon1UseSTricorderOnTulips() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_007);
}
void Room::demon1UseSTricorderOnPods() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 8, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_008);
}
void Room::demon1UseSTricorderOnCattails() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_005);
}
void Room::demon1UseSTricorderOnFerns() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_006);
}
void Room::demon1UseSTricorderOnHand() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 17, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_017);
}
void Room::demon1UseSTricorderOnKlingon1() {
@@ -464,17 +544,17 @@ void Room::demon1UseSTricorderOnKlingon1() {
playSoundEffectIndex(0x04);
if (_roomVar.demon.numKlingonsKilled == 3 && !_awayMission->demon.tookKlingonHand && _rdfData[0xcf] != 1) {
- showText(TX_SPEAKER_SPOCK, 18, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_018);
_rdfData[0xcf] = 1;
} else {
- showText(TX_SPEAKER_SPOCK, 19, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_019);
}
}
void Room::demon1UseSTricorderOnKlingon2Or3() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 19, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_019);
}
void Room::demon1UseMTricorderOnKirk() {
@@ -495,7 +575,7 @@ void Room::demon1UseMTricorderOnRedshirt() {
void Room::demon1UseMTricorderOnCrewman() {
loadActorAnim2(OBJECT_MCCOY, "mscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_009);
}
void Room::demon1GetHand() {
@@ -519,96 +599,96 @@ void Room::demon1PickedUpHand() {
void Room::demon1FinishedGettingHand() {
if (_awayMission->demon.tookKlingonHand)
- showDescription(5, true);
+ showDescription(TX_DEM1N005);
else {
_awayMission->demon.tookKlingonHand = true;
giveItem(OBJECT_IHAND);
- showDescription(7, true);
+ showDescription(TX_DEM1N007);
}
}
void Room::demon1LookAtKlingon() {
- showDescription(4, true);
+ showDescription(TX_DEM1N004);
}
void Room::demon1LookAtCattails() {
- showDescription(18, true);
+ showDescription(TX_DEM1N018);
}
void Room::demon1LookAtTulips() {
- showDescription(10, true);
+ showDescription(TX_DEM1N010);
}
void Room::demon1LookAtPods() {
- showDescription(19, true);
+ showDescription(TX_DEM1N019);
}
void Room::demon1LookAtFerns() {
- showDescription(9, true);
+ showDescription(TX_DEM1N009);
}
void Room::demon1LookAtStream() {
- showDescription(11, true);
+ showDescription(TX_DEM1N011);
}
void Room::demon1LookAtMine() {
- showDescription(21, true);
+ showDescription(TX_DEM1N021);
}
void Room::demon1LookAtMountain() {
- showDescription(16, true);
+ showDescription(TX_DEM1N016);
}
void Room::demon1LookAtHand() {
- showDescription(23, true);
+ showDescription(TX_DEM1N023);
}
void Room::demon1LookAnywhere() {
- showDescription(17, true);
+ showDescription(TX_DEM1N017);
}
void Room::demon1LookAtKirk() {
if (_awayMission->crewDownBitset & (1 << OBJECT_KIRK))
- showDescription(12, true);
+ showDescription(TX_DEM1N012);
else
- showDescription(3, true);
+ showDescription(TX_DEM1N003);
}
void Room::demon1LookAtSpock() {
if (_awayMission->crewDownBitset & (1 << OBJECT_SPOCK))
- showDescription(15, true);
+ showDescription(TX_DEM1N015);
else
- showDescription(8, true);
+ showDescription(TX_DEM1N008);
}
void Room::demon1LookAtMcCoy() {
if (_awayMission->crewDownBitset & (1 << OBJECT_MCCOY))
- showDescription(13, true);
+ showDescription(TX_DEM1N013);
else
- showDescription(1, true);
+ showDescription(TX_DEM1N001);
}
void Room::demon1LookAtRedshirt() {
if (_awayMission->crewDownBitset & (1 << OBJECT_REDSHIRT))
- showDescription(14, true);
+ showDescription(TX_DEM1N014);
else
- showDescription(2, true);
+ showDescription(TX_DEM1N002);
}
void Room::demon1TalkToKirk() {
if (_awayMission->crewDownBitset & (1 << OBJECT_KIRK))
demon1TalkToUnconsciousCrewman();
else if (_roomVar.demon.numKlingonsKilled == 3)
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM1_001);
}
void Room::demon1TalkToSpock() {
if (_awayMission->crewDownBitset & (1 << OBJECT_SPOCK))
demon1TalkToUnconsciousCrewman();
else {
- showText(TX_SPEAKER_SPOCK, 22, true);
- showText(TX_SPEAKER_MCCOY, 13, true);
- showText(TX_SPEAKER_SPOCK, 24, true);
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_022);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_013);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_024);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_014);
}
}
@@ -616,8 +696,8 @@ void Room::demon1TalkToMcCoy() {
if (_awayMission->crewDownBitset & (1 << OBJECT_MCCOY))
demon1TalkToUnconsciousCrewman();
else {
- showText(TX_SPEAKER_MCCOY, 15, true);
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM1_015);
+ showText(TX_SPEAKER_SPOCK, TX_DEM1_023);
}
}
@@ -625,16 +705,15 @@ void Room::demon1TalkToRedshirt() {
if (_awayMission->crewDownBitset & (1 << OBJECT_REDSHIRT))
demon1TalkToUnconsciousCrewman();
else
- showText(TX_SPEAKER_EVERTS, 26, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM1_026);
}
// FIXME: this doesn't happen in actual game? (does the event get blocked from higher up?)
void Room::demon1TalkToUnconsciousCrewman() {
const char *text[] = {
- nullptr,
- "Zzzzz....",
- ""
- };
+ nullptr,
+ "Zzzzz....",
+ ""};
showRoomSpecificText(text);
}
diff --git a/engines/startrek/rooms/demon2.cpp b/engines/startrek/rooms/demon2.cpp
index 966ea1d89c..2ee04bcb9d 100644
--- a/engines/startrek/rooms/demon2.cpp
+++ b/engines/startrek/rooms/demon2.cpp
@@ -67,6 +67,63 @@ extern const RoomAction demon2ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum demon2TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_DEM2_001, TX_DEM2_002, TX_DEM2_003, TX_DEM2_004, TX_DEM2_005,
+ TX_DEM2_006, TX_DEM2_007, TX_DEM2_008, TX_DEM2_009, TX_DEM2_010,
+ TX_DEM2_011, TX_DEM2_012, TX_DEM2_013, TX_DEM2_014, TX_DEM2_015,
+ TX_DEM2_016, TX_DEM2_017, TX_DEM2_018, TX_DEM2_019, TX_DEM2_020,
+ TX_DEM2N000, TX_DEM2N002, TX_DEM2N003, TX_DEM2N004, TX_DEM2N005,
+ TX_DEM2N006, TX_DEM2N007, TX_DEM2N008, TX_DEM2N009, TX_DEM2N010,
+ TX_DEM2N011, TX_DEM2N012, TX_DEM2N013
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon2TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 2890, 0 },
+ { TX_SPEAKER_MCCOY, 2901, 0 },
+ { TX_SPEAKER_SPOCK, 2911, 0 },
+ { TX_SPEAKER_EVERTS, 2921, 0 },
+ { TX_DEM2_001, 3275, 0 },
+ { TX_DEM2_002, 3732, 0 },
+ { TX_DEM2_003, 4228, 0 },
+ { TX_DEM2_004, 3912, 0 },
+ { TX_DEM2_005, 1613, 0 },
+ { TX_DEM2_006, 1466, 0 },
+ { TX_DEM2_007, 1336, 0 },
+ { TX_DEM2_008, 1161, 0 },
+ { TX_DEM2_009, 1963, 0 },
+ { TX_DEM2_010, 2071, 0 },
+ { TX_DEM2_011, 1050, 0 },
+ { TX_DEM2_012, 2212, 0 },
+ { TX_DEM2_013, 1869, 0 },
+ { TX_DEM2_014, 2384, 0 },
+ { TX_DEM2_015, 3346, 0 },
+ { TX_DEM2_016, 3561, 0 },
+ { TX_DEM2_017, 3414, 0 },
+ { TX_DEM2_018, 4111, 0 },
+ { TX_DEM2_019, 3618, 0 },
+ { TX_DEM2_020, 3791, 0 },
+ { TX_DEM2N000, 3197, 0 },
+ { TX_DEM2N002, 2935, 0 },
+ { TX_DEM2N003, 3117, 0 },
+ { TX_DEM2N004, 3014, 0 },
+ { TX_DEM2N005, 586, 0 },
+ { TX_DEM2N006, 710, 0 },
+ { TX_DEM2N007, 405, 0 },
+ { TX_DEM2N008, 454, 0 },
+ { TX_DEM2N009, 357, 0 },
+ { TX_DEM2N010, 637, 0 },
+ { TX_DEM2N011, 785, 0 },
+ { TX_DEM2N012, 503, 0 },
+ { TX_DEM2N013, 2529, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon2Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::demon2Tick1() {
playVoc("DEM2LOOP");
}
@@ -85,91 +142,91 @@ void Room::demon2TouchedWarp1() {
}
void Room::demon2LookAtCave() {
- showDescription(9, true);
+ showDescription(TX_DEM2N009);
}
void Room::demon2LookAtMountain() {
- showDescription(7, true);
+ showDescription(TX_DEM2N007);
}
void Room::demon2LookAtBerries() {
- showDescription(12, true);
+ showDescription(TX_DEM2N012);
}
void Room::demon2LookAtFern() {
- showDescription(5, true);
+ showDescription(TX_DEM2N005);
}
void Room::demon2LookAtMoss() {
- showDescription(10, true);
+ showDescription(TX_DEM2N010);
}
void Room::demon2LookAtLights() {
- showDescription(6, true);
+ showDescription(TX_DEM2N006);
}
void Room::demon2LookAtAnything() {
- showDescription(11, true);
+ showDescription(TX_DEM2N011);
}
void Room::demon2LookAtKirk() {
- showDescription(2, true);
+ showDescription(TX_DEM2N002);
}
void Room::demon2LookAtSpock() {
- showDescription(4, true);
+ showDescription(TX_DEM2N004);
}
void Room::demon2LookAtMcCoy() {
- showDescription(3, true);
+ showDescription(TX_DEM2N003);
}
void Room::demon2LookAtRedshirt() {
- showDescription(0, true);
+ showDescription(TX_DEM2N000);
}
void Room::demon2TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM2_001);
}
void Room::demon2TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 18, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_018);
+ showText(TX_SPEAKER_KIRK, TX_DEM2_003);
}
void Room::demon2TalkToMcCoy() {
- showText(TX_SPEAKER_MCCOY, 15, true);
- showText(TX_SPEAKER_SPOCK, 17, true);
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_015);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_017);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_016);
}
void Room::demon2TalkToRedshirt() {
- showText(TX_SPEAKER_EVERTS, 19, true);
- showText(TX_SPEAKER_KIRK, 2, true);
- showText(TX_SPEAKER_EVERTS, 20, true);
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM2_019);
+ showText(TX_SPEAKER_KIRK, TX_DEM2_002);
+ showText(TX_SPEAKER_EVERTS, TX_DEM2_020);
+ showText(TX_SPEAKER_KIRK, TX_DEM2_004);
}
void Room::demon2UsePhaserOnBerries() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_011);
}
void Room::demon2UseSTricorderOnBerries() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 8, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_008);
}
void Room::demon2UseSTricorderOnMoss() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_007);
}
void Room::demon2UseSTricorderOnFern() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_006);
}
void Room::demon2UseSTricorderOnCave() {
@@ -177,7 +234,7 @@ void Room::demon2UseSTricorderOnCave() {
playSoundEffectIndex(0x04);
// NOTE: audio file for this is empty.
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM2_005);
}
void Room::demon2UseMTricorderOnBerries() {
@@ -185,18 +242,18 @@ void Room::demon2UseMTricorderOnBerries() {
playSoundEffectIndex(0x04);
if (_awayMission->demon.curedChub)
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_013);
else if (_awayMission->demon.madeHypoDytoxin)
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_009);
else if (_awayMission->demon.knowAboutHypoDytoxin)
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_010);
else
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_012);
}
void Room::demon2GetBerries() {
if (_awayMission->demon.gotBerries)
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM2_014);
else
walkCrewman(OBJECT_KIRK, 0xe8, 0x97, 1);
}
@@ -207,7 +264,7 @@ void Room::demon2ReachedBerries() {
}
void Room::demon2PickedUpBerries() {
- showDescription(13, true);
+ showDescription(TX_DEM2N013);
giveItem(OBJECT_IBERRY);
_awayMission->demon.gotBerries = true;
_awayMission->demon.missionScore += 1;
diff --git a/engines/startrek/rooms/demon3.cpp b/engines/startrek/rooms/demon3.cpp
index 11c270f3cb..0ab5d46dd0 100644
--- a/engines/startrek/rooms/demon3.cpp
+++ b/engines/startrek/rooms/demon3.cpp
@@ -119,7 +119,97 @@ extern const RoomAction demon3ActionList[] = {
{ {ACTION_LOOK, 0x20, 0, 0}, &Room::demon3LookAtPanel },
{ {ACTION_LOOK, 8, 0, 0}, &Room::demon3LookAtLight },
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
+};
+
+enum demon3TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_KANDREY,
+ TX_DEM3_001, TX_DEM3_002, TX_DEM3_003, TX_DEM3_004, TX_DEM3_005,
+ TX_DEM3_006, TX_DEM3_007, TX_DEM3_008, TX_DEM3_009, TX_DEM3_010,
+ TX_DEM3_011, TX_DEM3_012, TX_DEM3_013, TX_DEM3_014, TX_DEM3_015,
+ TX_DEM3_016, TX_DEM3_017, TX_DEM3_018, TX_DEM3_019, TX_DEM3_020,
+ TX_DEM3_021, TX_DEM3_022, TX_DEM3_023, TX_DEM3_024, TX_DEM3_025,
+ TX_DEM3_026, TX_DEM3_027, TX_DEM3_028, TX_DEM3_029, TX_DEM3_030,
+ TX_DEM3_031, TX_DEM3_033, TX_DEM3_034, TX_DEM3_035, TX_DEM3_036,
+ TX_DEM3_A32, TX_DEM3_B32, TX_DEM3_F21, TX_DEM3N000, TX_DEM3N001,
+ TX_DEM3N002, TX_DEM3N003, TX_DEM3N004, TX_DEM3N005, TX_DEM3N006,
+ TX_DEM3N007, TX_DEM3N008, TX_DEM3N009, TX_DEM3N010, TX_DEM3N011,
+ TX_DEM3N012, TX_DEM3N013, TX_DEM3N014, TX_DEM3N015, TX_DEM3N016,
+ TX_DEM3N017, TX_DEM3N018, TX_DEM3N019, TX_DEM3N020
+};
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon3TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 6011, 0 },
+ { TX_SPEAKER_MCCOY, 6022, 0 },
+ { TX_SPEAKER_SPOCK, 6032, 0 },
+ { TX_SPEAKER_EVERTS, 6042, 0 },
+ { TX_SPEAKER_KANDREY, 6056, 0 },
+ { TX_DEM3_001, 7134, 0 },
+ { TX_DEM3_002, 6521, 0 },
+ { TX_DEM3_003, 6854, 0 },
+ { TX_DEM3_004, 7058, 0 },
+ { TX_DEM3_005, 3794, 0 },
+ { TX_DEM3_006, 1957, 0 },
+ { TX_DEM3_007, 1747, 0 },
+ { TX_DEM3_008, 2585, 0 },
+ { TX_DEM3_009, 2714, 0 },
+ { TX_DEM3_010, 7277, 0 },
+ { TX_DEM3_011, 8332, 0 },
+ { TX_DEM3_012, 7918, 0 },
+ { TX_DEM3_013, 1634, 0 },
+ { TX_DEM3_014, 4494, 0 },
+ { TX_DEM3_015, 4174, 0 },
+ { TX_DEM3_016, 3603, 0 },
+ { TX_DEM3_017, 7606, 0 },
+ { TX_DEM3_018, 7876, 0 },
+ { TX_DEM3_019, 8548, 0 },
+ { TX_DEM3_020, 7174, 0 },
+ { TX_DEM3_021, 7520, 0 },
+ { TX_DEM3_022, 7572, 0 },
+ { TX_DEM3_023, 7434, 0 },
+ { TX_DEM3_024, 6877, 0 },
+ { TX_DEM3_025, 6781, 0 },
+ { TX_DEM3_026, 6659, 0 },
+ { TX_DEM3_027, 8059, 0 },
+ { TX_DEM3_028, 6704, 0 },
+ { TX_DEM3_029, 6627, 0 },
+ { TX_DEM3_030, 3120, 0 },
+ { TX_DEM3_031, 3031, 0 },
+ { TX_DEM3_033, 7728, 0 },
+ { TX_DEM3_034, 7820, 0 },
+ { TX_DEM3_035, 7771, 0 },
+ { TX_DEM3_036, 6927, 0 },
+ { TX_DEM3_A32, 3326, 0 },
+ { TX_DEM3_B32, 7852, 0 },
+ { TX_DEM3_F21, 8642, 0 },
+ { TX_DEM3N000, 6418, 0 },
+ { TX_DEM3N001, 6134, 0 },
+ { TX_DEM3N002, 6197, 0 },
+ { TX_DEM3N003, 6292, 0 },
+ { TX_DEM3N004, 6077, 0 },
+ { TX_DEM3N005, 7696, 0 },
+ { TX_DEM3N006, 6345, 0 },
+ { TX_DEM3N007, 8394, 0 },
+ { TX_DEM3N008, 8469, 0 },
+ { TX_DEM3N009, 8288, 0 },
+ { TX_DEM3N010, 4772, 0 },
+ { TX_DEM3N011, 4995, 0 },
+ { TX_DEM3N012, 5547, 0 },
+ { TX_DEM3N013, 5077, 0 },
+ { TX_DEM3N013, 5187, 0 },
+ { TX_DEM3N014, 5621, 0 },
+ { TX_DEM3N015, 5805, 0 },
+ { TX_DEM3N016, 5410, 0 },
+ { TX_DEM3N017, 4680, 0 },
+ { TX_DEM3N018, 4852, 0 },
+ { TX_DEM3N019, 5704, 0 },
+ { TX_DEM3N020, 5297, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon3Texts[] = {
+ { -1, Common::UNK_LANG, "" }
};
void Room::demon3Tick1() {
@@ -183,13 +273,13 @@ void Room::demon3Timer1Expired() {
// Door just opened
void Room::demon3Timer3Expired() {
if (_awayMission->demon.repairedHand) {
- showDescription(8, true);
+ showDescription(TX_DEM3N008);
loadActorAnim(14, "door", 0x82, 0xc, 0);
loadMapFile("demon3");
_awayMission->demon.doorOpened = true;
_awayMission->demon.missionScore += 2;
} else {
- showDescription(7, true);
+ showDescription(TX_DEM3N007);
}
}
@@ -210,7 +300,7 @@ void Room::demon3FinishedAnimation2() {
void Room::demon3FinishedWalking5() {
loadActorAnim2(OBJECT_MCCOY, "mscanw", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_019);
_awayMission->disableInput = false;
}
@@ -277,9 +367,9 @@ void Room::demon3FireAtBoulder() {
// This should never happen (in the original game, this would cause a stack
// misalignment?
const char *text[] = {
- "wes",
- "There is a boulder check error.",
- ""
+ "wes",
+ "There is a boulder check error.",
+ ""
};
showRoomSpecificText(text);
break;
@@ -296,11 +386,11 @@ void Room::demon3FireAtBoulder() {
void Room::demon3UsePhaserOnRedshirt() {
if (!_awayMission->redshirtDead)
return;
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_013);
}
void Room::demon3UseStunPhaserOnBoulder() {
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_007);
}
void Room::demon3UsePhaserOnBoulder1() {
@@ -334,7 +424,7 @@ void Room::demon3UsePhaserOnBoulder3() {
strcpy(_roomVar.demon.boulderAnim, "s0r3s1");
demon3BoulderCommon();
} else {
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_006);
}
}
@@ -351,7 +441,7 @@ void Room::demon3UsePhaserOnBoulder4() {
} else {
// BUGFIX: In the original, the audio didn't play, despite the file existing (and
// despite it being used for the boulder on the left).
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_006);
}
}
@@ -366,7 +456,7 @@ void Room::demon3BoulderCommon() {
if (_roomVar.demon.inFiringPosition) {
demon3PullOutPhaserAndFireAtBoulder();
} else {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM3_001);
walkCrewman(OBJECT_KIRK, 0x79, 0xa0, 1);
walkCrewman(OBJECT_SPOCK, 0xae, 0xb4, 2);
@@ -382,13 +472,13 @@ void Room::demon3BoulderCommon() {
void Room::demon3UseSTricorderOnMiner() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 8, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_008);
}
void Room::demon3UseSTricorderOnPanel() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 9, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_009);
}
void Room::demon3UseSTricorderOnBoulder() {
@@ -396,7 +486,7 @@ void Room::demon3UseSTricorderOnBoulder() {
return;
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 10, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_010);
}
void Room::demon3UseMTricorderOnBoulder() {
@@ -404,13 +494,13 @@ void Room::demon3UseMTricorderOnBoulder() {
return;
loadActorAnim2(OBJECT_MCCOY, "mscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_020);
}
void Room::demon3UseCrewmanOnPanel() {
if (_awayMission->demon.numBouldersGone != 4 || _awayMission->redshirtDead)
return;
- showText(TX_SPEAKER_EVERTS, 31, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM3_031);
demon3UseRedshirtOnPanel();
}
@@ -419,7 +509,7 @@ void Room::demon3UseRedshirtOnPanel() {
return;
if (_awayMission->demon.numBouldersGone != 4)
- showText(TX_SPEAKER_EVERTS, 30, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM3_030);
else
walkCrewman(OBJECT_REDSHIRT, 0xd8, 0x70, 8);
}
@@ -443,52 +533,52 @@ void Room::demon3RedshirtUsedPanel() {
_awayMission->demon.field45 = true;
} else {
const TextRef textTable[] = {
- 5,
- 33,
- 35,
- 34,
+ TX_DEM3N005,
+ TX_DEM3_033,
+ TX_DEM3_035,
+ TX_DEM3_034,
};
TextRef text[] = {
- TX_SPEAKER_EVERTS,
- TX_NULL,
- TX_BLANK
+ TX_SPEAKER_EVERTS,
+ TX_EMPTY,
+ TX_END
};
text[1] = textTable[_awayMission->demon.field41 - 1];
- showMultipleTexts(text, true);
+ showMultipleTexts(text);
walkCrewman(OBJECT_REDSHIRT, 0xbe, 0x9b, 0);
}
}
void Room::demon3RedshirtElectrocuted() {
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_018);
}
void Room::demon3UseSTricorderOnDoor() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 12, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_012);
}
void Room::demon3UseSTricorderOnAnything() {
loadActorAnim2(OBJECT_SPOCK, "sscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 27, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_027);
}
void Room::demon3UseMTricorderOnDoor() {
loadActorAnim2(OBJECT_SPOCK, "mscann", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_016);
}
void Room::demon3UsePhaserOnDoor() {
_roomVar.demon.usedPhaserOnDoor++;
if (_roomVar.demon.usedPhaserOnDoor == 1)
- showDescription(9, true);
+ showDescription(TX_DEM3N009);
else if (_roomVar.demon.usedPhaserOnDoor == 2)
- showText(TX_SPEAKER_SPOCK, 11, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_011);
}
void Room::demon3UseHandOnPanel() {
@@ -497,7 +587,7 @@ void Room::demon3UseHandOnPanel() {
return;
walkCrewman(OBJECT_KIRK, 0xd8, 0x70, 7);
} else {
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_005);
}
}
@@ -518,15 +608,15 @@ void Room::demon3UseMTricorderOnMiner() {
playSoundEffectIndex(0x04);
if (_awayMission->demon.minerDead) {
- showText(TX_SPEAKER_MCCOY, 22, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_022);
} else {
- showText(TX_SPEAKER_MCCOY, 23, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_023);
}
}
void Room::demon3UseMedkitOnMiner() {
if (_awayMission->demon.healedMiner) {
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_015);
} else {
walkCrewman(OBJECT_MCCOY, 0xe6, 0x7b, 6);
_roomVar.demon.inFiringPosition = false;
@@ -540,9 +630,9 @@ void Room::demon3McCoyReachedMiner() {
void Room::demon3McCoyFinishedHealingMiner() {
if (_awayMission->demon.minerDead) {
- showText(TX_SPEAKER_MCCOY, 22, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_022);
} else {
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_021);
_awayMission->demon.healedMiner = true;
loadActorAnim2(13, "drmine", 0xda, 0x6c, 0);
_awayMission->demon.missionScore += 2;
@@ -551,110 +641,110 @@ void Room::demon3McCoyFinishedHealingMiner() {
}
void Room::demon3GetMiner() {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_017);
}
void Room::demon3TalkToMiner() {
if (!_awayMission->demon.healedMiner)
return;
- showText(TX_SPEAKER_KANDREY, 21 + FOLLOWUP_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_KANDREY, TX_DEM3_F21);
}
void Room::demon3TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 2, true);
- showText(TX_SPEAKER_SPOCK, 29, true);
- showText(TX_SPEAKER_MCCOY, 26, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM3_002);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_029);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_026);
}
void Room::demon3TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM3_028);
}
void Room::demon3TalkToMccoy() {
if (_awayMission->redshirtDead) {
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_014);
} else {
- showText(TX_SPEAKER_MCCOY, 25, true);
- showText(TX_SPEAKER_KIRK, 3, true);
- showText(TX_SPEAKER_MCCOY, 24, true);
-
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_025);
+ showText(TX_SPEAKER_KIRK, TX_DEM3_003);
+ showText(TX_SPEAKER_MCCOY, TX_DEM3_024);
}
}
void Room::demon3TalkToRedshirt() {
// FIXME: this shouldn't work if he's dead. Should it check higher up whether that's
// the case?
- showText(TX_SPEAKER_EVERTS, 36, true);
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM3_036);
+ showText(TX_SPEAKER_KIRK, TX_DEM3_004);
}
void Room::demon3LookAtKirk() {
- showDescription(4, true);
+ showDescription(TX_DEM3N004);
}
void Room::demon3LookAtSpock() {
- showDescription(1, true);
+ showDescription(TX_DEM3N001);
}
void Room::demon3LookAtMccoy() {
- showDescription(2, true);
+ showDescription(TX_DEM3N002);
}
void Room::demon3LookAtRedshirt() {
if (_awayMission->redshirtDead) {
- showDescription(17, true);
+ showDescription(TX_DEM3N017);
// NOTE: there's an alternate string that isn't used? (TX_DEM3N018)
} else {
- showDescription(3, true);
+ showDescription(TX_DEM3N003);
}
}
void Room::demon3LookAnywhere() {
- showDescription(10, true);
+ showDescription(TX_DEM3N010);
}
void Room::demon3LookAtMiner() {
if (_awayMission->demon.healedMiner) {
- showDescription(0, true);
+ showDescription(TX_DEM3N000);
} else {
- showDescription(6, true);
+ showDescription(TX_DEM3N006);
}
}
void Room::demon3LookAtBoulder1() {
- showDescription(11, true);
+ showDescription(TX_DEM3N011);
}
void Room::demon3LookAtBoulder2() {
- showDescription(13, true);
+ showDescription(TX_DEM3N013);
}
void Room::demon3LookAtBoulder3() {
- showDescription(13, true);
+ showDescription(TX_DEM3N013);
}
void Room::demon3LookAtBoulder4() {
- showDescription(20, true);
+ showDescription(TX_DEM3N020);
}
void Room::demon3LookAtStructure() {
- showDescription(16, true);
+ showDescription(TX_DEM3N016);
}
void Room::demon3LookAtDoor() {
if (_awayMission->demon.doorOpened) {
- showDescription(14, true);
+ showDescription(TX_DEM3N014);
} else {
- showDescription(12, true);
+ showDescription(TX_DEM3N012);
}
}
void Room::demon3LookAtPanel() {
- showDescription(19, true);
+ showDescription(TX_DEM3N019);
}
void Room::demon3LookAtLight() {
- showDescription(15, true);
+ showDescription(TX_DEM3N015);
}
+
}
diff --git a/engines/startrek/rooms/demon4.cpp b/engines/startrek/rooms/demon4.cpp
index e3c8ea8610..78a3fdd71f 100644
--- a/engines/startrek/rooms/demon4.cpp
+++ b/engines/startrek/rooms/demon4.cpp
@@ -95,6 +95,98 @@ extern const RoomAction demon4ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum demon4TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_NAUIAN, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_DEM4_001, TX_DEM4_002, TX_DEM4_003, TX_DEM4_004, TX_DEM4_005,
+ TX_DEM4_006, TX_DEM4_007, TX_DEM4_008, TX_DEM4_009, TX_DEM4_010,
+ TX_DEM4_011, TX_DEM4_012, TX_DEM4_013, TX_DEM4_014, TX_DEM4_015,
+ TX_DEM4_017, TX_DEM4_018, TX_DEM4_019, TX_DEM4_020, TX_DEM4_021,
+ TX_DEM4_022, TX_DEM4_023, TX_DEM4_024, TX_DEM4_025, TX_DEM4_026,
+ TX_DEM4_027, TX_DEM4_029, TX_DEM4_030, TX_DEM4_031, TX_DEM4_032,
+ TX_DEM4_033, TX_DEM4_034, TX_DEM4_035, TX_DEM4_036, TX_DEM4_037,
+ TX_DEM4_038, TX_DEM4_039, TX_DEM4_040, TX_DEM4_041, TX_DEM4_042,
+ TX_DEM4_043, TX_DEM4_044, TX_DEM4_045, TX_DEM4_046, TX_DEM4_047,
+ TX_DEM4N000, TX_DEM4N001, TX_DEM4N002, TX_DEM4N003, TX_DEM4N004,
+ TX_DEM4N005, TX_DEM4N006, TX_DEM4N007, TX_DEM4N008, TX_DEM4N009,
+ TX_DEM4N010, TX_DEM4N011, TX_DEM4N012, TX_DEM4N013, TX_DEM4N014,
+ TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon4TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 3902, 0 },
+ { TX_SPEAKER_NAUIAN, 3913, 0 },
+ { TX_SPEAKER_MCCOY, 3920, 0 },
+ { TX_SPEAKER_SPOCK, 3930, 0 },
+ { TX_SPEAKER_EVERTS, 3940, 0 },
+ { TX_DEM4_001, 2980, 0 },
+ { TX_DEM4_002, 4032, 0 },
+ { TX_DEM4_003, 9925, 0 },
+ { TX_DEM4_004, 4097, 0 },
+ { TX_DEM4_005, 9991, 0 },
+ { TX_DEM4_006, 9774, 0 },
+ { TX_DEM4_007, 5073, 0 },
+ { TX_DEM4_008, 5030, 0 },
+ { TX_DEM4_009, 4210, 0 },
+ { TX_DEM4_010, 596, 0 },
+ { TX_DEM4_011, 1055, 0 },
+ { TX_DEM4_012, 3195, 0 },
+ { TX_DEM4_013, 8780, 0 },
+ { TX_DEM4_014, 7484, 0 },
+ { TX_DEM4_015, 6822, 0 },
+ { TX_DEM4_017, 9415, 0 },
+ { TX_DEM4_018, 8903, 0 },
+ { TX_DEM4_019, 7104, 0 },
+ { TX_DEM4_020, 7376, 0 },
+ { TX_DEM4_021, 7334, 0 },
+ { TX_DEM4_022, 7172, 0 },
+ { TX_DEM4_023, 7999, 0 },
+ { TX_DEM4_024, 6882, 0 },
+ { TX_DEM4_025, 7756, 0 },
+ { TX_DEM4_026, 8239, 0 },
+ { TX_DEM4_027, 8146, 0 },
+ { TX_DEM4_029, 8429, 0 },
+ { TX_DEM4_030, 914, 0 },
+ { TX_DEM4_031, 1971, 0 },
+ { TX_DEM4_032, 8718, 0 },
+ { TX_DEM4_033, 8637, 0 },
+ { TX_DEM4_034, 9051, 0 },
+ { TX_DEM4_035, 755, 0 },
+ { TX_DEM4_036, 9539, 0 },
+ { TX_DEM4_037, 6019, 0 },
+ { TX_DEM4_038, 5821, 0 },
+ { TX_DEM4_039, 4845, 0 },
+ { TX_DEM4_040, 5272, 0 },
+ { TX_DEM4_041, 5130, 0 },
+ { TX_DEM4_042, 4310, 0 },
+ { TX_DEM4_043, 4476, 0 },
+ { TX_DEM4_044, 3955, 0 },
+ { TX_DEM4_045, 8836, 0 },
+ { TX_DEM4_046, 7055, 0 },
+ { TX_DEM4_047, 7305, 0 },
+ { TX_DEM4N000, 6576, 0 },
+ { TX_DEM4N001, 6667, 0 },
+ { TX_DEM4N002, 6301, 0 },
+ { TX_DEM4N003, 6765, 0 },
+ { TX_DEM4N004, 6715, 0 },
+ { TX_DEM4N005, 6613, 0 },
+ { TX_DEM4N006, 10194, 0 },
+ { TX_DEM4N007, 6491, 0 },
+ { TX_DEM4N008, 6419, 0 },
+ { TX_DEM4N009, 10116, 0 },
+ { TX_DEM4N010, 6365, 0 },
+ { TX_DEM4N011, 8924, 0 },
+ { TX_DEM4N012, 2666, 0 },
+ { TX_DEM4N013, 2868, 0 },
+ { TX_DEM4N014, 1602, 0 },
+ { TX_DIALOG_ERROR, 10252, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon4Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
// TODO: this room should have animations on computer terminals, but this isn't where
// they're implemented. Could be related to ".BAN" files which rooms can load?
@@ -130,7 +222,7 @@ void Room::demon4FinishedAnimation1() {
void Room::demon4FinishedAnimation2() {
if (!_roomVar.demon.cd) {
_roomVar.demon.cd = true;
- showDescription(11, true);
+ showDescription(TX_DEM4N011);
}
showGameOverMenu();
@@ -142,10 +234,10 @@ void Room::demon4FinishedAnimation2() {
}
void Room::demon4FinishedAnimation3() {
- showText(TX_SPEAKER_NAUIAN, 34, true);
- showText(TX_SPEAKER_KIRK, 10, true);
- showText(TX_SPEAKER_NAUIAN, 35, true);
- showText(TX_SPEAKER_SPOCK, 30, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_034);
+ showText(TX_SPEAKER_KIRK, TX_DEM4_010);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_035);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_030);
_awayMission->disableInput = true;
_awayMission->demon.missionScore += 5;
@@ -162,7 +254,7 @@ void Room::demon4Timer0Expired() {
// Mission end
void Room::demon4Timer1Expired() {
- showText(TX_SPEAKER_KIRK, 11, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM4_011);
walkCrewman(OBJECT_KIRK, 0xbe, 0xa5, 4);
walkCrewman(OBJECT_SPOCK, 0xb4, 0x9b, 4);
@@ -204,15 +296,15 @@ void Room::demon4Timer5Expired() {
}
void Room::demon4Timer6Expired() {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_017);
}
void Room::demon4UsePhaserOnNauian() {
if (!_roomVar.demon.triedToShootNauian) { // Lenient the first time
- showText(TX_SPEAKER_NAUIAN, 33, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_033);
_roomVar.demon.triedToShootNauian = true;
} else { // Murdery the second time
- showText(TX_SPEAKER_NAUIAN, 32, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_032);
loadActorAnim2(10, "bxfire", 0, 0, 2);
playVoc("V0SPOCKT");
_awayMission->disableInput = true;
@@ -234,7 +326,7 @@ void Room::demon4KirkReachedSecurityEquipment() {
void Room::demon4KirkFinishedUsingSecurityEquipment() {
_awayMission->disableInput = false;
- showDescription(14, true);
+ showDescription(TX_DEM4N014);
}
void Room::demon4UseMetalOnNauian() {
@@ -254,10 +346,10 @@ void Room::demon4UseSkullOnNauian() {
}
void Room::demon4KirkReachedNauianWithSkull() {
- showText(TX_SPEAKER_NAUIAN, 36, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_036);
- const TextRef choices[] = {TX_SPEAKER_KIRK, 6, 3, 5, TX_BLANK};
- int choice = showMultipleTexts(choices, true);
+ const TextRef choices[] = { TX_SPEAKER_KIRK, TX_DEM4_006, TX_DEM4_003, TX_DEM4_005, TX_END };
+ int choice = showMultipleTexts(choices);
switch (choice) {
case 0:
@@ -279,15 +371,15 @@ void Room::demon4KirkReachedNauianWithSkull() {
}
void Room::demon4UsePhaserOnPanel() {
- showText(TX_SPEAKER_SPOCK, 13, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_013);
}
void Room::demon4UsePhaserOnPattern() {
- showText(TX_SPEAKER_SPOCK, 45, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_045);
}
void Room::demon4UsePhaserOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_018);
}
void Room::demon4TalkToNauian() {
@@ -295,22 +387,22 @@ void Room::demon4TalkToNauian() {
if (!_awayMission->demon.metNauian) {
_awayMission->demon.metNauian = true;
- showText(TX_SPEAKER_NAUIAN, 44, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_044);
- const TextRef choices[] = {TX_SPEAKER_KIRK, 2, 4, 9, TX_BLANK};
- int choice = showMultipleTexts(choices, true);
+ const TextRef choices[] = { TX_SPEAKER_KIRK, TX_DEM4_002, TX_DEM4_004, TX_DEM4_009, TX_END };
+ int choice = showMultipleTexts(choices);
switch (choice) {
case 0:
_awayMission->demon.field2d = true;
- showText(TX_SPEAKER_NAUIAN, 42, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_042);
break;
case 1:
break;
case 2:
- showText(TX_SPEAKER_NAUIAN, 39, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_039);
break;
default:
@@ -318,15 +410,15 @@ void Room::demon4TalkToNauian() {
break;
}
- showText(TX_SPEAKER_NAUIAN, 43, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_043);
- const TextRef choices2[] = {TX_SPEAKER_KIRK, 8, 7, TX_BLANK};
- choice = showMultipleTexts(choices2, true);
+ const TextRef choices2[] = { TX_SPEAKER_KIRK, TX_DEM4_008, TX_DEM4_007, TX_END };
+ choice = showMultipleTexts(choices2);
switch (choice) {
case 0:
_awayMission->demon.field2d = true;
- showText(TX_SPEAKER_NAUIAN, 41, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_041);
break;
case 1:
break;
@@ -335,70 +427,70 @@ void Room::demon4TalkToNauian() {
break;
}
- showText(TX_SPEAKER_NAUIAN, 40, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_040);
if (_roomVar.demon.disabledSecurity) { // Impossible condition?
- showText(TX_SPEAKER_NAUIAN, 37, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_037);
// BUGFIX: Originally all of these used no audio, despite the files existing
// (being used elsewhere).
- showText(TX_SPEAKER_KIRK, 10, true);
- showText(TX_SPEAKER_NAUIAN, 35, true);
- showText(TX_SPEAKER_SPOCK, 30, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM4_010);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_035);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_030);
_awayMission->disableInput = true;
_awayMission->demon.missionScore += 5;
_awayMission->timers[1] = 20;
} else {
- showText(TX_SPEAKER_NAUIAN, 38, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_038);
}
} else {
- showText(TX_SPEAKER_NAUIAN, 31, true);
+ showText(TX_SPEAKER_NAUIAN, TX_DEM4_031);
}
}
void Room::demon4LookAtPattern() {
- showDescription(2, true);
+ showDescription(TX_DEM4N002);
}
void Room::demon4LookAtAlien() {
- showDescription(7, true);
+ showDescription(TX_DEM4N007);
}
void Room::demon4LookAnywhere() {
- showDescription(4, true);
+ showDescription(TX_DEM4N004);
}
void Room::demon4LookAtSecurityEquipment() {
- showDescription(8, true);
+ showDescription(TX_DEM4N008);
}
void Room::demon4LookAtFloor() {
- showDescription(9, true);
+ showDescription(TX_DEM4N009);
}
void Room::demon4LookAtKirk() {
- showDescription(3, true);
+ showDescription(TX_DEM4N003);
}
void Room::demon4LookAtMccoy() {
- showDescription(0, true);
+ showDescription(TX_DEM4N000);
}
void Room::demon4LookAtSpock() {
- showDescription(5, true);
+ showDescription(TX_DEM4N005);
}
void Room::demon4LookAtRedshirt() {
- showDescription(1, true);
+ showDescription(TX_DEM4N001);
}
void Room::demon4LookAtChamber() {
- showDescription(6, true);
+ showDescription(TX_DEM4N006);
}
void Room::demon4LookAtPanel() {
- showDescription(12, true);
+ showDescription(TX_DEM4N012);
}
void Room::demon4UseKirkOnPanel() {
@@ -436,7 +528,7 @@ void Room::demon4CrewmanReachedPanel() {
_awayMission->demon.missionScore += 3;
_awayMission->timers[0] = 10;
} else
- showDescription(13, true);
+ showDescription(TX_DEM4N013);
walkCrewman(_roomVar.demon.crewmanUsingPanel, 0xae, 0x93, 0);
_awayMission->disableInput = false;
@@ -628,93 +720,93 @@ bool Room::demon4ShowSunPuzzle() {
}
void Room::demon4TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM4_001);
}
void Room::demon4TalkToMccoy() {
if (_roomVar.demon.nauianEmerged)
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_019);
else
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_015);
}
void Room::demon4TalkToSpock() {
if (_roomVar.demon.nauianEmerged)
- showText(TX_SPEAKER_SPOCK, 22, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_022);
else
- showText(TX_SPEAKER_SPOCK, 24, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_024);
}
void Room::demon4TalkToRedshirt() {
if (_roomVar.demon.nauianEmerged)
- showText(TX_SPEAKER_EVERTS, 47, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM4_047);
else
- showText(TX_SPEAKER_EVERTS, 46, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM4_046);
}
void Room::demon4UseSTricorderOnChamber() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 12, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_012);
}
void Room::demon4UseSTricorderOnPattern() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 14, true);
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_014);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_025);
}
void Room::demon4UseMTricorderOnPattern() {
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_021);
}
void Room::demon4UseSTricorderOnPanel() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 27, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_027);
}
void Room::demon4UseMTricorderOnPanel() {
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_MCCOY, 27, true); // BUG: Uses spock's voice (though speaker says "Mccoy")
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_027); // BUG: Uses spock's voice (though speaker says "Mccoy")
}
void Room::demon4UseSTricorderOnAnything() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_023);
}
void Room::demon4UseMTricorderOnAnything() {
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM4_020);
}
void Room::demon4UseSTricorderOnNauian() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 29, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_029);
}
void Room::demon4UseMTricorderOnNauian() {
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 29, true); // BUG: Uses spock's voice (speaker says "Spock" too)
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_029); // BUG: Uses spock's voice (speaker says "Spock" too)
}
void Room::demon4UseSTricorderOnSecurityEquipment() {
loadActorAnim2(OBJECT_SPOCK, "sscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 26, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_026);
}
void Room::demon4UseMTricorderOnSecurityEquipment() {
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 26, true); // BUG: Uses spock's voice (speaker says "Spock" too)
+ showText(TX_SPEAKER_SPOCK, TX_DEM4_026); // BUG: Uses spock's voice (speaker says "Spock" too)
}
} // namespace StarTrek
diff --git a/engines/startrek/rooms/demon5.cpp b/engines/startrek/rooms/demon5.cpp
index 8f44a3f5c4..71e5973467 100644
--- a/engines/startrek/rooms/demon5.cpp
+++ b/engines/startrek/rooms/demon5.cpp
@@ -80,6 +80,105 @@ extern const RoomAction demon5ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum demon5TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_ROBERTS, TX_SPEAKER_CHUB, TX_SPEAKER_GRISNASH, TX_SPEAKER_STEPHEN,
+ TX_DEM5_001, TX_DEM5_002, TX_DEM5_003, TX_DEM5_004, TX_DEM5_005,
+ TX_DEM5_006, TX_DEM5_007, TX_DEM5_008, TX_DEM5_009, TX_DEM5_010,
+ TX_DEM5_011, TX_DEM5_012, TX_DEM5_013, TX_DEM5_014, TX_DEM5_015,
+ TX_DEM5_016, TX_DEM5_017, TX_DEM5_018, TX_DEM5_019, TX_DEM5_020,
+ TX_DEM5_021, TX_DEM5_022, TX_DEM5_023, TX_DEM5_024, TX_DEM5_025,
+ TX_DEM5_026, TX_DEM5_027, TX_DEM5_028, TX_DEM5_029, TX_DEM5_030,
+ TX_DEM5_031, TX_DEM5_032, TX_DEM5_033, TX_DEM5_034, TX_DEM5_035,
+ TX_DEM5_036, TX_DEM5_037, TX_DEM5_038, TX_DEM5_039, TX_DEM5_040,
+ TX_DEM5_041, TX_DEM5_042, TX_DEM5_043, TX_DEM5_044, TX_DEM5_045,
+ TX_DEM5L027, TX_DEM5L028, TX_DEM5L029, TX_DEM5L030, TX_DEM5L031,
+ TX_DEM5N000, TX_DEM5N001, TX_DEM5N002, TX_DEM5N003, TX_DEM5N004,
+ TX_DEM5N005, TX_DEM5N006, TX_DEM5N007, TX_DEM5N008, TX_DEM5N009,
+ TX_DEM5N010, TX_DEM5N011, TX_DEM5N012, TX_DEM5N013
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon5TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 3530, 0 },
+ { TX_SPEAKER_MCCOY, 3541, 0 },
+ { TX_SPEAKER_SPOCK, 3551, 0 },
+ { TX_SPEAKER_EVERTS, 3561, 0 },
+ { TX_SPEAKER_ROBERTS, 3575, 0 },
+ { TX_SPEAKER_CHUB, 3591, 0 },
+ { TX_SPEAKER_GRISNASH, 3604, 0 },
+ { TX_SPEAKER_STEPHEN, 3621, 0 },
+ { TX_DEM5_001, 7000, 0 },
+ { TX_DEM5_002, 4928, 0 },
+ { TX_DEM5_003, 7506, 0 },
+ { TX_DEM5_004, 7798, 0 },
+ { TX_DEM5_005, 5344, 0 },
+ { TX_DEM5_006, 636, 0 },
+ { TX_DEM5_007, 743, 0 },
+ { TX_DEM5_008, 1506, 0 },
+ { TX_DEM5_009, 1567, 0 },
+ { TX_DEM5_010, 2942, 0 },
+ { TX_DEM5_011, 9224, 0 },
+ { TX_DEM5_012, 8086, 0 },
+ { TX_DEM5_013, 8998, 0 },
+ { TX_DEM5_014, 9101, 0 },
+ { TX_DEM5_015, 8705, 0 },
+ { TX_DEM5_016, 8808, 0 },
+ { TX_DEM5_017, 7564, 0 },
+ { TX_DEM5_018, 7136, 0 },
+ { TX_DEM5_019, 8035, 0 },
+ { TX_DEM5_020, 7941, 0 },
+ { TX_DEM5_021, 7423, 0 },
+ { TX_DEM5_022, 6203, 0 },
+ { TX_DEM5_023, 7653, 0 },
+ { TX_DEM5_024, 5638, 0 },
+ { TX_DEM5_025, 5838, 0 },
+ { TX_DEM5_026, 7991, 0 },
+ { TX_DEM5_027, 7055, 0 },
+ { TX_DEM5_028, 5408, 0 },
+ { TX_DEM5_029, 5816, 0 },
+ { TX_DEM5_030, 4526, 0 },
+ { TX_DEM5_031, 6611, 0 },
+ { TX_DEM5_032, 2308, 0 },
+ { TX_DEM5_033, 1155, 0 },
+ { TX_DEM5_034, 2488, 0 },
+ { TX_DEM5_035, 2223, 0 },
+ { TX_DEM5_036, 1080, 0 },
+ { TX_DEM5_037, 1246, 0 },
+ { TX_DEM5_038, 2398, 0 },
+ { TX_DEM5_039, 903, 0 },
+ { TX_DEM5_040, 8411, 0 },
+ { TX_DEM5_041, 5897, 0 },
+ { TX_DEM5_042, 6680, 0 },
+ { TX_DEM5_043, 6286, 0 },
+ { TX_DEM5_044, 7849, 0 },
+ { TX_DEM5_045, 7268, 0 },
+ { TX_DEM5L027, 1423, 0 },
+ { TX_DEM5L028, 3700, 0 },
+ { TX_DEM5L029, 4772, 0 },
+ { TX_DEM5L030, 4982, 0 },
+ { TX_DEM5L031, 5389, 0 },
+ { TX_DEM5N000, 4183, 0 },
+ { TX_DEM5N001, 3637, 0 },
+ { TX_DEM5N002, 4033, 0 },
+ { TX_DEM5N003, 3918, 0 },
+ { TX_DEM5N004, 4111, 0 },
+ { TX_DEM5N005, 4298, 0 },
+ { TX_DEM5N006, 4440, 0 },
+ { TX_DEM5N007, 4245, 0 },
+ { TX_DEM5N008, 4378, 0 },
+ { TX_DEM5N009, 3777, 0 },
+ { TX_DEM5N010, 1811, 0 },
+ { TX_DEM5N011, 2066, 0 },
+ { TX_DEM5N012, 3276, 0 },
+ { TX_DEM5N013, 1923, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon5Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::demon5Tick1() {
playVoc("DEM5LOOP");
@@ -115,26 +214,26 @@ void Room::demon5DoorOpenedOrReachedDoor() {
void Room::demon5UseSTricorderOnCrate() {
loadActorAnim(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_006);
}
// FIXME: should work when used on people as well, but doesn't
void Room::demon5UsePhaserOnAnything() {
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_007);
}
void Room::demon5UseHandOnStephen() {
if (_awayMission->demon.repairedHand)
- showText(TX_SPEAKER_STEPHEN, 36, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_036);
else
- showText(TX_SPEAKER_STEPHEN, 39, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_039);
}
void Room::demon5UseBerryOnStephen() {
if (_awayMission->demon.knowAboutHypoDytoxin)
- showText(TX_SPEAKER_STEPHEN, 33, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_033);
else
- showText(TX_SPEAKER_STEPHEN, 37, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_037);
}
void Room::demon5UseHypoDytoxinOnChub() {
@@ -148,84 +247,84 @@ void Room::demon5MccoyReachedChub() {
void Room::demon5MccoyHealedChub() {
walkCrewman(OBJECT_MCCOY, 0xc8, 0xba, 0);
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
- showText(TX_SPEAKER_CHUB, 27, true);
+ showText(TX_SPEAKER_CHUB, TX_DEM5L027);
loseItem(OBJECT_IDETOXIN);
_awayMission->demon.curedChub = true;
_awayMission->demon.missionScore += 2;
}
void Room::demon5UseHypoDytoxinOnAnything() {
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_008);
}
void Room::demon5UseBerryOnChub() {
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_009);
}
void Room::demon5LookAtRoberts() {
- showDescription(1, true);
+ showDescription(TX_DEM5N001);
}
void Room::demon5LookAtGrisnash() {
- showDescription(9, true);
+ showDescription(TX_DEM5N009);
}
void Room::demon5LookAtStephen() {
- showDescription(3, true);
+ showDescription(TX_DEM5N003);
}
void Room::demon5LookAtKirk() {
- showDescription(6, true);
+ showDescription(TX_DEM5N006);
}
void Room::demon5LookAtSpock() {
- showDescription(8, true);
+ showDescription(TX_DEM5N008);
}
void Room::demon5LookAtMccoy() {
- showDescription(7, true);
+ showDescription(TX_DEM5N007);
}
void Room::demon5LookAtRedshirt() {
- showDescription(5, true);
+ showDescription(TX_DEM5N005);
}
void Room::demon5LookAtMountain() {
- showDescription(2, true);
+ showDescription(TX_DEM5N002);
}
void Room::demon5LookAtCrate() {
- showDescription(4, true);
+ showDescription(TX_DEM5N004);
}
void Room::demon5LookAnywhere() {
- showDescription(0, true);
+ showDescription(TX_DEM5N000);
}
void Room::demon5LookAtChub() {
- showText(TX_SPEAKER_CHUB, 28, true, true);
+ showText(TX_SPEAKER_CHUB, TX_DEM5L028);
}
void Room::demon5TalkToRoberts() {
if (_awayMission->demon.curedChub) {
- showText(TX_SPEAKER_ROBERTS, 30, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_030);
if (!_roomVar.demon.talkedToRoberts) {
_roomVar.demon.talkedToRoberts = true;
_roomVar.demon.numTalkedTo++;
demon5CheckCompletedStudy();
}
} else {
- showDescription(10, true);
+ showDescription(TX_DEM5N010);
}
}
void Room::demon5TalkToChub() {
if (_awayMission->demon.curedChub) {
- showText(TX_SPEAKER_CHUB, 29, true, true);
- showText(TX_SPEAKER_KIRK, 2, true);
- showText(TX_SPEAKER_CHUB, 30, true, true);
- showText(TX_SPEAKER_KIRK, 5, true);
- showText(TX_SPEAKER_CHUB, 31, true, true);
+ showText(TX_SPEAKER_CHUB, TX_DEM5L029);
+ showText(TX_SPEAKER_KIRK, TX_DEM5_002);
+ showText(TX_SPEAKER_CHUB, TX_DEM5L030);
+ showText(TX_SPEAKER_KIRK, TX_DEM5_005);
+ showText(TX_SPEAKER_CHUB, TX_DEM5L031);
if (!_roomVar.demon.talkedToChub) {
_roomVar.demon.talkedToChub = true;
@@ -233,16 +332,16 @@ void Room::demon5TalkToChub() {
demon5CheckCompletedStudy();
}
} else {
- showDescription(13, true);
+ showDescription(TX_DEM5N013);
}
}
void Room::demon5TalkToGrisnash() {
if (_awayMission->demon.curedChub) {
- showText(TX_SPEAKER_GRISNASH, 28, true);
- showText(TX_SPEAKER_SPOCK, 24, true);
- showText(TX_SPEAKER_GRISNASH, 29, true);
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_GRISNASH, TX_DEM5_028);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_024);
+ showText(TX_SPEAKER_GRISNASH, TX_DEM5_029);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_025);
if (!_roomVar.demon.talkedToGrisnash) {
_roomVar.demon.talkedToGrisnash = true;
@@ -250,17 +349,17 @@ void Room::demon5TalkToGrisnash() {
demon5CheckCompletedStudy();
}
} else {
- showDescription(11, true);
+ showDescription(TX_DEM5N011);
}
}
void Room::demon5TalkToStephen() {
if (_awayMission->demon.curedChub) {
- showText(TX_SPEAKER_STEPHEN, 41, true);
- showText(TX_SPEAKER_MCCOY, 22, true);
- showText(TX_SPEAKER_STEPHEN, 43, true);
- showText(TX_SPEAKER_ROBERTS, 31, true);
- showText(TX_SPEAKER_STEPHEN, 42, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_041);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_022);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_043);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_031);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_042);
if (!_roomVar.demon.talkedToStephen) {
_roomVar.demon.talkedToStephen = true;
@@ -268,46 +367,46 @@ void Room::demon5TalkToStephen() {
demon5CheckCompletedStudy();
}
} else if (!_awayMission->demon.knowAboutHypoDytoxin) {
- showText(TX_SPEAKER_ROBERTS, 34, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_034);
} else if (_awayMission->demon.madeHypoDytoxin) {
- showText(TX_SPEAKER_ROBERTS, 35, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_035);
} else if (_awayMission->demon.gotBerries) {
- showText(TX_SPEAKER_ROBERTS, 32, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_032);
_awayMission->demon.field3e = false;
} else if (_awayMission->demon.field3e) {
- showText(TX_SPEAKER_ROBERTS, 38, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_038);
} else {
- showText(TX_SPEAKER_ROBERTS, 34, true);
+ showText(TX_SPEAKER_ROBERTS, TX_DEM5_034);
}
}
void Room::demon5TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM5_001);
}
void Room::demon5TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 27, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_027);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_018);
}
void Room::demon5TalkToRedshirt() {
- showText(TX_SPEAKER_EVERTS, 45, true);
- showText(TX_SPEAKER_MCCOY, 21, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM5_045);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_021);
+ showText(TX_SPEAKER_KIRK, TX_DEM5_003);
}
void Room::demon5TalkToMccoy() {
if (_awayMission->demon.curedChub) {
- showText(TX_SPEAKER_MCCOY, 23, true);
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_023);
+ showText(TX_SPEAKER_KIRK, TX_DEM5_004);
if (!_awayMission->redshirtDead) {
- showText(TX_SPEAKER_EVERTS, 44, true);
- showText(TX_SPEAKER_MCCOY, 20, true);
- showText(TX_SPEAKER_SPOCK, 26, true);
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM5_044);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_020);
+ showText(TX_SPEAKER_SPOCK, TX_DEM5_026);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_019);
}
} else {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_017);
}
}
@@ -316,7 +415,7 @@ void Room::demon5UseMTricorderOnRoberts() {
return;
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_015);
_roomVar.demon.scannedRoberts = true;
_roomVar.demon.numScanned++;
@@ -330,16 +429,16 @@ void Room::demon5UseMTricorderOnChub() {
if (_awayMission->demon.curedChub) {
if (_roomVar.demon.scannedChub)
return;
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_016);
_roomVar.demon.scannedChub = true;
_roomVar.demon.numScanned++;
demon5CheckCompletedStudy();
} else {
if (_awayMission->demon.field3e)
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_010);
else {
- showText(TX_SPEAKER_MCCOY, 12, true);
- showText(TX_SPEAKER_STEPHEN, 40, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_012);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM5_040);
_awayMission->demon.knowAboutHypoDytoxin = true;
_awayMission->demon.field3e = true;
}
@@ -352,7 +451,7 @@ void Room::demon5UseMTricorderOnGrisnash() {
return;
loadActorAnim2(OBJECT_MCCOY, "mscane", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_013);
_roomVar.demon.scannedGrisnash = true;
_roomVar.demon.numScanned++;
@@ -364,7 +463,7 @@ void Room::demon5UseMTricorderOnStephen() {
return;
loadActorAnim2(OBJECT_MCCOY, "mscanw", -1, -1, 0);
playSoundEffectIndex(0x04);
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_014);
_roomVar.demon.scannedStephen = true;
_roomVar.demon.numScanned++;
@@ -373,13 +472,13 @@ void Room::demon5UseMTricorderOnStephen() {
void Room::demon5CheckCompletedStudy() {
if (_roomVar.demon.numScanned == 4 && _roomVar.demon.numTalkedTo == 4) {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM5_011);
_roomVar.demon.numTalkedTo = 5;
}
}
void Room::demon5GetCrate() {
- showDescription(12, true);
+ showDescription(TX_DEM5N012);
}
}
diff --git a/engines/startrek/rooms/demon6.cpp b/engines/startrek/rooms/demon6.cpp
index 3bebcb48de..4c9a4445d7 100644
--- a/engines/startrek/rooms/demon6.cpp
+++ b/engines/startrek/rooms/demon6.cpp
@@ -106,6 +106,120 @@ extern const RoomAction demon6ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum demon6TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_STEPHEN,
+ TX_DEM6_001, TX_DEM6_002, TX_DEM6_003, TX_DEM6_004, TX_DEM6_005,
+ TX_DEM6_006, TX_DEM6_007, TX_DEM6_008, TX_DEM6_009, TX_DEM6_010,
+ TX_DEM6_011, TX_DEM6_012, TX_DEM6_013, TX_DEM6_014, TX_DEM6_015,
+ TX_DEM6_016, TX_DEM6_017, TX_DEM6_018, TX_DEM6_019, TX_DEM6_020,
+ TX_DEM6_021, TX_DEM6_022, TX_DEM6_023, TX_DEM6_024, TX_DEM6_025,
+ TX_DEM6_026, TX_DEM6_027, TX_DEM6_028, TX_DEM6_029, TX_DEM6_030,
+ TX_DEM6_031, TX_DEM6_032, TX_DEM6_033, TX_DEM6_034, TX_DEM6_035,
+ TX_DEM6_036, TX_DEM6_037, TX_DEM6_038, TX_DEM6_039, TX_DEM6_040,
+ TX_DEM6_041, TX_DEM6_042, TX_DEM6_043, TX_DEM6_044, TX_DEM6_045,
+ TX_DEM6_046, TX_DEM6_047, TX_DEM6_048, TX_DEM6_049, TX_DEM6_050,
+ TX_DEM6_051, TX_DEM6_052, TX_DEM6_053, TX_DEM6N000, TX_DEM6N001,
+ TX_DEM6N002, TX_DEM6N003, TX_DEM6N004, TX_DEM6N005, TX_DEM6N006,
+ TX_DEM6N007, TX_DEM6N008, TX_DEM6N009, TX_DEM6N010, TX_DEM6N011,
+ TX_DEM6N012, TX_DEM6N013, TX_DEM6N014, TX_DEM6N015, TX_DEM6N016,
+ TX_DEM6N017, TX_DEM6N018, TX_DEM6N019, TX_DEM6N020, TX_DEM6N021,
+ TX_DEM6N022, TX_DEM6N023, TX_DEM6N024, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets demon6TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 4150, 0 },
+ { TX_SPEAKER_MCCOY, 4161, 0 },
+ { TX_SPEAKER_SPOCK, 4171, 0 },
+ { TX_SPEAKER_EVERTS, 4181, 0 },
+ { TX_SPEAKER_STEPHEN, 4195, 0 },
+ { TX_DEM6_001, 6283, 0 },
+ { TX_DEM6_002, 9373, 0 },
+ { TX_DEM6_003, 6387, 0 },
+ { TX_DEM6_004, 2427, 0 },
+ { TX_DEM6_005, 1927, 0 },
+ { TX_DEM6_006, 6339, 0 },
+ { TX_DEM6_007, 3239, 0 },
+ { TX_DEM6_008, 3668, 0 },
+ { TX_DEM6_009, 3057, 0 },
+ { TX_DEM6_010, 10137, 0 },
+ { TX_DEM6_011, 10040, 0 },
+ { TX_DEM6_012, 9812, 0 },
+ { TX_DEM6_013, 9601, 0 },
+ { TX_DEM6_014, 8244, 0 },
+ { TX_DEM6_015, 2549, 0 },
+ { TX_DEM6_016, 2942, 0 },
+ { TX_DEM6_017, 715, 0 },
+ { TX_DEM6_018, 1765, 0 },
+ { TX_DEM6_019, 6103, 0 },
+ { TX_DEM6_020, 8973, 0 },
+ { TX_DEM6_021, 9718, 0 },
+ { TX_DEM6_022, 5898, 0 },
+ { TX_DEM6_023, 10197, 0 },
+ { TX_DEM6_024, 5812, 0 },
+ { TX_DEM6_025, 9188, 0 },
+ { TX_DEM6_026, 1485, 0 },
+ { TX_DEM6_027, 1322, 0 },
+ { TX_DEM6_028, 613, 0 },
+ { TX_DEM6_029, 8443, 0 },
+ { TX_DEM6_030, 6431, 0 },
+ { TX_DEM6_031, 6524, 0 },
+ { TX_DEM6_032, 8881, 0 },
+ { TX_DEM6_033, 7758, 0 },
+ { TX_DEM6_034, 6613, 0 },
+ { TX_DEM6_035, 9475, 0 },
+ { TX_DEM6_036, 7210, 0 },
+ { TX_DEM6_037, 8785, 0 },
+ { TX_DEM6_038, 7315, 0 },
+ { TX_DEM6_039, 6930, 0 },
+ { TX_DEM6_040, 7122, 0 },
+ { TX_DEM6_041, 7566, 0 },
+ { TX_DEM6_042, 4216, 0 },
+ { TX_DEM6_043, 8493, 0 },
+ { TX_DEM6_044, 6213, 0 },
+ { TX_DEM6_045, 6701, 0 },
+ { TX_DEM6_046, 6735, 0 },
+ { TX_DEM6_047, 6761, 0 },
+ { TX_DEM6_048, 6791, 0 },
+ { TX_DEM6_049, 6837, 0 },
+ { TX_DEM6_050, 6868, 0 },
+ { TX_DEM6_051, 6667, 0 },
+ { TX_DEM6_052, 2655, 0 },
+ { TX_DEM6_053, 9413, 0 },
+ { TX_DEM6N000, 5105, 0 },
+ { TX_DEM6N001, 4691, 0 },
+ { TX_DEM6N002, 5174, 0 },
+ { TX_DEM6N003, 4592, 0 },
+ { TX_DEM6N004, 5252, 0 },
+ { TX_DEM6N005, 5058, 0 },
+ { TX_DEM6N006, 4498, 0 },
+ { TX_DEM6N007, 5323, 0 },
+ { TX_DEM6N008, 5424, 0 },
+ { TX_DEM6N009, 5594, 0 },
+ { TX_DEM6N010, 5662, 0 },
+ { TX_DEM6N011, 4909, 0 },
+ { TX_DEM6N012, 6074, 0 },
+ { TX_DEM6N013, 6188, 0 },
+ { TX_DEM6N014, 10359, 0 },
+ { TX_DEM6N015, 5501, 0 },
+ { TX_DEM6N016, 4871, 0 },
+ { TX_DEM6N017, 4960, 0 },
+ { TX_DEM6N018, 6006, 0 },
+ { TX_DEM6N019, 8372, 0 },
+ { TX_DEM6N020, 5750, 0 },
+ { TX_DEM6N021, 1139, 0 },
+ { TX_DEM6N022, 3812, 0 },
+ { TX_DEM6N023, 1687, 0 },
+ { TX_DEM6N024, 1036, 0 },
+ {TX_DIALOG_ERROR, 8214, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText demon6Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::demon6Tick1() {
playVoc("DEM6LOOP");
if (_awayMission->demon.gotBerries || (!_awayMission->demon.field3e && _awayMission->demon.field37)) {
@@ -126,12 +240,12 @@ void Room::demon6Tick30() {
if (_awayMission->demon.stephenWelcomedToStudy)
return;
- showText(TX_SPEAKER_STEPHEN, 42, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_042);
_awayMission->demon.stephenWelcomedToStudy = true;
}
void Room::demon6SpockReachedComputer() {
- showText(TX_SPEAKER_SPOCK, 14, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_014);
}
void Room::demon6WalkToDoor() {
@@ -154,71 +268,71 @@ void Room::demon6DoorOpenedOrReachedDoor() {
}
void Room::demon6UsePhaserOnStephen() {
- showText(TX_SPEAKER_STEPHEN, 28, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_028);
}
void Room::demon6UsePhaserOnCase() {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_017);
}
void Room::demon6LookAtWorkspace() {
- showDescription(3, true);
+ showDescription(TX_DEM6N003);
}
void Room::demon6LookAtCase() {
- showDescription(1, true);
+ showDescription(TX_DEM6N001);
}
void Room::demon6LookAtTable() {
- showDescription(7, true);
+ showDescription(TX_DEM6N007);
}
void Room::demon6LookAtMineral() {
- showDescription(16, true);
+ showDescription(TX_DEM6N016);
}
void Room::demon6LookAtShells() {
- showDescription(11, true);
+ showDescription(TX_DEM6N011);
}
void Room::demon6LookAtSkull() {
- showDescription(17, true);
+ showDescription(TX_DEM6N017);
}
void Room::demon6LookAtMetal() {
- showDescription(5, true);
+ showDescription(TX_DEM6N005);
}
void Room::demon6LookAtMeteor() {
- showDescription(0, true);
+ showDescription(TX_DEM6N000);
}
void Room::demon6LookAtMountain() {
- showDescription(2, true);
+ showDescription(TX_DEM6N002);
}
void Room::demon6LookAtSynthesizer() {
- showDescription(4, true);
+ showDescription(TX_DEM6N004);
}
void Room::demon6LookAtKirk() {
- showDescription(8, true);
+ showDescription(TX_DEM6N008);
}
void Room::demon6LookAtSpock() {
- showDescription(15, true);
+ showDescription(TX_DEM6N015);
}
void Room::demon6LookAtMccoy() {
- showDescription(9, true);
+ showDescription(TX_DEM6N009);
}
void Room::demon6LookAtRedshirt() {
- showDescription(10, true);
+ showDescription(TX_DEM6N010);
}
void Room::demon6LookAtComputer() {
- showDescription(6, true);
+ showDescription(TX_DEM6N006);
if (!_awayMission->demon.lookedAtComputer) {
_awayMission->demon.lookedAtComputer = true;
_awayMission->demon.missionScore++;
@@ -226,38 +340,38 @@ void Room::demon6LookAtComputer() {
}
void Room::demon6LookAnywhere() {
- showDescription(24, true);
+ showDescription(TX_DEM6N024);
}
void Room::demon6LookAtStephen() {
- showDescription(21, true);
+ showDescription(TX_DEM6N021);
}
void Room::demon6TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_020);
}
void Room::demon6TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_025);
}
void Room::demon6TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 2, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM6_002);
}
void Room::demon6TalkToRedshirt() {
- showText(TX_SPEAKER_EVERTS, 53, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM6_053);
}
void Room::demon6TalkToStephen() {
- showText(TX_SPEAKER_STEPHEN, 35, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_035);
}
void Room::demon6UseBerryOnStephen() {
if (_awayMission->demon.knowAboutHypoDytoxin) {
- showText(TX_SPEAKER_STEPHEN, 27, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_027);
} else {
- showText(TX_SPEAKER_STEPHEN, 26, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_026);
}
}
@@ -274,8 +388,8 @@ void Room::demon6MccoyReachedSynthesizer() {
void Room::demon6FinishedMakingHypoDytoxin() {
playMidiMusicTracks(-1, -1);
- showDescription(23, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showDescription(TX_DEM6N023);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_018);
giveItem(OBJECT_IDETOXIN);
_awayMission->demon.madeHypoDytoxin = true;
@@ -289,10 +403,10 @@ void Room::demon6FinishedMakingHypoDytoxin() {
void Room::demon6UseHandOnWorkspace() {
if (_awayMission->demon.repairedHand) {
- showText(TX_SPEAKER_SPOCK, 18, true); // FIXME
+ showText(TX_SPEAKER_SPOCK, TX_DEM6N018); // FIXME
} else {
_awayMission->disableInput = true;
- showText(TX_SPEAKER_KIRK, 5, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM6_005);
walkCrewman(OBJECT_SPOCK, 0xb3, 0xbb, 2);
}
}
@@ -302,7 +416,7 @@ void Room::demon6SpockReachedWorkspace() {
}
void Room::demon6SpockFinishedRepairingHand() {
- showText(TX_SPEAKER_SPOCK, 24, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_024);
_awayMission->demon.repairedHand = true;
_awayMission->demon.missionScore += 2;
loadActorStandAnim(OBJECT_SPOCK);
@@ -311,39 +425,39 @@ void Room::demon6SpockFinishedRepairingHand() {
// FIXME: doesn't work
void Room::demon6UseAnythingOnWorkspace() {
- showDescription(20, true);
+ showDescription(TX_DEM6N020);
}
void Room::demon6StephenIsInsulted() {
- showText(TX_SPEAKER_STEPHEN, 30, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_030);
_roomVar.demon.insultedStephenRecently = true;
_awayMission->demon.insultedStephen = true;
}
void Room::demon6StephenDescribesItemsInCase() {
while (true) {
- showText(TX_SPEAKER_STEPHEN, 51, true);
- TextRef choices2[] = { TX_SPEAKER_STEPHEN, 45, 46, 47, 48, 49, 50, TX_BLANK };
- TextRef choice = showMultipleTexts(choices2, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_051);
+ TextRef choices2[] = { TX_SPEAKER_STEPHEN, TX_DEM6_045, TX_DEM6_046, TX_DEM6_047, TX_DEM6_048, TX_DEM6_049, TX_DEM6_050, TX_END };
+ TextRef choice = showMultipleTexts(choices2);
switch (choice) {
case 0:
- showText(TX_SPEAKER_STEPHEN, 40, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_040);
break;
case 1:
- showText(TX_SPEAKER_STEPHEN, 33, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_033);
break;
case 2:
- showText(TX_SPEAKER_STEPHEN, 36, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_036);
break;
case 3:
- showText(TX_SPEAKER_STEPHEN, 38, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_038);
break;
case 4:
- showText(TX_SPEAKER_STEPHEN, 39, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_039);
break;
case 5:
- showText(TX_SPEAKER_STEPHEN, 41, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_041);
_roomVar.demon.caseOpened = true;
return;
default:
@@ -356,19 +470,19 @@ void Room::demon6UseCrewmanOnCase() {
if (_roomVar.demon.stephenInRoom) {
if (_roomVar.demon.insultedStephenRecently)
return;
- showText(TX_SPEAKER_STEPHEN, 44, true);
- TextRef choices1[] = {TX_SPEAKER_KIRK, 1, 6, 3, TX_BLANK};
- TextRef choice = showMultipleTexts(choices1, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_044);
+ TextRef choices1[] = {TX_SPEAKER_KIRK, TX_DEM6_001, TX_DEM6_006, TX_DEM6_003, TX_END};
+ TextRef choice = showMultipleTexts(choices1);
if (choice == 0) {
demon6StephenIsInsulted();
} else if (choice == 1) {
- showText(TX_SPEAKER_STEPHEN, 34, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_034);
demon6StephenDescribesItemsInCase();
} else if (choice == 2) {
- showText(TX_SPEAKER_STEPHEN, 31, true);
- TextRef choices3[] = {TX_SPEAKER_KIRK, 1, 6, TX_BLANK};
- choice = showMultipleTexts(choices3, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_031);
+ TextRef choices3[] = {TX_SPEAKER_KIRK, TX_DEM6_001, TX_DEM6_006, TX_END};
+ choice = showMultipleTexts(choices3);
if (choice == 0)
demon6StephenIsInsulted();
@@ -380,22 +494,22 @@ void Room::demon6UseCrewmanOnCase() {
showDescription(TX_DIALOG_ERROR);
}
} else {
- showDescription(12, true);
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showDescription(TX_DEM6N012);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_019);
}
}
void Room::demon6UseKirkOnComputer() {
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_KIRK, TX_DEM6_004);
demon6UseSpockOnComputer();
}
void Room::demon6UseMccoyOnComputer() {
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_015);
}
void Room::demon6UseRedshirtOnComputer() {
- showText(TX_SPEAKER_EVERTS, 52, true);
+ showText(TX_SPEAKER_EVERTS, TX_DEM6_052);
}
void Room::demon6UseSpockOnComputer() {
@@ -429,80 +543,80 @@ void Room::demon6UseMetalOnStephen() {
void Room::demon6ReturnItemToStephen(int item) {
loseItem(item);
- showDescription(19, true);
- showText(TX_SPEAKER_STEPHEN, 29, true);
+ showDescription(TX_DEM6N019);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_029);
}
void Room::demon6UseHandOnStephen() {
if (_awayMission->demon.repairedHand)
- showText(TX_SPEAKER_STEPHEN, 37, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_037);
else
- showText(TX_SPEAKER_STEPHEN, 43, true);
+ showText(TX_SPEAKER_STEPHEN, TX_DEM6_043);
}
void Room::demon6UseMTricoderOnStephen() {
loadActorAnim2(OBJECT_MCCOY, "mscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_DEM6_016);
}
void Room::demon6UseSTricoderOnTable() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 9, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_009);
}
void Room::demon6UseSTricoderOnComputer() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_007);
}
void Room::demon6UseSTricoderOnMineral() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 13, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_013);
}
void Room::demon6UseSTricoderOnShells() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 21, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_021);
}
void Room::demon6UseSTricoderOnSkull() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 12, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_012);
}
void Room::demon6UseSTricoderOnMetal() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 11, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_011);
}
void Room::demon6UseSTricoderOnMeteor() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 10, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_010);
}
void Room::demon6UseSTricoderOnCase() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_023);
}
void Room::demon6UseSTricoderOnSynthesizer() {
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(4);
- showText(TX_SPEAKER_SPOCK, 8, true);
+ showText(TX_SPEAKER_SPOCK, TX_DEM6_008);
}
void Room::demon6GetCase() {
if (!_roomVar.demon.caseOpened)
- showDescription(22, true);
+ showDescription(TX_DEM6N022);
else
walkCrewman(OBJECT_KIRK, 0xff, 0xba, 5);
}
diff --git a/engines/startrek/rooms/feather0.cpp b/engines/startrek/rooms/feather0.cpp
index d728407d10..0f049d1d51 100644
--- a/engines/startrek/rooms/feather0.cpp
+++ b/engines/startrek/rooms/feather0.cpp
@@ -78,6 +78,78 @@ extern const RoomAction feather0ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather0TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_QUETZECOATL, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY,
+ TX_FEA0_002, TX_FEA0_003, TX_FEA0_004, TX_FEA0_005, TX_FEA0_006,
+ TX_FEA0_007, TX_FEA0_008, TX_FEA0_009, TX_FEA0_010, TX_FEA0_011,
+ TX_FEA0_012, TX_FEA0_013, TX_FEA0_014, TX_FEA0_015, TX_FEA0_016,
+ TX_FEA0_017, TX_FEA0_018, TX_FEA0_019, TX_FEA0_020, TX_FEA0_021,
+ TX_FEA0_022, TX_FEA0_023, TX_FEA0_024, TX_FEA0_025, TX_FEA0_026,
+ TX_FEA0_027, TX_FEA0_028, TX_FEA0_029, TX_FEA0_030, TX_FEA0_031,
+ TX_FEA0_032, TX_FEA0_033, TX_FEA0_101, TX_FEA0_108, TX_FEA0N000,
+ TX_FEA0N001, TX_FEA0N002, TX_FEA0N003, TX_FEA0N004, TX_FEA0N005,
+ TX_FEA0N006, TX_FEA0N007, TX_FEA0N008, TX_FEA0N009, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather0TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 1775, 0 },
+ { TX_SPEAKER_QUETZECOATL, 1786, 0 },
+ { TX_SPEAKER_MCCOY, 1798, 0 },
+ { TX_SPEAKER_SPOCK, 1808, 0 },
+ { TX_SPEAKER_STRAGEY, 1818, 0 },
+ { TX_FEA0_002, 5547, 0 },
+ { TX_FEA0_003, 5324, 0 },
+ { TX_FEA0_004, 4335, 0 },
+ { TX_FEA0_005, 5094, 0 },
+ { TX_FEA0_006, 3553, 0 },
+ { TX_FEA0_007, 3670, 0 },
+ { TX_FEA0_008, 5870, 0 },
+ { TX_FEA0_009, 4232, 0 },
+ { TX_FEA0_010, 4586, 0 },
+ { TX_FEA0_011, 3786, 0 },
+ { TX_FEA0_012, 5671, 0 },
+ { TX_FEA0_013, 4963, 0 },
+ { TX_FEA0_014, 5764, 0 },
+ { TX_FEA0_015, 3203, 0 },
+ { TX_FEA0_016, 3382, 0 },
+ { TX_FEA0_017, 2597, 0 },
+ { TX_FEA0_018, 2949, 0 },
+ { TX_FEA0_019, 6135, 0 },
+ { TX_FEA0_020, 3083, 0 },
+ { TX_FEA0_021, 2664, 0 },
+ { TX_FEA0_022, 2793, 0 },
+ { TX_FEA0_023, 3034, 0 },
+ { TX_FEA0_024, 5986, 0 },
+ { TX_FEA0_025, 3343, 0 },
+ { TX_FEA0_026, 4911, 0 },
+ { TX_FEA0_027, 5250, 0 },
+ { TX_FEA0_028, 3466, 0 },
+ { TX_FEA0_029, 5204, 0 },
+ { TX_FEA0_030, 4444, 0 },
+ { TX_FEA0_031, 4007, 0 },
+ { TX_FEA0_032, 3894, 0 },
+ { TX_FEA0_033, 4124, 0 },
+ { TX_FEA0_101, 4711, 0 },
+ { TX_FEA0_108, 830, 0 },
+ { TX_FEA0N000, 1830, 0 },
+ { TX_FEA0N001, 1950, 0 },
+ { TX_FEA0N002, 2477, 0 },
+ { TX_FEA0N003, 1890, 0 },
+ { TX_FEA0N004, 2383, 0 },
+ { TX_FEA0N005, 2425, 0 },
+ { TX_FEA0N006, 2021, 0 },
+ { TX_FEA0N007, 2158, 0 },
+ { TX_FEA0N008, 2076, 0 },
+ { TX_FEA0N009, 2538, 0 },
+ { TX_DIALOG_ERROR, 6222, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather0Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather0Tick1() {
playVoc("FEA0LOOP");
loadActorAnim(OBJECT_QUETZECOATL, "s5r0qb", 0xbe, 0xa6);
@@ -90,73 +162,73 @@ void Room::feather0Tick60() {
void Room::feather0TalkToQuetzecoatl() {
const TextRef choices[] = {
TX_SPEAKER_KIRK,
- 6,
- 7,
- 11,
- TX_BLANK
+ TX_FEA0_006,
+ TX_FEA0_007,
+ TX_FEA0_011,
+ TX_END
};
- showText(TX_SPEAKER_QUETZECOATL, 28, true);
- int choice = showMultipleTexts(choices, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_028);
+ int choice = showMultipleTexts(choices);
bool alreadyAngered = false;
if (choice == 0) {
const TextRef choices0[] = {
TX_SPEAKER_KIRK,
- 9,
- 4,
- TX_BLANK
+ TX_FEA0_009,
+ TX_FEA0_004,
+ TX_END
};
- showText(TX_SPEAKER_QUETZECOATL, 32, true);
- choice = showMultipleTexts(choices0, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_032);
+ choice = showMultipleTexts(choices0);
} else if (choice == 1) {
const TextRef choices0[] = {
TX_SPEAKER_KIRK,
- 2,
- 12,
- TX_BLANK
+ TX_FEA0_002,
+ TX_FEA0_012,
+ TX_END
};
- showText(TX_SPEAKER_QUETZECOATL, 31, true);
- choice = showMultipleTexts(choices0, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_031);
+ choice = showMultipleTexts(choices0);
} else if (choice == 2) {
const TextRef choices0[] = {
TX_SPEAKER_KIRK,
- 14,
- 8,
- TX_BLANK
+ TX_FEA0_014,
+ TX_FEA0_008,
+ TX_END
};
- showText(TX_SPEAKER_QUETZECOATL, 33, true);
- choice = showMultipleTexts(choices0, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_033);
+ choice = showMultipleTexts(choices0);
if (choice == 0) {
alreadyAngered = true;
- showText(TX_SPEAKER_QUETZECOATL, 24, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_024);
}
} else
showDescription(TX_DIALOG_ERROR);
if (!alreadyAngered) {
if (choice == 0)
- showText(TX_SPEAKER_QUETZECOATL, 30, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_030);
else // choice == 1
- showText(TX_SPEAKER_QUETZECOATL, 101, true);
- showText(TX_SPEAKER_KIRK, 10, true);
- showText(TX_SPEAKER_QUETZECOATL, 26, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_101);
+ showText(TX_SPEAKER_KIRK, TX_FEA0_010);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_026);
const TextRef choices1[] = {
TX_SPEAKER_KIRK,
- 13,
- 5,
- TX_BLANK
+ TX_FEA0_013,
+ TX_FEA0_005,
+ TX_END
};
- choice = showMultipleTexts(choices1, true);
+ choice = showMultipleTexts(choices1);
if (choice == 0) {
- showText(TX_SPEAKER_QUETZECOATL, 29, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_029);
+ showText(TX_SPEAKER_KIRK, TX_FEA0_003);
}
- showText(TX_SPEAKER_QUETZECOATL, 27, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_027);
}
// Quetzecoatl ultimately warps the crew away no matter what
@@ -182,81 +254,81 @@ void Room::feather0Timer1Expired() {
}
void Room::feather0UsePhaserOnQuetzecoatl() {
- showText(TX_SPEAKER_QUETZECOATL, 25, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA0_025);
}
void Room::feather0UsePhaserOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA0_016);
}
void Room::feather0UseMedkit() {
- showText(TX_SPEAKER_MCCOY, 108, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA0_108);
}
void Room::feather0LookAtQuetzecoatl() {
- showDescription(8, true);
+ showDescription(TX_FEA0N008);
}
void Room::feather0LookAtMoon() {
- showDescription(7, true);
+ showDescription(TX_FEA0N007);
}
void Room::feather0LookAtLog() {
- showDescription(6, true);
+ showDescription(TX_FEA0N006);
}
void Room::feather0LookAtHut() {
- showDescription(1, true);
+ showDescription(TX_FEA0N001);
}
void Room::feather0LookAnywhere() {
- showDescription(9, true);
+ showDescription(TX_FEA0N009);
}
void Room::feather0LookAtEyes() {
- showDescription(0, true);
+ showDescription(TX_FEA0N000);
}
void Room::feather0LookAtTree() {
- showDescription(3, true);
+ showDescription(TX_FEA0N003);
}
void Room::feather0LookAtMccoy() {
- showDescription(4, true);
+ showDescription(TX_FEA0N004);
}
void Room::feather0LookAtSpock() {
- showDescription(5, true);
+ showDescription(TX_FEA0N005);
}
void Room::feather0LookAtRedshirt() {
- showDescription(2, true);
+ showDescription(TX_FEA0N002);
}
void Room::feather0TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 17, true);
- showText(TX_SPEAKER_SPOCK, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA0_017);
+ showText(TX_SPEAKER_SPOCK, TX_FEA0_021);
}
void Room::feather0TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 22, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA0_022);
+ showText(TX_SPEAKER_MCCOY, TX_FEA0_018);
}
void Room::feather0TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 23, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA0_023);
}
void Room::feather0UseSTricorderOnQuetzecoatl() {
- spockScan(DIR_S, 20, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA0_020, false);
}
void Room::feather0UseSTricorderAnywhere() {
- spockScan(DIR_S, 19, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA0_019, false);
}
void Room::feather0UseMTricorderOnQuetzecoatl() {
- mccoyScan(DIR_S, 15, false, true);
+ mccoyScan(DIR_S, TX_SPEAKER_MCCOY, TX_FEA0_015, false);
}
}
diff --git a/engines/startrek/rooms/feather1.cpp b/engines/startrek/rooms/feather1.cpp
index 48fe677a24..324a62c72f 100644
--- a/engines/startrek/rooms/feather1.cpp
+++ b/engines/startrek/rooms/feather1.cpp
@@ -142,6 +142,122 @@ extern const RoomAction feather1ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather1TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_QUETZECOATL, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY,
+ TX_FEA1_001, TX_FEA1_002, TX_FEA1_003, TX_FEA1_004, TX_FEA1_005,
+ TX_FEA1_006, TX_FEA1_007, TX_FEA1_008, TX_FEA1_009, TX_FEA1_010,
+ TX_FEA1_011, TX_FEA1_012, TX_FEA1_013, TX_FEA1_014, TX_FEA1_015,
+ TX_FEA1_017, TX_FEA1_018, TX_FEA1_019, TX_FEA1_020, TX_FEA1_021,
+ TX_FEA1_022, TX_FEA1_023, TX_FEA1_024, TX_FEA1_025, TX_FEA1_026,
+ TX_FEA1_027, TX_FEA1_028, TX_FEA1_029, TX_FEA1_030, TX_FEA1_031,
+ TX_FEA1_032, TX_FEA1_033, TX_FEA1_034, TX_FEA1_035, TX_FEA1_037,
+ TX_FEA1_038, TX_FEA1_039, TX_FEA1_040, TX_FEA1_041, TX_FEA1_042,
+ TX_FEA1_043, TX_FEA1_044, TX_FEA1_045, TX_FEA1_046, TX_FEA1_047,
+ TX_FEA1_048, TX_FEA1_049, TX_FEA1_050, TX_FEA1_051, TX_FEA1_052,
+ TX_FEA1_053, TX_FEA1_054, TX_FEA1_055, TX_FEA1_056, TX_FEA1_057,
+ TX_FEA1_A46, TX_FEA1_F25, TX_FEA1N000, TX_FEA1N001, TX_FEA1N002,
+ TX_FEA1N003, TX_FEA1N004, TX_FEA1N005, TX_FEA1N006, TX_FEA1N007,
+ TX_FEA1N008, TX_FEA1N009, TX_FEA1N010, TX_FEA1N011, TX_FEA1N012,
+ TX_FEA1N013, TX_FEA1N014, TX_FEA1N015, TX_FEA1N016, TX_FEA1N017,
+ TX_FEA1N018, TX_FEA1N019, TX_FEA1N020, TX_FEA1N021, TX_FEA1N022
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather1TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 4412, 0 },
+ { TX_SPEAKER_MCCOY, 4435, 0 },
+ { TX_SPEAKER_SPOCK, 4445, 0 },
+ { TX_SPEAKER_QUETZECOATL, 4423, 0 },
+ { TX_SPEAKER_STRAGEY, 4455, 0 },
+ { TX_FEA1_001, 10730, 0 },
+ { TX_FEA1_002, 9907, 0 },
+ { TX_FEA1_003, 10929, 0 },
+ { TX_FEA1_004, 6487, 0 },
+ { TX_FEA1_005, 6143, 0 },
+ { TX_FEA1_006, 7970, 0 },
+ { TX_FEA1_007, 9933, 0 },
+ { TX_FEA1_008, 3761, 0 },
+ { TX_FEA1_009, 4949, 0 },
+ { TX_FEA1_010, 6430, 0 },
+ { TX_FEA1_011, 9554, 0 },
+ { TX_FEA1_012, 9519, 0 },
+ { TX_FEA1_013, 5288, 0 },
+ { TX_FEA1_014, 9462, 0 },
+ { TX_FEA1_015, 6775, 0 },
+ { TX_FEA1_017, 5616, 0 },
+ { TX_FEA1_018, 10805, 0 },
+ { TX_FEA1_019, 9608, 0 },
+ { TX_FEA1_020, 10217, 0 },
+ { TX_FEA1_021, 5876, 0 },
+ { TX_FEA1_022, 9983, 0 },
+ { TX_FEA1_023, 4693, 0 },
+ { TX_FEA1_023, 4693, 0 },
+ { TX_FEA1_024, 10984, 0 },
+ { TX_FEA1_025, 6379, 0 },
+ { TX_FEA1_026, 7037, 0 },
+ { TX_FEA1_027, 6312, 0 },
+ { TX_FEA1_028, 8659, 0 },
+ { TX_FEA1_029, 8901, 0 },
+ { TX_FEA1_030, 9168, 0 },
+ { TX_FEA1_031, 9092, 0 },
+ { TX_FEA1_032, 4842, 0 },
+ { TX_FEA1_033, 6704, 0 },
+ { TX_FEA1_034, 5992, 0 },
+ { TX_FEA1_035, 6055, 0 },
+ { TX_FEA1_037, 5146, 0 },
+ { TX_FEA1_038, 9268, 0 },
+ { TX_FEA1_039, 8771, 0 },
+ { TX_FEA1_040, 8095, 0 },
+ { TX_FEA1_041, 10597, 0 },
+ { TX_FEA1_042, 5503, 0 },
+ { TX_FEA1_043, 5770, 0 },
+ { TX_FEA1_044, 9705, 0 },
+ { TX_FEA1_045, 4988, 0 },
+ { TX_FEA1_046, 6218, 0 },
+ { TX_FEA1_047, 6618, 0 },
+ { TX_FEA1_048, 8173, 0 },
+ { TX_FEA1_049, 6859, 0 },
+ { TX_FEA1_049, 6859, 0 },
+ { TX_FEA1_050, 7132, 0 },
+ { TX_FEA1_051, 6579, 0 },
+ { TX_FEA1_052, 5409, 0 },
+ { TX_FEA1_053, 5948, 0 },
+ { TX_FEA1_054, 5696, 0 },
+ { TX_FEA1_055, 9851, 0 },
+ { TX_FEA1_056, 10123, 0 },
+ { TX_FEA1_057, 4468, 0 },
+ { TX_FEA1_A46, 5235, 0 },
+ { TX_FEA1_F25, 6966, 0 },
+ { TX_FEA1N000, 4782, 0 },
+ { TX_FEA1N001, 10345, 0 },
+ { TX_FEA1N002, 10538, 0 },
+ { TX_FEA1N003, 10482, 0 },
+ { TX_FEA1N004, 10429, 0 },
+ { TX_FEA1N005, 5056, 0 },
+ { TX_FEA1N006, 6661, 0 },
+ { TX_FEA1N007, 8511, 0 },
+ { TX_FEA1N008, 8454, 0 },
+ { TX_FEA1N009, 8409, 0 },
+ { TX_FEA1N010, 5100, 0 },
+ { TX_FEA1N011, 7824, 0 },
+ { TX_FEA1N012, 7295, 0 },
+ { TX_FEA1N013, 7905, 0 },
+ { TX_FEA1N014, 7650, 0 },
+ { TX_FEA1N015, 7409, 0 },
+ { TX_FEA1N016, 7758, 0 },
+ { TX_FEA1N017, 7542, 0 },
+ { TX_FEA1N018, 8586, 0 },
+ { TX_FEA1N019, 8370, 0 },
+ { TX_FEA1N020, 7467, 0 },
+ { TX_FEA1N021, 8262, 0 },
+ { TX_FEA1N022, 8317, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather1Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather1Tick1() {
playVoc("FEA1LOOP");
playMidiMusicTracks(27);
@@ -171,7 +287,7 @@ void Room::feather1Tick45() {
void Room::feather1Tick85() {
if (_awayMission->feather.vineState == 0)
- showText(TX_SPEAKER_QUETZECOATL, 57, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA1_057);
}
void Room::feather1Tick95() {
@@ -186,21 +302,21 @@ void Room::feather1QuetzecoatlDisappeared() {
}
void Room::feather1GetRightVine() {
- showDescription(8, true);
+ showDescription(TX_FEA1N008);
}
void Room::feather1GetLeftVine() {
if (_awayMission->feather.vineState == 0)
- showDescription(9, true);
+ showDescription(TX_FEA1N009);
else
- showDescription(8, true);
+ showDescription(TX_FEA1N008);
}
void Room::feather1GetRocks() {
if (_roomVar.feather.crewEscaped[OBJECT_KIRK])
- showDescription(21, true);
+ showDescription(TX_FEA1N021);
else if (_awayMission->feather.gotRock)
- showDescription(19, true);
+ showDescription(TX_FEA1N019);
else {
walkCrewmanC(OBJECT_KIRK, 0x90, 0xb6, &Room::feather1ReachedRocks);
_awayMission->disableInput = true;
@@ -215,7 +331,7 @@ void Room::feather1PickedUpRocks() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
giveItem(OBJECT_IROCK);
- showDescription(22, true);
+ showDescription(TX_FEA1N022);
_awayMission->feather.gotRock = true;
}
@@ -227,7 +343,7 @@ void Room::feather1GetSnake() {
walkCrewmanC(OBJECT_KIRK, 0x90, 0xbe, &Room::feather1ReachedSnake);
_awayMission->disableInput = true;
} else
- showDescription(21, true);
+ showDescription(TX_FEA1N021);
}
void Room::feather1ReachedSnake() {
@@ -265,14 +381,14 @@ void Room::feather1Timer0Expired() { // Snake comes back out of hole
}
void Room::feather1UseCommunicator() {
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_023);
}
void Room::feather1UseRockOnHole() {
if (_roomVar.feather.crewEscaped[OBJECT_KIRK])
- showDescription(21, true);
+ showDescription(TX_FEA1N021);
else if (_awayMission->feather.holeBlocked)
- showDescription(5, true);
+ showDescription(TX_FEA1N005);
else {
_awayMission->feather.missionScore++;
walkCrewmanC(OBJECT_KIRK, 0xa3, 0xb6, &Room::feather1ReachedHole);
@@ -298,25 +414,25 @@ void Room::feather1PutRockInHole() {
}
void Room::feather1UseSnakeOnLeftVine() {
- showText(TX_SPEAKER_SPOCK, 37, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_037);
}
void Room::feather1UseSnakeOnSpock() {
- showText(TX_SPEAKER_SPOCK, 41, true);
- showText(TX_SPEAKER_KIRK, 1, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_041);
+ showText(TX_SPEAKER_KIRK, TX_FEA1_001);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_018);
}
void Room::feather1UseSnakeOnKirk() {
- showText(TX_SPEAKER_SPOCK, 26, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_026);
}
void Room::feather1UseSnakeOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 25 + FOLLOWUP_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_F25);
}
void Room::feather1UseSnakeOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 50, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_050);
}
void Room::feather1UseRockOnSnake() {
@@ -324,69 +440,69 @@ void Room::feather1UseRockOnSnake() {
loadActorAnim2(OBJECT_SNAKE, "s5r1si");
_awayMission->timers[0] = 80;
_roomVar.feather.snakeInHole = true;
- showText(TX_SPEAKER_SPOCK, 34, true); // BUGFIX: speaker is Spock, not Stragey
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_034); // BUGFIX: speaker is Spock, not Stragey
}
}
void Room::feather1UseSpockOnSnake() {
- showText(TX_SPEAKER_SPOCK, 35, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_035);
}
void Room::feather1UseMccoyOnSnake() {
- showText(TX_SPEAKER_MCCOY, 5, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_005);
}
void Room::feather1UseRedshirtOnSnake() {
- showText(TX_SPEAKER_STRAGEY, 46, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_046);
}
void Room::feather1UseSpockOnHole() {
if (_roomVar.feather.snakeInHole)
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_025);
else
- showText(TX_SPEAKER_SPOCK, 27, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_027);
}
void Room::feather1UseMccoyOnHole() {
if (_roomVar.feather.snakeInHole)
- showText(TX_SPEAKER_MCCOY, 4, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_004);
else
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_010);
}
void Room::feather1UseRedshirtOnHole() {
if (_roomVar.feather.snakeInHole)
- showText(TX_SPEAKER_STRAGEY, 47, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_047);
else
- showText(TX_SPEAKER_STRAGEY, 51, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_051);
}
void Room::feather1UseRockOnMoss() {
- showDescription(6, true);
+ showDescription(TX_FEA1N006);
}
void Room::feather1UseRockOnSpock() {
- showText(TX_SPEAKER_SPOCK, 32, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_032);
}
void Room::feather1UseRockOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_009);
}
void Room::feather1UseRockOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 45, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_045);
}
void Room::feather1UseSpockOnMoss() {
- showText(TX_SPEAKER_SPOCK, 33, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_033);
}
void Room::feather1UseMccoyOnMoss() {
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_015);
}
void Room::feather1UseRedshirtOnMoss() {
- showText(TX_SPEAKER_MCCOY, 49, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_049);
}
void Room::feather1UseRockOnLeftVine() {
@@ -412,9 +528,9 @@ void Room::feather1ThrewRock1() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
- showText(TX_SPEAKER_SPOCK, 42, true);
- showText(TX_SPEAKER_MCCOY, 17, true);
- showText(TX_SPEAKER_STRAGEY, 54, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_042);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_017);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_054);
}
void Room::feather1ReadyToThrowRock2() {
@@ -429,9 +545,9 @@ void Room::feather1ThrewRock2() {
loadActorStandAnim(OBJECT_KIRK);
_awayMission->disableInput = false;
- showText(TX_SPEAKER_SPOCK, 43, true);
- showText(TX_SPEAKER_MCCOY, 21, true);
- showText(TX_SPEAKER_STRAGEY, 53, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_043);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_021);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_053);
}
@@ -448,7 +564,7 @@ void Room::feather1UseMccoyOnVine() {
_roomVar.feather.crewmanClimbingVine = OBJECT_MCCOY;
feather1CrewmanClimbVine();
} else
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_013);
}
void Room::feather1UseRedshirtOnVine() {
@@ -456,7 +572,7 @@ void Room::feather1UseRedshirtOnVine() {
_roomVar.feather.crewmanClimbingVine = OBJECT_REDSHIRT;
feather1CrewmanClimbVine();
} else
- showText(TX_SPEAKER_STRAGEY, 52, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_052);
}
void Room::feather1UseKirkOnVine() {
@@ -464,7 +580,7 @@ void Room::feather1UseKirkOnVine() {
_roomVar.feather.crewmanClimbingVine = OBJECT_KIRK;
feather1CrewmanClimbVine();
} else
- showDescription(10, true);
+ showDescription(TX_FEA1N010);
}
// This was refactored, due to the similarity of the code for each crewman. Originally, the
@@ -544,76 +660,76 @@ void Room::feather1ClimbedDownVine() {
}
void Room::feather1UsePhaser() {
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_028);
}
void Room::feather1UseSTricorderOnRightVine() {
- spockScan(DIR_N, 39, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA1_039);
}
void Room::feather1UseSTricorderOnSnake() {
- spockScan(DIR_S, 29, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA1_029);
}
void Room::feather1UseSTricorderOnMoss() {
- spockScan(DIR_E, 38, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_FEA1_038);
}
void Room::feather1UseSTricorderOnHole() {
if (_roomVar.feather.snakeInHole)
- spockScan(DIR_E, 30, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_FEA1_030);
else
- spockScan(DIR_E, 31, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_FEA1_031);
}
void Room::feather1UseSTricorderAnywhere() {
- spockScan(DIR_S, 24, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA1_024);
}
void Room::feather1UseSTricorderOnRocks() {
- spockScan(DIR_E, 3, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_FEA1_003);
}
void Room::feather1UseMTricorderOnVine() {
// ENHANCEMENT: Original didn't play tricorder sound, etc
- mccoyScan(DIR_E, 7, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA1_007);
}
void Room::feather1UseMTricorderOnMoss() {
- mccoyScan(DIR_E, 14, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA1_014);
}
void Room::feather1UseMTricorderOnHole() {
if (_roomVar.feather.snakeInHole)
- mccoyScan(DIR_E, 11, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA1_011);
else
- mccoyScan(DIR_E, 12, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA1_012);
}
void Room::feather1UseMTricorderOnSnake() {
- mccoyScan(DIR_S, 19, false, true);
+ mccoyScan(DIR_S, TX_SPEAKER_MCCOY, TX_FEA1_019);
if (!_roomVar.feather.scannedSnake) {
- showText(TX_SPEAKER_SPOCK, 44, true);
- showText(TX_SPEAKER_STRAGEY, 55, true);
- showText(TX_SPEAKER_KIRK, 2, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_044);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_055);
+ showText(TX_SPEAKER_KIRK, TX_FEA1_002);
_roomVar.feather.scannedSnake = true;
}
}
void Room::feather1UseMedkit() {
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_008);
}
void Room::feather1TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 6, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA1_006);
}
void Room::feather1TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 40, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA1_040);
}
void Room::feather1TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 48, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA1_048);
}
void Room::feather1WalkToExit() {
@@ -621,58 +737,58 @@ void Room::feather1WalkToExit() {
}
void Room::feather1LookAnywhere() {
- showDescription(20, true);
+ showDescription(TX_FEA1N020);
}
void Room::feather1LookAtSnake() {
- showDescription(17, true);
+ showDescription(TX_FEA1N017);
}
void Room::feather1LookAtRightVine() {
- showDescription(15, true);
+ showDescription(TX_FEA1N015);
}
void Room::feather1LookAtHole() {
- showDescription(14, true);
+ showDescription(TX_FEA1N014);
}
void Room::feather1LookAtMoss() {
- showDescription(16, true);
+ showDescription(TX_FEA1N016);
}
void Room::feather1LookAtRocks() {
- showDescription(11, true);
+ showDescription(TX_FEA1N011);
}
void Room::feather1LookAtLight() {
- showDescription(13, true);
+ showDescription(TX_FEA1N013);
}
void Room::feather1LookAtEyes() {
- showDescription(0, true);
+ showDescription(TX_FEA1N000);
}
void Room::feather1LookAtKirk() {
- showDescription(1, true);
+ showDescription(TX_FEA1N001);
}
void Room::feather1LookAtSpock() {
- showDescription(4, true);
+ showDescription(TX_FEA1N004);
}
void Room::feather1LookAtMccoy() {
- showDescription(3, true);
+ showDescription(TX_FEA1N003);
}
void Room::feather1LookAtRedshirt() {
- showDescription(2, true);
+ showDescription(TX_FEA1N002);
}
void Room::feather1LookAtLeftVine() {
if (_awayMission->feather.vineState == 0)
- showDescription(12, true);
+ showDescription(TX_FEA1N012);
else
- showDescription(15, true);
+ showDescription(TX_FEA1N015);
}
}
diff --git a/engines/startrek/rooms/feather2.cpp b/engines/startrek/rooms/feather2.cpp
index 4f2753ba08..f7662d5134 100644
--- a/engines/startrek/rooms/feather2.cpp
+++ b/engines/startrek/rooms/feather2.cpp
@@ -58,50 +58,91 @@ extern const RoomAction feather2ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather2TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_QUETZECOATL, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY,
+ TX_FEA2_001, TX_FEA2_002, TX_FEA2_003, TX_FEA2_004, TX_FEA2_005,
+ TX_FEA2_006, TX_FEA2_007, TX_FEA2_008, TX_FEA2_009, TX_FEA2_010,
+ TX_FEA2N000, TX_FEA2N001, TX_FEA2N002, TX_FEA2N003, TX_FEA2N004,
+ TX_FEA2N005, TX_FEA2N006, TX_FEA2N007, TX_FEA2N008
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather2TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 965, 0 },
+ { TX_SPEAKER_MCCOY, 988, 0 },
+ { TX_SPEAKER_SPOCK, 998, 0 },
+ { TX_SPEAKER_QUETZECOATL, 976, 0 },
+ { TX_SPEAKER_STRAGEY, 1008, 0 },
+ { TX_FEA2_001, 465, 0 },
+ { TX_FEA2_002, 1827, 0 },
+ { TX_FEA2_003, 1713, 0 },
+ { TX_FEA2_004, 1894, 0 },
+ { TX_FEA2_005, 1390, 0 },
+ { TX_FEA2_006, 1624, 0 },
+ { TX_FEA2_007, 1747, 0 },
+ { TX_FEA2_008, 2003, 0 },
+ { TX_FEA2_009, 2112, 0 },
+ { TX_FEA2_010, 1253, 0 },
+ { TX_FEA2N000, 1209, 0 },
+ { TX_FEA2N001, 1461, 0 },
+ { TX_FEA2N002, 2172, 0 },
+ { TX_FEA2N003, 2479, 0 },
+ { TX_FEA2N004, 2365, 0 },
+ { TX_FEA2N005, 2252, 0 },
+ { TX_FEA2N006, 1021, 0 },
+ { TX_FEA2N007, 1091, 0 },
+ { TX_FEA2N008, 1521, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather2Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather2Tick1() {
playVoc("FEA2LOOP");
playMidiMusicTracks(27);
}
void Room::feather2UseCommunicator() {
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA2_006);
}
void Room::feather2UsePhaser() {
// FIXME: Why does McCoy say "They're dead, Jim"?
- showText(TX_SPEAKER_MCCOY, 3, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_003);
}
void Room::feather2UseSTricorderAnywhere() {
- spockScan(DIR_S, 7, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA2_007);
}
void Room::feather2UseMTricorderAnywhere() {
// ENHANCEMENT: Original didn't play tricorder sound, etc
- mccoyScan(DIR_S, 2, true);
+ mccoyScan(DIR_S, TX_SPEAKER_MCCOY, TX_FEA2_002);
}
void Room::feather2TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 4, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_004);
}
void Room::feather2TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 8, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA2_008);
}
void Room::feather2TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 9, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA2_009);
}
void Room::feather2LookAtVines() {
// NOTE: This might be unused? I can't find where HOTSPOT_VINES is supposed to be.
- showDescription(0, true);
- showText(TX_SPEAKER_STRAGEY, 10, true);
- showText(TX_SPEAKER_MCCOY, 5, true);
+ showDescription(TX_FEA2N000);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA2_010);
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_005);
}
void Room::feather2UseMedkit() {
- showText(TX_SPEAKER_MCCOY, 1, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_001);
}
void Room::feather2WalkToLeftExit() {
@@ -109,35 +150,35 @@ void Room::feather2WalkToLeftExit() {
}
void Room::feather2LookAtEyes() {
- showDescription(1, true);
+ showDescription(TX_FEA2N001);
}
void Room::feather2LookAtBigTree() {
- showDescription(6, true);
+ showDescription(TX_FEA2N006);
}
void Room::feather2LookAtTrees() {
- showDescription(7, true);
+ showDescription(TX_FEA2N007);
}
void Room::feather2LookAnywhere() {
- showDescription(8, true);
+ showDescription(TX_FEA2N008);
}
void Room::feather2LookAtKirk() {
- showDescription(2, true);
+ showDescription(TX_FEA2N002);
}
void Room::feather2LookAtSpock() {
- showDescription(5, true);
+ showDescription(TX_FEA2N005);
}
void Room::feather2LookAtMccoy() {
- showDescription(4, true);
+ showDescription(TX_FEA2N004);
}
void Room::feather2LookAtRedshirt() {
- showDescription(3, true);
+ showDescription(TX_FEA2N003);
}
}
diff --git a/engines/startrek/rooms/feather3.cpp b/engines/startrek/rooms/feather3.cpp
index 39162cb113..4923e575e5 100644
--- a/engines/startrek/rooms/feather3.cpp
+++ b/engines/startrek/rooms/feather3.cpp
@@ -91,6 +91,93 @@ extern const RoomAction feather3ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather3TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY, TX_SPEAKER_TLAOXAC,
+ TX_FEA3_001, TX_FEA3_002, TX_FEA3_003, TX_FEA3_004, TX_FEA3_005,
+ TX_FEA3_006, TX_FEA3_007, TX_FEA3_008, TX_FEA3_009, TX_FEA3_010,
+ TX_FEA3_011, TX_FEA3_012, TX_FEA3_013, TX_FEA3_014, TX_FEA3_015,
+ TX_FEA3_016, TX_FEA3_017, TX_FEA3_018, TX_FEA3_019, TX_FEA3_020,
+ TX_FEA3_021, TX_FEA3_022, TX_FEA3_023, TX_FEA3_024, TX_FEA3_025,
+ TX_FEA3_026, TX_FEA3_027, TX_FEA3_028, TX_FEA3_029, TX_FEA3_030,
+ TX_FEA3_031, TX_FEA3_032, TX_FEA3_033, TX_FEA3_034, TX_FEA3_035,
+ TX_FEA3_036, TX_FEA3_037, TX_FEA3_038, TX_FEA3_039, TX_FEA3_040,
+ TX_FEA3_041, TX_FEA3_042, TX_FEA3_043, TX_FEA3_044, TX_FEA3N000,
+ TX_FEA3N001, TX_FEA3N002, TX_FEA3N003, TX_FEA3N004, TX_FEA3N005,
+ TX_FEA3N006, TX_FEA3N007, TX_FEA3N010, TX_FEA3N011, TX_FEA3N012,
+ TX_LOVA_100, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather3TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 2681, 0 },
+ { TX_SPEAKER_MCCOY, 2692, 0 },
+ { TX_SPEAKER_SPOCK, 2702, 0 },
+ { TX_SPEAKER_STRAGEY, 2712, 0 },
+ { TX_SPEAKER_TLAOXAC, 2724, 0 },
+ { TX_FEA3_001, 5973, 0 },
+ { TX_FEA3_002, 6028, 0 },
+ { TX_FEA3_003, 6157, 0 },
+ { TX_FEA3_004, 4518, 0 },
+ { TX_FEA3_005, 5799, 0 },
+ { TX_FEA3_006, 1987, 0 },
+ { TX_FEA3_007, 4639, 0 },
+ { TX_FEA3_008, 2843, 0 },
+ { TX_FEA3_009, 5281, 0 },
+ { TX_FEA3_010, 6762, 0 },
+ { TX_FEA3_011, 5418, 0 },
+ { TX_FEA3_012, 1792, 0 },
+ { TX_FEA3_013, 5619, 0 },
+ { TX_FEA3_014, 6616, 0 },
+ { TX_FEA3_015, 3671, 0 },
+ { TX_FEA3_016, 3704, 0 },
+ { TX_FEA3_017, 3849, 0 },
+ { TX_FEA3_018, 3551, 0 },
+ { TX_FEA3_019, 5496, 0 },
+ { TX_FEA3_020, 4360, 0 },
+ { TX_FEA3_021, 6832, 0 },
+ { TX_FEA3_022, 5695, 0 },
+ { TX_FEA3_023, 6936, 0 },
+ { TX_FEA3_024, 6979, 0 },
+ { TX_FEA3_025, 5367, 0 },
+ { TX_FEA3_026, 3470, 0 },
+ { TX_FEA3_027, 3780, 0 },
+ { TX_FEA3_028, 3602, 0 },
+ { TX_FEA3_029, 3890, 0 },
+ { TX_FEA3_030, 6800, 0 },
+ { TX_FEA3_031, 4683, 0 },
+ { TX_FEA3_032, 5871, 0 },
+ { TX_FEA3_033, 5470, 0 },
+ { TX_FEA3_034, 4757, 0 },
+ { TX_FEA3_035, 4032, 0 },
+ { TX_FEA3_036, 2733, 0 },
+ { TX_FEA3_037, 6278, 0 },
+ { TX_FEA3_038, 5916, 0 },
+ { TX_FEA3_039, 5108, 0 },
+ { TX_FEA3_040, 6493, 0 },
+ { TX_FEA3_041, 4107, 0 },
+ { TX_FEA3_042, 6387, 0 },
+ { TX_FEA3_043, 4207, 0 },
+ { TX_FEA3_044, 4882, 0 },
+ { TX_FEA3N000, 3092, 0 },
+ { TX_FEA3N001, 3030, 0 },
+ { TX_FEA3N002, 3135, 0 },
+ { TX_FEA3N003, 3344, 0 },
+ { TX_FEA3N004, 4158, 0 },
+ { TX_FEA3N005, 2971, 0 },
+ { TX_FEA3N006, 5225, 0 },
+ { TX_FEA3N007, 3199, 0 },
+ { TX_FEA3N010, 6878, 0 },
+ { TX_FEA3N011, 3408, 0 },
+ { TX_FEA3N012, 2883, 0 },
+ { TX_LOVA_100, 8620, 0 },
+ { TX_DIALOG_ERROR, 7022, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather3Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather3Tick1() {
playVoc("FEA3LOOP");
playMidiMusicTracks(27);
@@ -104,60 +191,60 @@ void Room::feather3Tick1() {
void Room::feather3Tick40() {
if (!_awayMission->feather.tlaoxacTestPassed)
- showText(TX_SPEAKER_TLAOXAC, 36, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_036);
}
void Room::feather3TouchedHotspot0() { // Tlaoxac prevents you from passing this point
if (!_awayMission->feather.tlaoxacTestPassed)
- showText(TX_SPEAKER_TLAOXAC, 35, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_035);
}
void Room::feather3UseSpockOnTlaoxac() {
- showText(TX_SPEAKER_SPOCK, 26, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
- showText(TX_SPEAKER_SPOCK, 28, true);
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_026);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_018);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_028);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_015);
}
void Room::feather3UseMccoyOnTlaoxac() {
- showText(TX_SPEAKER_MCCOY, 16, true);
- showText(TX_SPEAKER_SPOCK, 27, true);
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_016);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_027);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_017);
}
void Room::feather3UseRedshirtOnTlaoxac() {
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_STRAGEY, 29, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA3_029);
}
void Room::feather3UseCrewmanOnLeftExit() {
if (!_awayMission->feather.tlaoxacTestPassed)
- showText(TX_SPEAKER_TLAOXAC, 41, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_041);
}
void Room::feather3UseCommunicator() {
- showText(TX_SPEAKER_SPOCK, 24, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_024);
}
void Room::feather3UseSnakeOnKirk() {
if (!_awayMission->feather.tlaoxacTestPassed && !_awayMission->redshirtDead) {
if (_roomVar.feather.showedSnakeToTlaoxac && _awayMission->feather.numRocksThrownAtTlaoxac == 0) {
- showText(TX_SPEAKER_TLAOXAC, 43, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_043);
_awayMission->feather.tlaoxacTestPassed = true;
_awayMission->feather.missionScore += 2;
loadMapFile("feather3");
loadActorAnim(OBJECT_KNIFE, "s5r3nf", KNIFE_X, KNIFE_Y);
_awayMission->feather.field2e = true;
} else
- showDescription(4, true);
+ showDescription(TX_FEA3N004);
}
}
void Room::feather3UseSnakeOnSpock() {
if (_roomVar.feather.showedSnakeToTlaoxac)
- showText(TX_SPEAKER_SPOCK, 4, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_004);
else
- showText(TX_SPEAKER_SPOCK, 20, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_020);
}
void Room::feather3UseSnakeOnRedshirt() {
@@ -166,15 +253,15 @@ void Room::feather3UseSnakeOnRedshirt() {
walkCrewmanC(OBJECT_KIRK, 0x7c, 0xbc, &Room::feather3KirkReachedRedshirtWithSnake);
_awayMission->disableInput = true;
} else
- showText(TX_SPEAKER_STRAGEY, 31, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA3_031);
}
}
void Room::feather3KirkReachedRedshirtWithSnake() {
_awayMission->disableInput = false;
- showText(TX_SPEAKER_STRAGEY, 34, true);
- showText(TX_SPEAKER_TLAOXAC, 44, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA3_034);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_044);
_awayMission->feather.tlaoxacTestPassed = true;
_awayMission->feather.missionScore += 1;
@@ -184,12 +271,12 @@ void Room::feather3KirkReachedRedshirtWithSnake() {
}
void Room::feather3UseSnakeOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 7, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_007);
}
void Room::feather3UseSnakeOnTlaoxac() {
if (!_awayMission->feather.tlaoxacTestPassed && _awayMission->feather.numRocksThrownAtTlaoxac == 0) {
- showText(TX_SPEAKER_TLAOXAC, 39, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_039);
_roomVar.feather.showedSnakeToTlaoxac = true;
if (!_awayMission->feather.showedSnakeToTlaoxac) {
_awayMission->feather.showedSnakeToTlaoxac = true;
@@ -199,21 +286,21 @@ void Room::feather3UseSnakeOnTlaoxac() {
}
void Room::feather3UseKnifeOnSpock() {
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_025);
}
void Room::feather3UseKnifeOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 11, true); // BUGFIX: Speaker is Mccoy, not Spock.
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_011); // BUGFIX: Speaker is Mccoy, not Spock.
}
void Room::feather3UseKnifeOnRedshirt() {
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_STRAGEY, 33, true); // BUGFIX: Speaker is Stragey, not Spock.
+ showText(TX_SPEAKER_STRAGEY, TX_FEA3_033); // BUGFIX: Speaker is Stragey, not Spock.
}
void Room::feather3UseRockOnTlaoxac() {
if (_roomVar.feather.tlaoxacUnconscious)
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_009);
else {
_awayMission->feather.numRocksThrownAtTlaoxac++;
_awayMission->disableInput = true;
@@ -256,10 +343,10 @@ void Room::feather3Timer3Expired() {
void Room::feather3TlaoxacKnockedOutFromRockThrow() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(6, true);
+ showDescription(TX_FEA3N006);
if (!_awayMission->feather.tookKnife && !_awayMission->feather.field2e)
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_008);
_awayMission->feather.tlaoxacTestPassed = true;
_roomVar.feather.tlaoxacUnconscious = true;
@@ -267,42 +354,42 @@ void Room::feather3TlaoxacKnockedOutFromRockThrow() {
}
void Room::feather3UsePhaser() {
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_023);
}
void Room::feather3TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 5, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_005);
}
void Room::feather3TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 22, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA3_022);
}
void Room::feather3TalkToRedshirt() {
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_STRAGEY, 32, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA3_032);
}
void Room::feather3TalkToTlaoxac() {
if (!_awayMission->feather.tlaoxacTestPassed && !_awayMission->redshirtDead && !_roomVar.feather.tlaoxacUnconscious) {
if (!_roomVar.feather.showedSnakeToTlaoxac)
- showText(TX_SPEAKER_TLAOXAC, 38, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_038);
else if (_awayMission->feather.numRocksThrownAtTlaoxac != 0)
- showText(TX_SPEAKER_TLAOXAC, 38, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_038);
else {
const TextRef choices[] = {
TX_SPEAKER_KIRK,
- 1, 2, 3,
- TX_BLANK
+ TX_FEA3_001, TX_FEA3_002, TX_FEA3_003,
+ TX_END
};
- int choice = showMultipleTexts(choices, true);
+ int choice = showMultipleTexts(choices);
if (choice == 0)
- showText(TX_SPEAKER_TLAOXAC, 37, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_037);
else if (choice == 1)
- showText(TX_SPEAKER_TLAOXAC, 42, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_042);
else if (choice == 2) { // Accidentally insulted Quetzecoatl
- showText(TX_SPEAKER_TLAOXAC, 40, true);
+ showText(TX_SPEAKER_TLAOXAC, TX_FEA3_040);
_awayMission->disableInput = true;
loadActorAnimC(OBJECT_TLAOXAC, "s5r3aj", -1, -1, &Room::feather3TlaoxacKilledRedshirt);
playMidiMusicTracks(2);
@@ -320,35 +407,36 @@ void Room::feather3TlaoxacKilledRedshirt() {
void Room::feather3UseMTricorderOnTlaoxac() {
if (_roomVar.feather.tlaoxacUnconscious)
- mccoyScan(DIR_W, 10, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA3_010);
else
- mccoyScan(DIR_W, 14, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA3_014);
}
void Room::feather3UseMedkitOnTlaoxac() {
if (_awayMission->feather.knockedOutTlaoxac)
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_012);
}
void Room::feather3UseMedkitOnRedshirt() {
- if (_awayMission->redshirtDead)
- mccoyScan(DIR_N, 30, true);
+ if (_awayMission->redshirtDead) {
+ mccoyScan(DIR_N, TX_SPEAKER_MCCOY, TX_FEA3_030);
+ }
}
void Room::feather3UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 6, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA3_006);
}
void Room::feather3UseMTricorderOnLight() {
- mccoyScan(DIR_W, 13, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA3_013);
}
void Room::feather3UseSTricorderOnLight() {
- spockScan(DIR_W, 19, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA3_019);
}
void Room::feather3UseSTricorderAnywhere() {
- spockScan(DIR_S, 21, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA3_021);
}
void Room::feather3GetKnife() {
@@ -370,40 +458,40 @@ void Room::feather3Timer1Expired() {
void Room::feather3PickedUpKnife() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(10, true);
+ showDescription(TX_FEA3N010);
}
void Room::feather3LookAtSpock() {
if (!_awayMission->feather.knockedOutTlaoxac && !_awayMission->feather.tlaoxacTestPassed)
- showDescription(2, true);
+ showDescription(TX_FEA3N002);
else // ENHANCEMENT: Originally did nothing here. Fall back to default behaviour in the engine.
_awayMission->rdfStillDoDefaultAction = true;
}
void Room::feather3LookAtRedshirt() {
if (_awayMission->redshirtDead)
- showDescription(5, true);
+ showDescription(TX_FEA3N005);
else
- showDescription(12, true);
+ showDescription(TX_FEA3N012);
}
void Room::feather3LookAtTlaoxac() {
if (_awayMission->feather.knockedOutTlaoxac)
- showDescription(3, true);
+ showDescription(TX_FEA3N003);
else
- showDescription(7, true);
+ showDescription(TX_FEA3N007);
}
void Room::feather3LookAtLight() {
- showDescription(1, true);
+ showDescription(TX_FEA3N001);
}
void Room::feather3LookAtMccoy() {
- showDescription(0, true);
+ showDescription(TX_FEA3N000);
}
void Room::feather3LookAtKnife() {
- showDescription(11, true);
+ showDescription(TX_FEA3N011);
}
}
diff --git a/engines/startrek/rooms/feather4.cpp b/engines/startrek/rooms/feather4.cpp
index 9f80d3d34f..1b3da09ece 100644
--- a/engines/startrek/rooms/feather4.cpp
+++ b/engines/startrek/rooms/feather4.cpp
@@ -65,97 +65,141 @@ extern const RoomAction feather4ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather4TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY, TX_SPEAKER_QUETZECOATL,
+ TX_FEA4_001, TX_FEA4_002, TX_FEA4_003, TX_FEA4_004, TX_FEA4_006,
+ TX_FEA4_007, TX_FEA4_008, TX_FEA4_009, TX_FEA4_010, TX_FEA4_011,
+ TX_FEA4_012, TX_FEA4_013, TX_FEA4N000, TX_FEA4N001, TX_FEA4N002,
+ TX_FEA4N003, TX_FEA4N004, TX_FEA4N005, TX_FEA4N006, TX_FEA4N007,
+ TX_FEA4N008
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather4TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 1205, 0 },
+ { TX_SPEAKER_MCCOY, 1228, 0 },
+ { TX_SPEAKER_SPOCK, 1238, 0 },
+ { TX_SPEAKER_STRAGEY, 1248, 0 },
+ { TX_SPEAKER_QUETZECOATL, 1216, 0 },
+ { TX_FEA4_001, 2525, 0 },
+ { TX_FEA4_002, 700, 0 },
+ { TX_FEA4_003, 2674, 0 },
+ { TX_FEA4_004, 1779, 0 },
+ { TX_FEA4_006, 1729, 0 },
+ { TX_FEA4_007, 1945, 0 },
+ { TX_FEA4_008, 1667, 0 },
+ { TX_FEA4_009, 2768, 0 },
+ { TX_FEA4_010, 2458, 0 },
+ { TX_FEA4_011, 1607, 0 },
+ { TX_FEA4_012, 2567, 0 },
+ { TX_FEA4_013, 2298, 0 },
+ { TX_FEA4N000, 1324, 0 },
+ { TX_FEA4N001, 1261, 0 },
+ { TX_FEA4N002, 1370, 0 },
+ { TX_FEA4N003, 1426, 0 },
+ { TX_FEA4N004, 2045, 0 },
+ { TX_FEA4N005, 2235, 0 },
+ { TX_FEA4N006, 2175, 0 },
+ { TX_FEA4N007, 2123, 0 },
+ { TX_FEA4N008, 1576, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather4Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather4Tick1() {
playVoc("FEA4LOOP");
playMidiMusicTracks(27);
}
void Room::feather4UseCommunicator() {
- showText(TX_SPEAKER_MCCOY, 5, true); // BUGFIX: Original played wrong audio file (TX_FEA4N008)
+ showText(TX_SPEAKER_MCCOY, TX_FEA4N008);
}
void Room::feather4UsePhaser() {
- showText(TX_SPEAKER_SPOCK, 11, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA4_011);
}
void Room::feather4UseSTricorderOnLight() {
- spockScan(DIR_W, 10, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA4_010);
}
void Room::feather4UseSTricorderOnMushroom() {
- spockScan(DIR_W, 12, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA4_012);
}
void Room::feather4UseSTricorderOnFern() {
- spockScan(DIR_W, 9, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA4_009);
}
void Room::feather4UseSTricorderAnywhere() {
- spockScan(DIR_W, 8, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA4_008);
}
void Room::feather4UseMTricorderOnLight() {
- mccoyScan(DIR_W, 1, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA4_001);
}
void Room::feather4UseMTricorderOnMushroom() {
- mccoyScan(DIR_W, 3, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA4_003);
}
void Room::feather4UseMTricorderAnywhere() {
- mccoyScan(DIR_W, 6, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA4_006);
}
void Room::feather4UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 2, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA4_002);
}
void Room::feather4TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 4, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA4_004);
}
void Room::feather4TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA4_007);
}
void Room::feather4TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 13, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA4_013);
}
void Room::feather4LookAtEyes() {
- showDescription(3, true);
+ showDescription(TX_FEA4N003);
}
void Room::feather4LookAnywhere() {
- showDescription(8, true);
+ showDescription(TX_FEA4N008);
}
void Room::feather4LookAtMushroom() {
- showDescription(1, true);
+ showDescription(TX_FEA4N001);
}
void Room::feather4LookAtFern() {
- showDescription(0, true);
+ showDescription(TX_FEA4N000);
}
void Room::feather4LookAtLight() {
- showDescription(2, true);
+ showDescription(TX_FEA4N002);
}
void Room::feather4LookAtKirk() {
- showDescription(4, true);
+ showDescription(TX_FEA4N004);
}
void Room::feather4LookAtSpock() {
- showDescription(7, true);
+ showDescription(TX_FEA4N007);
}
void Room::feather4LookAtMccoy() {
- showDescription(6, true);
+ showDescription(TX_FEA4N006);
}
void Room::feather4LookAtRedshirt() {
- showDescription(5, true);
+ showDescription(TX_FEA4N005);
}
}
diff --git a/engines/startrek/rooms/feather5.cpp b/engines/startrek/rooms/feather5.cpp
index a7fabbd7c9..ae15d92fcf 100644
--- a/engines/startrek/rooms/feather5.cpp
+++ b/engines/startrek/rooms/feather5.cpp
@@ -112,6 +112,35 @@ extern const RoomAction feather5ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather5TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY,
+ TX_FEA5_002, TX_FEA5_003, TX_FEA5_004, TX_FEA5_005, TX_FEA5_006,
+ TX_FEA5_007, TX_FEA5_008, TX_FEA5_009, TX_FEA5_010, TX_FEA5_011,
+ TX_FEA5_013, TX_FEA5_014, TX_FEA5_015, TX_FEA5_016, TX_FEA5_018,
+ TX_FEA5_019, TX_FEA5_020, TX_FEA5_021, TX_FEA5_022, TX_FEA5_023,
+ TX_FEA5_024, TX_FEA5_025, TX_FEA5_026, TX_FEA5_027, TX_FEA5_028,
+ TX_FEA5_029, TX_FEA5_030, TX_FEA5_031, TX_FEA5_032, TX_FEA5_033,
+ TX_FEA5_034, TX_FEA5_035, TX_FEA5_036, TX_FEA5_037, TX_FEA5_038,
+ TX_FEA5_039, TX_FEA5_040, TX_FEA5N000, TX_FEA5N001, TX_FEA5N002,
+ TX_FEA5N003, TX_FEA5N004, TX_FEA5N005, TX_FEA5N006, TX_FEA5N007,
+ TX_FEA5N008, TX_FEA5N009, TX_FEA5N010, TX_FEA5N011, TX_FEA5N012,
+ TX_FEA5N013, TX_FEA5N014, TX_FEA5N015, TX_FEA5_001
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather5TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 2385, 0 },
+ { TX_SPEAKER_MCCOY, 2396, 0 },
+ { TX_SPEAKER_SPOCK, 2406, 0 },
+ { TX_SPEAKER_STRAGEY, 2416, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather5Texts[] = {
+ { TX_FEA5_001, Common::EN_ANY, "#FEA5\\FEA5_001#This is a very finely crafted knife." },
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather5Tick1() {
playVoc("FEA5LOOP");
playMidiMusicTracks(29);
@@ -124,27 +153,27 @@ void Room::feather5Tick1() {
void Room::feather5TouchedHotspot0() { // Approached the log
if (!_awayMission->feather.waterMonsterRetreated) {
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_005);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_STRAGEY, 33, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_033);
}
}
void Room::feather5UseSpockOnFern() {
- showText(TX_SPEAKER_SPOCK, 4, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_004);
}
void Room::feather5UseMccoyOnFern() {
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_009);
}
void Room::feather5UseRedshirtOnFern() {
- showText(TX_SPEAKER_STRAGEY, 35, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_035);
}
void Room::feather5UseRedshirtOnLeftExit() {
if (!_awayMission->feather.waterMonsterRetreated) {
- showText(TX_SPEAKER_STRAGEY, 34, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_034);
_awayMission->disableInput = true;
loadMapFile("feath5b");
walkCrewmanC(OBJECT_REDSHIRT, 0x8f, 0x64, &Room::feather5RedshirtReachedLog);
@@ -167,32 +196,32 @@ void Room::feather5RedshirtDeathFinished() {
void Room::feather5UseSpockOnLeftExit() {
if (!_awayMission->feather.waterMonsterRetreated)
- showText(TX_SPEAKER_SPOCK, 2, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_002);
}
void Room::feather5UseMccoyOnLeftExit() {
if (!_awayMission->feather.waterMonsterRetreated)
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_015);
}
void Room::feather5UseSnakeOnKirk() {
- showText(TX_SPEAKER_KIRK, 10, true);
+ showText(TX_SPEAKER_KIRK, TX_FEA5N010);
}
void Room::feather5UseSnakeOnSpock() {
- showText(TX_SPEAKER_SPOCK, 32, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_032);
}
void Room::feather5UseSnakeOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_020);
}
void Room::feather5UseSnakeOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 40, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_040);
}
void Room::feather5UseSnakeOnWater() {
- showDescription(11, true);
+ showDescription(TX_FEA5N011);
loseItem(OBJECT_ISNAKE);
}
@@ -201,36 +230,36 @@ void Room::feather5UseKnifeOnKirk() {
// However, there is an unused audio file for text that otherwise only appears in the
// mac version. (DOS floppy version has yet another variation for this text.)
// We'll use that unused audio file here...
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_FEA5_001);
}
void Room::feather5UseKnifeOnSpock() {
- showText(TX_SPEAKER_SPOCK, 29, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_029);
}
void Room::feather5UseKnifeOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_008);
}
void Room::feather5UseKnifeOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 39, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_039);
}
void Room::feather5UseKnifeOnWater() {
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_018);
}
void Room::feather5UseKnifeOnMonster() {
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_006);
}
void Room::feather5GetFern() {
- showDescription(8, true);
+ showDescription(TX_FEA5N008);
}
void Room::feather5UseKnifeOnFern() {
if (_awayMission->feather.gotFern)
- showDescription(15, true);
+ showDescription(TX_FEA5N015);
else {
walkCrewmanC(OBJECT_KIRK, 0x106, 0x8a, &Room::feather5ReachedFern);
_awayMission->disableInput = true;
@@ -278,141 +307,141 @@ void Room::feather5FernFellIntoWater() {
}
void Room::feather5Timer1Expired() { // Spock explains that the creature retreated
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_025);
}
void Room::feather5UseRockOnSpock() {
- showText(TX_SPEAKER_SPOCK, 27, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_027);
}
void Room::feather5UseRockOnMccoy() {
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_019);
}
void Room::feather5UseRockOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 38, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_038);
}
void Room::feather5UseCrewmanOnThrownFern() {
// This might be unused? The object in question (OBJECT_THROWN_FERN) shouldn't be
// visible while player control is active.
- showDescription(3, true);
+ showDescription(TX_FEA5N003);
}
void Room::feather5UseSpockOnMonster() {
- showText(TX_SPEAKER_SPOCK, 3, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_003);
}
void Room::feather5UseMccoyOnMonster() {
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_016);
}
void Room::feather5UseRedshirtOnMonster() {
- showText(TX_SPEAKER_STRAGEY, 37, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_037);
}
void Room::feather5UsePhaser() {
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_028);
}
void Room::feather5LookAnywhere() {
- showDescription(12, true);
+ showDescription(TX_FEA5N012);
}
void Room::feather5LookAtLog() {
- showDescription(7, true);
+ showDescription(TX_FEA5N007);
}
void Room::feather5LookAtWater() {
- showDescription(9, true);
+ showDescription(TX_FEA5N009);
}
void Room::feather5LookAtFern() {
- showDescription(14, true);
+ showDescription(TX_FEA5N014);
}
void Room::feather5LookAtInsects() {
- showDescription(5, true);
+ showDescription(TX_FEA5N005);
}
void Room::feather5LookAtCave() {
- showDescription(13, true);
+ showDescription(TX_FEA5N013);
}
void Room::feather5LookAtMonster() {
- showDescription(0, true);
+ showDescription(TX_FEA5N000);
}
void Room::feather5LookAtSpock() {
- showDescription(6, true);
+ showDescription(TX_FEA5N006);
}
void Room::feather5LookAtKirk() {
if (!_awayMission->feather.waterMonsterRetreated)
- showDescription(1, true);
+ showDescription(TX_FEA5N001);
else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing
_awayMission->rdfStillDoDefaultAction = true;
}
void Room::feather5LookAtMccoy() {
if (!_awayMission->feather.waterMonsterRetreated)
- showDescription(2, true);
+ showDescription(TX_FEA5N002);
else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing
_awayMission->rdfStillDoDefaultAction = true;
}
void Room::feather5LookAtRedshirt() {
if (!_awayMission->feather.waterMonsterRetreated)
- showDescription(4, true);
+ showDescription(TX_FEA5N004);
else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing
_awayMission->rdfStillDoDefaultAction = true;
}
void Room::feather5TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 7, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_007);
}
void Room::feather5TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 22, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA5_022);
}
void Room::feather5TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 36, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA5_036);
}
void Room::feather5UseMTricorderOnWater() {
if (_awayMission->feather.waterMonsterRetreated)
- mccoyScan(DIR_W, 11, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA5_011);
else
- mccoyScan(DIR_W, 14, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA5_014);
}
void Room::feather5UseMTricorderOnMonster() {
- mccoyScan(DIR_W, 13, false, true);
+ mccoyScan(DIR_W, TX_SPEAKER_MCCOY, TX_FEA5_013);
}
void Room::feather5UseSTricorderOnMonster() {
- spockScan(DIR_W, 24, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA5_024);
}
void Room::feather5UseSTricorderAnywhere() {
- spockScan(DIR_W, 26, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA5_026);
}
void Room::feather5UseSTricorderOnWater() {
if (_awayMission->feather.waterMonsterRetreated)
- spockScan(DIR_W, 31, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA5_031);
else
- spockScan(DIR_W, 30, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_FEA5_030);
}
void Room::feather5UseSTricorderOnFern() {
- spockScan(DIR_N, 23, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA5_023);
}
void Room::feather5UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA5_010);
}
}
diff --git a/engines/startrek/rooms/feather6.cpp b/engines/startrek/rooms/feather6.cpp
index 2cef562571..6a71b50ac5 100644
--- a/engines/startrek/rooms/feather6.cpp
+++ b/engines/startrek/rooms/feather6.cpp
@@ -99,6 +99,99 @@ extern const RoomAction feather6ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather6TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY,
+ TX_FEA6_001, TX_FEA6_002, TX_FEA6_003, TX_FEA6_004, TX_FEA6_005,
+ TX_FEA6_006, TX_FEA6_007, TX_FEA6_008, TX_FEA6_009, TX_FEA6_011,
+ TX_FEA6_012, TX_FEA6_013, TX_FEA6_014, TX_FEA6_015, TX_FEA6_016,
+ TX_FEA6_017, TX_FEA6_018, TX_FEA6_019, TX_FEA6_020, TX_FEA6_021,
+ TX_FEA6_022, TX_FEA6_023, TX_FEA6_024, TX_FEA6_025, TX_FEA6_026,
+ TX_FEA6_027, TX_FEA6_028, TX_FEA6_029, TX_FEA6_030, TX_FEA6_031,
+ TX_FEA6_032, TX_FEA6_033, TX_FEA6_034, TX_FEA6_035, TX_FEA6_036,
+ TX_FEA6_037, TX_FEA6_038, TX_FEA6_039, TX_FEA6_040, TX_FEA6_041,
+ TX_FEA6_042, TX_FEA6_043, TX_FEA6N000, TX_FEA6N001, TX_FEA6N002,
+ TX_FEA6N003, TX_FEA6N004, TX_FEA6N005, TX_FEA6N006, TX_FEA6N007,
+ TX_FEA6N008, TX_FEA6N009, TX_FEA6N010, TX_FEA6N011, TX_FEA6N012,
+ TX_FEA6N013, TX_FEA6N014, TX_FEA6N015, TX_FEA6N016, TX_FEA6N017,
+ TX_FEA6N020, TX_FEA6N028, TX_FEA6N029
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather6TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 2326, 0 },
+ { TX_SPEAKER_MCCOY, 2337, 0 },
+ { TX_SPEAKER_SPOCK, 2347, 0 },
+ { TX_SPEAKER_STRAGEY, 2357, 0 },
+ { TX_FEA6_001, 2687, 0 },
+ { TX_FEA6_002, 5067, 0 },
+ { TX_FEA6_003, 5632, 0 },
+ { TX_FEA6_004, 4306, 0 },
+ { TX_FEA6_005, 5755, 0 },
+ { TX_FEA6_006, 4238, 0 },
+ { TX_FEA6_007, 5863, 0 },
+ { TX_FEA6_008, 4179, 0 },
+ { TX_FEA6_009, 2445, 0 },
+ { TX_FEA6_011, 1104, 0 },
+ { TX_FEA6_012, 6315, 0 },
+ { TX_FEA6_013, 6247, 0 },
+ { TX_FEA6_014, 7241, 0 },
+ { TX_FEA6_015, 6445, 0 },
+ { TX_FEA6_016, 5227, 0 },
+ { TX_FEA6_017, 4043, 0 },
+ { TX_FEA6_018, 6874, 0 },
+ { TX_FEA6_019, 3201, 0 },
+ { TX_FEA6_020, 2370, 0 },
+ { TX_FEA6_021, 2778, 0 },
+ { TX_FEA6_022, 6590, 0 },
+ { TX_FEA6_023, 7370, 0 },
+ { TX_FEA6_024, 6537, 0 },
+ { TX_FEA6_025, 6680, 0 },
+ { TX_FEA6_026, 6777, 0 },
+ { TX_FEA6_027, 7043, 0 },
+ { TX_FEA6_028, 3303, 0 },
+ { TX_FEA6_029, 6014, 0 },
+ { TX_FEA6_030, 6046, 0 },
+ { TX_FEA6_031, 6172, 0 },
+ { TX_FEA6_032, 4380, 0 },
+ { TX_FEA6_033, 4086, 0 },
+ { TX_FEA6_034, 3883, 0 },
+ { TX_FEA6_035, 5377, 0 },
+ { TX_FEA6_036, 4492, 0 },
+ { TX_FEA6_037, 4592, 0 },
+ { TX_FEA6_038, 5498, 0 },
+ { TX_FEA6_039, 2867, 0 },
+ { TX_FEA6_040, 2504, 0 },
+ { TX_FEA6_041, 5142, 0 },
+ { TX_FEA6_042, 4972, 0 },
+ { TX_FEA6_043, 5328, 0 },
+ { TX_FEA6N000, 2601, 0 },
+ { TX_FEA6N001, 3147, 0 },
+ { TX_FEA6N002, 4804, 0 },
+ { TX_FEA6N003, 3631, 0 },
+ { TX_FEA6N004, 7307, 0 },
+ { TX_FEA6N005, 3404, 0 },
+ { TX_FEA6N006, 3367, 0 },
+ { TX_FEA6N007, 4643, 0 },
+ { TX_FEA6N008, 4870, 0 },
+ { TX_FEA6N009, 2746, 0 },
+ { TX_FEA6N010, 2835, 0 },
+ { TX_FEA6N011, 4758, 0 },
+ { TX_FEA6N012, 3770, 0 },
+ { TX_FEA6N013, 3823, 0 },
+ { TX_FEA6N014, 3682, 0 },
+ { TX_FEA6N015, 3059, 0 },
+ { TX_FEA6N016, 3454, 0 },
+ { TX_FEA6N017, 7125, 0 },
+ { TX_FEA6N020, 7185, 0 },
+ { TX_FEA6N028, 2997, 0 },
+ { TX_FEA6N029, 2921, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather6Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather6Tick1() {
playVoc("FEA6LOOP");
playMidiMusicTracks(27);
@@ -107,22 +200,21 @@ void Room::feather6Tick1() {
}
void Room::feather6TouchedHotspot0() { // McCoy warns you not to go back to the river
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_014);
}
void Room::feather6UseSpockOnCrystals() {
- showText(TX_SPEAKER_SPOCK, 20, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_020);
}
void Room::feather6UseMccoyOnCrystals() {
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_009);
}
void Room::feather6UseRedshirtOnCrystals() {
- showText(TX_SPEAKER_STRAGEY, 40, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_040);
}
-
void Room::feather6UseRockOnStalactites() {
_awayMission->disableInput = true;
walkCrewmanC(OBJECT_KIRK, 0x94, 0x97, &Room::feather6ReachedPositionToThrowRock);
@@ -143,8 +235,8 @@ void Room::feather6KirkDiedFromStalactites() {
_awayMission->feather.missionScore -= 3;
_awayMission->feather.diedFromStalactites = true;
_awayMission->disableInput = false;
- showDescription(0, true);
- showDescription(4, true);
+ showDescription(TX_FEA6N000);
+ showDescription(TX_FEA6N004);
loadRoomIndex(7, 5);
}
@@ -169,7 +261,7 @@ void Room::feather6Tick() {
void Room::feather6HitCrystalsWithRockFirstTime() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_FEA6_001);
}
void Room::feather6HitCrystalsWithRockSecondTime() {
@@ -179,180 +271,180 @@ void Room::feather6HitCrystalsWithRockSecondTime() {
}
void Room::feather6UseRockOnStalagmites() {
- showText(TX_SPEAKER_SPOCK, 19, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_019);
}
void Room::feather6UseRockAnywhere() {
// ENHANCEMENT: There were two implementations of this function. The first (which took
// precedence) showed TX_FEA6N009, a generic "nothing happens" text. The second is
// Spock advising you not to use rocks, which is more interesting.
- showText(TX_SPEAKER_SPOCK, 21, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_021);
}
void Room::feather6UseKnifeOnStalagmites() {
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_028);
}
void Room::feather6UseKnifeAnywhere() {
- showDescription(10, true);
+ showDescription(TX_FEA6N010);
}
void Room::feather6UseKnifeOnMccoy() {
// BUG: Stragey could be dead...
- showText(TX_SPEAKER_STRAGEY, 39, true); // BUGFIX: Speaker is Stragey (not Spock)
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_039); // BUGFIX: Speaker is Stragey (not Spock)
}
void Room::feather6UseKnifeOnSpock() {
- showText(TX_SPEAKER_STRAGEY, 39, true); // BUGFIX: Speaker is Stragey (not Spock)
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_039); // BUGFIX: Speaker is Stragey (not Spock)
}
void Room::feather6UseKnifeOnRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 39, true); // BUGFIX: Speaker is Stragey (not Spock)
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_039); // BUGFIX: Speaker is Stragey (not Spock)
}
void Room::feather6UseCrystalAnywhere() {
- showDescription(15, true);
+ showDescription(TX_FEA6N015);
}
void Room::feather6UseSnakeAnywhere() {
- showDescription(1, true);
+ showDescription(TX_FEA6N001);
}
void Room::feather6UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_011);
}
void Room::feather6UsePhaser() {
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_023);
}
void Room::feather6LookAtEastExit() {
- showDescription(16, true);
+ showDescription(TX_FEA6N016);
}
void Room::feather6LookAnywhere() {
- showDescription(3, true);
+ showDescription(TX_FEA6N003);
}
void Room::feather6LookAtRocks() {
- showDescription(14, true);
+ showDescription(TX_FEA6N014);
}
void Room::feather6LookAtStalagmites() {
- showDescription(13, true);
+ showDescription(TX_FEA6N013);
}
void Room::feather6LookAtCrystals() {
- showDescription(5, true);
+ showDescription(TX_FEA6N005);
}
void Room::feather6LookAtKirk() {
- showDescription(7, true);
+ showDescription(TX_FEA6N007);
}
void Room::feather6LookAtSpock() {
- showDescription(11, true);
+ showDescription(TX_FEA6N011);
}
void Room::feather6LookAtMccoy() {
- showDescription(2, true);
+ showDescription(TX_FEA6N002);
}
void Room::feather6LookAtRedshirt() {
- showDescription(8, true);
+ showDescription(TX_FEA6N008);
}
void Room::feather6LookAtStalactites() {
- showDescription(12, true);
- showText(TX_SPEAKER_SPOCK, 34, true);
- showText(TX_SPEAKER_MCCOY, 17, true);
- showText(TX_SPEAKER_SPOCK, 33, true);
+ showDescription(TX_FEA6N012);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_034);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_017);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_033);
// BUG: Choice 2 (TX_FEA6_004) doesn't match with audio at all.
const TextRef choices[] = {
TX_SPEAKER_KIRK,
- 8, 6, 4,
- TX_BLANK
+ TX_FEA6_008, TX_FEA6_006, TX_FEA6_004,
+ TX_END
};
- int choice = showMultipleTexts(choices, true);
+ int choice = showMultipleTexts(choices);
if (choice == 0)
- showText(TX_SPEAKER_SPOCK, 32, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_032);
else if (choice == 1)
- showText(TX_SPEAKER_SPOCK, 36, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_036);
else
- showText(TX_SPEAKER_SPOCK, 37, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_037);
}
void Room::feather6TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_013);
}
void Room::feather6TalkToRedshirt() {
- showText(TX_SPEAKER_STRAGEY, 42, true);
- showText(TX_SPEAKER_KIRK, 2, true);
- showText(TX_SPEAKER_STRAGEY, 41, true);
- showText(TX_SPEAKER_MCCOY, 16, true);
- showText(TX_SPEAKER_STRAGEY, 43, true);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_042);
+ showText(TX_SPEAKER_KIRK, TX_FEA6_002);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_041);
+ showText(TX_SPEAKER_MCCOY, TX_FEA6_016);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA6_043);
}
void Room::feather6TalkToSpock() {
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_SPOCK, 35, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_035);
else {
- showText(TX_SPEAKER_SPOCK, 38, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_038);
const TextRef choices[] = {
TX_SPEAKER_KIRK,
- 3, 5, 7,
- TX_BLANK
+ TX_FEA6_003, TX_FEA6_005, TX_FEA6_007,
+ TX_END
};
- int choice = showMultipleTexts(choices, true);
+ int choice = showMultipleTexts(choices);
if (choice == 0)
- showText(TX_SPEAKER_SPOCK, 29, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_029);
else if (choice == 1)
- showText(TX_SPEAKER_SPOCK, 30, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_030);
else
- showText(TX_SPEAKER_SPOCK, 31, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA6_031);
}
}
void Room::feather6UseMTricorderOnEastExit() {
- mccoyScan(DIR_E, 12, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA6_012);
}
void Room::feather6UseMTricorderOnRocks() {
// ENHANCEMENT: Original didn't play tricorder noise, etc
- mccoyScan(DIR_E, 15, false, true);
+ mccoyScan(DIR_E, TX_SPEAKER_MCCOY, TX_FEA6_015);
}
void Room::feather6UseSTricorderOnEastExit() {
- spockScan(DIR_E, 24, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_FEA6_024);
}
void Room::feather6UseSTricorderAnywhere() {
- spockScan(DIR_S, 22, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_FEA6_022);
}
void Room::feather6UseSTricorderOnRocks() {
- spockScan(DIR_N, 18, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA6_018);
}
void Room::feather6UseSTricorderOnCrystals() {
- spockScan(DIR_N, 27, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA6_027);
}
void Room::feather6UseSTricorderOnStalactites() {
- spockScan(DIR_N, 25, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA6_025);
}
void Room::feather6UseSTricorderOnStalagmites() {
- spockScan(DIR_N, 26, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_FEA6_026);
}
void Room::feather6GetCrystals() {
- showDescription(20, true);
+ showDescription(TX_FEA6N020);
}
void Room::feather6UseKnifeOnCrystals() {
@@ -370,7 +462,7 @@ void Room::feather6DoneCuttingCrystals() {
loadActorStandAnim(OBJECT_KIRK);
_awayMission->feather.missionScore += 1;
giveItem(OBJECT_ICRYSTAL);
- showDescription(17, true);
+ showDescription(TX_FEA6N017);
}
void Room::feather6Timer4Expired() { // Crystal disappears when timer 4 expires
diff --git a/engines/startrek/rooms/feather7.cpp b/engines/startrek/rooms/feather7.cpp
index d2d97ca3c2..c3f8773ad6 100644
--- a/engines/startrek/rooms/feather7.cpp
+++ b/engines/startrek/rooms/feather7.cpp
@@ -38,6 +38,60 @@ extern const RoomAction feather7ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum feather7TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_STRAGEY, TX_SPEAKER_QUETZECOATL,
+ TX_FEA7_001, TX_FEA7_002, TX_FEA7_003, TX_FEA7_004, TX_FEA7_005,
+ TX_FEA7_006, TX_FEA7_007, TX_FEA7_008, TX_FEA7_009, TX_FEA7_010,
+ TX_FEA7_011, TX_FEA7_012, TX_FEA7_013, TX_FEA7_014, TX_FEA7_015,
+ TX_FEA7_016, TX_FEA7_017, TX_FEA7_018, TX_FEA7_019, TX_FEA7_020,
+ TX_FEA7_021, TX_FEA7_022, TX_FEA7_023, TX_FEA7_024, TX_FEA7_025,
+ TX_FEA7_026, TX_FEA7_027, TX_FEA7_028, TX_FEA7_029, TX_FEA7_030
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets feather7TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 1064, 0 },
+ { TX_SPEAKER_MCCOY, 1075, 0 },
+ { TX_SPEAKER_SPOCK, 1085, 0 },
+ { TX_SPEAKER_STRAGEY, 1095, 0 },
+ { TX_SPEAKER_QUETZECOATL, 1107, 0 },
+ { TX_FEA7_001, 4842, 0 },
+ { TX_FEA7_002, 4802, 0 },
+ { TX_FEA7_003, 4674, 0 },
+ { TX_FEA7_004, 2517, 0 },
+ { TX_FEA7_005, 1697, 0 },
+ { TX_FEA7_006, 1896, 0 },
+ { TX_FEA7_007, 2446, 0 },
+ { TX_FEA7_008, 3887, 0 },
+ { TX_FEA7_009, 4020, 0 },
+ { TX_FEA7_010, 2002, 0 },
+ { TX_FEA7_011, 4128, 0 },
+ { TX_FEA7_012, 2687, 0 },
+ { TX_FEA7_013, 4602, 0 },
+ { TX_FEA7_014, 3614, 0 },
+ { TX_FEA7_015, 4443, 0 },
+ { TX_FEA7_016, 2250, 0 },
+ { TX_FEA7_017, 1120, 0 },
+ { TX_FEA7_018, 3069, 0 },
+ { TX_FEA7_019, 2117, 0 },
+ { TX_FEA7_020, 2044, 0 },
+ { TX_FEA7_021, 1334, 0 },
+ { TX_FEA7_022, 1214, 0 },
+ { TX_FEA7_023, 1547, 0 },
+ { TX_FEA7_024, 3724, 0 },
+ { TX_FEA7_025, 4164, 0 },
+ { TX_FEA7_026, 3297, 0 },
+ { TX_FEA7_027, 1490, 0 },
+ { TX_FEA7_028, 4381, 0 },
+ { TX_FEA7_029, 2295, 0 },
+ { TX_FEA7_030, 2806, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText feather7Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::feather7Tick1() {
playVoc("FEA7LOOP");
playMidiMusicTracks(33);
@@ -47,19 +101,19 @@ void Room::feather7Tick1() {
void Room::feather7Tick40() {
if (_awayMission->feather.diedFromStalactites)
- showText(TX_SPEAKER_QUETZECOATL, 17, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_017);
- showText(TX_SPEAKER_QUETZECOATL, 22, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_022);
if (_awayMission->redshirtDead)
- showText(TX_SPEAKER_QUETZECOATL, 21, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_021);
// BUGFIX: Show this even if redshirt isn't dead (he wishes you wouldn't have knocked
// out Tlaoxac)
if (_awayMission->feather.knockedOutTlaoxac)
- showText(TX_SPEAKER_QUETZECOATL, 23, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_023);
- showText(TX_SPEAKER_QUETZECOATL, 27, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_027);
walkCrewmanC(OBJECT_KIRK, 0x6c, 0x93, &Room::feather7KirkReachedSeat);
walkCrewmanC(OBJECT_SPOCK, 0xbb, 0x8c, &Room::feather7SpockReachedSeat);
@@ -86,57 +140,57 @@ void Room::feather7QuetzecoatlReachedSeat() {
void Room::feather7KirkSatDown() {
const TextRef choices1[] = {
TX_SPEAKER_KIRK,
- 5, 6, 10,
- TX_BLANK
+ TX_FEA7_005, TX_FEA7_006, TX_FEA7_010,
+ TX_END
};
- int choice = showMultipleTexts(choices1, true);
+ int choice = showMultipleTexts(choices1);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
- showText(TX_SPEAKER_QUETZECOATL, 20, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_020);
} else if (choice == 1)
- showText(TX_SPEAKER_QUETZECOATL, 19, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_019);
else
- showText(TX_SPEAKER_QUETZECOATL, 16, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_016);
- showText(TX_SPEAKER_QUETZECOATL, 29, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_029);
const TextRef choices2[] = {
TX_SPEAKER_KIRK,
- 7, 4, 12,
- TX_BLANK
+ TX_FEA7_007, TX_FEA7_004, TX_FEA7_012,
+ TX_END
};
- choice = showMultipleTexts(choices2, true);
+ choice = showMultipleTexts(choices2);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
- showText(TX_SPEAKER_QUETZECOATL, 30, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_030);
} else if (choice == 1)
- showText(TX_SPEAKER_QUETZECOATL, 18, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_018);
else {
_roomVar.feather.insultedQuetzecoatl = true;
- showText(TX_SPEAKER_QUETZECOATL, 26, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_026);
}
- showText(TX_SPEAKER_SPOCK, 14, true);
- showText(TX_SPEAKER_QUETZECOATL, 24, true);
+ showText(TX_SPEAKER_SPOCK, TX_FEA7_014);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_024);
const TextRef choices3[] = {
TX_SPEAKER_KIRK,
- 8, 9, 11,
- TX_BLANK
+ TX_FEA7_008, TX_FEA7_009, TX_FEA7_011,
+ TX_END
};
- choice = showMultipleTexts(choices3, true);
+ choice = showMultipleTexts(choices3);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
- showText(TX_SPEAKER_QUETZECOATL, 25, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_025);
} else if (choice == 1)
- showText(TX_SPEAKER_QUETZECOATL, 28, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_028);
- showText(TX_SPEAKER_QUETZECOATL, 15, true);
- showText(TX_SPEAKER_MCCOY, 13, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_QUETZECOATL, TX_FEA7_015);
+ showText(TX_SPEAKER_MCCOY, TX_FEA7_013);
+ showText(TX_SPEAKER_KIRK, TX_FEA7_003);
loadActorAnimC(OBJECT_KIRK, "s5r7ku", -1, -1, &Room::feather7ReadyToBeamOut);
loadActorAnim2(OBJECT_SPOCK, "s5r7su");
@@ -145,10 +199,10 @@ void Room::feather7KirkSatDown() {
void Room::feather7ReadyToBeamOut() {
if (_awayMission->redshirtDead)
- showText(TX_SPEAKER_KIRK, 2, true);
+ showText(TX_SPEAKER_KIRK, TX_FEA7_002);
else {
_awayMission->feather.missionScore += 1;
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_FEA7_001);
}
if (!_roomVar.feather.insultedQuetzecoatl)
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h
index 61f49c87d2..5c263199b5 100644
--- a/engines/startrek/rooms/function_map.h
+++ b/engines/startrek/rooms/function_map.h
@@ -23,34 +23,67 @@
#ifndef STARTREK_FUNCTIONMAP_H
#define STARTREK_FUNCTIONMAP_H
-#include "startrek/action.h"
#include "startrek/room.h"
namespace StarTrek {
extern const RoomAction demon0ActionList[], demon1ActionList[], demon2ActionList[], demon3ActionList[];
extern const RoomAction demon4ActionList[], demon5ActionList[], demon6ActionList[];
+extern const RoomTextOffsets demon0TextOffsets[], demon1TextOffsets[], demon2TextOffsets[], demon3TextOffsets[];
+extern const RoomTextOffsets demon4TextOffsets[], demon5TextOffsets[], demon6TextOffsets[];
+extern const RoomText demon0Texts[], demon1Texts[], demon2Texts[], demon3Texts[];
+extern const RoomText demon4Texts[], demon5Texts[], demon6Texts[];
extern const RoomAction tug0ActionList[], tug1ActionList[], tug2ActionList[], tug3ActionList[];
+extern const RoomTextOffsets tug0TextOffsets[], tug1TextOffsets[], tug2TextOffsets[], tug3TextOffsets[];
+extern const RoomText tug0Texts[], tug1Texts[], tug2Texts[], tug3Texts[];
extern const RoomAction love0ActionList[], love1ActionList[], love2ActionList[], love3ActionList[];
extern const RoomAction love4ActionList[], love5ActionList[];
+extern const RoomTextOffsets love0TextOffsets[], love1TextOffsets[], love2TextOffsets[], love3TextOffsets[];
+extern const RoomTextOffsets love4TextOffsets[], love5TextOffsets[];
+extern const RoomText love0Texts[], love1Texts[], love2Texts[], love3Texts[];
+extern const RoomText love4Texts[], love5Texts[];
+extern const RoomTextOffsets loveTextOffsets[];
extern const RoomAction mudd0ActionList[], mudd1ActionList[], mudd2ActionList[], mudd3ActionList[];
extern const RoomAction mudd4ActionList[], mudd5ActionList[];
+//extern const RoomTextOffsets mudd0TextOffsets[], mudd1TextOffsets[], mudd2TextOffsets[], mudd3TextOffsets[];
+//extern const RoomTextOffsets mudd4TextOffsets[], mudd5TextOffsets[];
+//extern const RoomText mudd0Texts[], mudd1Texts[], mudd2Texts[], mudd3Texts[];
+//extern const RoomText mudd4Texts[], mudd5Texts[];
+//extern const RoomTextOffsets muddTextOffsets[];
extern const RoomAction feather0ActionList[], feather1ActionList[], feather2ActionList[], feather3ActionList[];
extern const RoomAction feather4ActionList[], feather5ActionList[], feather6ActionList[], feather7ActionList[];
+extern const RoomTextOffsets feather0TextOffsets[], feather1TextOffsets[], feather2TextOffsets[], feather3TextOffsets[];
+extern const RoomTextOffsets feather4TextOffsets[], feather5TextOffsets[], feather6TextOffsets[], feather7TextOffsets[];
+extern const RoomText feather0Texts[], feather1Texts[], feather2Texts[], feather3Texts[];
+extern const RoomText feather4Texts[], feather5Texts[], feather6Texts[], feather7Texts[];
extern const RoomAction trial0ActionList[], trial1ActionList[], trial2ActionList[], trial3ActionList[];
extern const RoomAction trial4ActionList[], trial5ActionList[];
+//extern const RoomTextOffsets trial0TextOffsets[], trial1TextOffsets[], trial2TextOffsets[], trial3TextOffsets[];
+//extern const RoomTextOffsets trial4TextOffsets[], trial5TextOffsets[];
+//extern const RoomText trial0Texts[], trial1Texts[], trial2Texts[], trial3Texts[];
+//extern const RoomText trial4Texts[], trial5Texts[];
extern const RoomAction sins0ActionList[], sins1ActionList[], sins2ActionList[], sins3ActionList[];
extern const RoomAction sins4ActionList[], sins5ActionList[];
+//extern const RoomTextOffsets sins0TextOffsets[], sins1TextOffsets[], sins2TextOffsets[], sins3TextOffsets[];
+//extern const RoomTextOffsets sins4TextOffsets[], sins5TextOffsets[];
+//extern const RoomText sins0Texts[], sins1Texts[], sins2Texts[], sins3Texts[];
+//extern const RoomText sins4Texts[], sins5Texts[];
extern const RoomAction veng0ActionList[], veng1ActionList[], veng2ActionList[], veng3ActionList[];
extern const RoomAction veng4ActionList[], veng5ActionList[], veng6ActionList[], veng7ActionList[];
extern const RoomAction veng8ActionList[];
+extern const RoomTextOffsets veng0TextOffsets[], veng1TextOffsets[], veng2TextOffsets[];//, veng3TextOffsets[];
+//extern const RoomTextOffsets veng4TextOffsets[], veng5TextOffsets[], veng6TextOffsets[], veng7TextOffsets[];
+//extern const RoomTextOffsets veng8TextOffsets[];
+extern const RoomText veng0Texts[], veng1Texts[], veng2Texts[];//, veng3Texts[];
+//extern const RoomText veng4Texts[], veng5Texts[], veng6Texts[], veng7Texts[];
+//extern const RoomText veng8Texts[];
}
diff --git a/engines/startrek/rooms/love0.cpp b/engines/startrek/rooms/love0.cpp
index 19ff429c1b..76e11cd212 100644
--- a/engines/startrek/rooms/love0.cpp
+++ b/engines/startrek/rooms/love0.cpp
@@ -93,6 +93,119 @@ extern const RoomAction love0ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love0TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS, TX_SPEAKER_COMPUTER,
+ TX_LOV0_001, TX_LOV0_002, TX_LOV0_003, TX_LOV0_004, TX_LOV0_005,
+ TX_LOV0_006, TX_LOV0_007, TX_LOV0_008, TX_LOV0_009, TX_LOV0_010,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_023, TX_LOV0_024, TX_LOV0_026,
+ TX_LOV0_027, TX_LOV0_028, TX_LOV0_029, TX_LOV0_030, TX_LOV0_031,
+ TX_LOV0_033, TX_LOV0_035, TX_LOV0_036, TX_LOV0_037, TX_LOV0_038,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050,
+ //TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104, TX_LOV0_105,
+ //TX_LOV0_106, TX_LOV0_107,
+ TX_LOV0_124, TX_LOV0N000,
+ TX_LOV0N001, TX_LOV0N002, TX_LOV0N003, TX_LOV0N004, TX_LOV0N005,
+ TX_LOV0N006, TX_LOV0N007, TX_LOV0N008, TX_LOV0N009, TX_COMPA186,
+ TX_COMPA187, TX_COMPA189, TX_COMPA190, TX_COMPA191, TX_COMPA193,
+ TX_COMPU186, TX_COMPU187, TX_COMPU188, TX_COMPU189, TX_COMPU190,
+ TX_COMPU192, TX_COMPU193, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love0TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 5915, 0 },
+ { TX_SPEAKER_MCCOY, 5926, 0 },
+ { TX_SPEAKER_SPOCK, 5936, 0 },
+ { TX_SPEAKER_FERRIS, 5946, 0 },
+ { TX_SPEAKER_COMPUTER, 5957, 0 },
+ { TX_LOV0_001, 10075, 0 },
+ { TX_LOV0_002, 1488, 0 },
+ { TX_LOV0_003, 959, 0 },
+ { TX_LOV0_004, 7933, 0 },
+ { TX_LOV0_005, 10149, 0 },
+ { TX_LOV0_006, 1256, 0 },
+ { TX_LOV0_007, 1105, 0 },
+ { TX_LOV0_008, 6848, 0 },
+ { TX_LOV0_009, 7999, 0 },
+ { TX_LOV0_010, 10477, 0 },
+ { TX_LOV0_011, 10498, 0 },
+ { TX_LOV0_012, 10625, 0 },
+ { TX_LOV0_013, 10921, 0 },
+ { TX_LOV0_014, 10685, 0 },
+ { TX_LOV0_015, 10789, 0 },
+ { TX_LOV0_016, 10592, 0 },
+ { TX_LOV0_017, 11055, 0 },
+ { TX_LOV0_019, 10975, 0 },
+ { TX_LOV0_020, 10532, 0 },
+ { TX_LOV0_021, 10843, 0 },
+ { TX_LOV0_022, 10733, 0 },
+ { TX_LOV0_023, 7881, 0 },
+ { TX_LOV0_024, 7536, 0 },
+ { TX_LOV0_026, 11854, 0 },
+ { TX_LOV0_027, 6650, 0 },
+ { TX_LOV0_028, 7062, 0 },
+ { TX_LOV0_029, 11734, 0 },
+ { TX_LOV0_030, 10335, 0 },
+ { TX_LOV0_031, 6931, 0 },
+ { TX_LOV0_033, 11794, 0 },
+ { TX_LOV0_035, 7805, 0 },
+ { TX_LOV0_036, 1591, 0 },
+ { TX_LOV0_037, 10240, 0 },
+ { TX_LOV0_038, 6760, 0 },
+ { TX_LOV0_039, 11116, 0 },
+ { TX_LOV0_040, 11243, 0 },
+ { TX_LOV0_041, 11539, 0 },
+ { TX_LOV0_042, 11303, 0 },
+ { TX_LOV0_043, 11407, 0 },
+ { TX_LOV0_045, 11210, 0 },
+ { TX_LOV0_046, 11673, 0 },
+ { TX_LOV0_047, 11593, 0 },
+ { TX_LOV0_048, 11150, 0 },
+ { TX_LOV0_049, 11461, 0 },
+ { TX_LOV0_050, 11351, 0 },
+ //{ TX_LOV0_101, 12062, 0 }, // global in lovea
+ //{ TX_LOV0_102, 12126, 0 }, // global in lovea
+ //{ TX_LOV0_103, 12196, 0 }, // global in lovea
+ //{ TX_LOV0_104, 12246, 0 }, // global in lovea
+ //{ TX_LOV0_105, 12303, 0 }, // global in lovea
+ //{ TX_LOV0_106, 12415, 0 }, // global in lovea
+ //{ TX_LOV0_107, 12483, 0 }, // global in lovea
+ { TX_LOV0_124, 11931, 0 },
+ { TX_LOV0N000, 6449, 0 },
+ { TX_LOV0N001, 10380, 0 },
+ { TX_LOV0N002, 6227, 0 },
+ { TX_LOV0N003, 6344, 0 },
+ { TX_LOV0N004, 6185, 0 },
+ { TX_LOV0N005, 6292, 0 },
+ { TX_LOV0N006, 6049, 0 },
+ { TX_LOV0N007, 6525, 0 },
+ { TX_LOV0N008, 5971, 0 },
+ { TX_LOV0N009, 6399, 0 },
+ { TX_COMPA186, 8349, 0 },
+ { TX_COMPA187, 8372, 0 },
+ { TX_COMPA189, 8320, 0 },
+ { TX_COMPA190, 8265, 0 },
+ { TX_COMPA191, 8405, 0 },
+ { TX_COMPA193, 8295, 0 },
+ { TX_COMPU186, 9642, 0 },
+ { TX_COMPU187, 9864, 0 },
+ { TX_COMPU188, 7106, 0 },
+ { TX_COMPU189, 9381, 0 },
+ { TX_COMPU190, 8434, 0 },
+ { TX_COMPU192, 8220, 0 },
+ { TX_COMPU193, 8858, 0 },
+ { TX_DIALOG_ERROR, 12536, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love0Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love0Tick1() {
// BUGFIX: moved this out of the if statement below.
playVoc("LOV0LOOP");
@@ -159,79 +272,79 @@ void Room::love0ReachedDoor1() {
}
void Room::love0LookAtConsole() {
- showDescription(6, true);
+ showDescription(TX_LOV0N006);
}
void Room::love0LookAtViewscreen() {
- showDescription(0, true);
+ showDescription(TX_LOV0N000);
}
void Room::love0LookAnywhere() {
- showDescription(9, true);
+ showDescription(TX_LOV0N009);
}
void Room::love0LookAtDoor1() {
- showDescription(8, true);
+ showDescription(TX_LOV0N008);
}
void Room::love0LookAtDoor2() {
- showDescription(7, true);
+ showDescription(TX_LOV0N007);
}
void Room::love0LookAtKirk() {
- showDescription(2, true);
+ showDescription(TX_LOV0N002);
}
void Room::love0LookAtMccoy() {
- showDescription(4, true);
+ showDescription(TX_LOV0N004);
}
void Room::love0LookAtSpock() {
- showDescription(5, true);
+ showDescription(TX_LOV0N005);
}
void Room::love0LookAtRedshirt() {
- showDescription(3, true);
+ showDescription(TX_LOV0N003);
}
void Room::love0TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV0_003);
}
void Room::love0TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 7, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV0_007);
}
void Room::love0TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 27, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV0_027);
}
void Room::love0TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 38, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV0_038);
}
void Room::love0UseMTricorderAnywhere() {
if (_awayMission->love.knowAboutVirus)
- mccoyScan(DIR_N, 8, false, true);
+ mccoyScan(DIR_N, TX_SPEAKER_MCCOY, TX_LOV0_008, false);
else
- mccoyScan(DIR_N, 6, false, true);
+ mccoyScan(DIR_N, TX_SPEAKER_MCCOY, TX_LOV0_006, false);
}
void Room::love0UseSTricorderOnConsole() {
- spockScan(DIR_N, 31, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK,TX_LOV0_031, false);
}
void Room::love0UseSTricorderAnywhere() {
- spockScan(DIR_S, 28, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK,TX_LOV0_028, false);
}
void Room::love0UseKirkOnConsole() {
- showText(TX_SPEAKER_KIRK, 2, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV0_002);
love0UseSpockOnConsole();
}
void Room::love0UseRedshirtOnConsole() {
- showText(TX_SPEAKER_FERRIS, 36, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV0_036);
}
void Room::love0UseSpockOnConsole() {
@@ -252,7 +365,7 @@ void Room::love0SpockAccessedConsole() {
love0InteractWithConsole();
else {
showText(TX_SPEAKER_COMPUTER, TX_COMPU188);
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV0_005);
_roomVar.love.heardSummaryOfVirus = true;
}
}
@@ -279,11 +392,11 @@ void Room::love0MccoyAccessedConsole() {
showText(TX_SPEAKER_COMPUTER, TX_COMPU188);
_roomVar.love.heardSummaryOfVirus = true;
}
- showText(TX_SPEAKER_MCCOY, 24, true);
- showText(TX_SPEAKER_SPOCK, 35, true);
- showText(TX_SPEAKER_MCCOY, 23, true);
- showText(TX_SPEAKER_KIRK, 4, true);
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV0_024);
+ showText(TX_SPEAKER_SPOCK, TX_LOV0_035);
+ showText(TX_SPEAKER_MCCOY, TX_LOV0_023);
+ showText(TX_SPEAKER_KIRK, TX_LOV0_004);
+ showText(TX_SPEAKER_MCCOY, TX_LOV0_009);
_awayMission->love.knowAboutVirus = true;
}
}
@@ -298,7 +411,7 @@ void Room::love0InteractWithConsole() {
TX_COMPA186,
TX_COMPA187,
TX_COMPA191,
- TX_BLANK
+ TX_END
};
while (true) {
@@ -334,7 +447,7 @@ void Room::love0GetDoorOrConsole() {
// BUGFIX: There was a problem with "get door 1" where it would execute a bit of
// non-code before reaching where it was supposed to be. Not sure if it had any actual
// effect.
- showDescription(1, true);
+ showDescription(TX_LOV0N001);
// NOTE: There is an unused block of code that's jumped over in the "get door 2"
// function. (Spock says "that's not logical".)
diff --git a/engines/startrek/rooms/love1.cpp b/engines/startrek/rooms/love1.cpp
index ccdc35517c..fb861fa2c4 100644
--- a/engines/startrek/rooms/love1.cpp
+++ b/engines/startrek/rooms/love1.cpp
@@ -182,6 +182,168 @@ extern const RoomAction love1ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love1TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_025, TX_LOV0_026, TX_LOV0_029, TX_LOV0_033,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV0_124, TX_LOV1_001,
+ TX_LOV1_002, TX_LOV1_003, TX_LOV1_004, TX_LOV1_005, TX_LOV1_006,
+ TX_LOV1_007, TX_LOV1_008, TX_LOV1_009, TX_LOV1_010, TX_LOV1_011,
+ TX_LOV1_012, TX_LOV1_013, TX_LOV1_014, TX_LOV1_015, TX_LOV1_016,
+ TX_LOV1_017, TX_LOV1_018, TX_LOV1_019, TX_LOV1_021, TX_LOV1_022,
+ TX_LOV1_023, TX_LOV1_024, TX_LOV1_025, TX_LOV1_026, TX_LOV1_027,
+ TX_LOV1_028, TX_LOV5_015, TX_LOV5_019, TX_LOV5_027, TX_LOV5_030,
+ TX_LOV5_038, TX_LOVA_100, TX_LOVA_F01, TX_LOVA_F02, TX_LOVA_F03,
+ TX_LOVA_F04, TX_LOVA_F07, TX_LOVA_F08, TX_LOVA_F10, TX_LOVA_F54,
+ TX_LOVA_F55, TX_MUD2_040, TX_MUD4_018, TX_TUG2_010, TX_VENA_F41,
+ TX_LOV1N000, TX_LOV1N001, TX_LOV1N002, TX_LOV1N003, TX_LOV1N004,
+ TX_LOV1N005, TX_LOV1N006, TX_LOV1N007, TX_LOV1N008, TX_LOV1N009,
+ TX_LOV1N010, TX_LOV1N011, TX_LOV1N012, TX_LOV1N013, TX_LOV1N014,
+ TX_LOV1N015, TX_LOV1N016, TX_LOV1N017, TX_LOV1N018, TX_LOV1N019,
+ TX_LOV1N020, TX_LOV1N021, TX_LOV1N022, TX_LOV1N023, TX_LOV1N034,
+ TX_LOV1N035, TX_LOV2N005, TX_BRIDU146, TX_GENER004, TX_GET_BOTTLE_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love1TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 11280, 0 },
+ { TX_SPEAKER_MCCOY, 11291, 0 },
+ { TX_SPEAKER_SPOCK, 11301, 0 },
+ { TX_SPEAKER_FERRIS, 11311, 0 },
+ { TX_LOV0_011, 12397, 0 },
+ { TX_LOV0_012, 12524, 0 },
+ { TX_LOV0_013, 12820, 0 },
+ { TX_LOV0_014, 12584, 0 },
+ { TX_LOV0_015, 12688, 0 },
+ { TX_LOV0_016, 12491, 0 },
+ { TX_LOV0_017, 12954, 0 },
+ { TX_LOV0_019, 12874, 0 },
+ { TX_LOV0_020, 12431, 0 },
+ { TX_LOV0_021, 12742, 0 },
+ { TX_LOV0_022, 12632, 0 },
+ { TX_LOV0_025, 13880, 0 },
+ { TX_LOV0_026, 13753, 0 },
+ { TX_LOV0_029, 13633, 0 },
+ { TX_LOV0_033, 13693, 0 },
+ { TX_LOV0_039, 13015, 0 },
+ { TX_LOV0_040, 13142, 0 },
+ { TX_LOV0_041, 13438, 0 },
+ { TX_LOV0_042, 13202, 0 },
+ { TX_LOV0_043, 13306, 0 },
+ { TX_LOV0_045, 13109, 0 },
+ { TX_LOV0_046, 13572, 0 },
+ { TX_LOV0_047, 13492, 0 },
+ { TX_LOV0_048, 13049, 0 },
+ { TX_LOV0_049, 13360, 0 },
+ { TX_LOV0_050, 13250, 0 },
+ { TX_LOV0_101, 13961, 0 },
+ { TX_LOV0_102, 14025, 0 },
+ { TX_LOV0_103, 14095, 0 },
+ { TX_LOV0_104, 14145, 0 },
+ { TX_LOV0_105, 14202, 0 },
+ { TX_LOV0_106, 14314, 0 },
+ { TX_LOV0_107, 14382, 0 },
+ { TX_LOV0_124, 13830, 0 },
+ { TX_LOV1_001, 2668, 0 },
+ { TX_LOV1_002, 5066, 0 },
+ { TX_LOV1_003, 3804, 0 },
+ { TX_LOV1_004, 3901, 0 },
+ { TX_LOV1_005, 2812, 0 },
+ { TX_LOV1_006, 12236, 0 },
+ { TX_LOV1_007, 11998, 0 },
+ { TX_LOV1_008, 6774, 0 },
+ { TX_LOV1_009, 3507, 0 },
+ { TX_LOV1_010, 3389, 0 },
+ { TX_LOV1_011, 2940, 0 },
+ { TX_LOV1_012, 4991, 0 },
+ { TX_LOV1_013, 5598, 0 },
+ { TX_LOV1_014, 5709, 0 },
+ { TX_LOV1_015, 5330, 0 },
+ { TX_LOV1_016, 6618, 0 },
+ { TX_LOV1_017, 3246, 0 },
+ { TX_LOV1_018, 11433, 0 },
+ { TX_LOV1_019, 11560, 0 },
+ { TX_LOV1_021, 11620, 0 },
+ { TX_LOV1_022, 12328, 0 },
+ { TX_LOV1_023, 12144, 0 },
+ { TX_LOV1_024, 7186, 0 },
+ { TX_LOV1_025, 7248, 0 },
+ { TX_LOV1_026, 5176, 0 },
+ { TX_LOV1_027, 3073, 0 },
+ { TX_LOV1_028, 7353, 0 },
+ { TX_LOV5_015, 8435, 0 },
+ //{ TX_LOV5_015, 8256, 0 }, // ignore duplicate line
+ { TX_LOV5_019, 8178, 0 },
+ { TX_LOV5_027, 8691, 0 },
+ { TX_LOV5_030, 8595, 0 },
+ { TX_LOV5_038, 8646, 0 },
+ { TX_LOVA_100, 9800, 0 },
+ { TX_LOVA_F01, 9242, 0 },
+ { TX_LOVA_F02, 9314, 0 },
+ { TX_LOVA_F03, 9513, 0 },
+ { TX_LOVA_F04, 9428, 0 },
+ { TX_LOVA_F07, 9877, 0 },
+ { TX_LOVA_F08, 8866, 0 },
+ //{ TX_LOVA_F08, 9581, 0 }, // ignore duplicate line
+ { TX_LOVA_F10, 9748, 0 },
+ { TX_LOVA_F54, 9022, 0 },
+ { TX_LOVA_F55, 8323, 0 },
+ { TX_MUD2_040, 10073, 0 },
+ { TX_MUD4_018, 10446, 0 },
+ //{ TX_MUD4_018, 10779, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 10282, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 10615, 0 }, // ignore duplicate line
+ { TX_TUG2_010, 9678, 0 },
+ { TX_VENA_F41, 10569, 0 },
+ { TX_VENA_F41, 10405, 0 },
+ //{ TX_VENA_F41, 10902, 0 }, // ignore duplicate line
+ //{ TX_VENA_F41, 10738, 0 }, // ignore duplicate line
+ { TX_LOV1N000, 11684, 0 },
+ { TX_LOV1N001, 11864, 0 },
+ { TX_LOV1N002, 11926, 0 },
+ { TX_LOV1N003, 11766, 0 },
+ { TX_LOV1N004, 11802, 0 },
+ { TX_LOV1N005, 11333, 0 },
+ { TX_LOV1N006, 11381, 0 },
+ { TX_LOV1N007, 4720, 0 },
+ { TX_LOV1N008, 6479, 0 },
+ { TX_LOV1N009, 4452, 0 },
+ { TX_LOV1N010, 4093, 0 },
+ { TX_LOV1N011, 4548, 0 },
+ { TX_LOV1N012, 2547, 0 },
+ { TX_LOV1N013, 2113, 0 },
+ { TX_LOV1N014, 2038, 0 },
+ { TX_LOV1N015, 2239, 0 },
+ { TX_LOV1N016, 1914, 0 },
+ { TX_LOV1N017, 1782, 0 },
+ { TX_LOV1N018, 2478, 0 },
+ { TX_LOV1N019, 1399, 0 },
+ { TX_LOV1N020, 1686, 0 },
+ { TX_LOV1N021, 1576, 0 },
+ { TX_LOV1N022, 1498, 0 },
+ { TX_LOV1N023, 2393, 0 },
+ { TX_LOV1N034, 5974, 0 },
+ { TX_LOV1N035, 4313, 0 },
+ { TX_LOV2N005, 9936, 0 },
+ //{ TX_LOV2N005, 10016, 0 }, // ignore duplicate line
+ //{ TX_LOV2N005, 10162, 0 }, // ignore duplicate line
+ { TX_BRIDU146, 10848, 0 },
+ //{ TX_BRIDU146, 10515, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 10684, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 10351, 0 }, // ignore duplicate line
+ { TX_GENER004, 9171, 0 },
+ { TX_GET_BOTTLE_ERROR, 4664, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love1Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love1Tick1() {
playVoc("LOV1LOOP");
@@ -298,122 +460,122 @@ void Room::love1ReachedDoor2() {
}
void Room::love1LookAtLaser() {
- showDescription(0, true);
+ showDescription(TX_LOV1N000);
}
void Room::love1LookAtKirk() {
- showDescription(3, true);
+ showDescription(TX_LOV1N003);
}
void Room::love1LookAtSpock() {
- showDescription(4, true);
+ showDescription(TX_LOV1N004);
}
void Room::love1LookAtMccoy() {
- showDescription(1, true);
+ showDescription(TX_LOV1N001);
}
void Room::love1LookAtRedshirt() {
- showDescription(2, true);
+ showDescription(TX_LOV1N002);
}
void Room::love1LookAnywhere() {
- showDescription(19, true);
+ showDescription(TX_LOV1N019);
}
void Room::love1LookAtNozzle() {
- showDescription(22, true);
+ showDescription(TX_LOV1N022);
}
void Room::love1LookAtLadder() {
- showDescription(21, true);
+ showDescription(TX_LOV1N021);
}
void Room::love1LookAtDoor1Or2() {
- showDescription(20, true);
+ showDescription(TX_LOV1N020);
}
void Room::love1LookAtDoor3() {
- showDescription(17, true);
+ showDescription(TX_LOV1N017);
}
void Room::love1LookAtDistillator() {
- showDescription(16, true);
+ showDescription(TX_LOV1N016);
}
void Room::love1LookAtChamber() {
if (_awayMission->love.chamberHasCure)
- showDescription(13, true);
+ showDescription(TX_LOV1N013);
else
- showDescription(14, true);
+ showDescription(TX_LOV1N014);
}
void Room::love1LookAtReplicator() {
- showDescription(15, true);
+ showDescription(TX_LOV1N015);
}
void Room::love1LookAtFreezer() {
if (_awayMission->love.freezerOpen)
- showDescription(23, true);
+ showDescription(TX_LOV1N023);
else
- showDescription(18, true);
+ showDescription(TX_LOV1N018);
}
void Room::love1LookAtDishes() {
- showDescription(12, true);
+ showDescription(TX_LOV1N012);
}
void Room::love1TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV1_001);
}
void Room::love1TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV1_005);
}
void Room::love1TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_011);
}
void Room::love1TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 27, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV1_027);
}
void Room::love1UseMTricorderOnDishes() {
- mccoyScan(DIR_W, 17, false, true);
+ mccoyScan(DIR_W, TX_LOV1_017, false);
// TODO: only works in this room, despite being inventory item?
}
void Room::love1UseMTricorderAnywhere() {
if (_awayMission->love.knowAboutVirus)
- mccoyScan(DIR_S, 9, false, true);
+ mccoyScan(DIR_S, TX_LOV1_009, false);
else
- mccoyScan(DIR_S, 10, false, true);
+ mccoyScan(DIR_S, TX_LOV1_010, false);
}
void Room::love1UseSTricorderOnReplicator() {
- spockScan(DIR_N, 22, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_LOV1_022, false);
}
void Room::love1UseSTricorderOnLaser() {
- spockScan(DIR_E, 6, false, true);
+ spockScan(DIR_E, TX_SPEAKER_SPOCK, TX_LOV1_006, false);
}
void Room::love1UseSTricorderOnFreezer() {
- spockScan(DIR_W, 23, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_LOV1_023, false);
}
void Room::love1UseSTricorderAnywhere() {
- spockScan(DIR_S, 3, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_LOV1_003, false);
}
void Room::love1UseSTricorderOnDishes() {
- spockScan(DIR_W, 4, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_LOV1_004, false);
// TODO: only works in this room, despite being inventory item?
}
void Room::love1UseSTricorderOnDistillator() {
- spockScan(DIR_S, 7, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_LOV1_007, false);
}
void Room::love1GetFreezer() {
@@ -424,17 +586,17 @@ void Room::love1KirkReachedFreezer() {
if (_awayMission->love.freezerOpen)
loadActorAnim2(OBJECT_KIRK, "kusehw", -1, -1, 9);
else
- showDescription(10, true);
+ showDescription(TX_LOV1N010);
}
void Room::love1KirkGotVirusCulture() {
giveItem(OBJECT_IDISHES);
- showDescription(6, true);
+ showDescription(TX_LOV1N006);
}
void Room::love1GetFromChamber() {
if (!_awayMission->love.chamberHasDish)
- showDescription(9, true);
+ showDescription(TX_LOV1N009);
else
walkCrewman(OBJECT_KIRK, 0xb5, 0x8c, 8);
}
@@ -446,14 +608,14 @@ void Room::love1KirkReachedChamber() {
void Room::love1KirkGotCureSample() {
if (_awayMission->love.chamberHasCure) {
giveItem(OBJECT_ISAMPLE);
- showDescription(35, true);
+ showDescription(TX_LOV1N035);
// BUGFIX: after removing the cure, unset this variable.
// Otherwise, any normal dish inserted afterward automagically becomes a cure.
_awayMission->love.chamberHasCure = false;
} else {
giveItem(OBJECT_IDISHES);
- showDescription(6, true);
+ showDescription(TX_LOV1N006);
}
loadActorStandAnim(OBJECT_DISH_IN_CHAMBER);
@@ -468,7 +630,7 @@ void Room::love1GetFromNozzle() {
void Room::love1KirkReachedNozzleToGet() {
if (_awayMission->love.bottleInNozzle == 0)
- showDescription(11, true);
+ showDescription(TX_LOV1N011);
else
loadActorAnim2(OBJECT_KIRK, "kusemn", -1, -1, 11);
}
@@ -488,13 +650,13 @@ void Room::love1KirkGotBottleFromNozzle() {
giveItem(OBJECT_IRLG);
break;
default:
- showDescription(TX_DIALOG_ERROR);
+ showDescription(TX_GET_BOTTLE_ERROR);
break;
}
_awayMission->love.bottleInNozzle = BOTTLETYPE_NONE;
loadActorStandAnim(OBJECT_BOTTLE);
- showDescription(7, true);
+ showDescription(TX_LOV1N007);
_roomVar.love.itemInNozzle = 0;
}
@@ -544,15 +706,15 @@ void Room::love1KirkPutBottleInNozzle() {
}
void Room::love1UseAnthingOnNozzle() {
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_012);
}
void Room::love1UseSpockOnReplicator() {
- showText(TX_SPEAKER_SPOCK, 2, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV1_002);
}
void Room::love1UseRedshirtOnReplicator() {
- showText(TX_SPEAKER_FERRIS, 26, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV1_026);
}
void Room::love1UseMccoyOnReplicator() {
@@ -561,10 +723,10 @@ void Room::love1UseMccoyOnReplicator() {
void Room::love1MccoyReachedReplicator() {
if (_awayMission->love.bottleInNozzle == BOTTLETYPE_NONE) {
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_021);
walkCrewman(OBJECT_MCCOY, 0xbf, 0x98, 0);
} else if (!_awayMission->love.chamberHasDish) {
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_015);
walkCrewman(OBJECT_MCCOY, 0xbf, 0x98, 0);
} else
loadActorAnim2(OBJECT_MCCOY, "musehn", -1, -1, 13);
@@ -577,7 +739,7 @@ void Room::love1MccoyUsedReplicator() {
playSoundEffectIndex(kSfxDoor);
walkCrewman(OBJECT_MCCOY, 0xbf, 0x98, 0);
} else {
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_019);
walkCrewman(OBJECT_MCCOY, 0xbf, 0x98, 0);
}
}
@@ -589,12 +751,12 @@ void Room::love1ChamberClosed() {
void Room::love1ChamberOpened() {
loadActorAnim(OBJECT_DISH_IN_CHAMBER, "dishes", 0xb4, 0x71, 0);
- showText(TX_SPEAKER_MCCOY, 18, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_018);
_awayMission->love.chamberHasCure = true;
}
void Room::love1UseAnythingOnChamber() {
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_013);
}
void Room::love1UseDishesOnChamber() {
@@ -603,7 +765,7 @@ void Room::love1UseDishesOnChamber() {
void Room::love1KirkReachedChamberToPut() {
if (_awayMission->love.chamberHasDish)
- showText(TX_SPEAKER_MCCOY, 14, true); // TODO: test
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_014); // TODO: test
else {
loadActorAnim(OBJECT_CHAMBER, "s3r2d5", 0xb4, 0x75, 1);
playSoundEffectIndex(kSfxDoor);
@@ -631,7 +793,7 @@ void Room::love1KirkReachedDistillator() {
void Room::love1KirkGotPolyberylcarbonate() {
// Result of using insulation on distillator
- showDescription(34, true);
+ showDescription(TX_LOV1N034);
if (!_awayMission->love.gotPolyberylcarbonate) {
_awayMission->love.gotPolyberylcarbonate = true;
_awayMission->love.missionScore++;
@@ -701,7 +863,7 @@ void Room::love1ReachedFreezerWithArbitraryItem() {
}
void Room::love1FinishedUsingArbitraryItemOnFreezer() {
- showDescription(8, true);
+ showDescription(TX_LOV1N008);
}
void Room::love1UseAnythingOnReplicator() {
@@ -713,7 +875,7 @@ void Room::love1ReachedReplicatorWithArbitraryItem() {
}
void Room::love1FinishedUsingArbitraryItemOnReplicator() {
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_016);
}
void Room::love1UseAnythingOnDistillator() {
@@ -725,7 +887,7 @@ void Room::love1ReachedDistillatorWithArbitraryItem() {
}
void Room::love1FinishedUsingArbitraryItemOnDistillator() {
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV1_008);
}
void Room::love1UseKirkOnLadder() {
@@ -779,10 +941,10 @@ void Room::love1CrewmanReachedLadder() {
void Room::love1CrewmanDiedFromPhaser() {
if (_roomVar.love.crewmanUsingDevice == OBJECT_REDSHIRT) {
_awayMission->disableInput = false;
- showText(TX_SPEAKER_FERRIS, 24, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV1_024);
_awayMission->redshirtDead = true;
} else {
- showText(_roomVar.love.dyingSpeaker, 25, true);
+ showText(_roomVar.love.dyingSpeaker, TX_LOV1_025);
showGameOverMenu();
}
}
@@ -794,7 +956,8 @@ void Room::love1TouchedHotspot0() {
loadActorAnim(OBJECT_PHASERSHOT, "s3r2s1", 0xf3, 0x89, 0);
playSoundEffectIndex(kSfxPhaser);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_FERRIS, 28, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV1_028);
}
+
}
diff --git a/engines/startrek/rooms/love2.cpp b/engines/startrek/rooms/love2.cpp
index dde23a835d..a4fcbd96db 100644
--- a/engines/startrek/rooms/love2.cpp
+++ b/engines/startrek/rooms/love2.cpp
@@ -177,6 +177,214 @@ extern const RoomAction love2ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love2TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS, TX_SPEAKER_COMPUTER,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_025, TX_LOV0_026, TX_LOV0_029, TX_LOV0_033,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV0_124, TX_LOV2_001,
+ TX_LOV2_002, TX_LOV2_003, TX_LOV2_004, TX_LOV2_005, TX_LOV2_006,
+ TX_LOV2_007, TX_LOV2_008, TX_LOV2_009, TX_LOV2_010, TX_LOV2_011,
+ TX_LOV2_012, TX_LOV2_014, TX_LOV2_015, TX_LOV2_016, TX_LOV2_017,
+ TX_LOV2_018, TX_LOV2_019, TX_LOV2_020, TX_LOV2_021, TX_LOV2_022,
+ TX_LOV2_023, TX_LOV2_024, TX_LOV2_025, TX_LOV2_026, TX_LOV2_027,
+ TX_LOV2_028, TX_LOV2_029, TX_LOV2_030, TX_LOV2_031, TX_LOV2_032,
+ TX_LOV2_033, TX_LOV2_034, TX_LOV2_035, TX_LOV2_036, TX_LOV2_037,
+ TX_LOV2_038, TX_LOV2_039, TX_LOV2_040, TX_LOV2_041, TX_LOV2_043,
+ TX_LOV5_015, TX_LOV5_019, TX_LOV5_027, TX_LOV5_030, TX_LOV5_038,
+ TX_LOVA_100, TX_LOVA_F01, TX_LOVA_F02, TX_LOVA_F03, TX_LOVA_F04,
+ TX_LOVA_F07, TX_LOVA_F08, TX_LOVA_F10, TX_LOVA_F54, TX_LOVA_F55,
+ TX_LOV2N000, TX_LOV2N001, TX_LOV2N002, TX_LOV2N003, TX_LOV2N004,
+ TX_LOV2N005, TX_LOV2N006, TX_LOV2N007, TX_LOV2N008, TX_LOV2N009,
+ TX_LOV2N010, TX_LOV2N011, TX_LOV2N012, TX_LOV2N013, TX_LOV2N014,
+ TX_LOV2N015, TX_LOV2N016, TX_LOV2N017, TX_LOV2N018, TX_LOV2N019,
+ TX_LOV2N024, TX_LOV2N025, TX_LOV2N026, TX_LOV2N027, TX_LOV2N028,
+ TX_LOV2N029, TX_LOV2N030, TX_LOV2N031, TX_LOV2N033, TX_LOV2N034,
+ TX_LOV2N035, TX_LOV2N036, TX_LOV2N037, TX_LOV2N038, TX_LOV2N039,
+ TX_LOV2N040, TX_LOV2N041, TX_LOV2N042, TX_LOV2N043, TX_LOV2N044,
+ TX_LOV2N045, TX_LOV2N046, TX_LOV2N047, TX_LOV2N048, TX_LOV2N049,
+ TX_LOV2N050, TX_LOV2N051, TX_MUD2_040, TX_MUD4_018, TX_TUG2_010,
+ TX_VENA_F41, TX_BRIDU146, TX_GENER004
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love2TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 14244, 0 },
+ { TX_SPEAKER_MCCOY, 14255, 0 },
+ { TX_SPEAKER_SPOCK, 14265, 0 },
+ { TX_SPEAKER_FERRIS, 14275, 0 },
+ { TX_SPEAKER_COMPUTER, 14287, 0 },
+ { TX_LOV0_011, 16471, 0 },
+ { TX_LOV0_012, 16598, 0 },
+ { TX_LOV0_013, 16894, 0 },
+ { TX_LOV0_014, 16658, 0 },
+ { TX_LOV0_015, 16762, 0 },
+ { TX_LOV0_016, 16565, 0 },
+ { TX_LOV0_017, 17028, 0 },
+ { TX_LOV0_019, 16948, 0 },
+ { TX_LOV0_020, 16505, 0 },
+ { TX_LOV0_021, 16816, 0 },
+ { TX_LOV0_022, 16706, 0 },
+ { TX_LOV0_025, 17954, 0 },
+ { TX_LOV0_026, 17827, 0 },
+ { TX_LOV0_029, 17707, 0 },
+ { TX_LOV0_033, 17767, 0 },
+ { TX_LOV0_039, 17089, 0 },
+ { TX_LOV0_040, 17216, 0 },
+ { TX_LOV0_041, 17512, 0 },
+ { TX_LOV0_042, 17276, 0 },
+ { TX_LOV0_043, 17380, 0 },
+ { TX_LOV0_045, 17183, 0 },
+ { TX_LOV0_046, 17646, 0 },
+ { TX_LOV0_047, 17566, 0 },
+ { TX_LOV0_048, 17123, 0 },
+ { TX_LOV0_049, 17434, 0 },
+ { TX_LOV0_050, 17324, 0 },
+ { TX_LOV0_101, 18035, 0 },
+ { TX_LOV0_102, 18099, 0 },
+ { TX_LOV0_103, 18169, 0 },
+ { TX_LOV0_104, 18219, 0 },
+ { TX_LOV0_105, 18276, 0 },
+ { TX_LOV0_106, 18388, 0 },
+ { TX_LOV0_107, 18456, 0 },
+ { TX_LOV0_124, 17904, 0 },
+ { TX_LOV2_001, 1734, 0 },
+ { TX_LOV2_002, 6690, 0 },
+ { TX_LOV2_003, 5722, 0 },
+ { TX_LOV2_004, 5885, 0 },
+ { TX_LOV2_005, 4110, 0 },
+ { TX_LOV2_006, 4025, 0 },
+ { TX_LOV2_007, 8933, 0 },
+ { TX_LOV2_008, 15998, 0 },
+ { TX_LOV2_009, 15764, 0 },
+ { TX_LOV2_010, 4710, 0 },
+ //{ TX_LOV2_010, 16437, 0 }, // ignore duplicate line
+ { TX_LOV2_011, 9129, 0 },
+ { TX_LOV2_012, 1916, 0 },
+ { TX_LOV2_014, 8848, 0 },
+ { TX_LOV2_015, 5377, 0 },
+ { TX_LOV2_016, 15386, 0 },
+ { TX_LOV2_017, 7699, 0 },
+ { TX_LOV2_018, 6248, 0 },
+ { TX_LOV2_019, 15259, 0 },
+ { TX_LOV2_020, 8083, 0 },
+ { TX_LOV2_021, 6856, 0 },
+ { TX_LOV2_022, 6402, 0 },
+ { TX_LOV2_023, 7371, 0 },
+ { TX_LOV2_024, 4468, 0 },
+ { TX_LOV2_025, 3226, 0 },
+ //{ TX_LOV2_025, 3540, 0 }, // ignore duplicate line
+ { TX_LOV2_026, 2639, 0 },
+ { TX_LOV2_027, 16081, 0 },
+ { TX_LOV2_028, 6936, 0 },
+ { TX_LOV2_029, 15832, 0 },
+ { TX_LOV2_030, 6312, 0 },
+ { TX_LOV2_031, 6088, 0 },
+ { TX_LOV2_032, 5224, 0 },
+ { TX_LOV2_033, 15321, 0 },
+ { TX_LOV2_034, 7288, 0 }, // NOTE: has typo (dash instead of underscore)
+ { TX_LOV2_035, 14978, 0 },
+ { TX_LOV2_036, 5447, 0 },
+ { TX_LOV2_037, 15561, 0 },
+ { TX_LOV2_038, 6472, 0 },
+ { TX_LOV2_039, 7111, 0 }, // NOTE: has typo (dash instead of underscore)
+ { TX_LOV2_040, 9058, 0 },
+ { TX_LOV2_041, 15889, 0 },
+ { TX_LOV2_043, 5634, 0 },
+ { TX_LOV5_015, 11567, 0 },
+ //{ TX_LOV5_015, 11388, 0 }, // ignore duplicate line
+ { TX_LOV5_019, 11310, 0 },
+ { TX_LOV5_027, 11823, 0 },
+ { TX_LOV5_030, 11727, 0 },
+ { TX_LOV5_038, 11778, 0 },
+ { TX_LOVA_100, 12932, 0 },
+ { TX_LOVA_F01, 12374, 0 },
+ { TX_LOVA_F02, 12446, 0 },
+ { TX_LOVA_F03, 12645, 0 },
+ { TX_LOVA_F04, 12560, 0 },
+ { TX_LOVA_F07, 13009, 0 },
+ { TX_LOVA_F08, 11998, 0 },
+ //{ TX_LOVA_F08, 12713, 0 }, // ignore duplicate line
+ { TX_LOVA_F10, 12880, 0 },
+ { TX_LOVA_F54, 12154, 0 },
+ { TX_LOVA_F55, 11455, 0 },
+ { TX_LOV2N000, 16147, 0 },
+ { TX_LOV2N001, 15741, 0 },
+ { TX_LOV2N002, 14608, 0 },
+ { TX_LOV2N003, 14647, 0 },
+ { TX_LOV2N004, 14569, 0 },
+ { TX_LOV2N005, 4653, 0 },
+ //{ TX_LOV2N005, 13294, 0 }, // ignore duplicate line
+ //{ TX_LOV2N005, 13148, 0 }, // ignore duplicate line
+ //{ TX_LOV2N005, 13068, 0 }, // ignore duplicate line
+ //{ TX_LOV2N005, 4410, 0 }, // ignore duplicate line
+ { TX_LOV2N006, 14300, 0 },
+ { TX_LOV2N007, 16217, 0 },
+ { TX_LOV2N008, 16186, 0 },
+ { TX_LOV2N009, 1467, 0 },
+ { TX_LOV2N010, 14780, 0 },
+ { TX_LOV2N011, 14686, 0 },
+ { TX_LOV2N012, 4334, 0 },
+ { TX_LOV2N013, 16249, 0 },
+ { TX_LOV2N014, 14728, 0 },
+ { TX_LOV2N015, 16281, 0 },
+ { TX_LOV2N016, 5555, 0 },
+ { TX_LOV2N017, 5147, 0 },
+ { TX_LOV2N018, 5812, 0 },
+ { TX_LOV2N019, 6013, 0 },
+ { TX_LOV2N024, 2955, 0 },
+ { TX_LOV2N025, 8231, 0 },
+ //{ TX_LOV2N025, 8454, 0 }, // ignore duplicate line
+ { TX_LOV2N026, 14840, 0 },
+ { TX_LOV2N027, 14878, 0 },
+ { TX_LOV2N028, 14425, 0 },
+ { TX_LOV2N029, 14920, 0 },
+ { TX_LOV2N030, 3356, 0 },
+ { TX_LOV2N031, 3696, 0 },
+ { TX_LOV2N033, 16366, 0 },
+ { TX_LOV2N034, 2843, 0 },
+ { TX_LOV2N035, 3081, 0 },
+ { TX_LOV2N036, 9618, 0 },
+ { TX_LOV2N037, 9803, 0 },
+ { TX_LOV2N038, 10228, 0 },
+ { TX_LOV2N039, 10072, 0 },
+ { TX_LOV2N040, 9986, 0 },
+ { TX_LOV2N041, 10152, 0 },
+ { TX_LOV2N042, 9298, 0 },
+ { TX_LOV2N043, 10484, 0 },
+ { TX_LOV2N044, 9430, 0 },
+ { TX_LOV2N045, 15417, 0 },
+ { TX_LOV2N046, 8005, 0 },
+ { TX_LOV2N047, 7616, 0 },
+ { TX_LOV2N048, 7209, 0 },
+ { TX_LOV2N049, 7033, 0 },
+ { TX_LOV2N050, 6778, 0 },
+ { TX_LOV2N051, 6612, 0 },
+ { TX_MUD2_040, 13205, 0 },
+ { TX_MUD4_018, 13414, 0 },
+ //{ TX_MUD4_018, 13911, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 13747, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 13578, 0 }, // ignore duplicate line
+ { TX_TUG2_010, 12810, 0 },
+ { TX_VENA_F41, 14034, 0 },
+ //{ TX_VENA_F41, 13537, 0 }, // ignore duplicate line
+ //{ TX_VENA_F41, 13870, 0 }, // ignore duplicate line
+ //{ TX_VENA_F41, 13701, 0 }, // ignore duplicate line
+ { TX_BRIDU146, 13647, 0 },
+ //{ TX_BRIDU146, 13980, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 13816, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 13483, 0 }, // ignore duplicate line
+ { TX_GENER004, 12303, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love2Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love2Tick1() {
playVoc("LOV2LOOP");
@@ -328,65 +536,65 @@ void Room::love2DoorReachedOrOpened() {
}
void Room::love2LookAtCabinet() {
- showDescription(27, true);
+ showDescription(27);
}
void Room::love2LookAtDoor() {
- showDescription(1, true);
+ showDescription(1);
}
void Room::love2LookAtSynthesizer() {
- showDescription(28, true);
+ showDescription(28);
}
void Room::love2LookAtAnywhere() {
- showDescription(26, true);
+ showDescription(26);
}
void Room::love2LookAtAntigrav() {
- showDescription(6, true);
+ showDescription(6);
}
void Room::love2LookAtMccoy() {
- showDescription(11, true);
+ showDescription(11);
}
void Room::love2LookAtSpock() {
- showDescription(14, true);
+ showDescription(14);
}
void Room::love2LookAtRedshirt() {
- showDescription(10, true);
+ showDescription(10);
}
void Room::love2LookAtKirk() {
- showDescription(9, true);
+ showDescription(9);
}
void Room::love2LookAtArdak() {
- showDescription(45, true);
- showText(TX_SPEAKER_SPOCK, 37, true);
+ showDescription(45);
+ showText(TX_SPEAKER_SPOCK, 37);
}
void Room::love2LookAtChamber() {
- showDescription(29, true);
- showText(TX_SPEAKER_SPOCK, 35, true);
- showText(TX_SPEAKER_MCCOY, 19, true);
- showText(TX_SPEAKER_SPOCK, 33, true);
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showDescription(29);
+ showText(TX_SPEAKER_SPOCK, 35);
+ showText(TX_SPEAKER_MCCOY, 19);
+ showText(TX_SPEAKER_SPOCK, 33);
+ showText(TX_SPEAKER_MCCOY, 16);
}
void Room::love2LookAtCan1() {
switch (_awayMission->love.canister1) {
case CANTYPE_O2:
- showDescription(4, true);
+ showDescription(4);
break;
case CANTYPE_H2:
- showDescription(2, true);
+ showDescription(2);
break;
case CANTYPE_N2:
default:
- showDescription(3, true);
+ showDescription(3);
break;
}
}
@@ -394,43 +602,43 @@ void Room::love2LookAtCan1() {
void Room::love2LookAtCan2() {
switch (_awayMission->love.canister2) {
case CANTYPE_O2:
- showDescription(4, true);
+ showDescription(4);
break;
case CANTYPE_H2:
- showDescription(2, true);
+ showDescription(2);
break;
case CANTYPE_N2:
default:
- showDescription(3, true);
+ showDescription(3);
break;
}
}
void Room::love2TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, 1);
}
void Room::love2TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 29, true);
+ showText(TX_SPEAKER_SPOCK, 29);
}
void Room::love2TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, 9);
}
void Room::love2TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 41, true);
+ showText(TX_SPEAKER_FERRIS, 41);
}
void Room::love2UseMTricorderAnywhere() {
if (_awayMission->love.knowAboutVirus)
- mccoyScan(DIR_S, 8, false, true);
+ mccoyScan(DIR_S, 8, false);
else
mccoyScan(DIR_S, 12, false);
}
void Room::love2UseSTricorderAnywhere() {
- spockScan(DIR_S, 27, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, 27, false);
}
void Room::love2UseKirkOnCabinet() {
@@ -490,11 +698,11 @@ void Room::love2ChangedGasFeed() {
if (_awayMission->love.gasFeedOn) {
_awayMission->love.gasFeedOn = false;
loadActorAnim2(OBJECT_GAS_FEED, "s3r3v2", 0xac, 0x75, 0);
- showDescription(7, true);
+ showDescription(7);
} else {
_awayMission->love.gasFeedOn = true;
loadActorAnim2(OBJECT_GAS_FEED, "s3r3v1", 0xac, 0x75, 0);
- showDescription(8, true);
+ showDescription(8);
}
}
@@ -521,14 +729,14 @@ void Room::love2UseN2GasOnCanisterSlot() {
void Room::love2ReachedCanisterSlot() {
if (_awayMission->love.gasFeedOn)
- showText(TX_SPEAKER_SPOCK, 26, true);
+ showText(TX_SPEAKER_SPOCK, 26);
else {
if (_awayMission->love.canister1 == CANTYPE_NONE)
loadActorAnim2(OBJECT_KIRK, "kusehn", -1, -1, 13);
else if (_awayMission->love.canister2 == CANTYPE_NONE)
loadActorAnim2(OBJECT_KIRK, "kusehn", -1, -1, 14);
else
- showDescription(24, true);
+ showDescription(24);
}
}
@@ -536,7 +744,7 @@ void Room::love2PutCanisterInSlot1() {
playVoc("SE6FOOD");
loadActorAnim(OBJECT_CAN1, _roomVar.love.canisterAnim, 0xa7, 0xae, 0);
_awayMission->love.canister1 = _roomVar.love.canisterType;
- showDescription(34, true);
+ showDescription(34);
loseItem(_roomVar.love.canisterItem);
}
@@ -544,7 +752,7 @@ void Room::love2PutCanisterInSlot2() {
playVoc("SE6FOOD");
loadActorAnim(OBJECT_CAN2, _roomVar.love.canisterAnim, 0xb1, 0xaf, 0);
_awayMission->love.canister2 = _roomVar.love.canisterType;
- showDescription(35, true);
+ showDescription(35);
loseItem(_roomVar.love.canisterItem);
}
@@ -554,7 +762,7 @@ void Room::love2UseAntigravOnCanister1() {
void Room::love2ReachedCanisterSlot1ToGet() {
if (_awayMission->love.gasFeedOn)
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, 25);
else {
loadActorAnim2(OBJECT_KIRK, "kusehn", -1, -1, 15);
// BUGFIX: original game only played this for canister 2
@@ -563,7 +771,7 @@ void Room::love2ReachedCanisterSlot1ToGet() {
}
void Room::love2TookCanister1() {
- showDescription(30, true);
+ showDescription(30);
loadActorStandAnim(OBJECT_CAN1);
switch (_awayMission->love.canister1) {
@@ -588,7 +796,7 @@ void Room::love2UseAntigravOnCanister2() {
void Room::love2ReachedCanisterSlot2ToGet() {
if (_awayMission->love.gasFeedOn)
- showText(TX_SPEAKER_SPOCK, 25, true);
+ showText(TX_SPEAKER_SPOCK, 25);
else {
loadActorAnim2(OBJECT_KIRK, "kusehn", -1, -1, 16);
playVoc("SE3PLBAT");
@@ -596,7 +804,7 @@ void Room::love2ReachedCanisterSlot2ToGet() {
}
void Room::love2TookCanister2() {
- showDescription(31, true);
+ showDescription(31);
loadActorStandAnim(OBJECT_CAN2);
switch (_awayMission->love.canister2) {
@@ -646,13 +854,13 @@ void Room::love2CrewmanUsedSynthesizer() {
} else {
if (_roomVar.love.cb == 3) {
if (haveItem(OBJECT_IWRENCH)) {
- showText(TX_SPEAKER_SPOCK, 5, true);
+ showText(TX_SPEAKER_SPOCK, 5);
walkCrewman(OBJECT_SPOCK, 0xa8, 0xb7, 16);
} else
- showText(TX_SPEAKER_SPOCK, 6, true);
+ showText(TX_SPEAKER_SPOCK, 6);
} else {
_roomVar.love.cb++;
- showDescription(12, true);
+ showDescription(12);
}
}
}
@@ -666,7 +874,7 @@ void Room::love2SpockEnabledGasFeeds() {
_awayMission->love.gasFeedOn = true;
loadActorAnim2(OBJECT_GAS_FEED, "s3r3v1", 0xac, 0x75, 0);
- showDescription(8, true);
+ showDescription(8);
walkCrewman(OBJECT_SPOCK, 0xc6, 0xbb, 0);
love2UseSynthesizer();
@@ -693,8 +901,8 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_VIRUS_SAMPLE: // Wet goo
- showDescription(51, true);
- showText(TX_SPEAKER_KIRK, 2, true);
+ showDescription(51);
+ showText(TX_SPEAKER_KIRK, 2);
loadActorStandAnim(OBJECT_VIRUSSAMPLE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -703,8 +911,8 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_CURE_SAMPLE: // Wet goo
- showDescription(50, true);
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showDescription(50);
+ showText(TX_SPEAKER_MCCOY, 21);
loadActorStandAnim(OBJECT_CURESAMPLE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -713,7 +921,7 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_BOTTLE: // Nothing happens
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, 28);
break;
case SYNTHITEM_NONE: // Water
@@ -728,8 +936,8 @@ void Room::love2UseSynthesizer() {
} else if (c1 == CANTYPE_H2 && c2 == CANTYPE_N2) {
switch (_awayMission->love.synthesizerContents) {
case SYNTHITEM_PBC: // Inert matter
- showDescription(49, true);
- showText(TX_SPEAKER_SPOCK, 39, true); // BUGFIX: original didn't play audio
+ showDescription(49);
+ showText(TX_SPEAKER_SPOCK, 39); // BUGFIX: original didn't play audio
loadActorStandAnim(OBJECT_POLYBERYLCARBONATE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -738,9 +946,9 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_VIRUS_SAMPLE: // Colorless goo (with useful information about virus in ammonia)
- showDescription(48, true);
- showText(TX_SPEAKER_SPOCK, 34, true); // BUGFIX: original didn't play audio
- showText(TX_SPEAKER_MCCOY, 23, true);
+ showDescription(48);
+ showText(TX_SPEAKER_SPOCK, 34); // BUGFIX: original didn't play audio
+ showText(TX_SPEAKER_MCCOY, 23);
loadActorStandAnim(OBJECT_VIRUSSAMPLE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -755,7 +963,7 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_BOTTLE: // Nothing happens
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, 28);
break;
case SYNTHITEM_NONE: // Ammonia
@@ -770,8 +978,8 @@ void Room::love2UseSynthesizer() {
} else if (c1 == CANTYPE_O2 && c2 == CANTYPE_N2) {
switch (_awayMission->love.synthesizerContents) {
case SYNTHITEM_PBC: // Inert matter
- showDescription(49, true);
- showText(TX_SPEAKER_SPOCK, 39, true); // BUGFIX: original didn't play audio
+ showDescription(49);
+ showText(TX_SPEAKER_SPOCK, 39); // BUGFIX: original didn't play audio
loadActorStandAnim(OBJECT_POLYBERYLCARBONATE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -780,8 +988,8 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_VIRUS_SAMPLE: // Wet goo
- showDescription(47, true);
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showDescription(47);
+ showText(TX_SPEAKER_MCCOY, 17);
loadActorStandAnim(OBJECT_VIRUSSAMPLE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -790,8 +998,8 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_CURE_SAMPLE: // Wet goo
- showDescription(50, true);
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showDescription(50);
+ showText(TX_SPEAKER_MCCOY, 21);
loadActorStandAnim(OBJECT_CURESAMPLE);
// Close synthesizer door
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -800,7 +1008,7 @@ void Room::love2UseSynthesizer() {
break;
case SYNTHITEM_BOTTLE: // Nothing happens
- showText(TX_SPEAKER_SPOCK, 28, true);
+ showText(TX_SPEAKER_SPOCK, 28);
break;
case SYNTHITEM_NONE: // Laughing gas
@@ -815,13 +1023,13 @@ void Room::love2UseSynthesizer() {
}
} else {
playVoc("EFX24");
- showDescription(5, true);
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showDescription(5);
+ showText(TX_SPEAKER_MCCOY, 10);
}
} else {
playVoc("EFX24");
- showDescription(5, true);
- showText(TX_SPEAKER_SPOCK, 24, true);
+ showDescription(5);
+ showText(TX_SPEAKER_SPOCK, 24);
}
}
@@ -835,33 +1043,33 @@ void Room::love2SynthesizerDoorClosed() {
void Room::love2SynthesizerFinished() {
switch (_awayMission->love.synthesizerBottleIndex) {
case BOTTLETYPE_N2O:
- showDescription(17, true);
+ showDescription(17);
showText(TX_SPEAKER_SPOCK, 32);
showText(TX_SPEAKER_MCCOY, 15);
showText(TX_SPEAKER_SPOCK, 36);
break;
case BOTTLETYPE_NH3:
- showDescription(16, true);
+ showDescription(16);
if (!_awayMission->redshirtDead) {
- showText(TX_SPEAKER_FERRIS, 43, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_FERRIS, 43);
+ showText(TX_SPEAKER_KIRK, 3);
}
break;
case BOTTLETYPE_H2O:
- showDescription(18, true);
- showText(TX_SPEAKER_SPOCK, 4, true);
+ showDescription(18);
+ showText(TX_SPEAKER_SPOCK, 4);
break;
case BOTTLETYPE_RLG:
default:
- showDescription(19, true);
- showText(TX_SPEAKER_SPOCK, 31, true);
- showText(TX_SPEAKER_MCCOY, 18, true);
- showText(TX_SPEAKER_SPOCK, 30, true);
- showText(TX_SPEAKER_MCCOY, 22, true);
- showText(TX_SPEAKER_SPOCK, 38, true);
+ showDescription(19);
+ showText(TX_SPEAKER_SPOCK, 31);
+ showText(TX_SPEAKER_MCCOY, 18);
+ showText(TX_SPEAKER_SPOCK, 30);
+ showText(TX_SPEAKER_MCCOY, 22);
+ showText(TX_SPEAKER_SPOCK, 38);
break;
}
}
@@ -883,8 +1091,8 @@ void Room::love2CureStartedSynthesizing() {
}
void Room::love2CureSynthesized() {
- showDescription(46, true);
- showText(TX_SPEAKER_MCCOY, 20, true);
+ showDescription(46);
+ showText(TX_SPEAKER_MCCOY, 20);
}
@@ -896,7 +1104,7 @@ void Room::love2UsePolyberylcarbonateOnSynthesizerDoor() {
void Room::love2KirkReachedSynthesizerWithPolyberylcarbonate() {
if (_awayMission->love.synthesizerContents != 0)
- showDescription(25, true);
+ showDescription(25);
else {
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d2", 0x8a, 0x8d, 5);
playSoundEffectIndex(kSfxDoor);
@@ -922,7 +1130,7 @@ void Room::love2UseVirusSampleOnSynthesizerDoor() {
void Room::love2KirkReachedSynthesizerWithVirusSample() {
if (_awayMission->love.synthesizerContents != 0)
- showDescription(25, true);
+ showDescription(25);
else {
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d2", 0x8a, 0x8d, 6);
playSoundEffectIndex(kSfxDoor);
@@ -948,7 +1156,7 @@ void Room::love2UseCureSampleOnSynthesizerDoor() {
void Room::love2KirkReachedSynthesizerWithCureSample() {
if (_awayMission->love.synthesizerContents != 0)
- showDescription(25, true); // BUGFIX: original didn't play audio
+ showDescription(25); // BUGFIX: original didn't play audio
else {
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d2", 0x8a, 0x8d, 7);
playSoundEffectIndex(kSfxDoor);
@@ -968,18 +1176,18 @@ void Room::love2PutCureSampleInSynthesizer() {
void Room::love2UseAnythingOnSynthesizerDoor() {
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, 14);
}
void Room::love2UseAnythingOnSynthesizer() {
- showText(TX_SPEAKER_SPOCK, 7, true);
+ showText(TX_SPEAKER_SPOCK, 7);
}
void Room::love2GetCanister() {
if (_awayMission->redshirtDead)
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, 11);
else
- showText(TX_SPEAKER_FERRIS, 40, true);
+ showText(TX_SPEAKER_FERRIS, 40);
}
@@ -995,7 +1203,7 @@ void Room::love2ReachedAntigrav() {
void Room::love2GotAntigrav() {
loadActorStandAnim(OBJECT_ANTIGRAV);
giveItem(OBJECT_IANTIGRA);
- showDescription(42, true);
+ showDescription(42);
}
@@ -1011,7 +1219,7 @@ void Room::love2ReachedPolyberylcarbonate() {
void Room::love2GotPolyberylcarbonate() {
loadActorStandAnim(OBJECT_POLYBERYLCARBONATE);
- showDescription(44, true);
+ showDescription(44);
giveItem(OBJECT_IPBC);
_awayMission->love.synthesizerContents = 0;
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -1031,7 +1239,7 @@ void Room::love2ReachedDishes() {
void Room::love2GotDishes() {
loadActorStandAnim(OBJECT_VIRUSSAMPLE);
- showDescription(36, true); // FIXME: text doesn't match audio
+ showDescription(36); // FIXME: text doesn't match audio
giveItem(OBJECT_IDISHES);
_awayMission->love.synthesizerContents = 0;
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -1051,7 +1259,7 @@ void Room::love2ReachedSample() {
void Room::love2GotSample() {
loadActorStandAnim(OBJECT_CURESAMPLE);
- showDescription(37, true);
+ showDescription(37);
giveItem(OBJECT_ISAMPLE);
_awayMission->love.synthesizerContents = 0;
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
@@ -1072,23 +1280,23 @@ void Room::love2ReachedSynthesizerOutput() {
void Room::love2GotSynthesizerOutput() {
switch (_awayMission->love.synthesizerBottleIndex) {
case BOTTLETYPE_N2O:
- showDescription(40, true);
+ showDescription(40);
giveItem(OBJECT_IN2O);
break;
case BOTTLETYPE_NH3:
- showDescription(39, true);
+ showDescription(39);
giveItem(OBJECT_INH3);
break;
case BOTTLETYPE_H2O:
- showDescription(41, true);
+ showDescription(41);
giveItem(OBJECT_IH2O);
break;
case BOTTLETYPE_RLG:
default:
- showDescription(38, true);
+ showDescription(38);
if (!_awayMission->love.gotTLDH) {
_awayMission->love.gotTLDH = true;
_awayMission->love.missionScore += 4;
@@ -1123,7 +1331,7 @@ void Room::love2GotCure() {
giveItem(OBJECT_ICURE);
loadActorStandAnim(OBJECT_CURE);
- showDescription(43, true);
+ showDescription(43);
loadActorAnim(OBJECT_SYNTHESIZER_DOOR, "s3r3d5", 0x8a, 0x8d, 0);
playSoundEffectIndex(kSfxDoor);
diff --git a/engines/startrek/rooms/love3.cpp b/engines/startrek/rooms/love3.cpp
index 32512ae283..ca7f55391f 100644
--- a/engines/startrek/rooms/love3.cpp
+++ b/engines/startrek/rooms/love3.cpp
@@ -159,6 +159,184 @@ extern const RoomAction love3ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love3TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_025, TX_LOV0_026, TX_LOV0_029, TX_LOV0_033,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV0_124, TX_LOV3_001,
+ TX_LOV3_002, TX_LOV3_003, TX_LOV3_004, TX_LOV3_005, TX_LOV3_006,
+ TX_LOV3_007, TX_LOV3_008, TX_LOV3_009, TX_LOV3_010, TX_LOV3_011,
+ TX_LOV3_012, TX_LOV3_013, TX_LOV3_014, TX_LOV3_015, TX_LOV3_016,
+ TX_LOV3_017, TX_LOV3_018, TX_LOV3_019, TX_LOV3_020, TX_LOV3_021,
+ TX_LOV3_022, TX_LOV3_023, TX_LOV3_024, TX_LOV3_025, TX_LOV3_026,
+ TX_LOV5_015, TX_LOV5_019, TX_LOV5_027, TX_LOV5_030, TX_LOV5_038,
+ TX_LOVA_100, TX_LOVA_F01, TX_LOVA_F02, TX_LOVA_F03, TX_LOVA_F04,
+ TX_LOVA_F07, TX_LOVA_F08, TX_LOVA_F10, TX_LOVA_F54, TX_LOVA_F55,
+ TX_MUD2_040, TX_MUD4_018, TX_TUG2_010, TX_VENA_F41, TX_BRIDU146,
+ TX_GENER004, TX_LOV2N005, TX_LOV3N000, TX_LOV3N001, TX_LOV3N002,
+ TX_LOV3N003, TX_LOV3N004, TX_LOV3N005, TX_LOV3N006, TX_LOV3N007,
+ TX_LOV3N008, TX_LOV3N009, TX_LOV3N010, TX_LOV3N011, TX_LOV3N012,
+ TX_LOV3N013, TX_LOV3N014, TX_LOV3N015, TX_LOV3N016, TX_LOV3N017,
+ TX_LOV3N018, TX_LOV3N019, TX_LOV3N020, TX_LOV3N021, TX_LOV3N022,
+ TX_LOV3N023, TX_LOV3N024, TX_LOV3N025, TX_LOV3N026, TX_LOV3N027,
+ TX_LOV3N028, TX_LOV3N029, TX_LOV3N030, TX_LOV3N031, TX_LOV3N032,
+ TX_LOV3NA08, TX_LOV3NA09, TX_LOV3NA20, TX_LOV3NA21, TX_LOV3NA22,
+ TX_LOV3NA23, TX_LOV3NJ32, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love3TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 9959, 0 },
+ { TX_SPEAKER_MCCOY, 9970, 0 },
+ { TX_SPEAKER_SPOCK, 9980, 0 },
+ { TX_SPEAKER_FERRIS, 9990, 0 },
+ { TX_LOV0_011, 12469, 0 },
+ { TX_LOV0_012, 12596, 0 },
+ { TX_LOV0_013, 12892, 0 },
+ { TX_LOV0_014, 12656, 0 },
+ { TX_LOV0_015, 12760, 0 },
+ { TX_LOV0_016, 12563, 0 },
+ { TX_LOV0_017, 13026, 0 },
+ { TX_LOV0_019, 12946, 0 },
+ { TX_LOV0_020, 12503, 0 },
+ { TX_LOV0_021, 12814, 0 },
+ { TX_LOV0_022, 12704, 0 },
+ { TX_LOV0_025, 13952, 0 },
+ { TX_LOV0_026, 13825, 0 },
+ { TX_LOV0_029, 13705, 0 },
+ { TX_LOV0_033, 13765, 0 },
+ { TX_LOV0_039, 13087, 0 },
+ { TX_LOV0_040, 13214, 0 },
+ { TX_LOV0_041, 13510, 0 },
+ { TX_LOV0_042, 13274, 0 },
+ { TX_LOV0_043, 13378, 0 },
+ { TX_LOV0_045, 13181, 0 },
+ { TX_LOV0_046, 13644, 0 },
+ { TX_LOV0_047, 13564, 0 },
+ { TX_LOV0_048, 13121, 0 },
+ { TX_LOV0_049, 13432, 0 },
+ { TX_LOV0_050, 13322, 0 },
+ { TX_LOV0_101, 14033, 0 },
+ { TX_LOV0_102, 14097, 0 },
+ { TX_LOV0_103, 14167, 0 },
+ { TX_LOV0_104, 14217, 0 },
+ { TX_LOV0_105, 14274, 0 },
+ { TX_LOV0_106, 14386, 0 },
+ { TX_LOV0_107, 14454, 0 },
+ { TX_LOV0_124, 13902, 0 },
+ { TX_LOV3_001, 1598, 0 },
+ { TX_LOV3_002, 11502, 0 },
+ { TX_LOV3_003, 11007, 0 },
+ { TX_LOV3_004, 11136, 0 },
+ { TX_LOV3_005, 11251, 0 },
+ { TX_LOV3_006, 2083, 0 },
+ { TX_LOV3_007, 14507, 0 },
+ { TX_LOV3_008, 1826, 0 },
+ { TX_LOV3_009, 10712, 0 },
+ { TX_LOV3_010, 684, 0 },
+ { TX_LOV3_011, 5079, 0 },
+ { TX_LOV3_012, 4619, 0 },
+ { TX_LOV3_013, 11334, 0 },
+ { TX_LOV3_014, 11378, 0 },
+ { TX_LOV3_015, 6046, 0 },
+ { TX_LOV3_016, 3156, 0 },
+ { TX_LOV3_017, 1696, 0 },
+ { TX_LOV3_018, 11891, 0 },
+ { TX_LOV3_019, 10794, 0 },
+ { TX_LOV3_020, 851, 0 },
+ { TX_LOV3_021, 3714, 0 },
+ { TX_LOV3_022, 2953, 0 },
+ { TX_LOV3_023, 4928, 0 },
+ { TX_LOV3_024, 1960, 0 },
+ { TX_LOV3_025, 5869, 0 },
+ { TX_LOV3_026, 10954, 0 },
+ { TX_LOV5_015, 7076, 0 },
+ //{ TX_LOV5_015, 7255, 0 }, // ignore duplicate line
+ { TX_LOV5_019, 6998, 0 },
+ { TX_LOV5_027, 7511, 0 },
+ { TX_LOV5_030, 7415, 0 },
+ { TX_LOV5_038, 7466, 0 },
+ { TX_LOVA_100, 8620, 0 },
+ { TX_LOVA_F01, 8062, 0 },
+ { TX_LOVA_F02, 8134, 0 },
+ { TX_LOVA_F03, 8333, 0 },
+ { TX_LOVA_F04, 8248, 0 },
+ { TX_LOVA_F07, 8697, 0 },
+ { TX_LOVA_F08, 7686, 0 },
+ //{ TX_LOVA_F08, 8401, 0 }, // ignore duplicate line
+ { TX_LOVA_F10, 8568, 0 },
+ { TX_LOVA_F54, 7842, 0 },
+ { TX_LOVA_F55, 7143, 0 },
+ { TX_MUD2_040, 8893, 0 },
+ { TX_MUD4_018, 9435, 0 },
+ //{ TX_MUD4_018, 9266, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 9599, 0 }, // ignore duplicate line
+ //{ TX_MUD4_018, 9102, 0 }, // ignore duplicate line
+ { TX_TUG2_010, 8498, 0 },
+ { TX_VENA_F41, 9389, 0 },
+ //{ TX_VENA_F41, 9722, 0 }, // ignore duplicate line
+ //{ TX_VENA_F41, 9225, 0 }, // ignore duplicate line
+ //{ TX_VENA_F41, 9558, 0 }, // ignore duplicate line
+ { TX_BRIDU146, 9668, 0 },
+ //{ TX_BRIDU146, 9335, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 9504, 0 }, // ignore duplicate line
+ //{ TX_BRIDU146, 9171, 0 }, // ignore duplicate line
+ { TX_GENER004, 7991, 0 },
+ { TX_LOV2N005, 8756, 0 },
+ //{ TX_LOV2N005, 8982, 0 }, // ignore duplicate line
+ //{ TX_LOV2N005, 8836, 0 }, // ignore duplicate line
+ { TX_LOV3N000, 10223, 0 }, // typo: the audio file is wrong
+ { TX_LOV3N001, 4852, 0 },
+ { TX_LOV3N002, 10260, 0 },
+ { TX_LOV3N003, 10324, 0 },
+ { TX_LOV3N004, 10475, 0 },
+ { TX_LOV3N005, 10381, 0 },
+ { TX_LOV3N006, 1503, 0 },
+ { TX_LOV3N007, 5476, 0 },
+ { TX_LOV3N008, 10423, 0 },
+ { TX_LOV3N009, 4422, 0 },
+ { TX_LOV3N010, 5947, 0 },
+ { TX_LOV3N011, 4277, 0 },
+ { TX_LOV3N012, 2895, 0 },
+ { TX_LOV3N013, 3371, 0 },
+ { TX_LOV3N014, 5550, 0 },
+ { TX_LOV3N015, 3060, 0 },
+ { TX_LOV3N016, 12045, 0 },
+ { TX_LOV3N017, 1374, 0 },
+ { TX_LOV3N018, 4564, 0 },
+ { TX_LOV3N019, 1272, 0 },
+ { TX_LOV3N020, 2580, 0 },
+ { TX_LOV3N021, 11748, 0 },
+ { TX_LOV3N022, 2675, 0 },
+ { TX_LOV3N023, 2631, 0 },
+ { TX_LOV3N024, 10535, 0 },
+ { TX_LOV3N025, 12110, 0 },
+ { TX_LOV3N026, 10600, 0 },
+ { TX_LOV3N027, 11699, 0 },
+ { TX_LOV3N028, 11606, 0 },
+ { TX_LOV3N029, 11650, 0 },
+ { TX_LOV3N030, 3914, 0 },
+ { TX_LOV3N031, 11563, 0 },
+ { TX_LOV3N032, 4188, 0 },
+ { TX_LOV3NA08, 12359, 0 },
+ { TX_LOV3NA09, 12156, 0 },
+ { TX_LOV3NA20, 10123, 0 },
+ { TX_LOV3NA21, 1187, 0 },
+ { TX_LOV3NA22, 10002, 0 },
+ { TX_LOV3NA23, 1089, 0 },
+ { TX_LOV3NJ32, 5767, 0 },
+ { TX_DIALOG_ERROR, 14528, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love3Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love3Tick1() {
playVoc("LOV3LOOP");
@@ -193,8 +371,8 @@ void Room::love3Tick1() {
void Room::love3Tick80() {
if (!_awayMission->love.visitedRoomWithRomulans && haveItem(OBJECT_IRLG)) {
- showText(TX_SPEAKER_MCCOY, 10, true);
- showText(TX_SPEAKER_SPOCK, 20, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV3_010);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_020);
}
}
@@ -213,27 +391,27 @@ void Room::love3LookAtServicePanel() {
}
void Room::love3LookAtMonitor() {
- showDescription(0, true); // BUGFIX: original didn't play the audio
+ showDescription(TX_LOV3N000); // BUGFIX: original didn't play the audio
}
void Room::love3LookAtWrench() {
- showDescription(2, true);
+ showDescription(TX_LOV3N002);
}
void Room::love3LookAtKirk() {
- showDescription(3, true);
+ showDescription(TX_LOV3N003);
}
void Room::love3LookAtMccoy() {
- showDescription(5, true);
+ showDescription(TX_LOV3N005);
}
void Room::love3LookAtSpock() {
- showDescription(8, true);
+ showDescription(TX_LOV3N008);
}
void Room::love3LookAtRedshirt() {
- showDescription(4, true);
+ showDescription(TX_LOV3N004);
}
void Room::love3LookAnywhere() {
@@ -245,69 +423,69 @@ void Room::love3LookAtShaft() {
}
void Room::love3LookAtGrate() {
- showDescription(19, true);
+ showDescription(TX_LOV3N019);
}
void Room::love3LookAtPanel() {
if (_awayMission->love.insulationOnGround)
- showDescription(17, true);
+ showDescription(TX_LOV3N017);
else
showDescription(TX_LOV3NA22);
}
void Room::love3LookAtGasTank() {
- showDescription(6, true);
+ showDescription(TX_LOV3N006);
}
void Room::love3LookAtTurbines() {
- showDescription(26, true);
- showText(TX_SPEAKER_MCCOY, 9, true);
- showText(TX_SPEAKER_SPOCK, 19, true);
+ showDescription(TX_LOV3N026);
+ showText(TX_SPEAKER_MCCOY, TX_LOV3_009);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_019);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_FERRIS, 26, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_026);
}
void Room::love3TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV3_001);
}
void Room::love3TalkToSpock() {
if (_awayMission->love.visitedRoomWithRomulans)
- showText(TX_SPEAKER_SPOCK, 3, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_003);
else if (_awayMission->love.romulansUnconsciousFromLaughingGas)
- showText(TX_SPEAKER_SPOCK, 17, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_017);
else if (haveItem(OBJECT_IRLG))
- showText(TX_SPEAKER_SPOCK, 4, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_004);
else
- showText(TX_SPEAKER_SPOCK, 3, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_003);
}
void Room::love3TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 8, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV3_008);
}
void Room::love3TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 24, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_024);
}
void Room::love3UseMTricorderAnywhere() {
if (_awayMission->love.knowAboutVirus)
- mccoyScan(DIR_S, 5, false, true);
+ mccoyScan(DIR_S, TX_LOV3_005, false);
else
- mccoyScan(DIR_S, 6, false, true);
+ mccoyScan(DIR_S, TX_LOV3_006, false);
}
void Room::love3UseSTricorderOnTurbines() {
- spockScan(DIR_N, 14, false, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_LOV3_014, false);
}
void Room::love3UseSTricorderOnInsulation() {
if (_awayMission->love.insulationOnGround)
- spockScan(DIR_W, 2, false, true);
+ spockScan(DIR_W, TX_SPEAKER_SPOCK, TX_LOV3_002, false);
}
void Room::love3UseSTricorderAnywhere() {
- spockScan(DIR_S, 13, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_LOV3_013, false);
}
void Room::love3UseKirkOnServicePanel() {
@@ -346,11 +524,11 @@ void Room::love3OpenedOrClosedServicePanel() {
if (_awayMission->love.servicePanelOpen) {
if (_awayMission->love.tookN2TankFromServicePanel)
- showDescription(23, true);
+ showDescription(TX_LOV3N023);
else
- showDescription(22, true);
+ showDescription(TX_LOV3N022);
} else
- showDescription(20, true);
+ showDescription(TX_LOV3N020);
}
// Use wrench on gas tank, to screw or unscrew it in position
@@ -365,19 +543,19 @@ void Room::love3ReachedGasTankToUnscrew() {
void Room::love3ScrewedOrUnscrewedGasTank() {
if (!_awayMission->love.gasTankUnscrewed) {
- showDescription(12, true);
+ showDescription(TX_LOV3N012);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_FERRIS, 22, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_022);
_awayMission->love.gasTankUnscrewed = true;
} else {
- showDescription(15, true);
+ showDescription(TX_LOV3N015);
_awayMission->love.gasTankUnscrewed = false;
}
}
void Room::love3UseWrenchOnO2OrH2Gas() {
- showText(TX_SPEAKER_SPOCK, 16, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_016);
}
@@ -392,7 +570,7 @@ void Room::love3ReachedGasTankToPutDown() {
}
void Room::love3PutN2TankBack() {
- showDescription(13, true);
+ showDescription(TX_LOV3N013);
_awayMission->love.tookN2TankFromServicePanel = false;
loseItem(OBJECT_IN2GAS);
loadActorAnim(OBJECT_GAS_TANK, "r4n2", 0, 0, 0);
@@ -415,12 +593,12 @@ void Room::love3OpenedEngineeringPanel() {
loadActorAnim(OBJECT_INSULATION, "s3r4p1", 0, 0, 0);
_awayMission->love.insulationOnGround = true;
}
- showDescription(21, true);
+ showDescription(TX_LOV3N021);
}
void Room::love3UseWrenchOnMonitor() {
- showText(TX_SPEAKER_SPOCK, 18, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_018);
}
@@ -436,14 +614,14 @@ void Room::love3PouredWaterOnMonitor() {
// BUGFIX: the speaker should be Lt. Ferris. In the original, the speaker wasn't
// specified.
// However, there is no substitute text for when Lt. Ferris is dead.
- showText(TX_SPEAKER_FERRIS, 21, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_021);
loseItem(OBJECT_IH2O);
}
void Room::love3UseCrewmanOnEngineeringPanelOrGrate() {
- showDescription(30, true);
+ showDescription(TX_LOV3N030);
}
@@ -468,7 +646,7 @@ void Room::love3OpenedOrClosedGrate() {
if (!_awayMission->love.grateRemoved) {
_awayMission->love.grateRemoved = true;
loadActorAnim(OBJECT_GRATE, "s3r4g3", 0, 0, 0);
- showDescription(16, true);
+ showDescription(TX_LOV3N016);
if (!_awayMission->love.gotPointsForOpeningGrate) {
_awayMission->love.gotPointsForOpeningGrate = true;
_awayMission->love.missionScore++;
@@ -476,13 +654,13 @@ void Room::love3OpenedOrClosedGrate() {
} else {
loadActorAnim(OBJECT_GRATE, "s3r4g1", 0x116, 0x8f, 0);
_awayMission->love.grateRemoved = false;
- showDescription(32, true);
+ showDescription(TX_LOV3N032);
}
}
void Room::love3UseCrewmanOnShaft() {
- showDescription(11, true);
+ showDescription(TX_LOV3N011);
}
@@ -492,13 +670,13 @@ void Room::love3UseWaterOnShaft() {
void Room::love3ReachedShaftUsingWater() {
if (!_awayMission->love.grateRemoved)
- showDescription(25, true);
+ showDescription(TX_LOV3N025);
else
loadActorAnimC(OBJECT_KIRK, "kuseme", -1, -1, &Room::love3PouredWaterDownShaft);
}
void Room::love3PouredWaterDownShaft() {
- showDescription(9, true);
+ showDescription(TX_LOV3N009);
loseItem(OBJECT_IH2O);
}
@@ -509,14 +687,14 @@ void Room::love3UseNitrousOxideOnShaft() {
void Room::love3ReachedShaftUsingNitrousOxide() {
if (!_awayMission->love.grateRemoved)
- showDescription(25, true);
+ showDescription(TX_LOV3N025);
else
loadActorAnimC(OBJECT_KIRK, "kuseme", -1, -1, &Room::love3PouredNitrousOxideDownShaft);
}
void Room::love3PouredNitrousOxideDownShaft() {
- showDescription(18, true);
- showText(TX_SPEAKER_SPOCK, 12, true);
+ showDescription(TX_LOV3N018);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_012);
loseItem(OBJECT_IN2O);
}
@@ -527,16 +705,16 @@ void Room::love3UseAmmoniaOnShaft() {
void Room::love3ReachedShaftUsingAmmonia() {
if (!_awayMission->love.grateRemoved)
- showDescription(25, true);
+ showDescription(TX_LOV3N025);
else
loadActorAnimC(OBJECT_KIRK, "kuseme", -1, -1, &Room::love3PouredAmmoniaDownShaft);
}
void Room::love3PouredAmmoniaDownShaft() {
if (!_awayMission->love.romulansUnconsciousFromVirus) {
- showDescription(01, true);
+ showDescription(TX_LOV3N001);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_FERRIS, 23, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_023);
}
loseItem(OBJECT_INH3);
@@ -551,7 +729,7 @@ void Room::love3UseRomulanLaughingGasOnShaft() {
_awayMission->love.missionScore += 6;
}
if (_awayMission->love.romulansUnconsciousFromLaughingGas)
- showText(TX_SPEAKER_SPOCK, 11, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_011);
else {
walkCrewmanC(OBJECT_KIRK, 0xf6, 0xa4, &Room::love3ReachedShaftUsingRomulanLaughingGas);
}
@@ -559,7 +737,7 @@ void Room::love3UseRomulanLaughingGasOnShaft() {
void Room::love3ReachedShaftUsingRomulanLaughingGas() {
if (!_awayMission->love.grateRemoved)
- showDescription(25, true);
+ showDescription(TX_LOV3N025);
else {
loadActorAnimC(OBJECT_KIRK, "kuseme", -1, -1, &Room::love3PouredRomulanLaughingGasDownShaft);
playVoc("EFX24");
@@ -594,7 +772,7 @@ void Room::love3PickedUpWrench() {
giveItem(OBJECT_IWRENCH);
loadActorStandAnim(OBJECT_WRENCH);
_awayMission->love.wrenchTaken = true;
- showDescription(31, true);
+ showDescription(TX_LOV3N031);
}
@@ -605,9 +783,9 @@ void Room::love3GetGasTank() {
void Room::love3ReachedGasTankToGet() {
if (_awayMission->love.gasTankUnscrewed)
- showDescription(07, true);
+ showDescription(TX_LOV3N007);
else
- showDescription(14, true);
+ showDescription(TX_LOV3N014);
}
@@ -621,8 +799,8 @@ void Room::love3ReachedGasTankUsingAntigrav() {
loadActorAnimC(OBJECT_KIRK, "kusehe", -1, -1, &Room::love3PickedUpGasTank);
playVoc("SE3PLBAT");
} else {
- showDescription(10, true);
- showText(TX_SPEAKER_SPOCK, 15, true);
+ showDescription(TX_LOV3N010);
+ showText(TX_SPEAKER_SPOCK, TX_LOV3_015);
}
}
@@ -633,7 +811,7 @@ void Room::love3PickedUpGasTank() {
showDescription(TX_LOV3NJ32);
if (!_awayMission->redshirtDead)
- showText(TX_SPEAKER_FERRIS, 25, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV3_025);
}
void Room::love3GetInsulation() {
@@ -648,7 +826,7 @@ void Room::love3ReachedInsulationToGet() {
void Room::love3PickedUpInsulation() {
loadActorStandAnim(OBJECT_KIRK);
giveItem(OBJECT_IINSULAT);
- showDescription(29, true);
+ showDescription(TX_LOV3N029);
}
}
diff --git a/engines/startrek/rooms/love4.cpp b/engines/startrek/rooms/love4.cpp
index 5b8e57f8f6..5035dd7e49 100644
--- a/engines/startrek/rooms/love4.cpp
+++ b/engines/startrek/rooms/love4.cpp
@@ -126,6 +126,154 @@ extern const RoomAction love4ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love4TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_025, TX_LOV0_026, TX_LOV0_029, TX_LOV0_033,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV0_124, TX_LOV4_001,
+ TX_LOV4_002, TX_LOV4_003, TX_LOV4_004, TX_LOV4_005, TX_LOV4_006,
+ TX_LOV4_007, TX_LOV4_009, TX_LOV4_010, TX_LOV4_011, TX_LOV4_012,
+ TX_LOV4_013, TX_LOV4_014, TX_LOV4_015, TX_LOV4_016, TX_LOV4_017,
+ TX_LOV4_018, TX_LOV4_019, TX_LOV4_020, TX_LOV4_021, TX_LOV4_022,
+ TX_LOV4_023, TX_LOV4_024, TX_LOV4_025, TX_LOV4_026, TX_LOV4_027,
+ TX_LOV4_028, TX_LOV4_029, TX_LOV5_015, TX_LOV5_019, TX_LOV5_027,
+ TX_LOV5_030, TX_LOV5_038, TX_LOVA_100, TX_LOVA_F01, TX_LOVA_F02,
+ TX_LOVA_F03, TX_LOVA_F04, TX_LOVA_F07, TX_LOVA_F08, TX_LOVA_F10,
+ TX_LOVA_F54, TX_LOVA_F55, TX_MUD2_040, TX_MUD4_018, TX_TUG2_010,
+ TX_VENA_F41, TX_FEA5_008, TX_LOV2N005, TX_LOV4N000, TX_LOV4N001,
+ TX_LOV4N002, TX_LOV4N003, TX_LOV4N004, TX_LOV4N005, TX_LOV4N006,
+ TX_LOV4N007, TX_LOV4N008, TX_LOV4N009, TX_LOV4N010, TX_LOV4N011,
+ TX_LOV4N013, TX_BRIDU146, TX_GENER004
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love4TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 7266, 0 },
+ { TX_SPEAKER_MCCOY, 7277, 0 },
+ { TX_SPEAKER_SPOCK, 7287, 0 },
+ { TX_SPEAKER_FERRIS, 7297, 0 },
+ { TX_LOV0_011, 8771, 0 },
+ { TX_LOV0_012, 8898, 0 },
+ { TX_LOV0_013, 9194, 0 },
+ { TX_LOV0_014, 8958, 0 },
+ { TX_LOV0_015, 9062, 0 },
+ { TX_LOV0_016, 8865, 0 },
+ { TX_LOV0_017, 9328, 0 },
+ { TX_LOV0_019, 9248, 0 },
+ { TX_LOV0_020, 8805, 0 },
+ { TX_LOV0_021, 9116, 0 },
+ { TX_LOV0_022, 9006, 0 },
+ { TX_LOV0_025, 10254, 0 },
+ { TX_LOV0_026, 10127, 0 },
+ { TX_LOV0_029, 10007, 0 },
+ { TX_LOV0_033, 10067, 0 },
+ { TX_LOV0_039, 9389, 0 },
+ { TX_LOV0_040, 9516, 0 },
+ { TX_LOV0_041, 9812, 0 },
+ { TX_LOV0_042, 9576, 0 },
+ { TX_LOV0_043, 9680, 0 },
+ { TX_LOV0_045, 9483, 0 },
+ { TX_LOV0_046, 9946, 0 },
+ { TX_LOV0_047, 9866, 0 },
+ { TX_LOV0_048, 9423, 0 },
+ { TX_LOV0_049, 9734, 0 },
+ { TX_LOV0_050, 9624, 0 },
+ { TX_LOV0_101, 10335, 0 },
+ { TX_LOV0_102, 10399, 0 },
+ { TX_LOV0_103, 10469, 0 },
+ { TX_LOV0_104, 10519, 0 },
+ { TX_LOV0_105, 10576, 0 },
+ { TX_LOV0_106, 10688, 0 },
+ { TX_LOV0_107, 10756, 0 },
+ { TX_LOV0_124, 10204, 0 },
+ { TX_LOV4_001, 2899, 0 },
+ { TX_LOV4_002, 1211, 0 },
+ { TX_LOV4_003, 8428, 0 },
+ { TX_LOV4_004, 3355, 0 },
+ { TX_LOV4_005, 1095, 0 },
+ { TX_LOV4_006, 8685, 0 },
+ { TX_LOV4_007, 7977, 0 },
+ { TX_LOV4_009, 3010, 0 },
+ { TX_LOV4_010, 8197, 0 },
+ { TX_LOV4_011, 3416, 0 },
+ { TX_LOV4_012, 3537, 0 },
+ { TX_LOV4_013, 2078, 0 },
+ { TX_LOV4_014, 7908, 0 },
+ { TX_LOV4_015, 1733, 0 },
+ { TX_LOV4_016, 10809, 0 },
+ { TX_LOV4_017, 8130, 0 },
+ { TX_LOV4_018, 1601, 0 },
+ { TX_LOV4_019, 1855, 0 },
+ { TX_LOV4_020, 8489, 0 },
+ { TX_LOV4_021, 8618, 0 },
+ { TX_LOV4_022, 1301, 0 },
+ { TX_LOV4_023, 2545, 0 },
+ { TX_LOV4_024, 1164, 0 },
+ { TX_LOV4_025, 7610, 0 },
+ { TX_LOV4_026, 2772, 0 },
+ { TX_LOV4_027, 8360, 0 },
+ { TX_LOV4_028, 8291, 0 },
+ { TX_LOV4_029, 3295, 0 },
+ { TX_LOV5_015, 4669, 0 },
+ //{ TX_LOV5_015, 4490, 0 },
+ { TX_LOV5_019, 4412, 0 },
+ { TX_LOV5_027, 4925, 0 },
+ { TX_LOV5_030, 4829, 0 },
+ { TX_LOV5_038, 4880, 0 },
+ { TX_LOVA_100, 6034, 0 },
+ { TX_LOVA_F01, 5476, 0 },
+ { TX_LOVA_F02, 5548, 0 },
+ { TX_LOVA_F03, 5747, 0 },
+ { TX_LOVA_F04, 5662, 0 },
+ { TX_LOVA_F07, 6111, 0 },
+ { TX_LOVA_F08, 5100, 0 },
+ //{ TX_LOVA_F08, 5815, 0 },
+ { TX_LOVA_F10, 5982, 0 },
+ { TX_LOVA_F54, 5256, 0 },
+ { TX_LOVA_F55, 4557, 0 },
+ { TX_FEA5_008, 8051, 0 },
+ { TX_MUD2_040, 6307, 0 },
+ { TX_MUD4_018, 7013, 0 },
+ //{ TX_MUD4_018, 6680, 0 },
+ //{ TX_MUD4_018, 6516, 0 },
+ //{ TX_MUD4_018, 6849, 0 },
+ { TX_TUG2_010, 5912, 0 },
+ { TX_VENA_F41, 7136, 0 },
+ //{ TX_VENA_F41, 6803, 0 },
+ //{ TX_VENA_F41, 6972, 0 },
+ //{ TX_VENA_F41, 6639, 0 },
+ { TX_LOV2N005, 6170, 0 },
+ //{ TX_LOV2N005, 6250, 0 },
+ //{ TX_LOV2N005, 6396, 0 },
+ { TX_LOV4N000, 8170, 0 },
+ { TX_LOV4N001, 7740, 0 },
+ { TX_LOV4N002, 7554, 0 },
+ { TX_LOV4N003, 7690, 0 },
+ { TX_LOV4N004, 3206, 0 },
+ { TX_LOV4N005, 2437, 0 },
+ { TX_LOV4N006, 7309, 0 },
+ { TX_LOV4N007, 1473, 0 },
+ { TX_LOV4N008, 7843, 0 },
+ { TX_LOV4N009, 7362, 0 },
+ { TX_LOV4N010, 7495, 0 },
+ { TX_LOV4N011, 7441, 0 },
+ { TX_LOV4N013, 2692, 0 },
+ { TX_BRIDU146, 6749, 0 },
+ //{ TX_BRIDU146, 7082, 0 },
+ //{ TX_BRIDU146, 6918, 0 },
+ //{ TX_BRIDU146, 6585, 0 },
+ { TX_GENER004, 5405, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love4Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love4Tick1() {
playVoc("LOV4LOOP");
@@ -189,23 +337,23 @@ void Room::love4ReachedLadder() {
}
void Room::love4UseStunPhaserOnRomulan() {
- showText(TX_SPEAKER_MCCOY, 7, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_007);
}
void Room::love4LookAnywhere() {
- showDescription(9, true);
+ showDescription(TX_LOV4N009);
}
void Room::love4LookAtLadder() {
- showDescription(10, true);
+ showDescription(TX_LOV4N010);
}
void Room::love4LookAtDoor() {
- showDescription(8, true);
+ showDescription(TX_LOV4N008);
}
void Room::love4LookAtKirk() {
- showDescription(2, true);
+ showDescription(TX_LOV4N002);
}
void Room::love4LookAtMccoy() {
@@ -214,76 +362,76 @@ void Room::love4LookAtMccoy() {
// is thinking it.
// Not sure if this was an intentional decision, but there is another unused audio
// file which matches with the text more accurately, so I'm using that instead.
- showDescription(12, true);
+ //showDescription(TX_LOV4N012); // TODO
}
void Room::love4LookAtSpock() {
- showDescription(03, true);
+ showDescription(TX_LOV4N003);
}
void Room::love4LookAtRedshirt() {
- showDescription(01, true);
+ showDescription(TX_LOV4N001);
}
void Room::love4LookAtRomulan() {
if (!_awayMission->love.romulansCured)
- showDescription(06, true);
+ showDescription(TX_LOV4N006);
else
- showDescription(11, true);
+ showDescription(TX_LOV4N011);
}
void Room::love4TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 05, true);
- showText(TX_SPEAKER_MCCOY, 24, true);
- showText(TX_SPEAKER_KIRK, 02, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV4_005);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_024);
+ showText(TX_SPEAKER_KIRK, TX_LOV4_002);
}
void Room::love4TalkToMccoy() {
if (_awayMission->love.romulansCured)
- showText(TX_SPEAKER_MCCOY, 22, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_022);
else
- showText(TX_SPEAKER_MCCOY, 10, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_010);
}
void Room::love4TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 28, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV4_028);
}
void Room::love4TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 27, true);
- showText(TX_SPEAKER_KIRK, 3, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV4_027);
+ showText(TX_SPEAKER_KIRK, TX_LOV4_003);
}
void Room::love4TalkToRomulan() {
if (_awayMission->love.romulansCured)
- showDescription(7, true); // BUGFIX: original didn't play audio
+ showDescription(TX_LOV4N007); // BUGFIX: original didn't play audio
}
void Room::love4UseMTricorderOnRomulan() {
if (_awayMission->love.romulansCured)
- mccoyScan(DIR_S, 18, false, true);
+ mccoyScan(DIR_S, TX_LOV4_018, false);
else
- mccoyScan(DIR_S, 15, false, true);
+ mccoyScan(DIR_S, TX_LOV4_015, false);
}
void Room::love4UseMTricorderAnywhere() {
if (_awayMission->love.romulansCured)
- mccoyScan(DIR_S, 19, false, true);
+ mccoyScan(DIR_S, TX_LOV4_019, false);
else if (_awayMission->love.romulansUnconsciousFromLaughingGas)
- mccoyScan(DIR_S, 20, false, true);
+ mccoyScan(DIR_S, TX_LOV4_020, false);
else
- mccoyScan(DIR_S, 21, false, true);
+ mccoyScan(DIR_S, TX_LOV4_021, false);
}
void Room::love4UseSTricorderAnywhere() {
- spockScan(DIR_S, 6, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_LOV4_006, false);
}
// Mccoy walks around to all romulans, giving each the cure
void Room::love4UseCureOnRomulan() {
if (_awayMission->love.romulansCured)
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_013);
else {
_awayMission->love.missionScore += 2;
_awayMission->love.romulansCured = true;
@@ -326,9 +474,9 @@ void Room::love4MccoyReachedRomulan1() {
void Room::love4MccoyCuredRomulan1() {
loadActorAnim2(OBJECT_ROMULAN_1, "s3r5r1", 0x36, 0xb3, 0);
- showDescription(05, true);
+ showDescription(TX_LOV4N005);
if (!_roomVar.love.gaveWaterToRomulans)
- showText(TX_SPEAKER_MCCOY, 23, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_023);
_awayMission->disableInput = false;
}
@@ -339,13 +487,13 @@ void Room::love4UseWaterOnRomulan() {
// In the original, you could use water on them, but there would be no corresponding
// narration, you'd get no points for it, and you'd lose the water anyway.
if (!_awayMission->love.romulansCured)
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_009);
else {
_roomVar.love.gaveWaterToRomulans = true;
if (_awayMission->love.romulansCured) {
- showDescription(13, true);
- showText(TX_SPEAKER_MCCOY, 26, true);
- showText(TX_SPEAKER_KIRK, 1, true);
+ showDescription(TX_LOV4N013);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_026);
+ showText(TX_SPEAKER_KIRK, TX_LOV4_001);
if (!_awayMission->love.gotPointsForHydratingRomulans) {
_awayMission->love.gotPointsForHydratingRomulans = true;
_awayMission->love.missionScore += 2;
@@ -364,29 +512,29 @@ void Room::love4UseWaterOnRomulan() {
// they did get voice acted anyway.
if (false) {
if (_awayMission->love.romulansUnconsciousFromVirus)
- showText(TX_SPEAKER_MCCOY, 9, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_009);
else {
- showDescription(4, true);
+ showDescription(TX_LOV4N004);
if (!_awayMission->redshirtDead) {
- showText(TX_SPEAKER_FERRIS, 29, true);
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV4_029);
+ showText(TX_SPEAKER_KIRK, TX_LOV4_004);
}
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_011);
loseItem(OBJECT_IH2O);
}
}
}
void Room::love4UseMedkitOnRomulan() {
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_012);
}
void Room::love4UseCureSampleOnRomulan() {
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_014);
}
void Room::love4UseAnythingOnRomulan() {
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV4_017);
}
}
diff --git a/engines/startrek/rooms/love5.cpp b/engines/startrek/rooms/love5.cpp
index f5fbe0c58f..6017dfe056 100644
--- a/engines/startrek/rooms/love5.cpp
+++ b/engines/startrek/rooms/love5.cpp
@@ -98,6 +98,164 @@ extern const RoomAction love5ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum love5TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_FERRIS, TX_SPEAKER_MARCUS,
+ TX_SPEAKER_CHEEVER, TX_SPEAKER_PREAX,
+ TX_LOV0_011, TX_LOV0_012, TX_LOV0_013, TX_LOV0_014, TX_LOV0_015,
+ TX_LOV0_016, TX_LOV0_017, TX_LOV0_019, TX_LOV0_020, TX_LOV0_021,
+ TX_LOV0_022, TX_LOV0_025, TX_LOV0_026, TX_LOV0_029, TX_LOV0_033,
+ TX_LOV0_039, TX_LOV0_040, TX_LOV0_041, TX_LOV0_042, TX_LOV0_043,
+ TX_LOV0_045, TX_LOV0_046, TX_LOV0_047, TX_LOV0_048, TX_LOV0_049,
+ TX_LOV0_050, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV0_124, TX_LOV5_001,
+ TX_LOV5_002, TX_LOV5_003, TX_LOV5_004, TX_LOV5_005, TX_LOV5_006,
+ TX_LOV5_007, TX_LOV5_008, TX_LOV5_009, TX_LOV5_010, TX_LOV5_011,
+ TX_LOV5_013, TX_LOV5_014, TX_LOV5_015, TX_LOV5_016, TX_LOV5_017,
+ TX_LOV5_018, TX_LOV5_019, TX_LOV5_020, TX_LOV5_021, TX_LOV5_023,
+ TX_LOV5_024, TX_LOV5_025, TX_LOV5_026, TX_LOV5_027, TX_LOV5_028,
+ TX_LOV5_029, TX_LOV5_030, TX_LOV5_031, TX_LOV5_032, TX_LOV5_033,
+ TX_LOV5_034, TX_LOV5_036, TX_LOV5_038, TX_LOV5_039, TX_LOV5_040,
+ TX_LOV5_041, TX_LOV5_042, TX_LOV5_043, TX_LOV5_044, TX_LOV5_045,
+ TX_LOV5_046, TX_LOV5_047, TX_LOV5_048, TX_LOV5_049, TX_LOV5_050,
+ TX_LOV5_051, TX_LOV5_052, TX_LOV5_053, TX_LOV5_054, TX_LOV5_055,
+ TX_LOV5_056, TX_LOV5_057, TX_LOV5_058, TX_LOV5_059, TX_LOV5_060,
+ TX_LOV5_061, TX_FEA5_008, TX_LOV5N000, TX_LOV5N001, TX_LOV5N002,
+ TX_LOV5N003, TX_LOV5N004, TX_LOV5N005, TX_LOV5N006, TX_LOV5N007,
+ TX_LOV5N008, TX_LOV5N009, TX_LOV5N010, TX_LOV5N011, TX_LOV5N012,
+ TX_LOV5N013, TX_LOV5N014, TX_LOV5N016, TX_LOV5N017, TX_LOV5N018,
+ TX_LOV5C001, TX_G_024, TX_DIALOG_ERROR
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets love5TextOffsets[] = {
+ { TX_SPEAKER_KIRK, 8968, 0 },
+ { TX_SPEAKER_MCCOY, 8979, 0 },
+ { TX_SPEAKER_SPOCK, 8989, 0 },
+ { TX_SPEAKER_FERRIS, 8999, 0 },
+ { TX_SPEAKER_CHEEVER, 9027, 0 },
+ { TX_SPEAKER_MARCUS, 9016, 0 },
+ { TX_SPEAKER_PREAX, 9010, 0 },
+ { TX_LOV0_011, 13010, 0 },
+ { TX_LOV0_012, 13137, 0 },
+ { TX_LOV0_013, 13433, 0 },
+ { TX_LOV0_014, 13197, 0 },
+ { TX_LOV0_015, 13301, 0 },
+ { TX_LOV0_016, 13104, 0 },
+ { TX_LOV0_017, 13567, 0 },
+ { TX_LOV0_019, 13487, 0 },
+ { TX_LOV0_020, 13044, 0 },
+ { TX_LOV0_021, 13355, 0 },
+ { TX_LOV0_022, 13245, 0 },
+ { TX_LOV0_025, 14493, 0 },
+ { TX_LOV0_026, 14366, 0 },
+ { TX_LOV0_029, 14246, 0 },
+ { TX_LOV0_033, 14306, 0 },
+ { TX_LOV0_039, 13628, 0 },
+ { TX_LOV0_040, 13755, 0 },
+ { TX_LOV0_041, 14051, 0 },
+ { TX_LOV0_042, 13815, 0 },
+ { TX_LOV0_043, 13919, 0 },
+ { TX_LOV0_045, 13722, 0 },
+ { TX_LOV0_046, 14185, 0 },
+ { TX_LOV0_047, 14105, 0 },
+ { TX_LOV0_048, 13662, 0 },
+ { TX_LOV0_049, 13973, 0 },
+ { TX_LOV0_050, 13863, 0 },
+ { TX_LOV0_101, 14574, 0 },
+ { TX_LOV0_102, 14638, 0 },
+ { TX_LOV0_103, 14708, 0 },
+ { TX_LOV0_104, 14758, 0 },
+ { TX_LOV0_105, 14815, 0 },
+ { TX_LOV0_106, 14927, 0 },
+ { TX_LOV0_107, 14995, 0 },
+ { TX_LOV0_124, 14443, 0 },
+ { TX_LOV5_001, 2119, 0 },
+ { TX_LOV5_002, 1715, 0 },
+ { TX_LOV5_003, 10797, 0 },
+ { TX_LOV5_004, 12334, 0 },
+ { TX_LOV5_005, 4485, 0 },
+ { TX_LOV5_006, 12464, 0 },
+ { TX_LOV5_007, 4020, 0 },
+ { TX_LOV5_008, 12178, 0 },
+ { TX_LOV5_009, 10983, 0 },
+ { TX_LOV5_010, 1502, 0 },
+ { TX_LOV5_011, 614, 0 },
+ { TX_LOV5_013, 4130, 0 },
+ { TX_LOV5_014, 2897, 0 },
+ { TX_LOV5_015, 3732, 0 },
+ { TX_LOV5_016, 3576, 0 },
+ { TX_LOV5_017, 4915, 0 },
+ { TX_LOV5_018, 1263, 0 },
+ { TX_LOV5_019, 3654, 0 },
+ { TX_LOV5_020, 4640, 0 },
+ { TX_LOV5_021, 1821, 0 },
+ { TX_LOV5_024, 3407, 0 },
+ { TX_LOV5_025, 11753, 0 },
+ { TX_LOV5_026, 4543, 0 },
+ { TX_LOV5_027, 2035, 0 },
+ { TX_LOV5_028, 9148, 0 },
+ { TX_LOV5_029, 3893, 0 },
+ { TX_LOV5_030, 1939, 0 },
+ { TX_LOV5_031, 9380, 0 },
+ { TX_LOV5_032, 1629, 0 },
+ { TX_LOV5_033, 3159, 0 },
+ { TX_LOV5_034, 11526, 0 },
+ { TX_LOV5_036, 11189, 0 },
+ { TX_LOV5_038, 1990, 0 },
+ { TX_LOV5_039, 2414, 0 },
+ { TX_LOV5_040, 2334, 0 },
+ { TX_LOV5_042, 2607, 0 },
+ { TX_LOV5_043, 12668, 0 },
+ { TX_LOV5_044, 9199, 0 },
+ { TX_LOV5_045, 1756, 0 },
+ { TX_LOV5_046, 9839, 0 },
+ { TX_LOV5_047, 11049, 0 },
+ { TX_LOV5_048, 10854, 0 },
+ { TX_LOV5_049, 11642, 0 },
+ { TX_LOV5_050, 9442, 0 },
+ { TX_LOV5_051, 11290, 0 },
+ { TX_LOV5_052, 3039, 0 },
+ { TX_LOV5_053, 4426, 0 },
+ { TX_LOV5_054, 10123, 0 },
+ { TX_LOV5_055, 2685, 0 },
+ { TX_LOV5_056, 2744, 0 },
+ { TX_LOV5_057, 10052, 0 },
+ { TX_LOV5_058, 10193, 0 },
+ { TX_LOV5_059, 11980, 0 },
+ { TX_LOV5_060, 12789, 0 },
+ { TX_LOV5_061, 12604, 0 },
+ { TX_LOV5_023, 5017, 0 },
+ { TX_LOV5_041, 5296, 0 },
+ { TX_FEA5_008, 706, 0 },
+ { TX_G_024, 11501, 0 },
+ { TX_LOV5N000, 10294, 0 },
+ { TX_LOV5N001, 9732, 0 },
+ { TX_LOV5N001, 9890, 0 },
+ { TX_LOV5N002, 10571, 0 },
+ { TX_LOV5N003, 10691, 0 },
+ { TX_LOV5N004, 10481, 0 },
+ { TX_LOV5N005, 10633, 0 },
+ { TX_LOV5N006, 1352, 0 },
+ { TX_LOV5N007, 4813, 0 },
+ { TX_LOV5N008, 863, 0 },
+ { TX_LOV5N009, 1115, 0 },
+ { TX_LOV5N010, 9660, 0 },
+ { TX_LOV5N011, 10413, 0 },
+ { TX_LOV5N012, 10359, 0 },
+ { TX_LOV5N013, 9040, 0 },
+ { TX_LOV5N014, 9961, 0 },
+ { TX_LOV5N016, 9311, 0 },
+ { TX_LOV5N017, 4320, 0 },
+ { TX_LOV5N018, 3805, 0 },
+ { TX_LOV5C001, 1598, 0 },
+ { TX_DIALOG_ERROR, 11927, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText love5Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::love5Tick1() {
playVoc("LOV5LOOP");
@@ -137,7 +295,7 @@ void Room::love5Timer4Expired() {
}
void Room::love5UseStunPhaserOnPreax() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_011);
// BUG: this function has two implementations. The second one (which is shadowed) is
// below.
@@ -146,23 +304,23 @@ void Room::love5UseStunPhaserOnPreax() {
}
void Room::love5LookAtKirk() {
- showDescription(04, true);
+ showDescription(TX_LOV5N004);
}
void Room::love5LookAtSpock() {
- showDescription(05, true);
+ showDescription(TX_LOV5N005);
}
void Room::love5LookAtMccoy() {
- showDescription(02, true);
+ showDescription(TX_LOV5N002);
}
void Room::love5LookAtRedshirt() {
- showDescription(3, true);
+ showDescription(TX_LOV5N003);
}
void Room::love5LookAnywhere() {
- showDescription(8, true);
+ showDescription(TX_LOV5N008);
// There is an unused version of this function, which states "This is Dr. Marcus's
// quarters, and there are hostages and 4 romulans here". That description doesn't
@@ -171,104 +329,104 @@ void Room::love5LookAnywhere() {
// load room LOVE6. This may be a leftover from a removed room that somehow ended up
// here.
- //showText(09, true);
+ //showText(TX_LOV5N009);
}
void Room::love5LookAtDevice() {
- showDescription(13, true);
- showText(TX_SPEAKER_MCCOY, 28, true);
- showText(TX_SPEAKER_MARCUS, 44, true);
+ showDescription(TX_LOV5N013);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_028);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_044);
}
void Room::love5LookAtConsole() {
- showDescription(16, true);
- showText(TX_SPEAKER_MCCOY, 31, true);
- showText(TX_SPEAKER_MARCUS, 50, true);
+ showDescription(TX_LOV5N016);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_031);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_050);
}
void Room::love5LookAtDrMarcus() {
if (_awayMission->love.freedMarcusAndCheever)
- showDescription(01, true);
+ showDescription(TX_LOV5N001);
else {
// BUGFIX: originally played audio "LOV5N001", which is only the first sentence of
// what should be spoken.
- showDescription(15, true);
+ //showDescription(TX_LOV5N015); // TODO
- showText(TX_SPEAKER_MARCUS, 46, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_046);
}
}
void Room::love5LookAtDrCheever() {
if (_awayMission->love.freedMarcusAndCheever)
- showDescription(00, true);
+ showDescription(TX_LOV5N000);
else {
- showDescription(14, true);
- showText(TX_SPEAKER_CHEEVER, 57, true);
+ showDescription(TX_LOV5N014);
+ showText(TX_SPEAKER_CHEEVER, TX_LOV5_057);
if (!_awayMission->redshirtDead) {
- showText(TX_SPEAKER_FERRIS, 54, true);
- showText(TX_SPEAKER_CHEEVER, 58, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV5_054);
+ showText(TX_SPEAKER_CHEEVER, TX_LOV5_058);
}
}
}
void Room::love5LookAtPreax() {
if (_awayMission->love.preaxCured)
- showDescription(11, true);
+ showDescription(TX_LOV5N011);
else
- showDescription(12, true);
+ showDescription(TX_LOV5N012);
}
void Room::love5TalkToPreax() {
if (_awayMission->love.preaxCured) {
if (!_awayMission->love.freedMarcusAndCheever)
- showDescription(06, true);
+ showDescription(TX_LOV5N006);
else {
const TextRef choices[] = {
TX_SPEAKER_KIRK,
- 8,
- 4,
- 6,
- TX_BLANK,
+ TX_LOV5_008,
+ TX_LOV5_004,
+ TX_LOV5_006,
+ TX_END,
};
- showText(TX_SPEAKER_PREAX, 59, true);
- int choice = showMultipleTexts(choices, true);
+ showText(TX_SPEAKER_PREAX, TX_LOV5_059);
+ int choice = showMultipleTexts(choices);
switch (choice) {
case 1:
- showText(TX_SPEAKER_MARCUS, 43, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_043);
// fall through
case 0:
- showText(TX_SPEAKER_PREAX, 61, true);
- showText(TX_SPEAKER_KIRK, 10, true);
+ showText(TX_SPEAKER_PREAX, TX_LOV5_061);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_010);
// NOTE: This just says "(Spock raises an eyebrow)". No audio associated.
showText(TX_SPEAKER_SPOCK, TX_LOV5C001);
- showText(TX_SPEAKER_MCCOY, 32, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_032);
break;
case 2:
- showText(TX_SPEAKER_PREAX, 60, true);
+ showText(TX_SPEAKER_PREAX, TX_LOV5_060);
break;
default:
showDescription(TX_DIALOG_ERROR);
break;
}
- showText(TX_SPEAKER_KIRK, 02, true);
- showText(TX_SPEAKER_MARCUS, 45, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_002);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_045);
_awayMission->disableInput = true;
if (!_awayMission->love.spockCured) {
- showText(TX_SPEAKER_MCCOY, 21, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_021);
walkCrewmanC(OBJECT_MCCOY, 0x87, 0xc3, &Room::love5MccoyReachedSpockToCure);
} else
love5EndMission();
}
} else
- showText(TX_SPEAKER_MARCUS, 18, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_018);
}
void Room::love5MccoyReachedSpockToCure() {
@@ -276,16 +434,16 @@ void Room::love5MccoyReachedSpockToCure() {
}
void Room::love5MccoyCuredSpock() {
- showText(TX_SPEAKER_MCCOY, 30, true);
- showText(TX_SPEAKER_SPOCK, 38, true);
- showText(TX_SPEAKER_MCCOY, 27, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_030);
+ showText(TX_SPEAKER_SPOCK, TX_LOV5_038);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_027);
// NOTE: This just says "(Spock raises an eyebrow)". No audio associated.
showText(TX_SPEAKER_SPOCK, TX_LOV5C001);
love5EndMission();
}
void Room::love5EndMission() {
- showText(TX_SPEAKER_KIRK, 01, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_001);
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
walkCrewmanC(OBJECT_KIRK, 0x64, 0xc2, &Room::love5CrewmanReachedBeamoutPosition);
@@ -313,78 +471,78 @@ void Room::love5CrewmanReachedBeamoutPosition() {
void Room::love5TalkToDrMarcus() {
if (!_awayMission->love.freedMarcusAndCheever)
- showText(TX_SPEAKER_MARCUS, 40, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_040);
else {
if (!haveItem(OBJECT_ICURE))
- showText(TX_SPEAKER_MARCUS, 39, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_039);
else
- showText(TX_SPEAKER_MARCUS, 42, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_042);
}
}
void Room::love5TalkToDrCheever() {
if (!_awayMission->love.freedMarcusAndCheever)
- showText(TX_SPEAKER_CHEEVER, 55, true);
+ showText(TX_SPEAKER_CHEEVER, TX_LOV5_055);
else
- showText(TX_SPEAKER_CHEEVER, 56, true);
+ showText(TX_SPEAKER_CHEEVER, TX_LOV5_056);
}
void Room::love5TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 3, true);
- showText(TX_SPEAKER_MARCUS, 48, true);
- showText(TX_SPEAKER_KIRK, 9, true);
- showText(TX_SPEAKER_MARCUS, 47, true);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_003);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_048);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_009);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_047);
}
void Room::love5TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 36, true);
- showText(TX_SPEAKER_MARCUS, 51, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOV5_036);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_051);
showText(TX_SPEAKER_SPOCK, TX_G_024);
}
void Room::love5TalkToMccoy() {
if (!_awayMission->love.preaxCured)
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_014);
}
void Room::love5TalkToRedshirt() {
- showText(TX_SPEAKER_FERRIS, 52, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV5_052);
}
void Room::love5UseSTricorderAnywhere() {
- spockScan(DIR_S, 33, false, true);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_LOV5_033, false);
}
void Room::love5UseSTricorderOnDevice() {
- spockScan(DIR_N, 34, false, true);
- showText(TX_SPEAKER_MARCUS, 49, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_LOV5_034, false);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_049);
}
void Room::love5UseMTricorderOnMarcusOrCheever() {
- mccoyScan(DIR_W, 25, false, true);
+ mccoyScan(DIR_W, TX_LOV5_025, false);
}
void Room::love5UseMTricorderOnPreax() {
if (!_awayMission->love.preaxCured) {
if (_awayMission->love.romulansUnconsciousFromLaughingGas)
- mccoyScan(DIR_E, 24, false, true);
+ mccoyScan(DIR_E, TX_LOV5_024, false);
else
- mccoyScan(DIR_E, 16, false, true);
+ mccoyScan(DIR_E, TX_LOV5_016, false);
}
}
void Room::love5UseMedkitOnPreax() {
if (_awayMission->love.preaxCured)
- showText(TX_SPEAKER_MCCOY, 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_015);
else
- showText(TX_SPEAKER_MCCOY, 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_019);
}
void Room::love5UseWaterOnPreax() {
if (_awayMission->love.preaxCured) {
- showDescription(18, true);
- showText(TX_SPEAKER_MCCOY, 29, true);
- showText(TX_SPEAKER_KIRK, 07, true);
+ showDescription(TX_LOV5N018);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_029);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_007);
if (!_awayMission->love.gotPointsForHydratingPreax) {
_awayMission->love.gotPointsForHydratingPreax = true;
_awayMission->love.missionScore++;
@@ -392,16 +550,16 @@ void Room::love5UseWaterOnPreax() {
loseItem(OBJECT_IH2O);
} else {
if (_awayMission->love.romulansUnconsciousFromVirus) {
- showText(TX_SPEAKER_MCCOY, 13, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_013);
// BUGFIX: original didn't have correct speaker. Also, you shouldn't lose your
// water since it's not actually used here, so a "loseItem" line was removed.
} else {
- showDescription(17, true);
+ showDescription(TX_LOV5N017);
if (!_awayMission->redshirtDead) {
- showText(TX_SPEAKER_FERRIS, 53, true);
- showText(TX_SPEAKER_KIRK, 05, true);
+ showText(TX_SPEAKER_FERRIS, TX_LOV5_053);
+ showText(TX_SPEAKER_KIRK, TX_LOV5_005);
}
- showText(TX_SPEAKER_MCCOY, 26, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_026);
loseItem(OBJECT_IH2O);
// BUGFIX: give a point for hydrating the Preax. It's inconsistent to only
@@ -415,7 +573,7 @@ void Room::love5UseWaterOnPreax() {
}
void Room::love5UseCureSampleOnPreax() {
- showText(TX_SPEAKER_MCCOY, 20, true); // BUGFIX: original didn't have correct speaker
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_020); // BUGFIX: original didn't have correct speaker
}
@@ -432,13 +590,13 @@ void Room::love5CuredPreax() {
walkCrewman(OBJECT_MCCOY, 0xdc, 0xc3);
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_E;
- showDescription(07, true);
+ showDescription(TX_LOV5N007);
// BUG: says he's dehydrated, but doesn't check whether you've given water to him
// already (like it does in LOVE4).
// TODO: make the whole "giving water to romulans" thing consistent between LOVE4 and
// LOVE5?
- showText(TX_SPEAKER_MCCOY, 17, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_017);
loadActorAnim2(OBJECT_PREAX, "s3r6r1", 0x116, 0xba);
_awayMission->love.preaxCured = true;
@@ -446,7 +604,7 @@ void Room::love5CuredPreax() {
void Room::love5UseAnythingOnPreax() {
- showText(TX_SPEAKER_MCCOY, 23, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_023);
}
@@ -481,7 +639,7 @@ void Room::love5KirkUntiedMarcus() {
void Room::love5MarcusStoodUp() {
_awayMission->disableInput = false;
- showText(TX_SPEAKER_MARCUS, 41, true);
+ showText(TX_SPEAKER_MARCUS, TX_LOV5_041);
}
}
diff --git a/engines/startrek/rooms/lovea.cpp b/engines/startrek/rooms/lovea.cpp
index 85b26f4e46..17266a5e8c 100644
--- a/engines/startrek/rooms/lovea.cpp
+++ b/engines/startrek/rooms/lovea.cpp
@@ -27,10 +27,90 @@
namespace StarTrek {
+enum loveTextIds {
+ TX_COMMON_IDS_OFFSET_START = 5000, // needed to distinguish common IDs
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_UHURA,
+ TX_LOV0_025, TX_LOV0_101, TX_LOV0_102, TX_LOV0_103, TX_LOV0_104,
+ TX_LOV0_105, TX_LOV0_106, TX_LOV0_107, TX_LOV5_015, TX_LOV5_019,
+ TX_LOV5_027, TX_LOV5_030, TX_LOV5_038, TX_LOVA_100, TX_LOVA_F01,
+ TX_LOVA_F02, TX_LOVA_F03, TX_LOVA_F04, TX_LOVA_F07, TX_LOVA_F08,
+ TX_LOVA_F10, TX_LOVA_F54, TX_LOVA_F55, TX_TUG2_010, TX_MUD2_040,
+ TX_LOV2N005, TX_MUD4_018, TX_BRIDU146, TX_VENA_F41, TX_GENER004,
+ TX_LOV5C001, TX_SPOKCOFF
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets loveTextOffsets[] = {
+ { TX_SPEAKER_KIRK, 5915, 0 },
+ { TX_SPEAKER_MCCOY, 5926, 0 },
+ { TX_SPEAKER_SPOCK, 5936, 0 },
+ { TX_SPEAKER_UHURA, 4990, 0 },
+ { TX_LOV0_025, 11981, 0 },
+ { TX_LOV0_101, 12062, 0 },
+ { TX_LOV0_102, 12126, 0 },
+ { TX_LOV0_103, 12196, 0 },
+ { TX_LOV0_104, 12246, 0 },
+ { TX_LOV0_105, 12303, 0 },
+ { TX_LOV0_106, 12415, 0 },
+ { TX_LOV0_107, 12483, 0 },
+ { TX_LOV5_015, 3009, 0 },
+ { TX_LOV5_019, 2931, 0 },
+ { TX_LOV5_027, 3444, 0 },
+ { TX_LOV5_030, 3348, 0 },
+ { TX_LOV5_038, 444, 0 },
+ { TX_LOVA_100, 4553, 0 },
+ { TX_LOVA_F01, 3995, 0 },
+ { TX_LOVA_F02, 4067, 0 },
+ { TX_LOVA_F03, 4266, 0 },
+ { TX_LOVA_F04, 4181, 0 },
+ { TX_LOVA_F07, 4630, 0 },
+ { TX_LOVA_F08, 3619, 0 },
+ { TX_LOVA_F10, 4501, 0 },
+ { TX_LOVA_F54, 3775, 0 },
+ { TX_LOVA_F55, 3076, 0 },
+ { TX_TUG2_010, 4431, 0 },
+ { TX_MUD2_040, 4826, 0 },
+ { TX_LOV2N005, 4689, 0 },
+ { TX_MUD4_018, 5035, 0 },
+ { TX_BRIDU146, 5104, 0 },
+ { TX_VENA_F41, 5158, 0 },
+ { TX_LOV5C001, 3497, 0 },
+ { TX_SPOKCOFF, 3564, 0 },
+ { TX_GENER004, 3924, 0 }, // Game over
+ { -1, 0, 0 }
+};
+
// Mccoy or Ferris say something under effects of laughing gas
void Room::loveaTimer0Expired() {
- const TextRef ferrisText[] = { 39, 48, 45, 40, 42, 50, 43, 41, 47, 46, 39 };
- const TextRef mccoyText[] = { 11, 20, 16, 12, 14, 22, 15, 21, 13, 19, 17 };
+// TODO
+#if 0
+ const TextRef ferrisText[] = {
+ TX_LOV0_039,
+ TX_LOV0_048,
+ TX_LOV0_045,
+ TX_LOV0_040,
+ TX_LOV0_042,
+ TX_LOV0_050,
+ TX_LOV0_043,
+ TX_LOV0_041,
+ TX_LOV0_047,
+ TX_LOV0_046,
+ TX_LOV0_039
+ };
+
+ const TextRef mccoyText[] = {
+ TX_LOV0_011,
+ TX_LOV0_020,
+ TX_LOV0_016,
+ TX_LOV0_012,
+ TX_LOV0_014,
+ TX_LOV0_022,
+ TX_LOV0_015,
+ TX_LOV0_021,
+ TX_LOV0_013,
+ TX_LOV0_019,
+ TX_LOV0_017
+ };
// BUGFIX: should range from 0-1, not 0-2. Original had "get name errors" when it
// rolled a 2.
@@ -49,31 +129,48 @@ void Room::loveaTimer0Expired() {
randomVal = getRandomWordInRange(0, 10);
- showText(speaker, COMMON_MESSAGE_OFFSET + textTable[randomVal], true);
+ showText(speaker, textTable[randomVal]);
if (!_awayMission->love.releasedRomulanLaughingGas) {
- const int spockText[] = { 29, 33, 26, 124 };
- showText(TX_SPEAKER_SPOCK, COMMON_MESSAGE_OFFSET + spockText[getRandomWordInRange(0, 3)], true);
+ const int spockText[] = {
+ TX_LOV0_029,
+ TX_LOV0_033,
+ TX_LOV0_026,
+ TX_LOV0_124
+ };
+ showText(TX_SPEAKER_SPOCK, spockText[getRandomWordInRange(0, 3)]);
// BUG(?): This is in an if statement, meaning the human crewmen stop talking from
// laughing gas if Spock is under laughing gas effects. Might be intentional, to
// reduce "spamming" of text?
_awayMission->timers[0] = getRandomWordInRange(200, 400);
}
+#endif
}
// Spock says something under effects of laughing gas
void Room::loveaTimer1Expired() {
- const int spockText[] = { 25, 101, 102, 103, 104, 105, 106, 107 };
- showText(TX_SPEAKER_SPOCK, COMMON_MESSAGE_OFFSET + spockText[getRandomWordInRange(0, 7)], true);
+ const int spockText[] = {
+ TX_LOV0_025,
+ TX_LOV0_101,
+ TX_LOV0_102,
+ TX_LOV0_103,
+ TX_LOV0_104,
+ TX_LOV0_105,
+ TX_LOV0_106,
+ TX_LOV0_107
+ };
+
+ showText(TX_SPEAKER_SPOCK, spockText[getRandomWordInRange(0, 7)]);
+
_awayMission->timers[1] = getRandomWordInRange(200, 400);
}
void Room::loveaUseMedkitOnSpock() {
if (_awayMission->love.spockCured)
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_015);
else
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 19, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_019);
}
void Room::loveaUseCureSampleOnSpock() {
@@ -81,13 +178,13 @@ void Room::loveaUseCureSampleOnSpock() {
walkCrewman(OBJECT_SPOCK, _roomVar.love.cmnXPosToCureSpock, _roomVar.love.cmnYPosToCureSpock, 99);
walkCrewman(OBJECT_MCCOY, _roomVar.love.cmnXPosToCureSpock, _roomVar.love.cmnYPosToCureSpock + 10, 99);
} else
- showText(TX_SPEAKER_MCCOY, 55 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F55);
}
void Room::loveaUseCureOnSpock() {
if (_awayMission->love.spockCured)
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 15, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_015);
else {
walkCrewman(OBJECT_SPOCK, _roomVar.love.cmnXPosToCureSpock, _roomVar.love.cmnYPosToCureSpock, 99);
walkCrewman(OBJECT_MCCOY, _roomVar.love.cmnXPosToCureSpock, _roomVar.love.cmnYPosToCureSpock + 10, 99);
@@ -101,9 +198,9 @@ void Room::loveaSpockOrMccoyInPositionToUseCure() {
}
void Room::loveaFinishedCuringSpock() {
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 30, true);
- showText(TX_SPEAKER_SPOCK, COMMON_MESSAGE_OFFSET + 38, true);
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 27, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_030);
+ showText(TX_SPEAKER_SPOCK, TX_LOV5_038);
+ showText(TX_SPEAKER_MCCOY, TX_LOV5_027);
showText(TX_SPEAKER_SPOCK, TX_LOV5C001);
_awayMission->love.spockCured = true;
}
@@ -123,13 +220,13 @@ void Room::loveaTimer2Expired() {
showText(TX_SPEAKER_SPOCK, TX_SPOKCOFF);
_awayMission->love.spockInfectionCounter++;
} else if (_awayMission->love.spockInfectionCounter == 30) {
- showText(TX_SPEAKER_MCCOY, 8 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F08);
_awayMission->love.spockInfectionCounter++;
} else if (_awayMission->love.spockInfectionCounter == 45) {
showText(TX_SPEAKER_SPOCK, TX_SPOKCOFF);
_awayMission->love.spockInfectionCounter++;
} else if (_awayMission->love.spockInfectionCounter == 60) {
- showText(TX_SPEAKER_SPOCK, 54 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_SPOCK, TX_LOVA_F54);
_awayMission->love.romulansUnconsciousFromVirus = true;
_awayMission->love.spockInfectionCounter++;
}
@@ -144,30 +241,30 @@ void Room::loveaUseMTricorderOnSpock() {
playSoundEffectIndex(kSfxTricorder);
if (_awayMission->love.spockCured)
- showText(TX_SPEAKER_MCCOY, 1 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F01);
else if (!_awayMission->love.knowAboutVirus)
- showText(TX_SPEAKER_MCCOY, 2 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F02);
else if (_awayMission->love.spockInfectionCounter < 10)
- showText(TX_SPEAKER_MCCOY, 4 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F04);
else if (_awayMission->love.spockInfectionCounter < 30)
- showText(TX_SPEAKER_MCCOY, 3 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F03);
else if (_awayMission->love.spockInfectionCounter < 50)
- showText(TX_SPEAKER_MCCOY, 8 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F08);
else if (_awayMission->love.spockInfectionCounter < 70) // BUGFIX: < 70 instead of == 70
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 10, true); // TX_TUG2_010
+ showText(TX_SPEAKER_MCCOY, TX_TUG2_010);
else if (_awayMission->love.spockInfectionCounter < 100)
- showText(TX_SPEAKER_MCCOY, 10 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F10);
else
- showText(TX_SPEAKER_MCCOY, COMMON_MESSAGE_OFFSET + 100);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_100);
}
void Room::loveaUseMTricorderOnHuman() {
playSoundEffectIndex(kSfxTricorder);
- showText(TX_SPEAKER_MCCOY, 7 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_MCCOY, TX_LOVA_F07);
}
void Room::loveaUseRomulanLaughingGas() {
- showDescription(COMMON_MESSAGE_OFFSET + 2, true);
+ showDescription(TX_LOV2N005);
_awayMission->love.releasedRomulanLaughingGas = true;
loseItem(OBJECT_IRLG);
@@ -176,7 +273,7 @@ void Room::loveaUseRomulanLaughingGas() {
}
void Room::loveaUseHumanLaughingGas() {
- showDescription(COMMON_MESSAGE_OFFSET + 5, true);
+ showDescription(TX_LOV2N005);
showText(TX_SPEAKER_SPOCK, TX_MUD2_040);
_awayMission->love.releasedHumanLaughingGas = true;
loseItem(OBJECT_IN2O);
@@ -187,7 +284,7 @@ void Room::loveaUseHumanLaughingGas() {
}
void Room::loveaUseAmmonia() {
- showDescription(COMMON_MESSAGE_OFFSET + 5, true);
+ showDescription(TX_LOV2N005);
// TODO: redshirt says something in floppy edition only
loseItem(OBJECT_INH3);
}
@@ -200,7 +297,7 @@ void Room::loveaUseCommunicator() {
showText(TX_SPEAKER_KIRK, TX_MUD4_018);
showText(TX_SPEAKER_UHURA, TX_BRIDU146);
- showText(TX_SPEAKER_KIRK, 41 + COMMON_MESSAGE_OFFSET, true);
+ showText(TX_SPEAKER_KIRK, TX_VENA_F41);
_awayMission->love.contactedEnterpriseBeforeCure = true;
}
diff --git a/engines/startrek/rooms/mudd0.cpp b/engines/startrek/rooms/mudd0.cpp
index 3c0bd76eb8..88dff07c8b 100644
--- a/engines/startrek/rooms/mudd0.cpp
+++ b/engines/startrek/rooms/mudd0.cpp
@@ -20,6 +20,7 @@
*
*/
+#if 0
#include "startrek/room.h"
#define OBJECT_MUDD 8
@@ -90,6 +91,23 @@ extern const RoomAction mudd0ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum mudd0TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets mudd0TextOffsets[] = {
+ //{ TX_SPEAKER_KIRK, 2597, 0 },
+ //{ TX_SPEAKER_MCCOY, 2622, 0 },
+ //{ TX_SPEAKER_SPOCK, 2632, 0 },
+ //{ TX_SPEAKER_EVERTS, 2642, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText mudd0Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::mudd0Tick1() {
playVoc("MUD0LOOP");
@@ -119,66 +137,66 @@ void Room::mudd0Tick60() {
_awayMission->mudd.muddFirstRoomState++;
- showText(TX_SPEAKER_MUDD, 37, true);
- showText(TX_SPEAKER_KIRK, 9, true);
- showText(TX_SPEAKER_MUDD, 28, true);
- showText(TX_SPEAKER_MCCOY,17, true);
- showText(TX_SPEAKER_MUDD, 26, true);
- showText(TX_SPEAKER_KIRK, 6, true);
- showText(TX_SPEAKER_MUDD, 33, true);
- showText(TX_SPEAKER_KIRK, 5, true);
- showText(TX_SPEAKER_MUDD, 29, true);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_037);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_009);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_028);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_017);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_026);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_006);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_033);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_005);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_029);
}
}
void Room::mudd0UsePhaserOnMudd() {
- showText(TX_SPEAKER_MUDD, 25, true);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_025);
}
void Room::mudd0UseCommunicator() {
- showText(TX_SPEAKER_KIRK, 1, true);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_001);
showText(TX_SPEAKER_UHURA, TX_STATICU1);
}
void Room::mudd0LookAtFoodBox() {
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(12, true);
+ showDescription(TX_MUD0N012);
}
void Room::mudd0LookAtComponentBox() {
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(13, true);
+ showDescription(TX_MUD0N013);
}
void Room::mudd0LookAnywhere() {
- showDescription(19, true);
+ showDescription(TX_MUD0N019);
}
void Room::mudd0LookAtMemoryDiskBox() {
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_N;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(10, true);
+ showDescription(TX_MUD0N010);
}
void Room::mudd0LookAtDegrimerBox() {
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_W;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(8, true);
+ showDescription(TX_MUD0N008);
}
void Room::mudd0LookAtLense() {
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_E;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(14, true);
+ showDescription(TX_MUD0N014);
}
void Room::mudd0UseSTricorderAnywhere() {
// Narrator says something, not Spock (so we don't use "spockScan" function)
loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
playSoundEffectIndex(kSfxTricorder);
- showDescription(15, true);
+ showDescription(TX_MUD0N015);
}
void Room::mudd0UseMTricorderAnywhere() {
@@ -187,11 +205,11 @@ void Room::mudd0UseMTricorderAnywhere() {
// above.
loadActorAnim2(OBJECT_MCCOY, "mscans", -1, -1, 0);
playSoundEffectIndex(kSfxTricorder);
- showDescription(15, true);
+ showDescription(TX_MUD0N015);
}
void Room::mudd0UseSTricorderOnMemoryDiskBox() {
- spockScan(DIR_N, 21, true);
+ spockScan(DIR_N, TX_SPEAKER_SPOCK, TX_MUD0_021, true);
}
void Room::mudd0UseSTricorderOnDegrimerBox() {
@@ -199,19 +217,19 @@ void Room::mudd0UseSTricorderOnDegrimerBox() {
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
loadActorAnim2(OBJECT_SPOCK, "sscanw", -1, -1, 0);
playSoundEffectIndex(kSfxTricorder);
- showDescription(0, true);
+ showDescription(TX_MUD0N000);
}
void Room::mudd0UseMTricorderOnLense() {
if (_awayMission->mudd.discoveredLenseAndDegrimerFunction)
- mccoyScan(DIR_E, 12, true);
+ mccoyScan(DIR_E, TX_MUD0_012, true);
else
- mccoyScan(DIR_E, 13, true);
+ mccoyScan(DIR_E, TX_MUD0_013, true);
}
void Room::mudd0GetLense() {
if (_awayMission->mudd.gotLense)
- showDescription(16, true);
+ showDescription(TX_MUD0N016);
else {
_awayMission->mudd.gotLense = true;
_awayMission->mudd.missionScore++;
@@ -224,7 +242,7 @@ void Room::mudd0GetLense() {
void Room::mudd0GetMemoryDisk() {
if (_awayMission->mudd.gotMemoryDisk)
- showDescription(16, true);
+ showDescription(TX_MUD0N016);
else {
_awayMission->mudd.gotMemoryDisk = true;
_awayMission->mudd.missionScore++;
@@ -236,7 +254,7 @@ void Room::mudd0GetMemoryDisk() {
void Room::mudd0GetDegrimer() {
if (_awayMission->mudd.gotDegrimer)
- showDescription(16, true);
+ showDescription(TX_MUD0N016);
else {
_awayMission->mudd.gotDegrimer = true;
_awayMission->mudd.missionScore++;
@@ -254,7 +272,7 @@ void Room::mudd0PickedUpLense() {
void Room::mudd0PickedUpItem() {
_awayMission->disableInput = false; // NOTE: this was never set to true
- showDescription(COMMON_MESSAGE_OFFSET + 7, true); // TX_LOV1N007
+ showDescription(TX_LOV1N007);
}
@@ -283,79 +301,80 @@ void Room::mudd0TouchedHotspot0() { // Trigger top door opening
}
void Room::mudd0UseMedkit() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_011);
}
void Room::mudd0LookAtKirk() {
- showDescription(4, true);
+ showDescription(TX_MUD0N004);
}
void Room::mudd0LookAtSpock() {
- showDescription(7, true);
+ showDescription(TX_MUD0N007);
}
void Room::mudd0LookAtMccoy() {
- showDescription(1, true);
+ showDescription(TX_MUD0N001);
}
void Room::mudd0LookAtRedshirt() {
- showDescription(5, true);
+ showDescription(TX_MUD0N005);
}
void Room::mudd0LookAtMudd() {
- showDescription(3, true);
+ showDescription(TX_MUD0N003);
}
void Room::mudd0TalkToKirk() {
if (_awayMission->mudd.muddFirstRoomState == 2)
- showText(TX_SPEAKER_KIRK, 10, true);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_010);
else {
- showText(TX_SPEAKER_KIRK, 10, true);
- showText(TX_SPEAKER_MUDD, 31, true);
- showText(TX_SPEAKER_KIRK, 7, true);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_010);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_031);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_007);
}
}
void Room::mudd0TalkToSpock() {
if (_awayMission->mudd.muddFirstRoomState == 2)
- showText(TX_SPEAKER_SPOCK, 22, true);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_022);
else {
- showText(TX_SPEAKER_SPOCK, 22, true);
- showText(TX_SPEAKER_MUDD, 34, true);
- showText(TX_SPEAKER_SPOCK, 23, true);
- showText(TX_SPEAKER_MCCOY, 15, true);
- showText(TX_SPEAKER_MUDD, 38, true);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_022);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_034);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_023);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_015);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_038);
}
}
void Room::mudd0TalkToMccoy() {
if (_awayMission->mudd.muddFirstRoomState == 2)
- showText(TX_SPEAKER_MCCOY, 16, true);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_016);
else {
- showText(TX_SPEAKER_MCCOY, 16, true);
- showText(TX_SPEAKER_KIRK, 3, true);
- showText(TX_SPEAKER_MUDD, 27, true);
- showText(TX_SPEAKER_MCCOY, 14, true);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_016);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_003);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_027);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_014);
}
}
void Room::mudd0TalkToRedshirt() {
if (_awayMission->mudd.muddFirstRoomState == 2) {
- showText(TX_SPEAKER_BUCHERT, 39, true);
- showText(TX_SPEAKER_KIRK, 8, true);
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_039);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_008);
} else {
- showText(TX_SPEAKER_BUCHERT, 40, true);
- showText(TX_SPEAKER_MUDD, 30, true);
- showText(TX_SPEAKER_BUCHERT, 41, true);
- showText(TX_SPEAKER_MUDD, 36, true);
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_040);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_030);
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_041);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_036);
}
}
void Room::mudd0TalkToMudd() {
- showText(TX_SPEAKER_MUDD, 32, true);
- showText(TX_SPEAKER_SPOCK, 24, true);
- showText(TX_SPEAKER_MUDD, 35, true);
- showText(TX_SPEAKER_KIRK, 4, true);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_032);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_024);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_035);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_004);
}
}
+#endif
diff --git a/engines/startrek/rooms/mudd1.cpp b/engines/startrek/rooms/mudd1.cpp
index 5c33501180..8cfe1b7952 100644
--- a/engines/startrek/rooms/mudd1.cpp
+++ b/engines/startrek/rooms/mudd1.cpp
@@ -20,6 +20,7 @@
*
*/
+#if 0
#include "startrek/room.h"
#define OBJECT_CRANE 8
@@ -108,6 +109,23 @@ extern const RoomAction mudd1ActionList[] = {
{ {ACTION_LIST_END, 0, 0, 0}, nullptr }
};
+enum mudd1TextIds {
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+};
+
+// TODO: Finish floppy offsets
+extern const RoomTextOffsets mudd1TextOffsets[] = {
+ //{ TX_SPEAKER_KIRK, 2597, 0 },
+ //{ TX_SPEAKER_MCCOY, 2622, 0 },
+ //{ TX_SPEAKER_SPOCK, 2632, 0 },
+ //{ TX_SPEAKER_EVERTS, 2642, 0 },
+ { -1, 0, 0 }
+};
+
+extern const RoomText mudd1Texts[] = {
+ { -1, Common::UNK_LANG, "" }
+};
+
void Room::mudd1Tick1() {
playVoc("MUD1LOOP"); // BUGFIX: moved this out of below if statement
@@ -127,8 +145,8 @@ void Room::mudd1Timer1Expired() {
}
void Room::mudd1UseCommunicator() {
- showText(TX_SPEAKER_KIRK, 1, true);
- showText(TX_SPEAKER_UHURA, TX_STATICU1);
+ showText(TX_SPEAKER_KIRK, 1);
+ showText(TX_SPEAKER_UHURA_GLOBAL, TX_STATICU1);
}
@@ -162,9 +180,9 @@ void Room::mudd1CraneFinishedMoving() {
walkCrewman(OBJECT_SPOCK, 0x43, 0x9f);
if (_awayMission->mudd.torpedoLoaded)
- showText(TX_SPEAKER_SPOCK, 17, true);
+ showText(TX_SPEAKER_SPOCK, 17);
else
- showText(TX_SPEAKER_SPOCK, 16, true);
+ showText(TX_SPEAKER_SPOCK, 16);
}
@@ -209,9 +227,9 @@ void Room::mudd1SpockReachedRedButton() {
void Room::mudd1SpockPressedRedButton() {
walkCrewman(OBJECT_SPOCK, 0x43, 0x9f);
- showText(TX_SPEAKER_SPOCK, 22, true);
- showText(TX_SPEAKER_SPOCK, 21, true);
- showText(TX_SPEAKER_SPOCK, 23, true);
+ showText(TX_SPEAKER_SPOCK, 22);
+ showText(TX_SPEAKER_SPOCK, 21);
+ showText(TX_SPEAKER_SPOCK, 23);
_awayMission->disableInput = false;
_awayMission->mudd.knowAboutTorpedo = true;
@@ -224,7 +242,7 @@ void Room::mudd1SpockPressedRedButton() {
TX_BLANK
};
- int choice = showMultipleTexts(choices, true);
+ int choice = showMultipleTexts(choices);
switch (choice) {
case 0:
@@ -233,16 +251,16 @@ void Room::mudd1SpockPressedRedButton() {
// ENHANCEMENT: Original text was just "(Spock raises eyebrow)" without any audio.
// This changes it to a narration to make it flow better.
// TODO: This needs to be refactored
- showDescription(TX_DEM0N009);
+ //showDescription(TX_DEM0N009);
break;
case 1:
- showText(TX_SPEAKER_KIRK, 7, true);
+ showText(TX_SPEAKER_KIRK, 7);
// fall through
case 2:
_awayMission->mudd.torpedoStatus = 1;
- showText(TX_SPEAKER_UHURA, TX_STATICU1);
+ showText(TX_SPEAKER_UHURA_GLOBAL, TX_STATICU1);
break;
default:
@@ -251,101 +269,101 @@ void Room::mudd1SpockPressedRedButton() {
}
void Room::mudd1GetTorpedo() {
- showDescription(14, true);
+ showDescription(14);
}
void Room::mudd1UseSTricorderOnTorpedo() {
- spockScan(DIR_W, 25, false, true);
- showText(TX_SPEAKER_BUCHERT, 27, true);
- showText(TX_SPEAKER_SPOCK, 20, true);
- showText(TX_SPEAKER_BUCHERT, 28, true);
- showText(TX_SPEAKER_SPOCK, 24, true);
+ spockScan(DIR_W, 25, false);
+ showText(TX_SPEAKER_BUCHERT, 27);
+ showText(TX_SPEAKER_SPOCK, 20);
+ showText(TX_SPEAKER_BUCHERT, 28);
+ showText(TX_SPEAKER_SPOCK, 24);
}
void Room::mudd1UseSTricorderOnTorpedoLauncher() {
- spockScan(DIR_W, 10, false, true);
+ spockScan(DIR_W, 10, false);
}
void Room::mudd1UseSTricorderOnButton() {
// ENHANCEMENT: Do the whole "spockScan" thing, don't just show the text
- spockScan(DIR_W, 15, false, true);
+ spockScan(DIR_W, 15, false);
}
void Room::mudd1UseSTricorderOnCrane() {
// ENHANCEMENT: See above
- spockScan(DIR_N, 14, false, true);
+ spockScan(DIR_N, 14, false);
}
void Room::mudd1UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 11, true);
+ showText(TX_SPEAKER_MCCOY, 11);
}
void Room::mudd1LookAnywhere() {
- showDescription(11, true);
+ showDescription(11);
}
void Room::mudd1LookAtTorpedo() {
- showDescription(2, true);
+ showDescription(2);
}
void Room::mudd1LookAtFallenTorpedo() {
- showDescription(12, true);
+ showDescription(12);
}
void Room::mudd1LookAtTorpedoLauncher() {
- showDescription(3, true);
+ showDescription(3);
}
void Room::mudd1LookAtKirk() {
- showDescription(5, true);
+ showDescription(5);
}
void Room::mudd1LookAtSpock() {
- showDescription(9, true);
+ showDescription(9);
}
void Room::mudd1LookAtMccoy() {
- showDescription(8, true);
+ showDescription(8);
}
void Room::mudd1LookAtRedshirt() {
- showDescription(6, true);
+ showDescription(6);
}
void Room::mudd1LookAtCrane() {
- showDescription(0, true);
+ showDescription(0);
}
void Room::mudd1LookAtRedButton() {
- showDescription(1, true);
+ showDescription(1);
}
void Room::mudd1LookAtBlueButton() {
- showDescription(15, true);
+ showDescription(15);
}
void Room::mudd1LookAtYellowButton() {
- showDescription(16, true);
+ showDescription(16);
}
void Room::mudd1TalkToKirk() {
- showText(TX_SPEAKER_KIRK, 6, true);
- showText(TX_SPEAKER_MCCOY, 13, true);
- showText(TX_SPEAKER_KIRK, 5, true);
+ showText(TX_SPEAKER_KIRK, 6);
+ showText(TX_SPEAKER_MCCOY, 13);
+ showText(TX_SPEAKER_KIRK, 5);
}
void Room::mudd1TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 19, true);
- showText(TX_SPEAKER_KIRK, 8, true);
+ showText(TX_SPEAKER_SPOCK, 19);
+ showText(TX_SPEAKER_KIRK, 8);
}
void Room::mudd1TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 12, true);
+ showText(TX_SPEAKER_MCCOY, 12);
}
void Room::mudd1TalkToRedshirt() {
- showText(TX_SPEAKER_BUCHERT, 26, true);
- showText(TX_SPEAKER_KIRK, 9, true);
Commit: 2c4b4c6cd51d25035e791c732cf88ef2b017bd30
https://github.com/scummvm/scummvm/commit/2c4b4c6cd51d25035e791c732cf88ef2b017bd30
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-02-08T03:11:46+02:00
Commit Message:
SCI: Add missing class member initializers
Changed paths:
engines/sci/console.cpp
engines/sci/engine/object.h
engines/sci/engine/segment.h
engines/sci/graphics/celobj32.h
engines/sci/resource/decompressor.h
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index cd88ef5f56..8cec13e38f 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -76,7 +76,7 @@ bool g_debug_track_mouse_clicks = false;
static int parse_reg_t(EngineState *s, const char *str, reg_t *dest);
Console::Console(SciEngine *engine) : GUI::Debugger(),
- _engine(engine), _debugState(engine->_debugState) {
+ _engine(engine), _debugState(engine->_debugState), _videoFrameDelay(0) {
assert(_engine);
assert(_engine->_gamestate);
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 55930eb409..d5f52f614a 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -73,12 +73,13 @@ public:
_name(NULL_REG),
_offset(getSciVersion() < SCI_VERSION_1_1 ? 0 : 5),
_isFreed(false),
- _baseObj(),
- _baseVars(),
- _methodCount(0)
+ _methodCount(0),
+ _pos(NULL_REG)
#ifdef ENABLE_SCI32
,
- _propertyOffsetsSci3()
+ _infoSelectorSci3(NULL_REG),
+ _speciesSelectorSci3(NULL_REG),
+ _superClassPosSci3(NULL_REG)
#endif
{}
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 2dfeca5c74..1e5d4a5be6 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -216,7 +216,7 @@ struct List {
*/
int numRecursions;
- List() : numRecursions(0) {}
+ List() : numRecursions(0), first(NULL_REG), last(NULL_REG) {}
#endif
};
@@ -434,7 +434,8 @@ public:
SciArray() :
_type(kArrayTypeInvalid),
_size(0),
- _data(nullptr) {}
+ _data(nullptr),
+ _elementSize(0) {}
SciArray(const SciArray &array) {
_type = array._type;
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index f445a1043e..1c65b9c703 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -101,7 +101,8 @@ struct CelInfo32 {
resourceId(0),
loopNo(0),
celNo(0),
- bitmap(NULL_REG) {}
+ bitmap(NULL_REG),
+ color(0) {}
// This is the equivalence criteria used by CelObj::searchCache in at least
// SSCI SQ6. Notably, it does not check the color field.
diff --git a/engines/sci/resource/decompressor.h b/engines/sci/resource/decompressor.h
index 1019ae2acf..c9aa001107 100644
--- a/engines/sci/resource/decompressor.h
+++ b/engines/sci/resource/decompressor.h
@@ -51,7 +51,17 @@ enum ResourceCompression {
*/
class Decompressor {
public:
- Decompressor() {}
+ Decompressor() :
+ _dwBits(0),
+ _nBits(0),
+ _szPacked(0),
+ _szUnpacked(0),
+ _dwRead(0),
+ _dwWrote(0),
+ _src(nullptr),
+ _dest(nullptr)
+ {}
+
virtual ~Decompressor() {}
@@ -138,7 +148,7 @@ protected:
*/
class DecompressorLZW : public Decompressor {
public:
- DecompressorLZW(int nCompression) {
+ DecompressorLZW(int nCompression) : _numbits(0), _curtoken(0), _endtoken(0) {
_compression = nCompression;
}
void init(Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked) override;
Commit: e9300f33d5494279ea043adab64c7d6d11c046a9
https://github.com/scummvm/scummvm/commit/e9300f33d5494279ea043adab64c7d6d11c046a9
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-02-08T03:11:46+02:00
Commit Message:
STARTREK: Fix the text scanner and convert 3 rooms to the new format
Changed paths:
engines/startrek/console.cpp
engines/startrek/room.cpp
engines/startrek/rooms/function_map.h
engines/startrek/rooms/mudd0.cpp
engines/startrek/rooms/mudda.cpp
engines/startrek/rooms/sins0.cpp
engines/startrek/rooms/trial0.cpp
engines/startrek/rooms/venga.cpp
diff --git a/engines/startrek/console.cpp b/engines/startrek/console.cpp
index c0fd522f34..a71e3b1da4 100644
--- a/engines/startrek/console.cpp
+++ b/engines/startrek/console.cpp
@@ -239,6 +239,9 @@ bool Console::Cmd_DumpText(int argc, const char **argv) {
Common::String message;
uint16 pos = rdfFile->pos();
byte c = rdfFile->readByte();
+ if (!Common::isPrint(c))
+ break;
+
while (c != '\0') {
message += c;
c = rdfFile->readByte();
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index e8853a463b..80d67363dc 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -70,13 +70,13 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm), _awayMissi
ADD_ROOM(love4)
ADD_ROOM(love5)
ADD_ROOM_COMMON(love)
- //ADD_ROOM(mudd0)
+ ADD_ROOM(mudd0)
//ADD_ROOM(mudd1)
//ADD_ROOM(mudd2)
//ADD_ROOM(mudd3)
//ADD_ROOM(mudd4)
//ADD_ROOM(mudd5)
- //ADD_ROOM_COMMON(mudd)
+ ADD_ROOM_COMMON(mudd)
ADD_ROOM(feather0)
ADD_ROOM(feather1)
ADD_ROOM(feather2)
@@ -85,13 +85,13 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm), _awayMissi
ADD_ROOM(feather5)
ADD_ROOM(feather6)
ADD_ROOM(feather7)
- //ADD_ROOM(trial0)
+ ADD_ROOM(trial0)
//ADD_ROOM(trial1)
//ADD_ROOM(trial2)
//ADD_ROOM(trial3)
//ADD_ROOM(trial4)
//ADD_ROOM(trial5)
- //ADD_ROOM(sins0)
+ ADD_ROOM(sins0)
//ADD_ROOM(sins1)
//ADD_ROOM(sins2)
//ADD_ROOM(sins3)
@@ -106,7 +106,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm), _awayMissi
//ADD_ROOM(veng6)
//ADD_ROOM(veng7)
//ADD_ROOM(veng8)
- //ADD_ROOM_COMMON(veng)
+ ADD_ROOM_COMMON(veng)
if (_roomActionList == nullptr) {
warning("Room \"%s\" unimplemented", name.c_str());
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h
index 5c263199b5..b34f5eaeb3 100644
--- a/engines/startrek/rooms/function_map.h
+++ b/engines/startrek/rooms/function_map.h
@@ -48,11 +48,11 @@ extern const RoomTextOffsets loveTextOffsets[];
extern const RoomAction mudd0ActionList[], mudd1ActionList[], mudd2ActionList[], mudd3ActionList[];
extern const RoomAction mudd4ActionList[], mudd5ActionList[];
-//extern const RoomTextOffsets mudd0TextOffsets[], mudd1TextOffsets[], mudd2TextOffsets[], mudd3TextOffsets[];
+extern const RoomTextOffsets mudd0TextOffsets[];//, mudd1TextOffsets[], mudd2TextOffsets[], mudd3TextOffsets[];
//extern const RoomTextOffsets mudd4TextOffsets[], mudd5TextOffsets[];
-//extern const RoomText mudd0Texts[], mudd1Texts[], mudd2Texts[], mudd3Texts[];
+extern const RoomText mudd0Texts[];//, mudd1Texts[], mudd2Texts[], mudd3Texts[];
//extern const RoomText mudd4Texts[], mudd5Texts[];
-//extern const RoomTextOffsets muddTextOffsets[];
+extern const RoomTextOffsets muddTextOffsets[];
extern const RoomAction feather0ActionList[], feather1ActionList[], feather2ActionList[], feather3ActionList[];
extern const RoomAction feather4ActionList[], feather5ActionList[], feather6ActionList[], feather7ActionList[];
@@ -63,16 +63,17 @@ extern const RoomText feather4Texts[], feather5Texts[], feather6Texts[], feather
extern const RoomAction trial0ActionList[], trial1ActionList[], trial2ActionList[], trial3ActionList[];
extern const RoomAction trial4ActionList[], trial5ActionList[];
-//extern const RoomTextOffsets trial0TextOffsets[], trial1TextOffsets[], trial2TextOffsets[], trial3TextOffsets[];
+extern const RoomTextOffsets trial0TextOffsets[];//, trial1TextOffsets[], trial2TextOffsets[], trial3TextOffsets[];
//extern const RoomTextOffsets trial4TextOffsets[], trial5TextOffsets[];
-//extern const RoomText trial0Texts[], trial1Texts[], trial2Texts[], trial3Texts[];
+extern const RoomText trial0Texts[];//, trial1Texts[], trial2Texts[], trial3Texts[];
//extern const RoomText trial4Texts[], trial5Texts[];
+extern const RoomTextOffsets trialTextOffsets[];
extern const RoomAction sins0ActionList[], sins1ActionList[], sins2ActionList[], sins3ActionList[];
extern const RoomAction sins4ActionList[], sins5ActionList[];
-//extern const RoomTextOffsets sins0TextOffsets[], sins1TextOffsets[], sins2TextOffsets[], sins3TextOffsets[];
+extern const RoomTextOffsets sins0TextOffsets[];//, sins1TextOffsets[], sins2TextOffsets[], sins3TextOffsets[];
//extern const RoomTextOffsets sins4TextOffsets[], sins5TextOffsets[];
-//extern const RoomText sins0Texts[], sins1Texts[], sins2Texts[], sins3Texts[];
+extern const RoomText sins0Texts[];//, sins1Texts[], sins2Texts[], sins3Texts[];
//extern const RoomText sins4Texts[], sins5Texts[];
extern const RoomAction veng0ActionList[], veng1ActionList[], veng2ActionList[], veng3ActionList[];
@@ -84,6 +85,7 @@ extern const RoomTextOffsets veng0TextOffsets[], veng1TextOffsets[], veng2TextOf
extern const RoomText veng0Texts[], veng1Texts[], veng2Texts[];//, veng3Texts[];
//extern const RoomText veng4Texts[], veng5Texts[], veng6Texts[], veng7Texts[];
//extern const RoomText veng8Texts[];
+extern const RoomTextOffsets vengTextOffsets[];
}
diff --git a/engines/startrek/rooms/mudd0.cpp b/engines/startrek/rooms/mudd0.cpp
index 88dff07c8b..7c9cb53526 100644
--- a/engines/startrek/rooms/mudd0.cpp
+++ b/engines/startrek/rooms/mudd0.cpp
@@ -20,7 +20,6 @@
*
*/
-#if 0
#include "startrek/room.h"
#define OBJECT_MUDD 8
@@ -92,15 +91,91 @@ extern const RoomAction mudd0ActionList[] = {
};
enum mudd0TextIds {
- TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_MUDD,
+ TX_SPEAKER_UHURA, TX_SPEAKER_BUCHERT,
+ TX_MUD0_001, TX_MUD0_003, TX_MUD0_004, TX_MUD0_005, TX_MUD0_006,
+ TX_MUD0_007, TX_MUD0_008, TX_MUD0_009, TX_MUD0_010, TX_MUD0_011,
+ TX_MUD0_012, TX_MUD0_013, TX_MUD0_014, TX_MUD0_015, TX_MUD0_016,
+ TX_MUD0_017, TX_MUD0_018, TX_MUD0_019, TX_MUD0_020, TX_MUD0_021,
+ TX_MUD0_022, TX_MUD0_023, TX_MUD0_024, TX_MUD0_025, TX_MUD0_026,
+ TX_MUD0_027, TX_MUD0_028, TX_MUD0_029, TX_MUD0_030, TX_MUD0_031,
+ TX_MUD0_032, TX_MUD0_033, TX_MUD0_034, TX_MUD0_035, TX_MUD0_036,
+ TX_MUD0_037, TX_MUD0_038, TX_MUD0_039, TX_MUD0_040, TX_MUD0_041,
+ TX_MUD0N000, TX_MUD0N001, TX_MUD0N002, TX_MUD0N003, TX_MUD0N004,
+ TX_MUD0N005, TX_MUD0N006, TX_MUD0N007, TX_MUD0N008, TX_MUD0N009,
+ TX_MUD0N010, TX_MUD0N011, TX_MUD0N012, TX_MUD0N013, TX_MUD0N014,
+ TX_MUD0N015, TX_MUD0N016, TX_MUD0N019, TX_LOV1N007,
+ TX_STATICU1
};
// TODO: Finish floppy offsets
extern const RoomTextOffsets mudd0TextOffsets[] = {
- //{ TX_SPEAKER_KIRK, 2597, 0 },
- //{ TX_SPEAKER_MCCOY, 2622, 0 },
- //{ TX_SPEAKER_SPOCK, 2632, 0 },
- //{ TX_SPEAKER_EVERTS, 2642, 0 },
+ { TX_SPEAKER_KIRK, 2941, 0 },
+ { TX_SPEAKER_MCCOY, 2966, 0 },
+ { TX_SPEAKER_SPOCK, 2976, 0 },
+ { TX_SPEAKER_MUDD, 2999, 0 },
+ { TX_SPEAKER_UHURA, 727, 0 },
+ { TX_SPEAKER_BUCHERT, 2986, 0 },
+ { TX_MUD0_001, 690, 0 },
+ { TX_MUD0_003, 7333, 0 },
+ { TX_MUD0_004, 7962, 0 },
+ { TX_MUD0_005, 4373, 0 },
+ { TX_MUD0_006, 4091, 0 },
+ { TX_MUD0_007, 6698, 0 },
+ { TX_MUD0_008, 8489, 0 },
+ { TX_MUD0_009, 3167, 0 },
+ { TX_MUD0_010, 6572, 0 },
+ { TX_MUD0_011, 1774, 0 },
+ { TX_MUD0_012, 5833, 0 },
+ { TX_MUD0_013, 5700, 0 },
+ { TX_MUD0_014, 7508, 0 },
+ { TX_MUD0_015, 7108, 0 },
+ { TX_MUD0_016, 7243, 0 },
+ { TX_MUD0_017, 3644, 0 },
+ { TX_MUD0_018, 2523, 0 },
+ { TX_MUD0_019, 2473, 0 },
+ { TX_MUD0_020, 2423, 0 },
+ { TX_MUD0_021, 5215, 0 },
+ { TX_MUD0_022, 6751, 0 },
+ { TX_MUD0_023, 6970, 0 },
+ { TX_MUD0_024, 7671, 0 },
+ { TX_MUD0_025, 8568, 0 },
+ { TX_MUD0_026, 3693, 0 },
+ { TX_MUD0_027, 7440, 0 },
+ { TX_MUD0_028, 3258, 0 },
+ { TX_MUD0_029, 4528, 0 },
+ { TX_MUD0_030, 8093, 0 },
+ { TX_MUD0_031, 6649, 0 },
+ { TX_MUD0_032, 7581, 0 },
+ { TX_MUD0_033, 4188, 0 },
+ { TX_MUD0_034, 6861, 0 },
+ { TX_MUD0_035, 7889, 0 },
+ { TX_MUD0_036, 8345, 0 },
+ { TX_MUD0_037, 3064, 0 },
+ { TX_MUD0_038, 7179, 0 },
+ { TX_MUD0_039, 8416, 0 },
+ { TX_MUD0_040, 8007, 0 },
+ { TX_MUD0_041, 8265, 0 },
+ { TX_MUD0N000, 5404, 0 },
+ { TX_MUD0N001, 6253, 0 },
+ { TX_MUD0N002, 5513, 0 },
+ { TX_MUD0N003, 6478, 0 },
+ { TX_MUD0N004, 6117, 0 },
+ { TX_MUD0N005, 6374, 0 },
+ { TX_MUD0N006, 2573, 0 },
+ { TX_MUD0N007, 6183, 0 },
+ { TX_MUD0N008, 5330, 0 },
+ { TX_MUD0N009, 2781, 0 },
+ { TX_MUD0N010, 5139, 0 },
+ { TX_MUD0N011, 6036, 0 },
+ { TX_MUD0N012, 4711, 0 },
+ { TX_MUD0N013, 4816, 0 },
+ { TX_MUD0N014, 5599, 0 },
+ { TX_MUD0N015, 5067, 0 },
+ { TX_MUD0N016, 8799, 0 },
+ { TX_MUD0N019, 4899, 0 },
+ { TX_LOV1N007, 8778, 0 },
+ { TX_STATICU1, 737, 0 },
{ -1, 0, 0 }
};
@@ -377,4 +452,3 @@ void Room::mudd0TalkToMudd() {
}
}
-#endif
diff --git a/engines/startrek/rooms/mudda.cpp b/engines/startrek/rooms/mudda.cpp
index f0ee2535fc..991e16aa9a 100644
--- a/engines/startrek/rooms/mudda.cpp
+++ b/engines/startrek/rooms/mudda.cpp
@@ -20,22 +20,27 @@
*
*/
-#if 0
#include "startrek/startrek.h"
#include "startrek/room.h"
namespace StarTrek {
enum muddTextIds {
- TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_COMMON_IDS_OFFSET_START = 5000, // needed to distinguish common IDs
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK,
+ TX_MUD0N011, TX_MUD1N013, TX_MUD2N010, TX_MUD3N016, TX_MUD4N009,
+ TX_MUD5N009, TX_MUD0_002, TX_MUD1_002, TX_MUD2_002, TX_MUD0_018,
+ TX_MUD0_019, TX_MUD0_020, TX_MUD0N002, TX_MUD1N004, TX_MUD2N001,
+ TX_MUD3N001, TX_MUD4N002, TX_MUD5N001, TX_MUD0N006, TX_MUD1N007,
+ TX_MUD2N005, TX_MUD3N008, TX_MUD4N005, TX_MUD5N105
};
+// TODO: Finish offsets
// TODO: Finish floppy offsets
extern const RoomTextOffsets muddTextOffsets[] = {
//{ TX_SPEAKER_KIRK, 2597, 0 },
//{ TX_SPEAKER_MCCOY, 2622, 0 },
//{ TX_SPEAKER_SPOCK, 2632, 0 },
- //{ TX_SPEAKER_EVERTS, 2642, 0 },
{ -1, 0, 0 }
};
@@ -45,14 +50,13 @@ extern const RoomTextOffsets muddTextOffsets[] = {
void Room::muddaUseLenseOnDegrimer() {
assert(_vm->_roomIndex >= 0 && _vm->_roomIndex <= 5);
- // All of these audio files are identical, but there's one for each room.
const TextRef text[] = {
- 11, // MUDD0
- 13, // MUDD1
- 10, // MUDD2
- 16, // MUDD3
- 9, // MUDD4
- 9, // MUDD5
+ TX_MUD0N011, // All of these audio files are identical, but there's one for each room.
+ TX_MUD1N013,
+ TX_MUD2N010,
+ TX_MUD3N016,
+ TX_MUD4N009,
+ TX_MUD5N009,
};
giveItem(OBJECT_IALIENDV);
@@ -88,11 +92,20 @@ void Room::muddaUseAlienDevice() {
void Room::muddaFiredAlienDevice() {
assert(_vm->_roomIndex >= 0 && _vm->_roomIndex <= 5);
+ const TextRef text[] = {
+ TX_MUD0_002, // These audio files aren't identical, but the text is mostly the same.
+ TX_MUD1_002,
+ TX_MUD2_002,
+ TX_MUD2_002, // Rooms 3-5 reuse MUD2
+ TX_MUD2_002,
+ TX_MUD2_002,
+ };
+
_awayMission->disableInput = false;
if (!_awayMission->mudd.discoveredLenseAndDegrimerFunction) {
_awayMission->mudd.discoveredLenseAndDegrimerFunction = true;
_awayMission->mudd.missionScore += 5; // BUGFIX: didn't happen if done in MUDD5
- showText(TX_SPEAKER_KIRK, 2);
+ showText(TX_SPEAKER_KIRK, text[_vm->_roomIndex]);
}
}
@@ -100,14 +113,13 @@ void Room::muddaFiredAlienDevice() {
void Room::muddaUseDegrimer() {
assert(_vm->_roomIndex >= 0 && _vm->_roomIndex <= 5);
- // All of these audio files are identical, but there's one for each room.
const TextRef text[] = {
- 2, // MUDD0
- 4, // MUDD1
- 1, // MUDD2
- 1, // MUDD3
- 2, // MUDD4
- 1, // MUDD5
+ TX_MUD0N002, // All of these audio files are identical, but there's one for each room.
+ TX_MUD1N004,
+ TX_MUD2N001,
+ TX_MUD3N001,
+ TX_MUD4N002,
+ TX_MUD5N001,
};
showDescription(text[_vm->_roomIndex]);
@@ -124,14 +136,8 @@ void Room::muddaTick() {
assert(_vm->_roomIndex >= 0 && _vm->_roomIndex <= 5);
- // All of these audio files are identical, but there's one for each room.
- const TextRef deathText[] = {
- 6, // MUDD0
- 7, // MUDD1
- 5, // MUDD2
- 8, // MUDD3
- 5, // MUDD4
- 5 // MUDD5
+ const TextRef deathText[] = { // All of these audio files are identical, but there's one for each room.
+ TX_MUD0N006, TX_MUD1N007, TX_MUD2N005, TX_MUD3N008, TX_MUD4N005, TX_MUD5N105
};
const int TIMER_LENGTH = 27000;
@@ -177,4 +183,3 @@ void Room::muddaTick() {
}
}
-#endif
diff --git a/engines/startrek/rooms/sins0.cpp b/engines/startrek/rooms/sins0.cpp
index 27f35a3cf3..9577ec553e 100644
--- a/engines/startrek/rooms/sins0.cpp
+++ b/engines/startrek/rooms/sins0.cpp
@@ -20,7 +20,6 @@
*
*/
-#if 0
#include "startrek/room.h"
#define OBJECT_DOOR 8
@@ -77,15 +76,74 @@ extern const RoomAction sins0ActionList[] = {
};
enum sins0TextIds {
- TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_EVERTS,
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_SCOTT, TX_SPEAKER_UHURA,
+ TX_SPEAKER_MOSHER,
+ TX_SIN0_001, TX_SIN0_002, TX_SIN0_003, TX_SIN0_004, TX_SIN0_005,
+ TX_SIN0_006, TX_SIN0_007, TX_SIN0_008, TX_SIN0_009, TX_SIN0_010,
+ TX_SIN0_011, TX_SIN0_012, TX_SIN0_013, TX_SIN0_014, TX_SIN0_015,
+ TX_SIN0_016, TX_SIN0_017, TX_SIN0_018, TX_SIN0_019, TX_SIN0_020,
+ TX_SIN0_021, TX_SIN0_022, TX_SIN0_023, TX_SIN0_024, TX_SIN0_025,
+ TX_SIN0_026, TX_SIN0_027, TX_SIN0_028, TX_SIN0_S01, TX_SIN0_S48,
+ TX_SIN0_S49, TX_SIN0_S50, TX_SIN0N000, TX_SIN0N001, TX_SIN0N002,
+ TX_SIN0N003, TX_SIN0N004, TX_SIN0N005, TX_SIN0N006, TX_SIN0N007,
+ TX_SIN0N008, TX_SIN0N009, TX_SIN0N010, TX_SIN0N011, TX_SIN0U069,
+ TX_SIN0U082
};
// TODO: Finish floppy offsets
extern const RoomTextOffsets sins0TextOffsets[] = {
- //{ TX_SPEAKER_KIRK, 2597, 0 },
- //{ TX_SPEAKER_MCCOY, 2622, 0 },
- //{ TX_SPEAKER_SPOCK, 2632, 0 },
- //{ TX_SPEAKER_EVERTS, 2642, 0 },
+ { TX_SPEAKER_KIRK, 289, 0 },
+ { TX_SPEAKER_MCCOY, 300, 0 },
+ { TX_SPEAKER_SPOCK, 310, 0 },
+ { TX_SPEAKER_SCOTT, 344, 0 },
+ { TX_SPEAKER_UHURA, 334, 0 },
+ { TX_SPEAKER_MOSHER, 320, 0 },
+ { TX_SIN0N000, 3805, 0 },
+ { TX_SIN0N001, 3994, 0 },
+ { TX_SIN0N002, 3594, 0 },
+ { TX_SIN0N003, 3694, 0 },
+ { TX_SIN0N004, 3461, 0 },
+ { TX_SIN0N005, 729, 0 },
+ { TX_SIN0N006, 1252, 0 },
+ { TX_SIN0N007, 3341, 0 },
+ { TX_SIN0N008, 804, 0 },
+ { TX_SIN0N009, 648, 0 },
+ { TX_SIN0N010, 1377, 0 },
+ { TX_SIN0N011, 2840, 0 },
+ { TX_SIN0U069, 5389, 0 },
+ { TX_SIN0U082, 1915, 0 },
+ { TX_SIN0_001, 2544, 0 },
+ { TX_SIN0_002, 5317, 0 },
+ { TX_SIN0_003, 1986, 0 },
+ { TX_SIN0_004, 5131, 0 },
+ { TX_SIN0_005, 2356, 0 },
+ { TX_SIN0_006, 2758, 0 },
+ { TX_SIN0_007, 2108, 0 },
+ { TX_SIN0_008, 4505, 0 },
+ { TX_SIN0_009, 924, 0 },
+ { TX_SIN0_010, 4922, 0 },
+ { TX_SIN0_011, 1054, 0 },
+ { TX_SIN0_012, 4742, 0 },
+ { TX_SIN0_013, 4362, 0 },
+ { TX_SIN0_014, 3214, 0 },
+ { TX_SIN0_015, 2896, 0 },
+ { TX_SIN0_016, 1750, 0 },
+ { TX_SIN0_017, 1613, 0 },
+ { TX_SIN0_018, 1476, 0 },
+ { TX_SIN0_019, 4132, 0 },
+ { TX_SIN0_020, 5506, 0 },
+ { TX_SIN0_021, 2978, 0 },
+ { TX_SIN0_022, 2715, 0 },
+ { TX_SIN0_023, 4595, 0 },
+ { TX_SIN0_024, 1197, 0 },
+ { TX_SIN0_025, 4233, 0 },
+ { TX_SIN0_026, 2634, 0 },
+ { TX_SIN0_027, 3086, 0 },
+ { TX_SIN0_028, 4421, 0 },
+ { TX_SIN0_S01, 5200, 0 },
+ { TX_SIN0_S48, 2023, 0 },
+ { TX_SIN0_S49, 2430, 0 },
+ { TX_SIN0_S50, 2175, 0 },
{ -1, 0, 0 }
};
@@ -108,23 +166,23 @@ void Room::sins0Tick1() {
}
void Room::sins0LookAnywhere() {
- showDescription(9);
+ showDescription(TX_SIN0N009);
}
void Room::sins0LookAtOpenDoor() {
- showDescription(5);
+ showDescription(TX_SIN0N005);
}
void Room::sins0LookAtClosedDoor() {
- showDescription(8);
+ showDescription(TX_SIN0N008);
}
void Room::sins0TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 9);
+ showText(TX_SPEAKER_SPOCK, TX_SIN0_009);
}
void Room::sins0TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 11);
+ showText(TX_SPEAKER_MCCOY, TX_SIN0_011);
}
void Room::sins0TalkToRedshirt() {
@@ -133,16 +191,16 @@ void Room::sins0TalkToRedshirt() {
// comments on how the small moon could have an atmosphere. This is more interesting
// and relevant, so that implementation is used instead.
if (false)
- showText(TX_SPEAKER_MOSHER, 24);
+ showText(TX_SPEAKER_MOSHER, TX_SIN0_024);
else {
- showText(TX_SPEAKER_MOSHER, 26);
- showText(TX_SPEAKER_SPOCK, 22);
- showText(TX_SPEAKER_KIRK, 6);
+ showText(TX_SPEAKER_MOSHER, TX_SIN0_026);
+ showText(TX_SPEAKER_SPOCK, TX_SIN0_022);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_006);
}
}
void Room::sins0LookAtGround() {
- showDescription(6);
+ showDescription(TX_SIN0N006);
}
void Room::sins0GetRock() {
@@ -154,82 +212,82 @@ void Room::sins0GetRock() {
void Room::sins0PickedUpRock() {
_awayMission->disableInput = false;
loadActorStandAnim(OBJECT_KIRK);
- showDescription(10);
+ showDescription(TX_SIN0N010);
giveItem(OBJECT_IS8ROCKS);
}
void Room::sins0UseSTricorderAnywhere() {
- spockScan(DIR_S, 18, false);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_SIN0_018);
}
void Room::sins0UseSTricorderOnGround() {
- spockScan(DIR_S, 17, false);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_SIN0_017);
_awayMission->sins.gatheredClues |= 1;
}
void Room::sins0UseSTricorderOnPlanet() {
- spockScan(DIR_S, 16, false);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_SIN0_016);
}
void Room::sins0Tick40() {
if (!_awayMission->sins.enteredRoom0FirstTime) {
_awayMission->disableInput = false;
- showText(TX_SPEAKER_UHURA_GLOBAL, 82);
- showText(TX_SPEAKER_KIRK, 3);
- showText(TX_SPEAKER_SCOTT_GLOBAL, 48 + SCOTTY_MESSAGE_OFFSET);
- showText(TX_SPEAKER_KIRK, 7);
- showText(TX_SPEAKER_SCOTT_GLOBAL, 50 + SCOTTY_MESSAGE_OFFSET);
- showText(TX_SPEAKER_KIRK, 5);
- showText(TX_SPEAKER_SCOTT_GLOBAL, 49 + SCOTTY_MESSAGE_OFFSET);
- showText(TX_SPEAKER_KIRK, 1);
+ showText(TX_SPEAKER_UHURA, TX_SIN0U082);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_003);
+ showText(TX_SPEAKER_SCOTT, TX_SIN0_S48);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_007);
+ showText(TX_SPEAKER_SCOTT, TX_SIN0_S50);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_005);
+ showText(TX_SPEAKER_SCOTT, TX_SIN0_S49);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_001);
_awayMission->sins.enteredRoom0FirstTime = true;
}
}
void Room::sins0LookAtStatue() {
- showDescription(11);
- showText(TX_SPEAKER_MCCOY, 15);
- showText(TX_SPEAKER_SPOCK, 21);
- showText(TX_SPEAKER_MOSHER, 27);
- showText(TX_SPEAKER_MCCOY, 14);
+ showDescription(TX_SIN0N011);
+ showText(TX_SPEAKER_MCCOY, TX_SIN0_015);
+ showText(TX_SPEAKER_SPOCK, TX_SIN0_021);
+ showText(TX_SPEAKER_MOSHER, TX_SIN0_027);
+ showText(TX_SPEAKER_MCCOY, TX_SIN0_014);
}
void Room::sins0LookAtPlanet() {
- showDescription(7);
+ showDescription(TX_SIN0N007);
}
void Room::sins0LookAtSky() {
// This seems unused, due to HOTSPOT_SKY not being mapped anywhere?
- showDescription(4);
+ showDescription(TX_SIN0N004);
}
void Room::sins0LookAtKirk() {
- showDescription(2);
+ showDescription(TX_SIN0N002);
}
void Room::sins0LookAtSpock() {
- showDescription(3);
+ showDescription(TX_SIN0N003);
}
void Room::sins0LookAtMccoy() {
- showDescription(0);
+ showDescription(TX_SIN0N000);
}
void Room::sins0LookAtRedshirt() {
- showDescription(1);
+ showDescription(TX_SIN0N001);
}
void Room::sins0UseSTricorderOnClosedDoor() {
- spockScan(DIR_S, 19, false);
- showText(TX_SPEAKER_MOSHER, 25);
- showText(TX_SPEAKER_MCCOY, 13);
- showText(TX_SPEAKER_MOSHER, 28);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_SIN0_019);
+ showText(TX_SPEAKER_MOSHER, TX_SIN0_025);
+ showText(TX_SPEAKER_MCCOY, TX_SIN0_013);
+ showText(TX_SPEAKER_MOSHER, TX_SIN0_028);
}
void Room::sins0UseSTricorderOnStatue() {
- spockScan(DIR_S, 20, false);
- showText(TX_SPEAKER_KIRK, 8);
- showText(TX_SPEAKER_SPOCK, 23);
+ spockScan(DIR_S, TX_SPEAKER_SPOCK, TX_SIN0_020);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_008);
+ showText(TX_SPEAKER_SPOCK, TX_SIN0_023);
if (!_awayMission->sins.gotPointsForScanningStatue) {
_awayMission->sins.gotPointsForScanningStatue = true;
@@ -238,20 +296,20 @@ void Room::sins0UseSTricorderOnStatue() {
}
void Room::sins0UseMedkitOnCrewman() {
- showText(TX_SPEAKER_MCCOY, 12);
+ showText(TX_SPEAKER_MCCOY, TX_SIN0_012);
}
void Room::sins0UseMTricorderOnCrewman() {
- mccoyScan(DIR_S, 10, false);
+ mccoyScan(DIR_S, TX_SPEAKER_MCCOY, TX_SIN0_010);
}
void Room::sins0UseCommunicator() {
if (!_awayMission->sins.scottyInformedKirkAboutVirus) {
- showText(TX_SPEAKER_KIRK, 4);
- showText(TX_SPEAKER_SCOTT_GLOBAL, 1 + SCOTTY_MESSAGE_OFFSET);
- showText(TX_SPEAKER_KIRK, 2);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_004);
+ showText(TX_SPEAKER_SCOTT, TX_SIN0_S01);
+ showText(TX_SPEAKER_KIRK, TX_SIN0_002);
} else
- showText(TX_SPEAKER_UHURA_GLOBAL, 69);
+ showText(TX_SPEAKER_UHURA, TX_SIN0U069);
}
void Room::sins0WalkToDoor() {
@@ -259,4 +317,3 @@ void Room::sins0WalkToDoor() {
}
}
-#endif
diff --git a/engines/startrek/rooms/trial0.cpp b/engines/startrek/rooms/trial0.cpp
index 815640b6be..49b5349d71 100644
--- a/engines/startrek/rooms/trial0.cpp
+++ b/engines/startrek/rooms/trial0.cpp
@@ -20,7 +20,6 @@
*
*/
-#if 0
#include "startrek/room.h"
#define OBJECT_VLICT 8
@@ -83,14 +82,111 @@ extern const RoomAction trial0ActionList[] = {
};
enum trial0TextIds {
- TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK
+ TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_UHURA, TX_SPEAKER_BENNIE,
+ TX_SPEAKER_VLICT, TX_SPEAKER_QUETZECOATL, TX_SPEAKER_KLINGON_GUARD,
+ TX_TRI0_001, TX_TRI0_002, TX_TRI0_003, TX_TRI0_004, TX_TRI0_006,
+ TX_TRI0_007, TX_TRI0_008, TX_TRI0_009, TX_TRI0_010, TX_TRI0_011,
+ TX_TRI0_013, TX_TRI0_014, TX_TRI0_015, TX_TRI0_016, TX_TRI0_017,
+ TX_TRI0_018, TX_TRI0_019, TX_TRI0_020, TX_TRI0_021, TX_TRI0_022,
+ TX_TRI0_023, TX_TRI0_024, TX_TRI0_025, TX_TRI0_026, TX_TRI0_027,
+ TX_TRI0_028, TX_TRI0_029, TX_TRI0_030, TX_TRI0_031, TX_TRI0_034,
+ TX_TRI0_035, TX_TRI0_036, TX_TRI0_037, TX_TRI0_038, TX_TRI0_039,
+ TX_TRI0_040, TX_TRI0_041, TX_TRI0_042, TX_TRI0_043, TX_TRI0_044,
+ TX_TRI0_045, TX_TRI0_046, TX_TRI0_047, TX_TRI0_048, TX_TRI0_049,
+ TX_TRI0_050, TX_TRI0_051, TX_TRI0_052, TX_TRI0_053, TX_TRI0_054,
+ TX_TRI0_055, TX_TRI0_056, TX_TRI0_057, TX_TRI0_058, TX_TRI0_059,
+ TX_TRI0_060, TX_TRI0_061, TX_TRI0_062, TX_TRI0_063, TX_TRI0_064,
+ TX_TRI0_065, TX_TRI0_066, TX_TRI0_F24, TX_TRI4_076, TX_TRI0N000,
+ TX_TRI0N001, TX_TRI0N002, TX_TRI0N003, TX_TRI0N004, TX_TRI0N005,
+ TX_TRI0N006, TX_TRI0N007, TX_TRI0N008, TX_TRI0N009, TX_TRI0U075
};
// TODO: Finish floppy offsets
extern const RoomTextOffsets trial0TextOffsets[] = {
- //{ TX_SPEAKER_KIRK, 1064, 0 },
- //{ TX_SPEAKER_MCCOY, 1075, 0 },
- //{ TX_SPEAKER_SPOCK, 1085, 0 },
+ { TX_SPEAKER_KIRK, 279, 0 },
+ { TX_SPEAKER_MCCOY, 290, 0 },
+ { TX_SPEAKER_SPOCK, 300, 0 },
+ { TX_SPEAKER_UHURA, 324, 0 },
+ { TX_SPEAKER_BENNIE, 310, 0 },
+ { TX_SPEAKER_VLICT, 334, 0 },
+ { TX_SPEAKER_QUETZECOATL, 354, 0 },
+ { TX_SPEAKER_KLINGON_GUARD, 340, 0 },
+ { TX_TRI0_001, 2728, 0 },
+ { TX_TRI0_002, 2315, 0 },
+ { TX_TRI0_003, 4950, 0 },
+ { TX_TRI0_004, 1556, 0 },
+ { TX_TRI0_006, 4097, 0 },
+ { TX_TRI0_007, 7911, 0 },
+ { TX_TRI0_008, 4721, 0 },
+ { TX_TRI0_009, 5176, 0 },
+ { TX_TRI0_010, 4268, 0 },
+ { TX_TRI0_011, 1832, 0 },
+ { TX_TRI0_013, 5423, 0 },
+ { TX_TRI0_014, 5269, 0 },
+ { TX_TRI0_015, 2067, 0 },
+ { TX_TRI0_016, 1083, 0 },
+ { TX_TRI0_017, 4409, 0 },
+ { TX_TRI0_018, 1977, 0 },
+ { TX_TRI0_019, 957, 0 },
+ { TX_TRI0_020, 4570, 0 },
+ { TX_TRI0_021, 1174, 0 },
+ { TX_TRI0_022, 8073, 0 },
+ { TX_TRI0_023, 3960, 0 },
+ { TX_TRI0_024, 9850, 0 },
+ { TX_TRI0_025, 8440, 0 },
+ { TX_TRI0_026, 8636, 0 },
+ { TX_TRI0_027, 9956, 0 },
+ { TX_TRI0_028, 10033, 0 },
+ { TX_TRI0_029, 9149, 0 },
+ { TX_TRI0_030, 9268, 0 },
+ { TX_TRI0_031, 8370, 0 },
+ { TX_TRI0_034, 10125, 0 },
+ { TX_TRI0_035, 9383, 0 },
+ { TX_TRI0_036, 8794, 0 },
+ { TX_TRI0_037, 9487, 0 },
+ { TX_TRI0_038, 9621, 0 },
+ { TX_TRI0_039, 3448, 0 },
+ { TX_TRI0_040, 3765, 0 },
+ { TX_TRI0_041, 3124, 0 },
+ { TX_TRI0_042, 8269, 0 },
+ { TX_TRI0_043, 2194, 0 },
+ { TX_TRI0_044, 6132, 0 },
+ { TX_TRI0_045, 5787, 0 },
+ { TX_TRI0_046, 3831, 0 },
+ { TX_TRI0_047, 1665, 0 },
+ { TX_TRI0_048, 2981, 0 },
+ { TX_TRI0_049, 6054, 0 },
+ { TX_TRI0_050, 3269, 0 },
+ { TX_TRI0_051, 5011, 0 },
+ { TX_TRI0_052, 10206, 0 },
+ { TX_TRI0_053, 831, 0 },
+ { TX_TRI0_054, 1350, 0 },
+ { TX_TRI0_055, 5619, 0 },
+ { TX_TRI0_056, 2500, 0 },
+ { TX_TRI0_057, 4878, 0 },
+ { TX_TRI0_058, 653, 0 },
+ { TX_TRI0_059, 3550, 0 },
+ { TX_TRI0_060, 2851, 0 },
+ { TX_TRI0_061, 2570, 0 },
+ { TX_TRI0_062, 7660, 0 },
+ { TX_TRI0_063, 8557, 0 },
+ { TX_TRI0_064, 7945, 0 },
+ { TX_TRI0_065, 7809, 0 },
+ { TX_TRI0_066, 8227, 0 },
+ { TX_TRI0_F24, 9031, 0 },
+ { TX_TRI0_F24, 7748, 0 },
+ { TX_TRI4_076, 8927, 0 },
+ { TX_TRI0N000, 6620, 0 },
+ { TX_TRI0N001, 6528, 0 },
+ { TX_TRI0N002, 7287, 0 },
+ { TX_TRI0N003, 7433, 0 },
+ { TX_TRI0N004, 7021, 0 },
+ { TX_TRI0N005, 7158, 0 },
+ { TX_TRI0N006, 6778, 0 },
+ { TX_TRI0N007, 6363, 0 },
+ { TX_TRI0N008, 6941, 0 },
+ { TX_TRI0N009, 7545, 0 },
+ { TX_TRI0U075, 9675, 0 },
{ -1, 0, 0 }
};
@@ -108,7 +204,7 @@ void Room::trial0Tick1() {
}
void Room::trial0Tick40() {
- showText(TX_SPEAKER_VLICT, 58);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_058);
}
void Room::trial0Timer0Expired() { // Doesn't do anything?
@@ -125,79 +221,79 @@ void Room::trial0ReachedRoomCenter() {
bool gaveUp = false;
_awayMission->disableInput = false;
- showText(TX_SPEAKER_VLICT, 53);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_053);
const TextRef choices1[] = {
TX_SPEAKER_KIRK,
- 19, 16, 21,
- TX_BLANK
+ TX_TRI0_019, TX_TRI0_016, TX_TRI0_021,
+ TX_END
};
showMultipleTexts(choices1);
- showText(TX_SPEAKER_VLICT, 54);
- showText(TX_SPEAKER_KIRK, 4);
- showText(TX_SPEAKER_VLICT, 47);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_054);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_004);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_047);
const TextRef choices2[] = {
TX_SPEAKER_KIRK,
- 11, 18, 15,
- TX_BLANK
+ TX_TRI0_011, TX_TRI0_018, TX_TRI0_015,
+ TX_END
};
int choice = showMultipleTexts(choices2);
if (choice == 0) { // Kirk intervenes as a warrior
- showText(TX_SPEAKER_VLICT, 43);
- showText(TX_SPEAKER_KIRK, 2);
- showText(TX_SPEAKER_VLICT, 56);
- showText(TX_SPEAKER_VLICT, 61);
- showText(TX_SPEAKER_KIRK, 1);
- showText(TX_SPEAKER_VLICT, 60);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_043);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_002);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_056);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_061);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_001);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_060);
_awayMission->disableInput = true;
loadRoomIndex(1, 4);
} else if (choice == 1) { // "This trial is a mockery"
- showText(TX_SPEAKER_VLICT, 48);
- showText(TX_SPEAKER_QUETZECOATL_GLOBAL, 41);
- showText(TX_SPEAKER_VLICT, 50);
- showText(TX_SPEAKER_QUETZECOATL_GLOBAL, 39);
- showText(TX_SPEAKER_VLICT, 59);
- showText(TX_SPEAKER_QUETZECOATL_GLOBAL, 40);
- showText(TX_SPEAKER_VLICT, 46);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_048);
+ showText(TX_SPEAKER_QUETZECOATL, TX_TRI0_041);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_050);
+ showText(TX_SPEAKER_QUETZECOATL, TX_TRI0_039);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_059);
+ showText(TX_SPEAKER_QUETZECOATL, TX_TRI0_040);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_046);
const TextRef choices3[] = {
TX_SPEAKER_KIRK,
- 23, 6, 10,
- TX_BLANK
+ TX_TRI0_023, TX_TRI0_006, TX_TRI0_010,
+ TX_END
};
choice = showMultipleTexts(choices3);
if (choice == 0 || choice == 1) {
- showText(TX_SPEAKER_VLICT, 52);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_052);
const TextRef choices4[] = {
TX_SPEAKER_KIRK,
- 17, 20, 8,
- TX_BLANK
+ TX_TRI0_017, TX_TRI0_020, TX_TRI0_008,
+ TX_END
};
choice = showMultipleTexts(choices4);
if (choice == 0 || choice == 1) {
- showText(TX_SPEAKER_VLICT, 57);
- showText(TX_SPEAKER_KIRK, 3);
- showText(TX_SPEAKER_VLICT, 51);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_057);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_003);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_051);
const TextRef choices5[] = {
TX_SPEAKER_KIRK,
- 9, 14, 13,
- TX_BLANK
+ TX_TRI0_009, TX_TRI0_014, TX_TRI0_013,
+ TX_END
};
choice = showMultipleTexts(choices5);
if (choice == 0 || choice == 1) {
- showText(TX_SPEAKER_VLICT, 55);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_055);
_awayMission->disableInput = true;
loadRoomIndex(1, 4);
} else { // choice == 2
- showText(TX_SPEAKER_VLICT, 45);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_045);
_awayMission->disableInput = true;
loadRoomIndex(1, 4);
}
@@ -210,8 +306,8 @@ void Room::trial0ReachedRoomCenter() {
if (gaveUp) {
playMidiMusicTracks(2, -1);
- showText(TX_SPEAKER_VLICT, 49);
- showText(TX_SPEAKER_VLICT, 44);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_049);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_044);
_awayMission->trial.missionEndMethod = 0;
// FIXME: Are these parameters in the right order?
@@ -220,77 +316,77 @@ void Room::trial0ReachedRoomCenter() {
}
void Room::trial0LookAtWindow() {
- showDescription(7);
+ showDescription(TX_TRI0N007);
}
void Room::trial0LookAtVlict() {
- showDescription(1);
+ showDescription(TX_TRI0N001);
}
void Room::trial0LookAtGuard() {
- showDescription(0);
+ showDescription(TX_TRI0N000);
}
void Room::trial0LookAtBench() {
- showDescription(6);
+ showDescription(TX_TRI0N006);
}
void Room::trial0LookAtSeal() {
- showDescription(8);
+ showDescription(TX_TRI0N008);
}
void Room::trial0LookAtKirk() {
- showDescription(4);
+ showDescription(TX_TRI0N004);
}
void Room::trial0LookAtSpock() {
- showDescription(5);
+ showDescription(TX_TRI0N005);
}
void Room::trial0LookAtMccoy() {
- showDescription(2);
+ showDescription(TX_TRI0N002);
}
void Room::trial0LookAtRedshirt() {
- showDescription(3);
+ showDescription(TX_TRI0N003);
}
void Room::trial0LookAtQuetzecoatl() {
- showDescription(9);
+ showDescription(TX_TRI0N009);
}
void Room::trial0TalkToVlict() {
- showText(TX_SPEAKER_VLICT, 62);
+ showText(TX_SPEAKER_VLICT, TX_TRI0_062);
}
void Room::trial0TalkToGuard() {
- showText(TX_SPEAKER_KLINGON_GUARD, 24 + FOLLOWUP_MESSAGE_OFFSET);
- showText(TX_SPEAKER_BENNIE, 65);
- showText(TX_SPEAKER_KIRK, 7);
- showText(TX_SPEAKER_BENNIE, 64);
- showText(TX_SPEAKER_KIRK, 22);
- showText(TX_SPEAKER_BENNIE, 66);
+ showText(TX_SPEAKER_KLINGON_GUARD, TX_TRI0_F24);
+ showText(TX_SPEAKER_BENNIE, TX_TRI0_065);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_007);
+ showText(TX_SPEAKER_BENNIE, TX_TRI0_064);
+ showText(TX_SPEAKER_KIRK, TX_TRI0_022);
+ showText(TX_SPEAKER_BENNIE, TX_TRI0_066);
}
void Room::trial0TalkToQuetzecoatl() {
- showText(TX_SPEAKER_QUETZECOATL_GLOBAL, 42);
+ showText(TX_SPEAKER_QUETZECOATL, TX_TRI0_042);
}
void Room::trial0TalkToMccoy() {
- showText(TX_SPEAKER_MCCOY, 31);
+ showText(TX_SPEAKER_MCCOY, TX_TRI0_031);
}
void Room::trial0TalkToSpock() {
- showText(TX_SPEAKER_SPOCK, 25);
+ showText(TX_SPEAKER_SPOCK, TX_TRI0_025);
}
void Room::trial0TalkToRedshirt() {
- showText(TX_SPEAKER_BENNIE, 63);
+ showText(TX_SPEAKER_BENNIE, TX_TRI0_063);
}
void Room::trial0UsePhaserOrRock() {
- showText(TX_SPEAKER_SPOCK, 26);
- showText(TX_SPEAKER_MCCOY, 36);
+ showText(TX_SPEAKER_SPOCK, TX_TRI0_026);
+ showText(TX_SPEAKER_MCCOY, TX_TRI0_036);
}
void Room::trial0UseSnakeOnVlict() {
@@ -300,49 +396,48 @@ void Room::trial0UseSnakeOnVlict() {
void Room::trial0UseSnakeOnGuard() {
// Unused, since the snake item doesn't carry over to the courtroom
- showText(TX_SPEAKER_KLINGON_GUARD, 24 + FOLLOWUP_MESSAGE_OFFSET);
+ showText(TX_SPEAKER_KLINGON_GUARD, TX_TRI0_F24);
}
void Room::trial0UseMTricorderOnQuetzecoatl() {
- mccoyScan(DIR_S, 29, false);
+ mccoyScan(DIR_S, TX_TRI0_029, true);
}
void Room::trial0UseMTricorderOnVlict() {
- mccoyScan(DIR_S, 30, false);
+ mccoyScan(DIR_S, TX_TRI0_030, true);
}
void Room::trial0UseMTricorderAnywhere() {
- mccoyScan(DIR_S, 35, false);
+ mccoyScan(DIR_S, TX_TRI0_035, true);
}
void Room::trial0UseSTricorderOnWindow() {
- spockScan(DIR_S, 37, false);
+ spockScan(DIR_S, TX_TRI0_037, true);
}
void Room::trial0UseSTricorderAnywhere() {
// ENHANCEMENT: Originally didn't play tricorder sound, etc
- spockScan(DIR_S, 38, false);
+ spockScan(DIR_S, TX_TRI0_038, true);
}
void Room::trial0UseCommunicator() {
- showText(TX_SPEAKER_UHURA_GLOBAL, 75);
+ showText(TX_SPEAKER_UHURA, TX_TRI0U075);
}
void Room::trial0UseCrewmanOnKlingon() {
- showText(TX_SPEAKER_SPOCK, 24);
+ showText(TX_SPEAKER_SPOCK, TX_TRI0_024);
}
void Room::trial0UseMccoyOnVlict() {
- showText(TX_SPEAKER_MCCOY, 27);
+ showText(TX_SPEAKER_MCCOY, TX_TRI0_027);
}
void Room::trial0UseMccoyOnGuard() {
- showText(TX_SPEAKER_MCCOY, 28);
+ showText(TX_SPEAKER_MCCOY, TX_TRI0_028);
}
void Room::trial0UseMedkitAnywhere() {
- showText(TX_SPEAKER_MCCOY, 34);
+ showText(TX_SPEAKER_MCCOY, TX_TRI0_034);
}
}
-#endif
diff --git a/engines/startrek/rooms/venga.cpp b/engines/startrek/rooms/venga.cpp
index 59c5552c97..fbba81be75 100644
--- a/engines/startrek/rooms/venga.cpp
+++ b/engines/startrek/rooms/venga.cpp
@@ -25,6 +25,7 @@
namespace StarTrek {
enum vengTextIds {
+ TX_COMMON_IDS_OFFSET_START = 5000, // needed to distinguish common IDs
TX_SPEAKER_KIRK, TX_SPEAKER_MCCOY, TX_SPEAKER_SPOCK, TX_SPEAKER_ELASI_CAPTAIN, TX_SPEAKER_UHURA,
TX_VEN0_016, TX_VEN2_098, TX_VEN2_028, TX_VEN2_066, TX_VENA_F32,
TX_VENA_F34, TX_VENA_F40, TX_VEN4N007, TX_VEN4N010, TX_VEN2U093,
More information about the Scummvm-git-logs
mailing list