summaryrefslogtreecommitdiff
path: root/engine/events
diff options
context:
space:
mode:
authorentrpntr <entrpntr@gmail.com>2020-05-04 16:23:03 -0400
committerentrpntr <entrpntr@gmail.com>2020-05-04 16:23:03 -0400
commit858f7a0b8a7aebe69df387654e3201051d348b9e (patch)
tree990a5c6dbd7e312b57a89298070cbff8e55293aa /engine/events
parentfd35959d94c9487e74b2376e529302b32061af83 (diff)
Finish cleanup of bank 3.
Diffstat (limited to 'engine/events')
-rwxr-xr-xengine/events/engine_flags.asm9
-rwxr-xr-xengine/events/overworld.asm2
-rwxr-xr-xengine/events/specials.asm5
3 files changed, 7 insertions, 9 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.
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