[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.98,1.99 costume.h,1.22,1.23
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Aug 17 09:54:01 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv26645
Modified Files:
costume.cpp costume.h
Log Message:
Enabled the v1 costume palette tables Kirben and Hoenicke added earlier.
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- costume.cpp 17 Aug 2003 12:13:17 -0000 1.98
+++ costume.cpp 17 Aug 2003 16:53:00 -0000 1.99
@@ -268,9 +268,11 @@
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 @@
}
}
-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 @@
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;
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- costume.h 8 Jul 2003 16:31:01 -0000 1.22
+++ costume.h 17 Aug 2003 16:53:00 -0000 1.23
@@ -72,7 +72,7 @@
void proc3();
void proc3_ami();
- void procC64();
+ void procC64(int actor);
void c64_ignorePakCols(int num);
byte mainRoutine(int xmoveCur, int ymoveCur);
More information about the Scummvm-git-logs
mailing list