From 642625498bb44b4748e6ce715576f568837e565d Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 24 May 2025 08:56:43 +0200 Subject: [PATCH] unit: Added tile and oam flags to default actor model --- src/defs.s | 4 +++- src/macros.inc | 4 ++++ src/unit.s | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/defs.s b/src/defs.s index f829003..6456787 100644 --- a/src/defs.s +++ b/src/defs.s @@ -126,7 +126,9 @@ ; de: actor ; returns: ; bc: null -.de act_draw, 2 +.de act_draw, 2 +.de act_oam_tile, 1 +.de act_oam_flags, 1 .de act_size, 0 ; max bge queue size diff --git a/src/macros.inc b/src/macros.inc index c51fcb0..978698a 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -137,8 +137,12 @@ ; defines draw call for actor ; inputs: ; $1: draw call + ; $2: default tiles + ; $3: default oam flags #macro act_def_draw dw $1 + .db $2 + .db $3 #endmacro ; define an actor without state diff --git a/src/unit.s b/src/unit.s index 1ade05d..3bb8bfd 100644 --- a/src/unit.s +++ b/src/unit.s @@ -607,20 +607,20 @@ unit_demo_1: st_def 0x00, unit_demo_1_init, st_unit_idle act_def ACT_T_DEMO_1, 0, 1, 2, 3, 4, 6, 2, 2, 0 act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle - act_def_draw unit_demo_1_draw + act_def_draw unit_demo_1_draw, 0x84, 0 unit_demo_2: st_def 0x00, unit_demo_1_init, st_unit_idle act_def ACT_T_DEMO_1, 0, 1, 2, 3, 1, 5, 3, 3, 0 act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle - act_def_draw unit_demo_1_draw + act_def_draw unit_demo_1_draw, 0x84, 0 unit_demo_3: st_def 0x00, unit_demo_1_init, st_unit_idle act_def ACT_T_DEMO_1, 0, 1, 2, 3, 0, 5, 4, 4, 0 act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle - act_def_draw unit_demo_1_draw + act_def_draw unit_demo_1_draw, 0x84, 0 st_unit_demo_1_update: st_def 0x00, unit_demo_1_update, st_unit_demo_1_update -- 2.30.2