diff options
author | Paul Gilbert | 2018-01-28 21:41:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-01-28 21:41:59 -0500 |
commit | 86c084cf9a33407851a7e6b976c309b7a4be92b1 (patch) | |
tree | 31cd4eae349572d6a5783d5b513bd32140047687 /engines/xeen | |
parent | d80ddcc246ec6a0af24f1c20657c2fb1ffaee186 (diff) | |
download | scummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.tar.gz scummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.tar.bz2 scummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.zip |
XEEN: Implemented cmdDisplayLarge opcode
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/scripts.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 3a3e0c2578..0e5b412a63 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1334,8 +1334,22 @@ bool Scripts::cmdDisplayBottomTwoLines(ParamsIterator ¶ms) { } bool Scripts::cmdDisplayLarge(ParamsIterator ¶ms) { - error("TODO: Implement event text loading"); - + Party &party = *g_vm->_party; + Common::String filename = Common::String::format("aaze2%03u.txt", party._mazeId); + uint offset = params.readByte(); + + // Get the text data for the current maze + File f(filename); + char *data = new char[f.size()]; + f.read(data, f.size()); + f.close(); + + // Get the message at the specified offset + _message = Common::String(data + offset); + delete[] data; + + // Display the message + _windowIndex = 11; display(true, 0); return true; } |