[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.23,1.24

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Mar 23 23:41:09 CET 2004


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21088/sword1

Modified Files:
	animation.cpp 
Log Message:
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...


Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- animation.cpp	23 Mar 2004 00:10:18 -0000	1.23
+++ animation.cpp	24 Mar 2004 07:29:59 -0000	1.24
@@ -69,16 +69,26 @@
 #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;
+				}
 			}
 		}
 	}





More information about the Scummvm-git-logs mailing list