DIG: Layering bugfix
|Reported by:||eriktorbjorn||Owned by:||aquadran|
This should fix some - maybe most - of bug #629412
("DIG: Layer problem"). I've only gotten far enough to
see the room with the buried animals, though -- I don't
know about the other problems mentioned.
The problem in that room is that it's made up of five
layers, but gdi._imgBufOffs (which despite its name
is used for storing offsets into the *mask* buffer) has
only four elements. In my case, the fifth one was 0, so
the mask that was meant for the last layer was applied
to the last one.
I'd really like to change the name of this variable,
but that's beyond the scope of the patch.
Note that save/load still thinks that gdi._imgBufOffs
is four elements, since I didn't want to break savegame
compatibility. Since loadState() calls initBGBuffers()
I'm not entirely convinced that the array *has* to be
Ticket imported from: #634326. Ticket imported from: patches/224.