mirror of https://github.com/pret/pokecrystal.git
34 lines
420 B
NASM
34 lines
420 B
NASM
|
IsInJohto:: ; 2f17
|
||
|
; 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 FAST_SHIP
|
||
|
jr z, .Johto
|
||
|
|
||
|
cp SPECIAL_MAP
|
||
|
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
|
||
|
ret
|
||
|
|
||
|
.Kanto:
|
||
|
ld a, 1
|
||
|
ret
|
||
|
; 2f3e
|