Prev: 46591 Up: Map Next: 46754
46723: Handle Dropping Block
Handles a block that sinks while something is standing on it. The collision routines set the triggered flag of the block (bit 3 of its flags byte) for as long as something rests on it.
Input
IX Address of the block object
HandleDroppingBlock 46723 CALL SetPixelAdjustments_Block Set the pixel adjustments of a block.
Sink while something is standing on the block.
46726 BIT 3,(IX+13) Test whether something is standing on the block.
46730 RET Z Return if nothing is.
46731 RES 3,(IX+13) Reset the triggered flag.
46735 LD (IX+11),0 Clear the speed in Z of the block.
46739 CALL ApplyGravityAndMove Apply gravity to the block and move it.
46742 BIT 2,(IX+12) Jump to HandleDroppingBlock_Draw if the block has hit the floor.
46746 JR NZ,HandleDroppingBlock_Draw
46748 CALL PlaySoundFromHeight Play the sound of a falling object.
HandleDroppingBlock_Draw 46751 JP SetWipeAndDrawFlags Flag the block to be drawn again.
Prev: 46591 Up: Map Next: 46754