mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
Disabled masks in BRA Amiga, because the decoding is not known yet.
svn-id: r33473
This commit is contained in:
parent
b79f069c58
commit
0679889d98
@ -267,7 +267,6 @@ protected:
|
||||
|
||||
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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user