diff options
Diffstat (limited to 'engine/events/engine_flags.asm')
| -rwxr-xr-x | engine/events/engine_flags.asm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engine/events/engine_flags.asm b/engine/events/engine_flags.asm index d1329f1d..4099dfda 100755 --- a/engine/events/engine_flags.asm +++ b/engine/events/engine_flags.asm @@ -1,4 +1,4 @@ -EngineFlagAction:: ; c01b +EngineFlagAction:: ; Do action b on engine flag de ; ; b = 0: reset flag @@ -7,22 +7,21 @@ EngineFlagAction:: ; c01b ; ; Setting/resetting does not return a result. - ; 16-bit flag ids are considered invalid, but it's nice ; to know that the infrastructure is there. ld a, d - cp 0 + cp HIGH(NUM_ENGINE_FLAGS) jr z, .ceiling jr c, .read ; cp 0 can't set carry! jr .invalid -; There are only $a2 engine flags, so +; There are only NUM_ENGINE_FLAGS engine flags, so ; anything beyond that is invalid too. .ceiling ld a, e - cp NUM_ENGINE_FLAGS + cp LOW(NUM_ENGINE_FLAGS) jr c, .read ; Invalid flags are treated as flag 00. |
