[Scummvm-cvs-logs] SF.net SVN: scummvm:[33473] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Thu Jul 31 16:20:53 CEST 2008
Revision: 33473
http://scummvm.svn.sourceforge.net/scummvm/?rev=33473&view=rev
Author: peres001
Date: 2008-07-31 14:20:51 +0000 (Thu, 31 Jul 2008)
Log Message:
-----------
Disabled masks in BRA Amiga, because the decoding is not known yet.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.h
scummvm/trunk/engines/parallaction/disk_br.cpp
Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h 2008-07-31 13:46:55 UTC (rev 33472)
+++ scummvm/trunk/engines/parallaction/disk.h 2008-07-31 14:20:51 UTC (rev 33473)
@@ -267,7 +267,6 @@
Sprites* createSprites(Common::ReadStream &stream);
Font *createFont(const char *name, Common::SeekableReadStream &stream);
- void loadMask(BackgroundInfo& info, Common::SeekableReadStream &stream);
void loadBackground(BackgroundInfo& info, Common::SeekableReadStream &stream);
FilesystemNode _baseBkgDir;
Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-31 13:46:55 UTC (rev 33472)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-31 14:20:51 UTC (rev 33473)
@@ -510,33 +510,6 @@
}
-/*
- 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,28 +538,7 @@
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 @@
loadBackground(info, stream);
stream.close();
}
-
+#if 0
if (mask && _mskDir.exists()) {
filepath = Common::String(mask) + ".msk";
node = _mskDir.getChild(filepath);
@@ -619,11 +571,16 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list