![]() |
Routines |
| Prev: CD87 | Up: Map | Next: CDBB |
|
The handler of the object type 4E, 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.
|
||||||||
|
Sink one step while something is pushing down.
|
||||||||
| RunSinkingBlock | CDA0 | CALL SetSpriteOffset_Minus16_Minus8 | Call SetSpriteOffset_Minus16_Minus8 to set the offsets of the sprite. | |||||
| CDA3 | LD (IX+$09),$00 | Set the speed along x to zero. | ||||||
| CDA7 | LD (IX+$0A),$00 | Set the speed along y to zero. | ||||||
| CDAB | LD A,(IX+$0B) | Fetch the speed along z. | ||||||
| CDAE | AND A | Jump to RunSinkingBlock_Move if there is none. | ||||||
| CDAF | JR Z,RunSinkingBlock_Move | |||||||
| CDB1 | LD A,$FF | Set the speed along z to FF. | ||||||
| CDB3 | LD (IX+$0B),A | |||||||
| RunSinkingBlock_Move | CDB6 | CALL ApplyGravityAndMove_Move | Call ApplyGravityAndMove_Move to move the block, without gravity. | |||||
| CDB9 | JR FinishObjectMove | Jump to FinishObjectMove to finish. | ||||||
| Prev: CD87 | Up: Map | Next: CDBB |