2018-06-24 07:09:41 -07:00
|
|
|
IsInJohto::
|
2018-04-04 21:35:14 -07:00
|
|
|
; Return 0 if the player is in Johto, and 1 in Kanto.
|
|
|
|
|
|
|
|
ld a, [wMapGroup]
|
|
|
|
ld b, a
|
|
|
|
ld a, [wMapNumber]
|
|
|
|
ld c, a
|
|
|
|
call GetWorldMapLocation
|
|
|
|
|
2020-03-15 14:26:10 -07:00
|
|
|
cp LANDMARK_FAST_SHIP
|
2018-04-04 21:35:14 -07:00
|
|
|
jr z, .Johto
|
|
|
|
|
2020-03-15 14:26:10 -07:00
|
|
|
cp LANDMARK_SPECIAL
|
2018-04-04 21:35:14 -07:00
|
|
|
jr nz, .CheckRegion
|
|
|
|
|
|
|
|
ld a, [wBackupMapGroup]
|
|
|
|
ld b, a
|
|
|
|
ld a, [wBackupMapNumber]
|
|
|
|
ld c, a
|
|
|
|
call GetWorldMapLocation
|
|
|
|
|
|
|
|
.CheckRegion:
|
|
|
|
cp KANTO_LANDMARK
|
|
|
|
jr nc, .Kanto
|
|
|
|
|
|
|
|
.Johto:
|
2020-03-15 14:26:10 -07:00
|
|
|
xor a ; JOHTO_REGION
|
2018-04-04 21:35:14 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.Kanto:
|
2020-03-15 14:26:10 -07:00
|
|
|
ld a, KANTO_REGION
|
2018-04-04 21:35:14 -07:00
|
|
|
ret
|
2020-02-21 14:48:51 -08:00
|
|
|
|
|
|
|
ret_2f3e::
|
|
|
|
ret
|