Prev: 52615 Up: Map Next: 52667
52640: Run Sinking Block
The handler of the object type 78, which is a block that sinks while something is standing on it. It does not move at all unless something pushes it down, which gives it a speed along z, and then it goes down by one for each frame.
Input
IX Object record
Sink one step while something is pushing down.
RunSinkingBlock 52640 CALL SetSpriteOffset_Minus16_Minus8 Call SetSpriteOffset_Minus16_Minus8 to set the offsets of the sprite.
52643 LD (IX+9),0 Set the speed along x to zero.
52647 LD (IX+10),0 Set the speed along y to zero.
52651 LD A,(IX+11) Fetch the speed along z.
52654 AND A Jump to RunSinkingBlock_Move if there is none.
52655 JR Z,RunSinkingBlock_Move
52657 LD A,255 Set the speed along z to 255.
52659 LD (IX+11),A
RunSinkingBlock_Move 52662 CALL ApplyGravityAndMove_Move Call ApplyGravityAndMove_Move to move the block, without gravity.
52665 JR FinishObjectMove Jump to FinishObjectMove to finish.
Prev: 52615 Up: Map Next: 52667