diff options
Diffstat (limited to 'saga/gfx.cpp')
-rw-r--r-- | saga/gfx.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/saga/gfx.cpp b/saga/gfx.cpp index 17d3117817..7f5f7319df 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -986,6 +986,32 @@ int Gfx::blackToPal(SURFACE *surface, PALENTRY *src_pal, double percent) { return SUCCESS; } +void Gfx::palToBlackWait(SURFACE *surface, PALENTRY *src_pal, int duration) { + uint32 start_time = _vm->_system->getMillis(); + uint32 cur_time; + + do { + cur_time = _vm->_system->getMillis(); + + palToBlack(surface, src_pal, (double) (cur_time - start_time) / duration); + _vm->_system->updateScreen(); + _vm->_system->delayMillis(50); + } while (cur_time < start_time + duration); +} + +void Gfx::blackToPalWait(SURFACE *surface, PALENTRY *src_pal, int duration) { + uint32 start_time = _vm->_system->getMillis(); + uint32 cur_time; + + do { + cur_time = _vm->_system->getMillis(); + + blackToPal(surface, src_pal, (double) (cur_time - start_time) / duration); + _vm->_system->updateScreen(); + _vm->_system->delayMillis(50); + } while (cur_time < start_time + duration); +} + void Gfx::showCursor(bool state) { updateCursor(); g_system->showMouse(state); |