mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
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
svn-id: r27055
This commit is contained in:
parent
9896ce253e
commit
f4299e81c1
@ -1811,6 +1811,10 @@ void Actor::drawActors() {
|
||||
|
||||
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*();
|
||||
|
||||
|
@ -326,6 +326,11 @@ public:
|
||||
_sleepTime = sleepTime;
|
||||
}
|
||||
|
||||
void waitFrames(int frames) {
|
||||
wait(kWaitTypeWaitFrames);
|
||||
_frameWait = frames;
|
||||
}
|
||||
|
||||
ScriptThread() {
|
||||
memset(this, 0xFE, sizeof(*this));
|
||||
_stackBuf = NULL;
|
||||
|
@ -1887,8 +1887,13 @@ void Script::sfResetMouseClicks(SCRIPTFUNC_PARAMS) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user