Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 7197
Author: ian.rushforth
Date: 11/05/2018
Subject: Re: fast-crumbling floors
Sendy wrote:
> can someone tell me the properties for a succesfull, non ghost-leaving crumbling floor?
i will of
> course experiment myself, but if someone points it out to me i might get it done quicker :)
Over at jswmm.co.uk 'Norman Sword' (aka Derrick P Rowland, I think) has come up with a method of resolving the fast-crumbling, ghost-leaving crumblies. It involves using the OR command in a loop, to check that all eight pixel-rows have been cleared before changing the colour-attribute of the block to that of air.
I have also used a similar approach to fix another, hitherto-undocumented bug which I have recently discovered, namely that if the top half of the opening wall in one of the Kong caverns has a blank pixel-row, then it can prevent the bottom half of the opening wall from being completely cleared of pixels - the two cells occupied by the opening wall do turn to air (as far as their attribute is concerned), but a 'ghost' is left in the bottom of the two air cells, and the remaining pixels are promptly crashed into by the horizontal guardian whose rightmost boundary is altered to allow it to pass through the gap created by the opening wall - with a fatal outcome for Willy!
The solution to this bug (similar to Norman Sword's fix) involves OR'ing each pixel-row of the top half of the wall with its 'opposite number' from the bottom half. e.g. the graphic byte at #5F71 is paired up with the graphic byte at #5891, etc.
I took a similar approach to #916E-#9173 in the original code to 'pair up' the bytes, but I used both HL and DE to point at each pair of bytes, then copied (DE) to A and did an OR (HL) - the Zero Flag is then set iff both graphic bytes are blank at each pass through the loop.
