mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
Fixed for bug report # 1401360.
Also added some delay calls while waiting in some script functions. svn-id: r19982
This commit is contained in:
parent
67d1cc0cf9
commit
e179f3f6ed
@ -155,7 +155,7 @@ void Screen::fadeSpecialPalette(int palIndex, int startIndex, int size, int fade
|
||||
uint8 tempPal[768];
|
||||
memcpy(tempPal, _currentPalette, 768);
|
||||
memcpy(&tempPal[startIndex*3], _vm->palTable1()[palIndex], size*3);
|
||||
fadePalette(tempPal, fadeTime*9);
|
||||
fadePalette(tempPal, fadeTime*18);
|
||||
memcpy(&_currentPalette[startIndex*3], &tempPal[startIndex*3], size*3);
|
||||
setScreenPalette(_currentPalette);
|
||||
_system->updateScreen();
|
||||
@ -172,11 +172,11 @@ void Screen::fadePalette(const uint8 *palData, int delay) {
|
||||
maxDiff = diff;
|
||||
}
|
||||
}
|
||||
delay <<= 8;
|
||||
int16 delayInc = delay << 8;
|
||||
if (maxDiff != 0) {
|
||||
delay /= maxDiff;
|
||||
delayInc /= maxDiff;
|
||||
}
|
||||
int delayInc = delay;
|
||||
delay = delayInc;
|
||||
for (diff = 1; diff <= maxDiff; ++diff) {
|
||||
if (delayInc >= 512) {
|
||||
break;
|
||||
|
@ -250,6 +250,7 @@ int KyraEngine::cmd_runSceneAnimUntilDone(ScriptState *script) {
|
||||
while (_sprites->_anims[stackPos(0)].play) {
|
||||
_sprites->updateSceneAnims();
|
||||
_animator->updateAllObjectShapes();
|
||||
delay(10);
|
||||
}
|
||||
_animator->restoreAllObjectBackgrounds();
|
||||
_screen->showMouse();
|
||||
@ -463,7 +464,8 @@ int KyraEngine::cmd_runWSAFromBeginningToEnd(ScriptState *script) {
|
||||
} else {
|
||||
_screen->updateScreen();
|
||||
}
|
||||
delay(10);
|
||||
if (continueTime - _system->getMillis() >= 10)
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,7 +491,8 @@ int KyraEngine::cmd_displayWSAFrame(ScriptState *script) {
|
||||
while (_system->getMillis() < continueTime) {
|
||||
_sprites->updateSceneAnims();
|
||||
_animator->updateAllObjectShapes();
|
||||
delay(10);
|
||||
if (continueTime - _system->getMillis() >= 10)
|
||||
delay(10);
|
||||
}
|
||||
_screen->showMouse();
|
||||
return 0;
|
||||
@ -529,7 +532,8 @@ int KyraEngine::cmd_runWSAFrames(ScriptState *script) {
|
||||
while (_system->getMillis() < nextRun) {
|
||||
_sprites->updateSceneAnims();
|
||||
_animator->updateAllObjectShapes();
|
||||
delay(10);
|
||||
if (nextRun - _system->getMillis() >= 10)
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
_screen->showMouse();
|
||||
@ -716,7 +720,8 @@ int KyraEngine::cmd_displayWSAFrameOnHidPage(ScriptState *script) {
|
||||
while (_system->getMillis() < continueTime) {
|
||||
_sprites->updateSceneAnims();
|
||||
_animator->updateAllObjectShapes();
|
||||
delay(10);
|
||||
if (continueTime - _system->getMillis() >= 10)
|
||||
delay(10);
|
||||
}
|
||||
_screen->showMouse();
|
||||
|
||||
@ -1254,6 +1259,8 @@ int KyraEngine::cmd_makeAmuletAppear(ScriptState *script) {
|
||||
while (_system->getMillis() < nextTime) {
|
||||
_sprites->updateSceneAnims();
|
||||
_animator->updateAllObjectShapes();
|
||||
if (nextTime - _system->getMillis() >= 10)
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
_screen->showMouse();
|
||||
|
@ -667,6 +667,7 @@ KyraEngine::OpcodeProc KyraEngine::_opcodeTable[] = {
|
||||
Opcode(cmd_fillRect),
|
||||
Opcode(cmd_dummy),
|
||||
Opcode(cmd_dummy),
|
||||
Opcode(cmd_dummy),
|
||||
Opcode(cmd_dummy)
|
||||
};
|
||||
#undef Opcode
|
||||
|
Loading…
Reference in New Issue
Block a user