Routines |
Prev: F0BF | Up: Map | Next: F104 |
Used by the routine at EFC7.
|
||||
F0C0 | LD A,(IY+$0A) | Get the Y co-ordinate. | ||
F0C3 | CP $98 | Is the player on the floor yet? | ||
F0C5 | RET NZ | Return if so. | ||
F0C6 | CALL $B03C | Check for 'left' and put the result in C. | ||
F0C9 | LD C,A | |||
F0CA | CALL $B00B | Check for 'right' and put the result in B. | ||
F0CD | LD B,A | |||
F0CE | LD A,($F0BF) | Get the next direction control. (F0BF) | ||
F0D1 | OR A | Is it zero? | ||
F0D2 | JR NZ,$F0DB | Jump forward if it isn't. | ||
Player should be moving left.
|
||||
F0D4 | LD A,B | Did the player move right? | ||
F0D5 | OR A | |||
F0D6 | JR NZ,$F0FB | Jump forward to reduce the tick count if so. | ||
F0D8 | LD A,C | Otherwise test for moving left. | ||
F0D9 | JR $F0E0 | |||
Player should be moving right.
|
||||
F0DB | LD A,C | Did the player move left? | ||
F0DC | OR A | |||
F0DD | JR NZ,$F0FB | Jump forward to reduce the tick count if so. | ||
F0DF | LD A,B | Otherwise test for moving right. | ||
F0E0 | OR A | Did the player move in the correct direction? | ||
F0E1 | JR Z,$F0FB | If not, skip forward to reducing the frame count. | ||
The character moved in the right way, so move them forward.
|
||||
F0E3 | LD A,$05 | Set the number of ticks left (F0BE) to 5. | ||
F0E5 | LD ($F0BE),A | |||
F0E8 | LD A,($F0BF) | Invert the direction flag. | ||
F0EB | XOR $01 | |||
F0ED | LD ($F0BF),A | |||
F0F0 | LD (IY+$3C),$FF | Set the direction to left. | ||
F0F4 | LD (IY+$41),$FF | |||
F0F8 | JP $B288 | Move the character. | ||
Move forward one frame.
|
||||
F0FB | LD HL,$F0BE | Point HL at the tick count. (F0BE) | ||
F0FE | LD A,(HL) | Get the value in A. | ||
F0FF | OR A | Is it zero? | ||
F100 | RET Z | Return if it is. | ||
F101 | DEC (HL) | Otherwise, reduce the tick count and move. | ||
F102 | JR $F0F0 |
Prev: F0BF | Up: Map | Next: F104 |