Prev: 39682 Up: Map Next: 39758
39714: Move Magic Knight one room to the left if possible
Used by the routine at 39668.
Input
A (Entry at 39746 only) Magic Knight's new x-coordinate (pixels)
39714 LD A,(23702) If Magic Knight's current room is not 2 (Outdoors, 1, Bearwoolf's Cave)...
39717 CP 2 ...
39719 JR NZ,39736 ...then skip ahead to 39736
39721 LD A,(23465) If current progress through cave is 4...
39724 CP 4 ...
39726 JR Z,39736 ...then skip ahead to 39736
39728 INC A Increase current progress through cave by one...
39729 LD (23465),A ...
39732 LD A,228 Load A with Magic Knight's new x-coordinate when he arrives in new room (228 is near right-hand side of room)
39734 JR 39746 Skip ahead to 39746 (move Magic Knight back to other side of the room)
39736 LD DE,0 Set DE to zero (dealing with current room's left exit)
39739 LD A,228 Load A with Magic Knight's new x-coordinate when he arrives in new room (228 is near right-hand side of room)
39741 CALL 39682 Change Magic Knight's current room (if possible) based upon left exit of his current room
39744 JR Z,39752 If Magic Knight can't leave his current room then jump to 39752
This entry point is used by the routine at 39758.
39746 LD (24840),A Set Magic Knight's x-coordinate
39749 JP 38844 Draw Magic Knight's current room, draw objects and characters and initialise room-specific data and return
39752 LD A,1 Set Magic Knight's temporary-movement flags to 1 (Magic Knight can't move left because he can't leave his current room)...
39754 LD (23451),A ...
39757 RET Return
Prev: 39682 Up: Map Next: 39758