aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/disk_br.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-07-31 14:20:51 +0000
committerNicola Mettifogo2008-07-31 14:20:51 +0000
commit0679889d98ef00275c7c726147b3bc54cbefdca6 (patch)
tree13c0091a7539af83691bb2e2c6a47243eb51ff42 /engines/parallaction/disk_br.cpp
parentb79f069c58fb8f90562b1ddacd52046b0d1d24be (diff)
downloadscummvm-rg350-0679889d98ef00275c7c726147b3bc54cbefdca6.tar.gz
scummvm-rg350-0679889d98ef00275c7c726147b3bc54cbefdca6.tar.bz2
scummvm-rg350-0679889d98ef00275c7c726147b3bc54cbefdca6.zip
Disabled masks in BRA Amiga, because the decoding is not known yet.
svn-id: r33473
Diffstat (limited to 'engines/parallaction/disk_br.cpp')
-rw-r--r--engines/parallaction/disk_br.cpp57
1 files changed, 7 insertions, 50 deletions
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 2285c5608e..cd57ec8822 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -510,33 +510,6 @@ AmigaDisk_br::~AmigaDisk_br() {
}
-/*
- FIXME: mask values are not computed correctly for level 1 and 2
-
- NOTE: this routine is only able to build masks for Nippon Safes, since mask widths are hardcoded
- into the main loop.
-*/
-void buildMask2(byte* buf) {
-
- byte mask1[16] = { 0, 0x80, 0x20, 0xA0, 8, 0x88, 0x28, 0xA8, 2, 0x82, 0x22, 0xA2, 0xA, 0x8A, 0x2A, 0xAA };
- byte mask0[16] = { 0, 0x40, 0x10, 0x50, 4, 0x44, 0x14, 0x54, 1, 0x41, 0x11, 0x51, 0x5, 0x45, 0x15, 0x55 };
-
- byte plane0[40];
- byte plane1[40];
-
- for (int32 i = 0; i < _vm->_screenHeight; i++) {
-
- memcpy(plane0, buf, 40);
- memcpy(plane1, buf+40, 40);
-
- for (uint32 j = 0; j < 40; j++) {
- *buf++ = mask0[(plane0[j] & 0xF0) >> 4] | mask1[(plane1[j] & 0xF0) >> 4];
- *buf++ = mask0[plane0[j] & 0xF] | mask1[plane1[j] & 0xF];
- }
-
- }
-}
-
void AmigaDisk_br::loadBackground(BackgroundInfo& info, Common::SeekableReadStream &stream) {
byte *pal;
@@ -565,27 +538,6 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, Common::SeekableReadStre
return;
}
-void AmigaDisk_br::loadMask(BackgroundInfo& info, Common::SeekableReadStream &stream) {
- stream.seek(0x30, SEEK_SET);
-
- byte r, g, b;
- for (uint i = 0; i < 4; i++) {
- r = stream.readByte();
- g = stream.readByte();
- b = stream.readByte();
-
- info.layers[i] = (((r << 4) & 0xF00) | (g & 0xF0) | (b >> 4)) & 0xFF;
- }
-
- stream.seek(0x126, SEEK_SET); // HACK: skipping IFF/ILBM header should be done by analysis, not magic
- Graphics::PackBitsReadStream unpackedStream(stream);
-
- info.mask.create(info.width, info.height);
- unpackedStream.read(info.mask.data, info.mask.size);
- buildMask2(info.mask.data);
-
- return;
-}
void AmigaDisk_br::loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path) {
debugC(1, kDebugDisk, "AmigaDisk_br::loadScenery '%s', '%s' '%s'", name, mask, path);
@@ -608,7 +560,7 @@ void AmigaDisk_br::loadScenery(BackgroundInfo& info, const char* name, const cha
loadBackground(info, stream);
stream.close();
}
-
+#if 0
if (mask && _mskDir.exists()) {
filepath = Common::String(mask) + ".msk";
node = _mskDir.getChild(filepath);
@@ -619,11 +571,16 @@ void AmigaDisk_br::loadScenery(BackgroundInfo& info, const char* name, const cha
if (node.exists()) {
stream.open(node);
+ stream.seek(0x30, SEEK_SET);
+ Graphics::PackBitsReadStream unpackedStream(stream);
+ info.mask.create(info.width, info.height);
+ unpackedStream.read(info.mask.data, info.mask.size);
+ // TODO: there is another step to do after decompression...
loadMask(info, stream);
stream.close();
}
}
-
+#endif
if (path && _pthDir.exists()) {
filepath = Common::String(path) + ".pth";
node = _pthDir.getChild(filepath);