Prev: 53841 Up: Map Next: 53982
53933: Run Crumbling Block
The handler of the object types 136 to 139, which are the stages of a block that crumbles away. Each time that the player or a block of type 91 lands on it, it changes to the next type, which has the next sprite, and after the last it is erased.
Input
IX Object record
Crumble one stage when something lands on the block.
RunCrumblingBlock 53933 CALL SetSpriteOffset_Minus16_Minus8 Call SetSpriteOffset_Minus16_Minus8 to set the offsets of the sprite.
53936 LD (IX+11),0 Set the speed along z to zero.
53940 CALL ApplyGravityAndMove_Move Call ApplyGravityAndMove_Move to move the block, without gravity.
53943 BIT 7,(IX+23) Return if nothing has landed on the block.
53947 RET Z
53948 RES 7,(IX+23) Clear the flag for something having landed on the block.
53952 BIT 3,(IX+13) Return if there is nothing on the block.
53956 RET Z
53957 RES 3,(IX+13) Clear the flag for something being on the block.
53961 LD A,(IX+0) Fetch the type of the block.
53964 CP 139 Jump to RunCrumblingBlock_Erase if it is the last of the types.
53966 JR Z,RunCrumblingBlock_Erase
53968 INC A Move on to the next type.
53969 LD (IX+0),A Set the type.
53972 JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags to flag the block as moved.
Erase the last stage of the block.
RunCrumblingBlock_Erase 53975 LD (IX+0),1 Change the block to the type 1, which makes DrawObject erase it.
53979 JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags to flag the block as moved.
Prev: 53841 Up: Map Next: 53982