From afefe7dcfa7bc3a360b77ecd67c3650b426438d5 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 24 Mar 2004 07:29:59 +0000 Subject: Use the binary .pal file format that was introduced for 0.6.0. Invalidate the lookup table when the screen changes. (TODO: We also have to invalidate it if the change happens between cutscenes, don't we?) Some cleanup, particularly in the BS2 cutscene player. More needed, I guess... svn-id: r13377 --- sword1/animation.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'sword1') diff --git a/sword1/animation.cpp b/sword1/animation.cpp index 0b79d91a07..fa1c91bf45 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -69,16 +69,26 @@ void MoviePlayer::play(const char *filename) { #ifndef BACKEND_8BIT _sys->updateScreen(); #endif - // FIXME: check for ESC and abbort animation be just returning from the function OSystem::Event event; while (_sys->poll_event(&event)) { - if ((event.event_code == OSystem::EVENT_KEYDOWN) && - (event.kbd.keycode == 27)) { - delete anim; - return; - } - if (event.event_code == OSystem::EVENT_QUIT) + switch (event.event_code) { +#ifndef BACKEND_8BIT + case OSystem::EVENT_SCREEN_CHANGED: + anim->invalidateLookup(true); + break; +#endif + case OSystem::EVENT_KEYDOWN: + if (event.kbd.keycode == 27) { + delete anim; + return; + } + break; + case OSystem::EVENT_QUIT: _sys->quit(); + break; + default: + break; + } } } } -- cgit v1.2.3