Skip to content

Commit b8d0c93

Browse files
authored
Make town map limits more intuitive (#1185)
1 parent b34b4c3 commit b8d0c93

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

constants/landmark_constants.asm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
; Landmarks indexes (see data/maps/landmarks.asm)
22
const_def
33
const LANDMARK_SPECIAL ; 00
4-
; Johto landmarks
4+
5+
DEF JOHTO_LANDMARK EQU const_value
56
const LANDMARK_NEW_BARK_TOWN ; 01
67
const LANDMARK_ROUTE_29 ; 02
78
const LANDMARK_CHERRYGROVE_CITY ; 03
@@ -48,6 +49,8 @@
4849
const LANDMARK_DARK_CAVE ; 2c
4950
const LANDMARK_ROUTE_46 ; 2d
5051
const LANDMARK_SILVER_CAVE ; 2e
52+
DEF JOHTO_LANDMARK_LAST EQU const_value - 1
53+
5154
DEF KANTO_LANDMARK EQU const_value
5255
const LANDMARK_PALLET_TOWN ; 2f
5356
const LANDMARK_ROUTE_1 ; 30
@@ -97,7 +100,11 @@ DEF KANTO_LANDMARK EQU const_value
97100
const LANDMARK_ROUTE_27 ; 5c
98101
const LANDMARK_TOHJO_FALLS ; 5d
99102
const LANDMARK_ROUTE_28 ; 5e
103+
DEF KANTO_LANDMARK_LAST EQU const_value - 1
104+
105+
DEF OTHER_LANDMARK EQU const_value
100106
const LANDMARK_FAST_SHIP ; 5f
107+
101108
DEF NUM_LANDMARKS EQU const_value
102109

103110
; used in CaughtData

engine/pokegear/pokegear.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ PokegearMap_KantoMap:
565565
jr PokegearMap_ContinueMap
566566

567567
PokegearMap_JohtoMap:
568-
ld d, LANDMARK_SILVER_CAVE
569-
ld e, LANDMARK_NEW_BARK_TOWN
568+
ld d, JOHTO_LANDMARK_LAST
569+
ld e, JOHTO_LANDMARK
570570
PokegearMap_ContinueMap:
571571
ld hl, hJoyLast
572572
ld a, [hl]
@@ -728,8 +728,8 @@ TownMap_GetKantoLandmarkLimits:
728728
ld a, [wStatusFlags]
729729
bit STATUSFLAGS_HALL_OF_FAME_F, a
730730
jr z, .not_hof
731-
ld d, LANDMARK_ROUTE_28
732-
ld e, LANDMARK_PALLET_TOWN
731+
ld d, KANTO_LANDMARK_LAST
732+
ld e, KANTO_LANDMARK
733733
ret
734734

735735
.not_hof

0 commit comments

Comments
 (0)