MM: Walk behind mask char data
|Reported by:||(none)||Owned by:||fingolfin|
Nothing serious I hope and feel guilty about posting it really. I was mucking around with the LFL files for the V1 Maniac Mansion with the help of the documentation on Lucas Hacks. The document stops short at explaining how the Walk behind mask char data is stored (compressed, how big etc) so anyway I had a look at the
void GdiV1::roomChanged(byte *roomptr) method in gfx.cpp and in particular the line
decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 18) + 2, _C64.maskChar, READ_LE_UINT16(roomptr + READ_LE_UINT16(roomptr + 18)));
My code is as below
// Mask Char Map (not sure that this works, sizes don't seem to match up)
offset = (fileData & 0xFF)<<8; offset |= fileData & 0xFF;
int size = (fileData[offset+1] & 0xFF)<<8; size |= (fileData[offset] & 0xFF); size -= 8; // MANIAC MANSION V1/DOS
byte maskChar = new byte[size];
Decompress.decompress(fileData, offset+2, maskChar);
The decompress method does the same job as decode C64Gfx.
The sizes of the Walk behind char map regions in the LFL files I have are stated as being 8 bytes larger than they actually are. Nothing serious but in Java that causes and ArrayOutOfBounds exception.
That's it. The only other thing to note is that I got the LFL files by way of the Macintosh version of DOTT.
Ticket imported from: #1837375. Ticket imported from: bugs/3458.