[Scummvm-cvs-logs] SF.net SVN: scummvm: [27055] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Jun 2 17:26:06 CEST 2007
Revision: 27055
http://scummvm.svn.sourceforge.net/scummvm/?rev=27055&view=rev
Author: thebluegr
Date: 2007-06-02 08:26:05 -0700 (Sat, 02 Jun 2007)
Log Message:
-----------
Implemented the sfWaitFrames script function for IHNM. Many animations should display more correctly now (e.g. actor "zapping" animations, Ben falling off the stairs). They're still not correct, as frameCount is not updated properly
Modified Paths:
--------------
scummvm/trunk/engines/saga/actor.cpp
scummvm/trunk/engines/saga/script.h
scummvm/trunk/engines/saga/sfuncs.cpp
Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp 2007-06-02 15:21:42 UTC (rev 27054)
+++ scummvm/trunk/engines/saga/actor.cpp 2007-06-02 15:26:05 UTC (rev 27055)
@@ -1811,6 +1811,10 @@
createDrawOrderList();
+ // Update frameCount for sfWaitFrames in IHNM
+ // TODO: is this the correct place to do this?
+ _vm->_frameCount++;
+
for (drawOrderIterator = _drawOrderList.begin(); drawOrderIterator != _drawOrderList.end(); ++drawOrderIterator) {
drawObject = drawOrderIterator.operator*();
Modified: scummvm/trunk/engines/saga/script.h
===================================================================
--- scummvm/trunk/engines/saga/script.h 2007-06-02 15:21:42 UTC (rev 27054)
+++ scummvm/trunk/engines/saga/script.h 2007-06-02 15:26:05 UTC (rev 27055)
@@ -326,6 +326,11 @@
_sleepTime = sleepTime;
}
+ void waitFrames(int frames) {
+ wait(kWaitTypeWaitFrames);
+ _frameWait = frames;
+ }
+
ScriptThread() {
memset(this, 0xFE, sizeof(*this));
_stackBuf = NULL;
Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp 2007-06-02 15:21:42 UTC (rev 27054)
+++ scummvm/trunk/engines/saga/sfuncs.cpp 2007-06-02 15:26:05 UTC (rev 27055)
@@ -1887,8 +1887,13 @@
SF_stub("sfResetMouseClicks", thread, nArgs);
}
+// Param1: frames
void Script::sfWaitFrames(SCRIPTFUNC_PARAMS) {
- SF_stub("sfWaitFrames", thread, nArgs);
+ int16 frames;
+ frames = thread->pop();
+
+ if (!_skipSpeeches)
+ thread->waitFrames(_vm->_frameCount + frames);
}
void Script::sfScriptFade(SCRIPTFUNC_PARAMS) {
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