unit: Added tile and oam flags to default actor model
authorLukas Krickl <lukas@krickl.dev>
Sat, 24 May 2025 06:56:43 +0000 (08:56 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 24 May 2025 06:56:43 +0000 (08:56 +0200)
src/defs.s
src/macros.inc
src/unit.s

index f82900309010171d0151b16323990989c6eee3a9..64567873aaf5414b9423788f0b77345b46e8379b 100644 (file)
   ;   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
index c51fcb0eb55ec697a7b520d3bb3a7fceba9795e2..978698af697eeae03de8a52ec74d197916a71871 100644 (file)
  ; 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
index 1ade05dee1b8f1cf3e81fda9f2cbd2a1b45440ed..3bb8bfdf7903c14a5574c256f36e10162285708e 100644 (file)
@@ -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