Use constants to delineate map types, and factor out more data

This commit is contained in:
Rangi 2020-08-31 10:23:19 -04:00
parent 70eac3a1f7
commit bfd9f617c9
17 changed files with 126 additions and 135 deletions

View file

@ -118,9 +118,6 @@ GetBattleTransitionID_CompareLevels:
ld [wBattleTransitionSpiralDirection], a
ret
; fails to recognize VICTORY_ROAD_2F, VICTORY_ROAD_3F, all ROCKET_HIDEOUT maps,
; POKEMON_MANSION_1F, SEAFOAM_ISLANDS_[B1F-B4F], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
GetBattleTransitionID_IsDungeonMap:
ld a, [wCurMap]
ld e, a

View file

@ -39,7 +39,7 @@ TryDoWildEncounter:
; so long as the map is "indoor" and has wild pokemon defined.
; ...as long as it's not Viridian Forest or Safari Zone.
ld a, [wCurMap]
cp REDS_HOUSE_1F ; is this an indoor map?
cp FIRST_INDOOR_MAP ; is this an indoor map?
jr c, .CantEncounter2
ld a, [wCurMapTileset]
cp FOREST ; Viridian Forest/Safari Zone