aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek
diff options
context:
space:
mode:
authorFilippos Karapetis2019-10-20 21:45:58 +0300
committerFilippos Karapetis2019-10-20 21:46:31 +0300
commit6a316498b52fc53f8b3a7316a10cddef0a83248b (patch)
tree5b3b9b31f06ccd663bf869b5508d9a8f810e5ad9 /engines/startrek
parent1f2e242e2e728270c63eee06c158ad969b49e7b8 (diff)
downloadscummvm-rg350-6a316498b52fc53f8b3a7316a10cddef0a83248b.tar.gz
scummvm-rg350-6a316498b52fc53f8b3a7316a10cddef0a83248b.tar.bz2
scummvm-rg350-6a316498b52fc53f8b3a7316a10cddef0a83248b.zip
STARTREK: Unify the text patching code
Diffstat (limited to 'engines/startrek')
-rw-r--r--engines/startrek/room.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index d777564bf0..a01f52f92c 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -194,6 +194,9 @@ Common::String Room::patchRoomMessage(const char *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
+ { "#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," },
@@ -208,18 +211,6 @@ Common::String Room::patchRoomMessage(const char *text) {
if (txt[10] == '-')
txt.replace(10, 1, "_");
- // Message index missing
- if (txt.hasPrefix("#LOV3\\LOV3_#"))
- txt = Common::String("#LOV3\\LOV3_000#") + (text + 12);
-
- // Should be TX_LOV2_012, but the audio file is missing
- if (txt.hasPrefix("#LOV2\\LOV2_012#"))
- txt = Common::String("#LOV1\\LOV1_010#") + (text + 14);
-
- // Original voice clip is someone who's clearly not Kelley saying "he's dead, Jim"
- if (txt.hasPrefix("#FEA3\\FEA3_030#"))
- txt = Common::String("#LOVA\\LOVA_100#") + (text + 14);
-
// Fix typos
do {
const Common::String origText = typoFixes[i].origText;