aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2008-04-17 09:30:04 +0000
committerNicola Mettifogo2008-04-17 09:30:04 +0000
commitff2dfb6a4ea34389e71ea6ea3afbd4449c333dfa (patch)
tree1009d272dde360515b02fdfbd954b506bf248294 /engines
parent90ae32c97577c573737906e0913b74ae6083abd4 (diff)
downloadscummvm-rg350-ff2dfb6a4ea34389e71ea6ea3afbd4449c333dfa.tar.gz
scummvm-rg350-ff2dfb6a4ea34389e71ea6ea3afbd4449c333dfa.tar.bz2
scummvm-rg350-ff2dfb6a4ea34389e71ea6ea3afbd4449c333dfa.zip
Cleanup of background loading for BRA.
svn-id: r31531
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk.h2
-rw-r--r--engines/parallaction/disk_br.cpp50
2 files changed, 1 insertions, 51 deletions
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) {