2017-12-15 18:22:26 -08:00
|
|
|
GetMobileOTTrainerClass: ; mobile function
|
|
|
|
ld h, b
|
|
|
|
ld l, c
|
|
|
|
call .GetMobileOTTrainerClass
|
|
|
|
ld c, a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.GetMobileOTTrainerClass:
|
2017-12-15 18:22:26 -08:00
|
|
|
ld a, [hli]
|
|
|
|
xor [hl]
|
|
|
|
ld c, a
|
|
|
|
jr z, .skip_male_trainers
|
|
|
|
srl c
|
|
|
|
srl c
|
|
|
|
.male_trainer_loop
|
|
|
|
srl c
|
|
|
|
ld a, c
|
2018-01-22 10:00:35 -08:00
|
|
|
cp MaleTrainers.End - MaleTrainers - 1
|
2017-12-15 18:22:26 -08:00
|
|
|
jr nc, .male_trainer_loop
|
|
|
|
inc c
|
|
|
|
|
|
|
|
.skip_male_trainers
|
|
|
|
ld a, [de]
|
|
|
|
cp $1
|
|
|
|
ld hl, MaleTrainers
|
|
|
|
jr nz, .finished
|
|
|
|
|
|
|
|
ld hl, FemaleTrainers
|
|
|
|
ld a, c
|
|
|
|
and a
|
|
|
|
jr z, .finished
|
|
|
|
|
|
|
|
.female_trainer_loop
|
|
|
|
srl c
|
|
|
|
ld a, c
|
2018-01-22 10:00:35 -08:00
|
|
|
cp FemaleTrainers.End - FemaleTrainers - 1
|
2017-12-15 18:22:26 -08:00
|
|
|
jr nc, .female_trainer_loop
|
|
|
|
inc c
|
|
|
|
|
|
|
|
.finished
|
|
|
|
ld b, $0
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "data/trainers/gendered_trainers.asm"
|