mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-16 18:20:50 +12:00

This adds the baseline infrastructure to account for the Sevii Islands, while also fixing a couple of bugs. Zeta, please read the commit carefully! Only real issue I noticed was that scrolling on the town map is infinite in all three new regions, implying there's something in `pokegear.asm` I haven't accounted for. I've also ret'd the ezchat order and gen1 orders out of existence to reduce the sheer amount of 8-bit warnings. This abolishes gen1 compatibility (though this was already a bit fucked) in exchange for actually being able to debug things in a reasonable timeframe.
51 lines
659 B
NASM
51 lines
659 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 NIHON_LANDMARK
|
|
jr c, .Nihon
|
|
cp SEVII_LANDMARK_1
|
|
jr c, .sevii1
|
|
cp SEVII_LANDMARK_2
|
|
jr c, .sevii2
|
|
cp KANTO_LANDMARK
|
|
jr nc, .Kanto
|
|
|
|
.Johto:
|
|
xor a ; JOHTO_REGION
|
|
ret
|
|
|
|
.Kanto:
|
|
ld a, KANTO_REGION
|
|
ret
|
|
|
|
.sevii1:
|
|
ld a, SEVII_REGION_1
|
|
ret
|
|
|
|
.sevii2:
|
|
ld a, SEVII_REGION_2
|
|
ret
|
|
|
|
.Nihon:
|
|
ld a, NIHON_REGION
|
|
ret
|