From: Lukas Krickl Date: Wed, 7 May 2025 18:17:35 +0000 (+0200) Subject: actors: Added tile position to actor def X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=63978a4fa6fbd3a2658b3ceb824dc1eb2d9f2789;p=gbrg%2F.git actors: Added tile position to actor def --- diff --git a/src/defs.s b/src/defs.s index e7fccab..dee341b 100644 --- a/src/defs.s +++ b/src/defs.s @@ -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 diff --git a/src/macros.inc b/src/macros.inc index 7858fa2..5193ce5 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -144,7 +144,9 @@ ; $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 @@ -152,7 +154,9 @@ .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 diff --git a/src/unit.s b/src/unit.s index 82bf1dd..41ffee9 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, 0 + act_def ACT_T_DEMO_1, 1, 1, 1, 1, 1, 2, 2, 0