#define PLAYER_TARGET_CURSOR 0x86
+ ; sets player target positon
+ ; inputs:
+ ; $1: inc/dec for y position (e.g. 0, 1, -1)
+ ; $2: inc/dec for x position (e.g. 0, 1, -1)
+#macro _player_set_target
+ ld a, [player+act_pos_y]
+ add a, $1 & 0xFF
+ ld [player_target_y], a
+
+ ld a, [player+act_pos_x]
+ add a, $2 & 0xFF
+ ld [player_target_x], a
+#endmacro
+
; sets up the player actor
player_init:
ld a, 2
ld [player+act_hp], a
ld a, c
ld [player+act_hp+1], a
-
+
+ _player_set_target -1, 0
ret
ret
- ; sets player target positon
- ; inputs:
- ; $1: inc/dec for y position (e.g. 0, 1, -1)
- ; $2: inc/dec for x position (e.g. 0, 1, -1)
-#macro _player_set_target
- ld a, [player+act_pos_y]
- add a, $1 & 0xFF
- ld [player_target_y], a
-
- ld a, [player+act_pos_x]
- add a, $2 & 0xFF
- ld [player_target_x], a
-#endmacro
; player attack call
player_attack: