diff options
author | Filippos Karapetis | 2019-05-28 21:41:58 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-05-28 21:41:58 +0300 |
commit | 42ac19e8042d12949d21a2b9650f8f12ca76493d (patch) | |
tree | 3e0762b27142aa682973967526e792fcc95cfffb /engines/startrek/textbox.cpp | |
parent | 310377033f334779dc39261c9cd20a295bb1cc04 (diff) | |
download | scummvm-rg350-42ac19e8042d12949d21a2b9650f8f12ca76493d.tar.gz scummvm-rg350-42ac19e8042d12949d21a2b9650f8f12ca76493d.tar.bz2 scummvm-rg350-42ac19e8042d12949d21a2b9650f8f12ca76493d.zip |
STARTREK: Start reading text from RDF files, instead of hardcoding it
Rooms DEMON0 and DEMON5 have been partially adapted to the new logic.
This isn't yet fully functional, for the following reasons:
- We only read the main text block. There are also some others which
are not handled yet. The unhandled blocks have been kept in text.cpp
- We load text in dictionaries, splitting the strings in look and talk.
However, there's a third category (look with a talker), which isn't
handled yet
- Text is loaded per-room, but there are enhancements where text and
samples are loaded from other rooms. These need to be refactored
Diffstat (limited to 'engines/startrek/textbox.cpp')
-rw-r--r-- | engines/startrek/textbox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/startrek/textbox.cpp b/engines/startrek/textbox.cpp index a6fc0d0ee2..a503c42a81 100644 --- a/engines/startrek/textbox.cpp +++ b/engines/startrek/textbox.cpp @@ -654,7 +654,7 @@ String StarTrekEngine::readTextFromArrayWithChoices(int choiceIndex, uintptr dat const char *headerText = textArray[0]; const char *mainText = textArray[choiceIndex + 1]; - if (*mainText == '\0') + if (mainText == nullptr || *mainText == '\0') return Common::String(); // Technically should be nullptr... if (headerTextOutput != nullptr) { |