summaryrefslogtreecommitdiff
path: root/engine/radio.asm
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2018-01-11 12:00:01 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2018-01-11 14:27:19 -0500
commit94d6a327218fc56753238b424df208245092d96c (patch)
tree25688edfc18dacb965f6ecf9691691e68888b845 /engine/radio.asm
parenta436bbc23bb7ba723a7f897ddbe9d25830169612 (diff)
Use maskbits some more
Diffstat (limited to 'engine/radio.asm')
-rw-r--r--engine/radio.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/radio.asm b/engine/radio.asm
index 06cc3a59a..de19a289c 100644
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -247,7 +247,7 @@ endr
; Generate a number, either 0, 1, or 2, to choose a time of day.
.loop2
call Random
- and $3
+ maskbits NUM_DAYTIMES +- 1
cp DARKNESS_F
jr z, .loop2
@@ -692,8 +692,8 @@ PokedexShow_GetDexEntryBank:
dec a
rlca
rlca
- and 3
- ld hl, .pokedexbanks
+ maskbits NUM_DEX_ENTRY_BANKS +- 1
+ ld hl, .PokedexEntryBanks
ld d, 0
ld e, a
add hl, de
@@ -702,7 +702,7 @@ PokedexShow_GetDexEntryBank:
pop hl
ret
-.pokedexbanks
+.PokedexEntryBanks
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)