Prev: 88F5 Up: Map Next: 8914
8900: Move a position one cell in a direction
Used by the routines at SCROLL_VIEW, MOVE_OBJECT and FOLLOW_PLAYER.
Input
A The direction (only bits 0-1 count)
HL The position: L is x, H is y
STEP 8900 AND $03
8902 JR Z,STEP_2
8904 CP $01
8906 JR Z,STEP_1
8908 CP $02
890A JR Z,STEP_0
890C DEC L 3: x down.
890D RET
STEP_0 890E DEC H 2: y down.
890F RET
STEP_1 8910 INC L 1: x up.
8911 RET
STEP_2 8912 INC H 0: y up.
8913 RET
Prev: 88F5 Up: Map Next: 8914