Merge pull request #2214 from GriffinRichards/hidden-item-error
Some checks failed
CI / build (push) Has been cancelled

Display error for invalid hidden item flags
This commit is contained in:
Martin Griffin 2025-12-04 06:28:53 +00:00 committed by GitHub
commit 4d3144cc66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,9 @@
@ Defines a background hidden item event for map data
.macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req
.if \flag < FLAG_HIDDEN_ITEMS_START
.error "Hidden Item flag \flag is too small. Must be >= FLAG_HIDDEN_ITEMS_START."
.endif
bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START)
.endm