actors: Added tile position to actor def
authorLukas Krickl <lukas@krickl.dev>
Wed, 7 May 2025 18:17:35 +0000 (20:17 +0200)
committerLukas Krickl <lukas@krickl.dev>
Wed, 7 May 2025 18:17:35 +0000 (20:17 +0200)
src/defs.s
src/macros.inc
src/unit.s

index e7fccab4220e436fcd97c70910ace5150827f926..dee341bc288c75c31fbe81f13f984a48f626bbc7 100644 (file)
@@ -84,6 +84,8 @@
 .de act_moves, stat_size ; moves for each turn
 .de act_init, 1 ; initiative value
 
+.de act_pos_y, 1 ; y/x tile position
+.de act_pos_x, 1
   ; custom parameter
 .de act_p0, 1
 .de act_size, 0
index 7858fa2baae6e3a632932b3a9d23287812f7d093..5193ce540de7202195a3b33c7ba1ce8b3c4d260e 100644 (file)
   ;   $4 shiled
   ;   $5 moves
   ;   $6 initiative
-  ;   $7 custom p0 value
+  ;   $7 y pos
+  ;   $8 x pos
+  ;   $9 custom p0 value
 #macro act_def
   .db $1 ; type
   .db $2, $2 ; hp hp max
   .db $4, $4 ; shiled shield max
   .db $5, $5 ; moves moves max
   .db $6 ; initiative
-  .db $7 ; p0
+  .db $7 ; y pos
+  .db $8 ; x pos
+  .db $9 ; p0
 #endmacro
 
   ; loads NULL into a 16 bit register
index 82bf1dd1f55d9ff6d50ae8b95e509e2e629cf5a1..41ffee939476658cb780b54eb40ba2a44bd58049 100644 (file)
@@ -46,4 +46,4 @@ unit_demo_1_update:
 
 unit_demo_1:
   st_def 0x00, unit_demo_1_update, unit_demo_1 
-  act_def ACT_T_DEMO_1, 1, 1, 1, 1, 1, 0 
+  act_def ACT_T_DEMO_1, 1, 1, 1, 1, 1, 2, 2,