map exits: Added required input field to exit struct
authorLukas Krickl <lukas@krickl.dev>
Fri, 4 Jul 2025 16:58:42 +0000 (18:58 +0200)
committerLukas Krickl <lukas@krickl.dev>
Fri, 4 Jul 2025 16:58:42 +0000 (18:58 +0200)
src/defs.s
src/macros.inc

index bbd17479f771e66d7e071b7b6fc40f9d0a4bb9cc..6744428121ef6df2e0afabca401b1519439f362f 100644 (file)
   ; map exit table entry struct
 .se 0
 .de map_exit_flags, 1
+  ; if this is != 0
+  ; the exit will only trigger
+  ; if the input specified is pressed
+.de map_exit_required_input, 1
 .de map_exit_goto_y, 1
 .de map_exit_goto_x, 1
   ; pointer to new map struct
index bc375194105586aa7caee95dcd02113aced913f8..7a714d2ee527d6e9dacb277106b6f89f362eed4d 100644 (file)
   ; defines an exit table entry
   ; inputs:
   ;   $1: flags
-  ;   $2: goto y
-  ;   $3: goto x
-  ;   $4: map header pointer
+  ;   $2: required input/0
+  ;   $3: goto y
+  ;   $4: goto x
+  ;   $5: map header pointer
 #macro map_exit_table_entry
   .db $1
   .db $2
   .db $3
-  dw $4
+  .db $4
+  dw $5
 #endmacro
 
   ; loads NULL into a 16 bit register