Prev: 52954 Up: Map Next: 53012
52957: Run Slider Y
The handler of the object type 88, which is a block that goes backwards and forwards along y, in the same way as RunSliderX does along x.
Input
IX Object record
RunSliderY 52957 CALL SetSpriteOffset_Minus16_Minus8 Call SetSpriteOffset_Minus16_Minus8 to set the offsets of the sprite.
52960 XOR A Set the speeds along x and z to zero.
52961 LD (IX+9),A
52964 LD (IX+11),A
Go towards the end of the run, or turn around if the block is stopped.
52967 BIT 0,(IX+16) Jump to RunSliderY_Start if the block is going to the start.
52971 JR Z,RunSliderY_Start
52973 LD (IX+10),2 Set the speed along y to 2.
52977 CALL ApplyGravityAndMove_Move Call ApplyGravityAndMove_Move to move the block, without gravity.
52980 BIT 1,(IX+12) Jump to RunSliderY_Finish if the block was not stopped along y.
52984 JR Z,RunSliderY_Finish
52986 RES 0,(IX+16) Make the block go to the start.
RunSliderY_Finish 52990 JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags to flag the block as moved.
Go towards the start of the run.
RunSliderY_Start 52993 LD (IX+10),254 Set the speed along y to 254.
52997 CALL ApplyGravityAndMove_Move Call ApplyGravityAndMove_Move to move the block, without gravity.
53000 BIT 1,(IX+12) Jump to RunSliderY_Finish if the block was not stopped along y.
53004 JR Z,RunSliderY_Finish
53006 SET 0,(IX+16) Make the block go to the end.
53010 JR RunSliderY_Finish Jump to RunSliderY_Finish to finish.
Prev: 52954 Up: Map Next: 53012