actor: renamed def_draw to def_meta and added dialog options ptr
authorLukas Krickl <lukas@krickl.dev>
Sat, 28 Jun 2025 05:54:11 +0000 (07:54 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 28 Jun 2025 05:54:11 +0000 (07:54 +0200)
src/defs.s
src/macros.inc
src/player.s
src/unit_demo.s

index 7edd11af8862a995d6fbcfc619143d52588887f5..10fae51ad8ce22db47f404b0a5bdb5b870cf5275 100644 (file)
 .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
index 2328adbfb89c081fdc0a3752ff5e8f342627fb95..ac6e41f833dff11f5867bc2291c852ce75002107 100644 (file)
   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
index c5d3169320f8ada803b2cb9d64b911250731f319..b0bf78b946a4a973881993190b5c40e2a1cc3771 100644 (file)
@@ -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 
index a9f4b903e86cc58fc77ee54b8f6053ca7ddb74de..396884b004d5573bb75038c0d01d7ae50ad9db16 100644 (file)
@@ -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: