Sevii Region groundwork

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.
This commit is contained in:
Llinos Evans 2024-08-06 15:30:37 +01:00
parent 08cea5888f
commit 4432dd4d2f
27 changed files with 425 additions and 538 deletions

View file

@ -68,7 +68,7 @@ RegionCheck:
.checkagain
cp NIHON_LANDMARK
jr z, .nihon
jr nc, .nihon
cp KANTO_LANDMARK
jr c, .johto

View file

@ -38,8 +38,12 @@ FindNest:
ld b, h
ld c, l
ld a, e
cp 2
cp NIHON_REGION
jr z, .nihon
cp SEVII_REGION_2
jr z, .sevii ; these areas are small enough to that we shouldn't need two separate tables for these regions.
cp SEVII_REGION_1
jr z, .sevii
and a
jr nz, .kanto
decoord 0, 0
@ -58,6 +62,13 @@ FindNest:
ld hl, KantoWaterWildMons
jp .FindWater
.sevii
decoord 0, 0
ld hl, SeviiGrassWildMons
call .FindGrass
ld hl, SeviiWaterWildMons
jp .FindWater
.nihon
decoord 0, 0
ld hl, NihonGrassWildMons
@ -439,7 +450,7 @@ _GrassWildmonLookup:
ld hl, JohtoGrassWildMons
; Old Nihon Check from 2023.
; Testing new method.
; it's painfully broken and bad, don't use it unless you have brighter ideas for the below
; Nihon Check
; Basically, conditionally load Nihon or Kanto into de, depending on region check.
; IsInJohto returns 1 if Kanto, 2 if Nihon.
@ -463,9 +474,16 @@ _GrassWildmonLookup:
ld c, a
call GetWorldMapLocation
cp NIHON_LANDMARK
jr nc, .skip2
jr nc, .johto
; account for sevii
ld de, SeviiGrassWildMons
cp SEVII_LANDMARK_2 ; I am 90% sure this check is unnecessary when in tandem with landmark 1.
jr nc, .johto
cp SEVII_LANDMARK_1
jr nc, .johto
ld de, KantoGrassWildMons
.skip2
.johto
call _JohtoWildmonCheck ; So run this check. More commentary there.
ld bc, GRASS_WILDDATA_LENGTH
@ -486,9 +504,17 @@ _WaterWildmonLookup:
ld c, a
call GetWorldMapLocation
cp NIHON_LANDMARK
jr nc, .skip2
jr nc, .johto
; account for sevii
ld de, SeviiWaterWildMons
cp SEVII_LANDMARK_2
jr nc, .johto
cp SEVII_LANDMARK_1
jr nc, .johto
ld de, KantoWaterWildMons
.skip2
.johto
call _JohtoWildmonCheck
ld bc, WATER_WILDDATA_LENGTH
@ -1074,6 +1100,8 @@ INCLUDE "data/wild/johto_grass.asm"
INCLUDE "data/wild/johto_water.asm"
INCLUDE "data/wild/kanto_grass.asm"
INCLUDE "data/wild/kanto_water.asm"
INCLUDE "data/wild/sevii_grass.asm"
INCLUDE "data/wild/sevii_water.asm"
INCLUDE "data/wild/nihon_grass.asm"
INCLUDE "data/wild/nihon_water.asm"
INCLUDE "data/wild/swarm_grass.asm"