[Scummvm-cvs-logs] CVS: scummvm/scumm base-costume.cpp,2.3,2.4 base-costume.h,1.11,1.12 costume.cpp,1.68,1.69 costume.h,1.19,1.20
Max Horn
fingolfin at users.sourceforge.net
Tue Jul 8 03:50:18 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv14786
Modified Files:
base-costume.cpp base-costume.h costume.cpp costume.h
Log Message:
move V1_ignorePakCols to CostumeRenderer (it makes absolutely no sense to keep it in BaseCostumeRenderer), and renamed it to c64_ignorePakCols to avoid confusion (V1 in the context of costumes means the original costume format, as opposed to AKOS; and *not* the scumm version); added FIXME to cost_decodeData (have my doubts about it being correct)
Index: base-costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.cpp,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -d -r2.3 -r2.4
--- base-costume.cpp 5 Jul 2003 11:45:18 -0000 2.3
+++ base-costume.cpp 8 Jul 2003 10:49:13 -0000 2.4
@@ -60,24 +60,3 @@
} while (--v1.replen);
} while (1);
}
-
-// FIXME: Call this something sensible, make sure it works
-void BaseCostumeRenderer::V1_ignorePakCols(int num) {
- int n = _height;
- warning("Attempting V1 column skip. We don't even make it here, yet.");
- if (num > 1)
- n *= num;
-
- do {
- v1.repcolor = *_srcptr >> 4;
- v1.replen = *_srcptr++ & 0x0F;
-
- if (v1.replen == 0)
- v1.replen = *_srcptr++;
-
- do {
- if (!--n) return;
- } while (--v1.replen);
- } while (1);
-}
-
Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- base-costume.h 5 Jul 2003 11:45:17 -0000 1.11
+++ base-costume.h 8 Jul 2003 10:49:13 -0000 1.12
@@ -128,7 +128,6 @@
virtual byte drawLimb(const CostumeData &cost, int limb) = 0;
void codec1_ignorePakCols(int num);
- void V1_ignorePakCols(int num);
};
#endif
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- costume.cpp 7 Jul 2003 15:12:21 -0000 1.68
+++ costume.cpp 8 Jul 2003 10:49:13 -0000 1.69
@@ -207,7 +207,7 @@
v1.skip_width -= skip;
if (_vm->_version == 1)
- V1_ignorePakCols(skip);
+ c64_ignorePakCols(skip);
else
codec1_ignorePakCols(skip);
v1.x = 0;
@@ -226,7 +226,7 @@
v1.skip_width -= skip;
if (_vm->_version == 1)
- V1_ignorePakCols(skip);
+ c64_ignorePakCols(skip);
else
codec1_ignorePakCols(skip);
v1.x = _vm->_screenWidth - 1;
@@ -279,6 +279,26 @@
return drawFlag;
}
+// FIXME: Call this something sensible, make sure it works
+void CostumeRenderer::c64_ignorePakCols(int num) {
+ int n = _height;
+ warning("Attempting C64 column skip. We don't even make it here, yet.");
+ if (num > 1)
+ n *= num;
+
+ do {
+ v1.repcolor = *_srcptr >> 4;
+ v1.replen = *_srcptr++ & 0x0F;
+
+ if (v1.replen == 0)
+ v1.replen = *_srcptr++;
+
+ do {
+ if (!--n) return;
+ } while (--v1.replen);
+ } while (1);
+}
+
void CostumeRenderer::procC64() {
const byte *src;
byte *dst;
@@ -585,10 +605,17 @@
return;
}
- if (_version == 1)
+ if (_version == 1) {
+ // FIXME: lc._numColors is 0 for C64 codec...
+ // Is this code here really correct? If I compare V1 and V2 maniac,
+ // I noticed that for V1, there are 3 bytes / entry (i.e. the offsets
+ // increase in steps of 3), while for V2 there are 10 bytes / entry.
+ // That makes me wonder if the following decoder is correct *at all*
+ // for the C64 data
r = lc._baseptr + READ_LE_UINT16(lc._ptr + anim * 2 + lc._numColors + 30);
- else
+ } else {
r = lc._baseptr + READ_LE_UINT16(lc._ptr + anim * 2 + lc._numColors + 42);
+ }
if (r == lc._baseptr) {
return;
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- costume.h 19 Jun 2003 10:45:21 -0000 1.19
+++ costume.h 8 Jul 2003 10:49:13 -0000 1.20
@@ -62,8 +62,11 @@
byte drawLimb(const CostumeData &cost, int limb);
void proc3();
- void procC64();
void proc3_ami();
+
+ void procC64();
+ void c64_ignorePakCols(int num);
+
byte mainRoutine(int xmoveCur, int ymoveCur);
};
More information about the Scummvm-git-logs
mailing list