From 86c084cf9a33407851a7e6b976c309b7a4be92b1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 28 Jan 2018 21:41:59 -0500 Subject: XEEN: Implemented cmdDisplayLarge opcode --- engines/xeen/scripts.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'engines/xeen/scripts.cpp') 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; } -- cgit v1.2.3