diff options
author | Max Horn | 2003-07-08 10:49:13 +0000 |
---|---|---|
committer | Max Horn | 2003-07-08 10:49:13 +0000 |
commit | 07bd98b27f4c7e9968ec225863cded3bd8bda6e8 (patch) | |
tree | c9d22d8e201cc4d211ea257c111b0d2c2f2ed907 /scumm | |
parent | 7b017fcf7c9d81c3599226310b63b6bc2be85d70 (diff) | |
download | scummvm-rg350-07bd98b27f4c7e9968ec225863cded3bd8bda6e8.tar.gz scummvm-rg350-07bd98b27f4c7e9968ec225863cded3bd8bda6e8.tar.bz2 scummvm-rg350-07bd98b27f4c7e9968ec225863cded3bd8bda6e8.zip |
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)
svn-id: r8852
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/base-costume.cpp | 21 | ||||
-rw-r--r-- | scumm/base-costume.h | 1 | ||||
-rw-r--r-- | scumm/costume.cpp | 35 | ||||
-rw-r--r-- | scumm/costume.h | 5 |
4 files changed, 35 insertions, 27 deletions
diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp index 0216a4ff41..8ca30709f9 100644 --- a/scumm/base-costume.cpp +++ b/scumm/base-costume.cpp @@ -60,24 +60,3 @@ void BaseCostumeRenderer::codec1_ignorePakCols(int num) { } 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); -} - diff --git a/scumm/base-costume.h b/scumm/base-costume.h index feddcb8a3c..391b592439 100644 --- a/scumm/base-costume.h +++ b/scumm/base-costume.h @@ -128,7 +128,6 @@ protected: virtual byte drawLimb(const CostumeData &cost, int limb) = 0; void codec1_ignorePakCols(int num); - void V1_ignorePakCols(int num); }; #endif diff --git a/scumm/costume.cpp b/scumm/costume.cpp index be66fb5f21..b040a1a5e4 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -207,7 +207,7 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { 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 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { 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 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { 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 @@ void Scumm::cost_decodeData(Actor *a, int frame, uint usemask) { 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; diff --git a/scumm/costume.h b/scumm/costume.h index e2cce8ab72..a870af435e 100644 --- a/scumm/costume.h +++ b/scumm/costume.h @@ -62,8 +62,11 @@ protected: 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); }; |