aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-17 16:53:00 +0000
committerTorbjörn Andersson2003-08-17 16:53:00 +0000
commit1bb575da9df8f02fc0246b1e0aad077e995389b2 (patch)
treef6d3ce5498511cbae0b9973b7644b103bf256f85 /scumm
parent711c2b76cecf939942b401e74d5cca932800b60d (diff)
downloadscummvm-rg350-1bb575da9df8f02fc0246b1e0aad077e995389b2.tar.gz
scummvm-rg350-1bb575da9df8f02fc0246b1e0aad077e995389b2.tar.bz2
scummvm-rg350-1bb575da9df8f02fc0246b1e0aad077e995389b2.zip
Enabled the v1 costume palette tables Kirben and Hoenicke added earlier.
svn-id: r9745
Diffstat (limited to 'scumm')
-rw-r--r--scumm/costume.cpp27
-rw-r--r--scumm/costume.h2
2 files changed, 15 insertions, 14 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index 2bfbb43e65..ffb7941b0a 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -268,9 +268,11 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
CHECK_HEAP
- if (_loaded._format == 0x57)
- procC64();
- else if (newAmiCost)
+ if (_loaded._format == 0x57) {
+ // The v1 costume renderer needs the actor number, which is
+ // the same thing as the costume renderer's _dirty_id.
+ procC64(_dirty_id);
+ } else if (newAmiCost)
proc3_ami();
else
proc3();
@@ -319,10 +321,10 @@ void CostumeRenderer::c64_ignorePakCols(int num) {
}
}
-int v1_actor_palatte_1 [] = { 8, 8, 8, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0};
-int v1_actor_palatte_2 [] = { 0, 7, 2, 6, 9, 1, 3, 7, 7, 1, 1, 9, 1, 4, 5, 5, 4, 1, 0, 5, 4, 2, 2, 7, 7, 0};
+int v1_actor_palatte_1 [] = { 8, 8, 8, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0 };
+int v1_actor_palatte_2 [] = { 0, 7, 2, 6, 9, 1, 3, 7, 7, 1, 1, 9, 1, 4, 5, 5, 4, 1, 0, 5, 4, 2, 2, 7, 7, 0 };
-void CostumeRenderer::procC64() {
+void CostumeRenderer::procC64(int actor) {
const byte *src;
byte *dst;
byte len;
@@ -338,15 +340,14 @@ void CostumeRenderer::procC64() {
height = _height;
// TODO:
- // * figure out how to get the right colors/palette
// * test masking (once we implement any masking for V1 games)
- byte palette[4] = { 0, 10, 6, 0 };
- //FIXME We need to know actor number for correct palette
-// palette[0] = 0;
-// palette[1] = v1_actor_palatte_1[actor];
-// palette[2] = v1_actor_palatte_2[actor];
-// palette[3] = 0;
+ byte palette[4];
+
+ palette[0] = 0;
+ palette[1] = v1_actor_palatte_1[actor];
+ palette[2] = v1_actor_palatte_2[actor];
+ palette[3] = 0;
v1.skip_width >>= 3;
diff --git a/scumm/costume.h b/scumm/costume.h
index e15a652fe2..e43320e08f 100644
--- a/scumm/costume.h
+++ b/scumm/costume.h
@@ -72,7 +72,7 @@ protected:
void proc3();
void proc3_ami();
- void procC64();
+ void procC64(int actor);
void c64_ignorePakCols(int num);
byte mainRoutine(int xmoveCur, int ymoveCur);