BBE7: Move cursor on screen depending on direction key pressed
move_cursor |
BBE7 |
PUSH HL |
|
BBE8 |
PUSH DE |
|
BBE9 |
LD A,$08 |
|
BBEB |
LD ($5C6A),A |
|
BBEE |
PUSH BC |
|
BBEF |
LD A,(computer_player_flag) |
|
BBF2 |
OR A |
|
BBF3 |
JP NZ,routine70 |
|
BBF6 |
CALL $02BF |
move_cursor_0 |
BBF9 |
POP BC |
|
BBFA |
LD (unknown31),A |
|
BBFD |
CP $57 |
|
BBFF |
JR NZ,not_W_pressed |
|
BC01 |
LD A,$02 |
|
BC03 |
LD (movement_x2),A |
|
BC06 |
CALL cursor_up |
not_W_pressed |
BC09 |
CP $58 |
|
BC0B |
JR NZ,not_X_pressed |
|
BC0D |
LD A,$02 |
|
BC0F |
LD (movement_x2),A |
|
BC12 |
CALL cursor_down |
not_X_pressed |
BC15 |
CP $41 |
|
BC17 |
JR NZ,not_A_pressed |
|
BC19 |
LD A,$02 |
|
BC1B |
LD (movement_x2),A |
|
BC1E |
CALL cursor_left |
not_A_pressed |
BC21 |
CP $44 |
|
BC23 |
JR NZ,not_D_pressed |
|
BC25 |
LD A,$02 |
|
BC27 |
LD (movement_x2),A |
|
BC2A |
CALL cursor_right |
not_D_pressed |
BC2D |
CP $51 |
|
BC2F |
JR NZ,not_Q_pressed |
|
BC31 |
LD A,$03 |
|
BC33 |
LD (movement_x2),A |
|
BC36 |
CALL cursor_left |
|
BC39 |
CALL cursor_up |
not_Q_pressed |
BC3C |
CP $45 |
|
BC3E |
JR NZ,not_E_pressed |
|
BC40 |
LD A,$03 |
|
BC42 |
LD (movement_x2),A |
|
BC45 |
CALL cursor_right |
|
BC48 |
CALL cursor_up |
not_E_pressed |
BC4B |
CP $5A |
|
BC4D |
JR NZ,not_Z_pressed |
|
BC4F |
LD A,$03 |
|
BC51 |
LD (movement_x2),A |
|
BC54 |
CALL cursor_down |
|
BC57 |
CALL cursor_left |
not_Z_pressed |
BC5A |
CP $43 |
|
BC5C |
JR NZ,not_C_pressed |
|
BC5E |
LD A,$03 |
|
BC60 |
LD (movement_x2),A |
|
BC63 |
CALL cursor_right |
|
BC66 |
CALL cursor_down |
not_C_pressed |
BC69 |
POP DE |
|
BC6A |
POP HL |
|
BC6B |
RET |