aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-05-20 14:28:02 +0000
committerMax Horn2002-05-20 14:28:02 +0000
commitcb150cd11db05aeb25afa5f835d61325851bcd09 (patch)
treea4e26aedc11ac42e56f8f0d3f516fb16b471febf
parent4aabb0378c88d77d544aad41376552f9ce4fa198 (diff)
downloadscummvm-rg350-cb150cd11db05aeb25afa5f835d61325851bcd09.tar.gz
scummvm-rg350-cb150cd11db05aeb25afa5f835d61325851bcd09.tar.bz2
scummvm-rg350-cb150cd11db05aeb25afa5f835d61325851bcd09.zip
setupShadowPalette doesn't belong into actor.cpp; it's only used in script_v2.cpp, hence moving it there
svn-id: r4360
-rw-r--r--actor.cpp28
-rw-r--r--script_v2.cpp40
2 files changed, 34 insertions, 34 deletions
diff --git a/actor.cpp b/actor.cpp
index 008329beb8..c88a4a3b30 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -1287,34 +1287,6 @@ void Actor::remapActor(int r_fact, int g_fact, int b_fact,
}
}
-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;
diff --git a/script_v2.cpp b/script_v2.cpp
index d384796638..3d60d537b9 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -2987,6 +2987,15 @@ void Scumm::o6_pickOneOfDefault()
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::decodeParseString2(int m, int n)
}
}
-void Scumm::o6_getActorPriority()
+void Scumm::setupShadowPalette(int slot, int rfact, int gfact, int bfact,
+ int from, int to)
{
- Actor *a;
-
- a = derefActorSafe(pop(), "getActorPriority");
-
- push(a->layer);
+ 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);
}