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

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Thu Dec 2 22:24:56 CET 2010


Revision: 54742
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54742&view=rev
Author:   fuzzie
Date:     2010-12-02 21:24:55 +0000 (Thu, 02 Dec 2010)

Log Message:
-----------
MOHAWK: implement kLBAnimOpDelay

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-02 21:16:39 UTC (rev 54741)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-12-02 21:24:55 UTC (rev 54742)
@@ -974,8 +974,6 @@
 }
 
 LBAnimationNode::LBAnimationNode(MohawkEngine_LivingBooks *vm, LBAnimation *parent, uint16 scriptResourceId) : _vm(vm), _parent(parent) {
-	_currentCel = 0;
-
 	loadScript(scriptResourceId);
 }
 
@@ -1042,6 +1040,7 @@
 
 	_currentCel = 0;
 	_currentEntry = 0;
+	_delay = 0;
 
 	_xPos = 0;
 	_yPos = 0;
@@ -1051,6 +1050,9 @@
 	if (_currentEntry == _scriptEntries.size())
 		return kLBNodeDone;
 
+	if (_delay > 0 && --_delay)
+		return kLBNodeRunning;
+
 	while (_currentEntry < _scriptEntries.size()) {
 		LBAnimScriptEntry &entry = _scriptEntries[_currentEntry];
 		_currentEntry++;
@@ -1187,11 +1189,14 @@
 			}
 			break;
 
-		case kLBAnimOpUnknownF:
-			// TODO: Found in maggiesfa
-			// Seems to always be a uint32 as the data
+		case kLBAnimOpDelay:
+			{
 			assert(entry.size == 4);
-			warning("f: UnknownF(%d)", READ_BE_UINT32(entry.data));
+			uint32 delay = READ_BE_UINT32(entry.data);
+			debug(4, "f: Delay(%d)", delay);
+			_delay = delay;
+			return kLBNodeRunning;
+			}
 			break;
 
 		default:

Modified: scummvm/trunk/engines/mohawk/livingbooks.h
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.h	2010-12-02 21:16:39 UTC (rev 54741)
+++ scummvm/trunk/engines/mohawk/livingbooks.h	2010-12-02 21:24:55 UTC (rev 54742)
@@ -81,7 +81,7 @@
 	kLBAnimOpReleaseSound = 0xc,
 	kLBAnimOpResetSound = 0xd,
 	kLBAnimOpUnknownE = 0xe,
-	kLBAnimOpUnknownF = 0xf
+	kLBAnimOpDelay = 0xf
 };
 
 enum {
@@ -179,6 +179,7 @@
 
 	uint _currentCel;
 	int16 _xPos, _yPos;
+	uint32 _delay;
 };
 
 class LBAnimationItem;


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