Added flags to actor struct
authorLukas Krickl <lukas@krickl.dev>
Thu, 8 May 2025 06:56:01 +0000 (08:56 +0200)
committerLukas Krickl <lukas@krickl.dev>
Thu, 8 May 2025 06:56:01 +0000 (08:56 +0200)
src/defs.s
src/macros.inc
src/unit.s

index dee341bc288c75c31fbe81f13f984a48f626bbc7..86302e71152fe681d2c9abaed2915e656b5e4805 100644 (file)
@@ -77,6 +77,7 @@
   ; copy of current state
 .de act_state, st_size
 .de act_type, 1
+.de act_flags, 1
   ; stats
 .de act_hp, stat_size
 .de act_atk, stat_size
index 5193ce540de7202195a3b33c7ba1ce8b3c4d260e..0b7397268e67262a41f312cd65ef1cfb43fae726 100644 (file)
   ; st_def and act_def
   ; inputs:
   ;   $1 type
-  ;   $2 hp
-  ;   $3 atk
-  ;   $4 shiled
-  ;   $5 moves
-  ;   $6 initiative
-  ;   $7 y pos
-  ;   $8 x pos
-  ;   $9 custom p0 value
+  ;   $2 flags
+  ;   $3 hp
+  ;   $4 atk
+  ;   $5 shiled
+  ;   $6 moves
+  ;   $7 initiative
+  ;   $8 y pos
+  ;   $9 x pos
+  ;   $10 custom p0 value
 #macro act_def
   .db $1 ; type
-  .db $2, $2 ; hp hp max
-  .db $3, $3 ; atk atk max
-  .db $4, $4 ; shiled shield max
-  .db $5, $5 ; moves moves max
-  .db $6 ; initiative
-  .db $7 ; y pos
-  .db $8 ; x pos
-  .db $9 ; p0
+  .db $2 ; flags
+  .db $3, $3 ; hp hp max
+  .db $4, $4 ; atk atk max
+  .db $5, $5 ; shiled shield max
+  .db $6, $6 ; moves moves max
+  .db $7 ; initiative
+  .db $8 ; y pos
+  .db $9 ; x pos
+  .db $10 ; p0
 #endmacro
 
   ; loads NULL into a 16 bit register
index 41ffee939476658cb780b54eb40ba2a44bd58049..fa4581570eea8fe4252d1bdc8e220259a42d3bde 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, 2, 2, 0 
+  act_def ACT_T_DEMO_1, 0, 1, 1, 1, 1, 1, 2, 2, 0