diff options
author | Max Horn | 2003-05-29 01:27:16 +0000 |
---|---|---|
committer | Max Horn | 2003-05-29 01:27:16 +0000 |
commit | 3da16e64044c7e6f52631ce75baf66993c2eb6fc (patch) | |
tree | 8c9382c29d06124baa0c5c118f9c518537cc8ae0 | |
parent | 1c3b7dc883628f9c37f59949b00102e5f7a48b69 (diff) | |
download | scummvm-rg350-3da16e64044c7e6f52631ce75baf66993c2eb6fc.tar.gz scummvm-rg350-3da16e64044c7e6f52631ce75baf66993c2eb6fc.tar.bz2 scummvm-rg350-3da16e64044c7e6f52631ce75baf66993c2eb6fc.zip |
cleanup
svn-id: r8072
-rw-r--r-- | scumm/akos.cpp | 63 | ||||
-rw-r--r-- | scumm/costume.cpp | 10 | ||||
-rw-r--r-- | scumm/costume.h | 2 |
3 files changed, 18 insertions, 57 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index ce6f4e9f92..7fc761a35f 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -882,28 +882,22 @@ byte AkosRenderer::codec1() { void AkosRenderer::codec1_ignorePakCols(int num) { int n; - byte repcolor; - byte replen; - const byte *src; n = _height; if (num > 1) n *= num; - src = srcptr; do { - repcolor = *src++; - replen = repcolor & v1.mask; - if (replen == 0) { - replen = *src++; + v1.repcolor = *srcptr++; + v1.replen = v1.repcolor & v1.mask; + if (v1.replen == 0) { + v1.replen = *srcptr++; } do { if (!--n) { - v1.repcolor = repcolor >> v1.shr; - v1.replen = replen; - srcptr = src; + v1.repcolor >>= v1.shr; return; } - } while (--replen); + } while (--v1.replen); } while (1); } @@ -1056,51 +1050,18 @@ void AkosRenderer::akos16PutOnScreen(byte *dest, const byte *src, byte transpare akos16.bits >>= (n); -void AkosRenderer::akos16SkipData(int32 numskip) { - uint16 bits, tmp_bits; - - while (numskip != 0) { - if (akos16.unk5 == 0) { - AKOS16_FILL_BITS() - bits = akos16.bits & 3; - if (bits & 1) { - AKOS16_EAT_BITS(2) - if (bits & 2) { - tmp_bits = akos16.bits & 7; - AKOS16_EAT_BITS(3) - if (tmp_bits != 4) { - akos16.color += (tmp_bits - 4); - } else { - akos16.unk5 = 1; - AKOS16_FILL_BITS() - akos16.unk6 = (akos16.bits & 0xff) - 1; - AKOS16_EAT_BITS(8) - AKOS16_FILL_BITS() - } - } else { - AKOS16_FILL_BITS() - akos16.color = ((byte)akos16.bits) & akos16.mask; - AKOS16_EAT_BITS(akos16.shift) - AKOS16_FILL_BITS() - } - } else { - AKOS16_EAT_BITS(1); - } - } else { - if (--akos16.unk6 == 0) { - akos16.unk5 = 0; - } - } - numskip--; - } +void AkosRenderer::akos16SkipData(int32 numbytes) { + akos16DecodeLine(0, numbytes, 0); } void AkosRenderer::akos16DecodeLine(byte *buf, int32 numbytes, int32 dir) { uint16 bits, tmp_bits; while (numbytes != 0) { - *buf = akos16.color; - buf += dir; + if (buf) { + *buf = akos16.color; + buf += dir; + } if (akos16.unk5 == 0) { AKOS16_FILL_BITS() diff --git a/scumm/costume.cpp b/scumm/costume.cpp index c6603d5cce..f807037ef0 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -28,12 +28,12 @@ const byte revBitMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; -void CostumeRenderer::ignorePakCols(int a) { +void CostumeRenderer::ignorePakCols(int num) { int n; n = _height; - if (a > 1) - n *= a; + if (num > 1) + n *= num; do { _repcolor = *_srcptr++; @@ -77,7 +77,7 @@ const byte cost_scaleTable[256] = { 238, 30, 158, 94, 222, 62, 190, 126, 254 }; -byte CostumeRenderer::mainRoutine(int slot, int frame) { +byte CostumeRenderer::mainRoutine() { int xmove, ymove, i, s; byte drawFlag = 1; uint scal; @@ -503,7 +503,7 @@ byte CostumeRenderer::drawLimb(const CostumeData &cost, int limb) { if (code != 0x7B) { if (!(_vm->_features & GF_OLD256) || code < 0x79) - return mainRoutine(limb, code); + return mainRoutine(); } return 0; diff --git a/scumm/costume.h b/scumm/costume.h index c0e305f86c..6257b15d95 100644 --- a/scumm/costume.h +++ b/scumm/costume.h @@ -85,7 +85,7 @@ protected: void proc3(); void proc3_ami(); - byte mainRoutine(int limb, int frame); + byte mainRoutine(); void ignorePakCols(int num); }; |