From 2c5237db7e0d4f2fd887ec8dd65e881fedeacb7d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 28 Aug 2019 19:58:31 -0700 Subject: XEEN: Parameter to cmdDisplayLarge is line number, not offset --- engines/xeen/scripts.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/xeen/scripts.cpp') diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 9e04fd1252..be567236a9 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1374,7 +1374,7 @@ bool Scripts::cmdDisplayBottomTwoLines(ParamsIterator ¶ms) { bool Scripts::cmdDisplayLarge(ParamsIterator ¶ms) { Party &party = *g_vm->_party; Common::String filename = Common::String::format("aaze2%03u.txt", party._mazeId); - uint offset = params.readByte(); + uint lineNumber = params.readByte(); // Get the text data for the current maze File f(filename); @@ -1382,8 +1382,11 @@ bool Scripts::cmdDisplayLarge(ParamsIterator ¶ms) { f.read(data, f.size()); f.close(); - // Get the message at the specified offset - _message = Common::String(data + offset); + // Get the message at the specified line + const char *lineP = data; + for (uint idx = 0; idx < lineNumber; ++idx, lineP += strlen(lineP) + 1) {} + + _message = Common::String(lineP); delete[] data; // Display the message -- cgit v1.2.3