From 858f7a0b8a7aebe69df387654e3201051d348b9e Mon Sep 17 00:00:00 2001 From: entrpntr Date: Mon, 4 May 2020 16:23:03 -0400 Subject: Finish cleanup of bank 3. --- engine/events/engine_flags.asm | 9 ++++----- engine/events/overworld.asm | 2 +- engine/events/specials.asm | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'engine/events') 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. diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index ca8116c4..441f38b0 100755 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1577,7 +1577,7 @@ MovementData_CastRod: PutTheRodAway: hlcoord 1, 14 - lb bc, $3, $12 + lb bc, 3, 18 call ClearBox call WaitBGMap xor a diff --git a/engine/events/specials.asm b/engine/events/specials.asm index ab02d3a0..f4b6437d 100755 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -90,9 +90,7 @@ NameRival: .default IF DEF(_GOLD) db "SILVER@" -ENDC - -IF DEF(_SILVER) +ELIF DEF(_SILVER) db "GOLD@" ENDC @@ -317,6 +315,7 @@ CheckSwarmFlag:: ret CheckPokerus: +; Check if a monster in your party has Pokerus farcall _CheckPokerus jp ScriptReturnCarry -- cgit v1.2.3