Prev: 40523 Up: Map Next: 40546
40527: Room-specific routine: Set Magic Knight's x-velocity to -2 if his y-coordinate is 136
Used by the routine at 40190.
40527 LD A,254 Load A with -2
This entry point is used by the routine at 40523.
40529 LD (40539),A Prepare to set Magic Knight's x-velocity to A
40532 LD A,(24841) If Magic Knight's current y-coordinate (pixels) is not 136...
40535 CP 136 ...
40537 RET NZ ...then return
This entry point is used by the routine at 40489.
The operand of the instruction at 40538 represents the x-velocity given to Magic Knight due to a conveyor-belt-like force. This is modified by the instructions at 40512 and 40529.
40538 LD A,0 Load A with new x-velocity...
40540 LD (24844),A ...and set this as Magic Knight's x-velocity
40543 JP 61816 Set redraw-Magic-Knight-on-next-interrupt flag, wait for interrupt and return
Prev: 40523 Up: Map Next: 40546