[Scummvm-cvs-logs] CVS: scummvm/graphics animation.cpp,1.2,1.3 animation.h,1.2,1.3

Max Horn fingolfin at users.sourceforge.net
Sun Mar 21 17:51:04 CET 2004


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

Modified Files:
	animation.cpp animation.h 
Log Message:
some more cleanup

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animation.cpp	22 Mar 2004 01:28:44 -0000	1.2
+++ animation.cpp	22 Mar 2004 01:40:24 -0000	1.3
@@ -48,6 +48,23 @@
 
 
 
+bool BaseAnimationState::checkPaletteSwitch() {
+#ifdef BACKEND_8BIT
+	// if we have reached the last image with this palette, switch to new one
+	if (framenum == palettes[palnum].end) {
+		unsigned char *l = lut2;
+		palnum++;
+		setPalette(palettes[palnum].pal);
+		lutcalcnum = (BITDEPTH + palettes[palnum].end - (framenum + 1) + 2) / (palettes[palnum].end - (framenum + 1) + 2);
+		lut2 = lut;
+		lut = l;
+		return true;
+	}
+#endif
+
+	return false;
+}
+
 #ifdef BACKEND_8BIT
 
 /**
@@ -100,21 +117,6 @@
 	}
 }
 
-bool BaseAnimationState::checkPaletteSwitch() {
-	// if we have reached the last image with this palette, switch to new one
-	if (framenum == palettes[palnum].end) {
-		unsigned char *l = lut2;
-		palnum++;
-		setPalette(palettes[palnum].pal);
-		lutcalcnum = (BITDEPTH + palettes[palnum].end - (framenum + 1) + 2) / (palettes[palnum].end - (framenum + 1) + 2);
-		lut2 = lut;
-		lut = l;
-		return true;
-	}
-
-	return false;
-}
-
 #else
 
 OverlayColor *BaseAnimationState::lookup = 0;

Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animation.h	22 Mar 2004 01:28:44 -0000	1.2
+++ animation.h	22 Mar 2004 01:40:24 -0000	1.3
@@ -123,9 +123,9 @@
 	virtual ~BaseAnimationState();
 
 protected:
+	bool checkPaletteSwitch();
 #ifdef BACKEND_8BIT
 	void buildLookup(int p, int lines);
-	bool checkPaletteSwitch();
 	virtual void setPalette(byte *pal) = 0;
 #else
 	void buildLookup(void);





More information about the Scummvm-git-logs mailing list