[Scummvm-cvs-logs] SF.net SVN: scummvm:[54710] scummvm/trunk/engines/mohawk

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Wed Dec 1 19:22:05 CET 2010


Revision: 54710
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54710&view=rev
Author:   fuzzie
Date:     2010-12-01 18:22:05 +0000 (Wed, 01 Dec 2010)

Log Message:
-----------
MOHAWK: document/handle more LB item data

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/livingbooks.cpp
    scummvm/trunk/engines/mohawk/livingbooks.h

Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-12-01 18:21:49 UTC (rev 54709)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-12-01 18:22:05 UTC (rev 54710)
@@ -1467,6 +1467,8 @@
 	_nextTime = 0;
 	_startTime = 0;
 	_loops = 0;
+
+	_isAmbient = false;
 }
 
 LBItem::~LBItem() {
@@ -1590,10 +1592,23 @@
 		_phase = stream->readUint16();
 		break;
 
-	case 0x7b:
-		assert(size == 0);
-		debug(2, "LBItem: 0x7b");
-		// TODO
+	case kLBUnknown6F:
+		{
+		if (size != 18)
+			error("0x6f had wrong size (%d)", size);
+		uint u1 = stream->readUint16();
+		uint u2 = stream->readUint16();
+		uint u3 = stream->readUint16();
+		uint u4 = stream->readUint16();
+		uint u5 = stream->readUint16();
+		uint u6 = stream->readUint16();
+		uint u7 = stream->readUint16();
+		uint u8 = stream->readUint16();
+		uint u9 = stream->readUint16();
+		// FIXME: this is scripting stuff
+		debug(2, "0x6f: item %s, unknowns: %04x, %04x, %04x, %04x, %04x, %04x, %04x, %04x, %04x\n",
+			_desc.c_str(), u1, u2, u3, u4, u5, u6, u7, u8, u9);
+		}
 		break;
 
 	case kLBCommand:
@@ -1601,20 +1616,47 @@
 			Common::String command = readString(stream);
 			if (size != command.size() + 1)
 				error("failed to read command string");
+			// FIXME
 			warning("ignoring command '%s'", command.c_str());
 		}
 		break;
 
-	case 0x69:
-		// TODO: ??
-	case 0x6a:
-		// TODO: ??
-	case 0x6d:
-		// TODO: one-shot?
+	case kLBSetNotVisible:
+		assert(size == 0);
+		_visible = false;
+		break;
+
+	case kLBGlobalSetNotVisible:
+		assert(size == 0);
+		// FIXME
+		_visible = false;
+		break;
+
+	case kLBSetAmbient:
+		assert(size == 0);
+		_isAmbient = true;
+		break;
+
+	case kLBUnknown7D:
+		{
+		if (size != 10)
+			error("0x7d had wrong size (%d)", size);
+		uint u1 = stream->readUint16();
+		uint u2 = stream->readUint16();
+		uint u3 = stream->readUint16();
+		uint u4 = stream->readUint16();
+		uint u5 = stream->readUint16();
+		// FIXME: this is scripting stuff
+		debug(2, "0x7d: item %s, unknowns: %04x, %04x, %04x, %04x, %04x\n",
+			_desc.c_str(), u1, u2, u3, u4, u5);
+		}
+		break;
+
 	default:
-		for (uint i = 0; i < size; i++)
-			debugN("%02x ", stream->readByte());
-		warning("Unknown message %04x (size 0x%04x)", type, size);
+		error("Unknown message %04x (size 0x%04x)", type, size);
+		//for (uint i = 0; i < size; i++)
+		//	debugN("%02x ", stream->readByte());
+		//debugN("\n");
 		break;
 	}
 }
@@ -2329,13 +2371,13 @@
 
 void LBPictureItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
 	switch (type) {
-	case 0x6b:
+	case kLBSetDrawMode:
 		{
 		assert(size == 2);
 		// TODO: this probably sets whether points are always contained (0x10)
 		// or whether the bitmap contents are checked (00, or anything else?)
 		uint16 val = stream->readUint16();
-		debug(2, "LBPictureItem: 0x6b: %04x", val);
+		debug(2, "LBPictureItem: kLBSetDrawMode: %04x", val);
 		}
 		break;
 

Modified: scummvm/trunk/engines/mohawk/livingbooks.h
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.h	2010-12-01 18:21:49 UTC (rev 54709)
+++ scummvm/trunk/engines/mohawk/livingbooks.h	2010-12-01 18:22:05 UTC (rev 54710)
@@ -100,8 +100,31 @@
 	kLBMsgListScript = 0x66,
 	kLBNotifyScript = 0x67,
 	kLBSetPlayInfo = 0x68,
+	kLBSetRandomLoc = 0x69,  // unused?
+	kLBSetDrag = 0x6a,       // unused?
+	kLBSetDrawMode = 0x6b,
+	kLBSetFont = 0x6c,       // unused?
+	kLBSetOneShot = 0x6d,    // unused?
 	kLBSetPlayPhase = 0x6e,
-	kLBCommand = 0x70
+	// from here, 2.x+
+	kLBUnknown6F = 0x6f,
+	kLBCommand = 0x70,
+	kLBPaletteAData = 0x71,  // unused?
+	kLBPaletteXData = 0x72,
+	kLBDisable = 0x73,       // unused?
+	kLBEnable = 0x74,        // unused?
+	kLBSetNotVisible = 0x75,
+	kLBSetVisible = 0x76,    // unused?
+	kLBGlobalDisable = 0x77, // unused?
+	kLBGlobalEnable = 0x78,  // unused?
+	kLBGlobalSetNotVisible = 0x79,
+	kLBGlobalSetVisible = 0x7a, // unused?
+	kLBSetAmbient = 0x7b,
+	kLBUnknown7C = 0x7c,     // unused?
+	kLBUnknown7D = 0x7d,
+	kLBUnknown7E = 0x7e,     // unused?
+	kLBSetParent = 0x7f,     // unused?
+	kLBUnknown80 = 0x80      // unused?
 };
 
 enum {
@@ -250,6 +273,8 @@
 	uint16 _controlMode;
 	Common::Point _relocPoint;
 
+	bool _isAmbient;
+
 	Common::Array<LBScriptEntry *> _scriptEntries;
 	void runScript(uint id);
 };


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list