diff options
author | Nicola Mettifogo | 2007-04-23 21:16:13 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-04-23 21:16:13 +0000 |
commit | fd08c7278dfeb2365ec13cfbd4a4f652563c0b56 (patch) | |
tree | 15ff7e0e4ee0836edd11fa0632f4c920d3741ddb /engines | |
parent | b60c35e6f131fb0ea1b491f409c2edf3ec8755e4 (diff) | |
download | scummvm-rg350-fd08c7278dfeb2365ec13cfbd4a4f652563c0b56.tar.gz scummvm-rg350-fd08c7278dfeb2365ec13cfbd4a4f652563c0b56.tar.bz2 scummvm-rg350-fd08c7278dfeb2365ec13cfbd4a4f652563c0b56.zip |
Improvements on background masking in Amiga versions (not yet perfect, though),
svn-id: r26584
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/disk.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index d4e5ae1340..b91a95c674 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -985,8 +985,8 @@ void AmigaDisk::loadSlide(const char *name) { // FIXME: mask values are not computed correctly for level 1 and 2 void buildMask(byte* buf) { - byte mask0[16] = { 0, 0x80, 0x20, 0xA0, 8, 0x84, 0x28, 0xA8, 2, 0x82, 0x22, 0xA2, 0xA, 0x8A, 0x2A, 0xAA }; - byte mask1[16] = { 0, 0x40, 0x10, 0x50, 4, 0x42, 0x14, 0x54, 1, 0x41, 0x11, 0x51, 0x5, 0x45, 0x15, 0x55 }; + 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]; @@ -1057,6 +1057,20 @@ void AmigaDisk::loadMask(const char *name) { sprintf(path, "%s.mask", name); Common::SeekableReadStream *s = openArchivedFile(path, true); + s->seek(0x30, SEEK_SET); + + byte r, g, b; + for (uint i = 0; i < 4; i++) { + r = s->readByte(); + g = s->readByte(); + b = s->readByte(); + + _vm->_gfx->_bgLayers[i] = (((r << 4) & 0xF00) | (g & 0xF0) | (b >> 4)) & 0xFF; + +// printf("rgb = (%x, %x, %x) -> %x\n", r, g, b, _vm->_gfx->_bgLayers[i]); + } + + s->seek(0x126, SEEK_SET); // HACK: skipping IFF/ILBM header should be done by analysis, not magic RLEStream stream(s); |