[Scummvm-git-logs] scummvm master -> 86c084cf9a33407851a7e6b976c309b7a4be92b1

dreammaster dreammaster at scummvm.org
Mon Jan 29 03:42:06 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
86c084cf9a XEEN: Implemented cmdDisplayLarge opcode


Commit: 86c084cf9a33407851a7e6b976c309b7a4be92b1
    https://github.com/scummvm/scummvm/commit/86c084cf9a33407851a7e6b976c309b7a4be92b1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-01-28T21:41:59-05:00

Commit Message:
XEEN: Implemented cmdDisplayLarge opcode

Changed paths:
    engines/xeen/scripts.cpp


diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 3a3e0c2..0e5b412 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;
 }





More information about the Scummvm-git-logs mailing list