[Scummvm-cvs-logs] CVS: scummvm script_v2.cpp,1.63,1.64 actor.cpp,1.67,1.68

Max Horn fingolfin at users.sourceforge.net
Mon May 20 07:29:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv2703

Modified Files:
	script_v2.cpp actor.cpp 
Log Message:
setupShadowPalette doesn't belong into actor.cpp; it's only used in script_v2.cpp, hence moving it there

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- script_v2.cpp	14 May 2002 23:32:34 -0000	1.63
+++ script_v2.cpp	20 May 2002 14:28:02 -0000	1.64
@@ -2987,6 +2987,15 @@
 	push(i);
 }
 
+void Scumm::o6_getActorPriority()
+{
+	Actor *a;
+
+	a = derefActorSafe(pop(), "getActorPriority");
+
+	push(a->layer);
+}
+
 void Scumm::decodeParseString2(int m, int n)
 {
 	byte b;
@@ -3071,11 +3080,30 @@
 	}
 }
 
-void Scumm::o6_getActorPriority()
+void Scumm::setupShadowPalette(int slot, int rfact, int gfact, int bfact,
+															 int from, int to)
 {
-	Actor *a;
+	byte *table;
+	int i, num;
+	byte *curpal;
 
-	a = derefActorSafe(pop(), "getActorPriority");
+	if (slot < 0 || slot > 7)
+		error("setupShadowPalette: invalid slot %d", slot);
 
-	push(a->layer);
+	if (from < 0 || from > 255 || to < 0 || from > 255 || to < from)
+		error("setupShadowPalette: invalid range from %d to %d", from, to);
+
+	table = _shadowPalette + slot * 256;
+	for (i = 0; i < 256; i++)
+		table[i] = i;
+
+	table += from;
+	curpal = _currentPalette + from * 3;
+	num = to - from + 1;
+	do {
+		*table++ = remapPaletteColor((curpal[0] * rfact) >> 8,
+																 curpal[1] * gfact >> 8,
+																 curpal[2] * bfact >> 8, (uint) - 1);
+		curpal += 3;
+	} while (--num);
 }

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- actor.cpp	14 May 2002 23:35:28 -0000	1.67
+++ actor.cpp	20 May 2002 14:28:02 -0000	1.68
@@ -1287,34 +1287,6 @@
 	}
 }
 
-void Scumm::setupShadowPalette(int slot, int rfact, int gfact, int bfact,
-															 int from, int to)
-{
-	byte *table;
-	int i, num;
-	byte *curpal;
-
-	if (slot < 0 || slot > 7)
-		error("setupShadowPalette: invalid slot %d", slot);
-
-	if (from < 0 || from > 255 || to < 0 || from > 255 || to < from)
-		error("setupShadowPalette: invalid range from %d to %d", from, to);
-
-	table = _shadowPalette + slot * 256;
-	for (i = 0; i < 256; i++)
-		table[i] = i;
-
-	table += from;
-	curpal = _currentPalette + from * 3;
-	num = to - from + 1;
-	do {
-		*table++ = remapPaletteColor((curpal[0] * rfact) >> 8,
-																 curpal[1] * gfact >> 8,
-																 curpal[2] * bfact >> 8, (uint) - 1);
-		curpal += 3;
-	} while (--num);
-}
-
 void Actor::walkActorOld()
 {
 	int new_dir, next_box;





More information about the Scummvm-git-logs mailing list