aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-01-28 21:41:59 -0500
committerPaul Gilbert2018-01-28 21:41:59 -0500
commit86c084cf9a33407851a7e6b976c309b7a4be92b1 (patch)
tree31cd4eae349572d6a5783d5b513bd32140047687
parentd80ddcc246ec6a0af24f1c20657c2fb1ffaee186 (diff)
downloadscummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.tar.gz
scummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.tar.bz2
scummvm-rg350-86c084cf9a33407851a7e6b976c309b7a4be92b1.zip
XEEN: Implemented cmdDisplayLarge opcode
-rw-r--r--engines/xeen/scripts.cpp18
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 &params) {
}
bool Scripts::cmdDisplayLarge(ParamsIterator &params) {
- 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;
}