mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
ad50e94b50
Resolves #697
36 lines
463 B
NASM
36 lines
463 B
NASM
IsInJohto::
|
|
; 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
|
|
|
|
cp LANDMARK_FAST_SHIP
|
|
jr z, .Johto
|
|
|
|
cp LANDMARK_SPECIAL
|
|
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:
|
|
xor a ; JOHTO_REGION
|
|
ret
|
|
|
|
.Kanto:
|
|
ld a, KANTO_REGION
|
|
ret
|
|
|
|
ret_2f3e::
|
|
ret
|