From: Lukas Krickl Date: Sat, 28 Jun 2025 05:54:11 +0000 (+0200) Subject: actor: renamed def_draw to def_meta and added dialog options ptr X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=175bc72802e83e6e5e0cf7e65a06d2bc14bded36;p=gbrg%2F.git actor: renamed def_draw to def_meta and added dialog options ptr --- diff --git a/src/defs.s b/src/defs.s index 7edd11a..10fae51 100644 --- a/src/defs.s +++ b/src/defs.s @@ -206,7 +206,10 @@ .de act_draw, 2 .de act_oam_tile, 1 .de act_oam_flags, 1 - + + ; ptr to dialog options + ; if NULL do not execute any dialog +.de act_dialog_opts, 2 .de act_size, 0 ; max bge queue size diff --git a/src/macros.inc b/src/macros.inc index 2328adb..ac6e41f 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -154,15 +154,17 @@ dw $3 #endmacro - ; defines draw call for actor + ; defines actor meta data call for actor ; inputs: ; $1: draw call ; $2: default tiles ; $3: default oam flags -#macro act_def_draw + ; $4: dialog options ptr +#macro act_def_meta dw $1 .db $2 .db $3 + dw $4 #endmacro ; define an actor without state diff --git a/src/player.s b/src/player.s index c5d3169..b0bf78b 100644 --- a/src/player.s +++ b/src/player.s @@ -47,7 +47,7 @@ unit_player: act_equipment_empty act_effects_empty act_st_def NULL, NULL, st_unit_player_update, st_unit_idle - act_def_draw unit_draw, 0x84, 0 + act_def_meta unit_draw, 0x84, 0, NULL st_unit_player_update: st_def 0x00, unit_player_update, st_unit_player_update diff --git a/src/unit_demo.s b/src/unit_demo.s index a9f4b90..396884b 100644 --- a/src/unit_demo.s +++ b/src/unit_demo.s @@ -49,7 +49,7 @@ unit_demo_2: act_equipment_empty act_effects_empty act_st_def NULL, NULL, st_unit_demo_1_cpu_update_idle, st_unit_idle - act_def_draw unit_draw, 0x84, 0 + act_def_meta unit_draw, 0x84, 0, NULL unit_demo_3: st_def 0x00, unit_demo_1_init, st_unit_demo_1_cpu_update @@ -61,7 +61,7 @@ unit_demo_3: act_equipment_empty act_effects_empty act_st_def NULL, NULL, st_unit_demo_1_cpu_update, st_unit_idle - act_def_draw unit_draw, 0x84, 0 + act_def_meta unit_draw, 0x84, 0, NULL st_unit_demo_1_cpu_update: