From e012415b7bdadc6be04881d09735ef5d6800c4ab Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Thu, 8 May 2025 08:56:01 +0200 Subject: [PATCH] Added flags to actor struct --- src/defs.s | 1 + src/macros.inc | 34 ++++++++++++++++++---------------- src/unit.s | 2 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/defs.s b/src/defs.s index dee341b..86302e7 100644 --- a/src/defs.s +++ b/src/defs.s @@ -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 diff --git a/src/macros.inc b/src/macros.inc index 5193ce5..0b73972 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -139,24 +139,26 @@ ; 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 diff --git a/src/unit.s b/src/unit.s index 41ffee9..fa45815 100644 --- a/src/unit.s +++ b/src/unit.s @@ -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 -- 2.30.2