mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
maskbits <count> +- 1
This commit is contained in:
parent
bc79f17b9d
commit
28d5169a11
@ -27,12 +27,12 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
||||
add b
|
||||
ld b, a ; b contains the nr of the trainer
|
||||
if DEF(_CRYSTAL11)
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS +- 1
|
||||
cp BATTLETOWER_NUM_UNIQUE_TRAINERS
|
||||
else
|
||||
; Crystal 1.0 used the wrong constant here, so only the first 21
|
||||
; trainers in BattleTowerTrainers can be sampled.
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_PKMN +- 1
|
||||
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
||||
endc
|
||||
jr nc, .resample
|
||||
@ -115,7 +115,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||
ld a, [hRandomAdd]
|
||||
add b
|
||||
ld b, a
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
|
||||
maskbits BATTLETOWER_NUM_UNIQUE_PKMN +- 1
|
||||
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
||||
jr nc, .resample
|
||||
; in register 'a' is the chosen Pkmn of the LevelGroup
|
||||
|
@ -48,17 +48,17 @@ GetClock:: ; 5b7
|
||||
|
||||
ld [hl], RTC_S
|
||||
ld a, [de]
|
||||
maskbits 60
|
||||
maskbits 60 - 1
|
||||
ld [hRTCSeconds], a
|
||||
|
||||
ld [hl], RTC_M
|
||||
ld a, [de]
|
||||
maskbits 60
|
||||
maskbits 60 - 1
|
||||
ld [hRTCMinutes], a
|
||||
|
||||
ld [hl], RTC_H
|
||||
ld a, [de]
|
||||
maskbits 24
|
||||
maskbits 24 - 1
|
||||
ld [hRTCHours], a
|
||||
|
||||
ld [hl], RTC_DL
|
||||
|
Loading…
Reference in New Issue
Block a user