Prev: B2B0 Up: Map Next: B2D9
B2B6: Handle Falling Block
The handler for a block which falls when something stands on it (object 2C). It falls by one step on each frame that something is standing on it, and makes a sound unless it has landed.
Input
IX The address of the object
Fall if something is standing on the block.
HandleFallingBlock B2B6 CALL SetPixelAdjustments Call SetPixelAdjustments.
B2B9 BIT 3,(IX+$0D) Test bit 3 of the state.
B2BD RES 3,(IX+$0D) Reset bit 3 of the state.
B2C1 RET Z Return if nothing was standing on the block.
B2C2 LD (IX+$0B),$00 Write 00 as the speed along the z axis.
B2C6 CALL ApplyGravityAndMove Call ApplyGravityAndMove.
B2C9 LD (IX+$0B),$00 Write 00 as the speed along the z axis.
B2CD BIT 2,(IX+$0C) Jump to HandleFallingBlock_Redraw if the block has landed.
B2D1 JR NZ,HandleFallingBlock_Redraw
B2D3 CALL PlaySoundFromHeight Call PlaySoundFromHeight.
HandleFallingBlock_Redraw B2D6 JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags.
Prev: B2B0 Up: Map Next: B2D9