[Scummvm-cvs-logs] SF.net SVN: scummvm: [26584] scummvm/trunk/engines/parallaction/disk.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Apr 23 23:16:14 CEST 2007
Revision: 26584
http://scummvm.svn.sourceforge.net/scummvm/?rev=26584&view=rev
Author: peres001
Date: 2007-04-23 14:16:13 -0700 (Mon, 23 Apr 2007)
Log Message:
-----------
Improvements on background masking in Amiga versions (not yet perfect, though),
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.cpp
Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp 2007-04-23 18:39:45 UTC (rev 26583)
+++ scummvm/trunk/engines/parallaction/disk.cpp 2007-04-23 21:16:13 UTC (rev 26584)
@@ -985,8 +985,8 @@
// 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 @@
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);
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