From 28d5169a119ece438cc39b442adaa018b9a376e3 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Wed, 10 Jan 2018 14:03:11 -0500 Subject: [PATCH] maskbits +- 1 --- engine/events/battle_tower/load_trainer.asm | 6 +++--- home/time.asm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm index 67c9d2232..c84020e9d 100644 --- a/engine/events/battle_tower/load_trainer.asm +++ b/engine/events/battle_tower/load_trainer.asm @@ -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 diff --git a/home/time.asm b/home/time.asm index 9ed703686..be141a066 100644 --- a/home/time.asm +++ b/home/time.asm @@ -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