From ff2dfb6a4ea34389e71ea6ea3afbd4449c333dfa Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 17 Apr 2008 09:30:04 +0000 Subject: Cleanup of background loading for BRA. svn-id: r31531 --- engines/parallaction/disk.h | 2 -- engines/parallaction/disk_br.cpp | 50 +--------------------------------------- 2 files changed, 1 insertion(+), 51 deletions(-) (limited to 'engines') diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 13bdd2a73f..21ff4aba76 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -240,8 +240,6 @@ protected: BackgroundInfo _backgroundTemp; Sprites* createSprites(const char *name); - void unpackFrame(byte *dst, byte *src, uint16 planeSize); - void unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 bytesPerPlane, uint16 height); Font *createFont(const char *name, Common::SeekableReadStream &stream); void loadMask(BackgroundInfo& info, const char *name); void loadBackground(BackgroundInfo& info, const char *name); diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index fa2658061f..f6cb078835 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -409,49 +409,6 @@ AmigaDisk_br::~AmigaDisk_br() { } -#define NUM_PLANES 5 - -/* - unpackFrame transforms images from 5-bitplanes format to - 8-bit color-index mode -*/ -void AmigaDisk_br::unpackFrame(byte *dst, byte *src, uint16 planeSize) { - - byte s0, s1, s2, s3, s4, mask, t0, t1, t2, t3, t4; - - for (uint32 j = 0; j < planeSize; j++) { - s0 = src[j]; - s1 = src[j+planeSize]; - s2 = src[j+planeSize*2]; - s3 = src[j+planeSize*3]; - s4 = src[j+planeSize*4]; - - for (uint32 k = 0; k < 8; k++) { - mask = 1 << (7 - k); - t0 = (s0 & mask ? 1 << 0 : 0); - t1 = (s1 & mask ? 1 << 1 : 0); - t2 = (s2 & mask ? 1 << 2 : 0); - t3 = (s3 & mask ? 1 << 3 : 0); - t4 = (s4 & mask ? 1 << 4 : 0); - *dst++ = t0 | t1 | t2 | t3 | t4; - } - - } - -} - -// FIXME: no mask is loaded -void AmigaDisk_br::unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 bytesPerPlane, uint16 height) { - uint16 planeSize = bytesPerPlane * height; - - for (uint32 i = 0; i < numFrames; i++) { - unpackFrame(dst, src, planeSize); - src += planeSize * NUM_PLANES; - dst += planeSize * 8; - } -} - -#undef NUM_PLANES /* FIXME: mask values are not computed correctly for level 1 and 2 @@ -552,7 +509,7 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *name) { info.height = info.bg.h; byte *p = pal; - for (i = 0; i < 32; i++) { + for (i = 0; i < 16; i++) { byte r = *p >> 2; p++; byte g = *p >> 2; @@ -564,12 +521,7 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *name) { free(pal); - for (i = 0; i < 6; i++) { - info.setPaletteRange(i, ranges[i]); - } - return; - } void AmigaDisk_br::loadMask(BackgroundInfo& info, const char *name) { -- cgit v1.2.3