From: Lukas Krickl Date: Sat, 24 May 2025 06:56:43 +0000 (+0200) Subject: unit: Added tile and oam flags to default actor model X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=642625498bb44b4748e6ce715576f568837e565d;p=gbrg%2F.git unit: Added tile and oam flags to default actor model --- 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