2018-06-24 14:09:41 +00:00
|
|
|
IsInJohto::
|
2018-04-05 04:35:14 +00: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 21:26:10 +00:00
|
|
|
cp LANDMARK_FAST_SHIP
|
2018-04-05 04:35:14 +00:00
|
|
|
jr z, .Johto
|
|
|
|
|
2020-03-15 21:26:10 +00:00
|
|
|
cp LANDMARK_SPECIAL
|
2018-04-05 04:35:14 +00: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 21:26:10 +00:00
|
|
|
xor a ; JOHTO_REGION
|
2018-04-05 04:35:14 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
.Kanto:
|
2020-03-15 21:26:10 +00:00
|
|
|
ld a, KANTO_REGION
|
2018-04-05 04:35:14 +00:00
|
|
|
ret
|
2020-02-21 22:48:51 +00:00
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
Function2f3e:: ; dummied out
|
2020-02-21 22:48:51 +00:00
|
|
|
ret
|