mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
Merge pull request #2137 from mrgriffin/pret-suspicious-setvar
Some checks are pending
CI / build (push) Waiting to run
Some checks are pending
CI / build (push) Waiting to run
Warn on suspicious setvar usages
This commit is contained in:
commit
74bf498aaa
|
|
@ -145,7 +145,10 @@
|
|||
.endm
|
||||
|
||||
@ Changes the value of destination to value.
|
||||
.macro setvar destination:req, value:req
|
||||
.macro setvar destination:req, value:req, warn=TRUE
|
||||
.if \warn && ((\value >= VARS_START && \value <= VARS_END) || (\value >= SPECIAL_VARS_START && \value <= SPECIAL_VARS_END))
|
||||
.warning "setvar with a value that might be a VAR_ constant; did you mean copyvar instead?"
|
||||
.endif
|
||||
.byte SCR_OP_SETVAR
|
||||
.2byte \destination
|
||||
.2byte \value
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user