+ ; y/x coordinates for target update
+_player_update_target_coords:
+ .db 0, -1
+ .db -1, 0
+ .db 0, 1
+ .db 1, 0
+
+ ; rotates the current target
+player_update_target:
+ ld a, [player_target_index]
+ inc a
+ and a, 3 ; there are only 4 directions
+ ld [player_target_index], a
+
+ add a, a ; *2 to get 2 byte offset
+
+ ld hl, _player_update_target_coords
+ ld d, 0
+ ld e, a
+ add hl, de
+
+ ; y pos
+ ld a, [hl+]
+ ld [player_target_y], a
+ ld a, [hl]
+
+ ; x pos
+ ld [player_target_x], a
+ ret
+
+