Get rid of LANDMARK_SPECIAL (#1)

This commit is contained in:
xCrystal 2023-07-25 18:32:57 +02:00
parent 473c23a727
commit 787caa2147
5 changed files with 1 additions and 44 deletions

View File

@ -1,7 +1,6 @@
; Landmarks indexes (see data/maps/landmarks.asm)
const_def
const LANDMARK_SPECIAL ; 00
const LANDMARK_LEVEL_1 ; 01
const LANDMARK_LEVEL_1 ; 00
DEF NUM_LANDMARKS EQU const_value
; used in CaughtData

View File

@ -7,9 +7,7 @@ ENDM
Landmarks:
; entries correspond to constants/landmark_constants.asm
table_width 4, Landmarks
landmark -8, -16, SpecialLandmarkName
landmark 140, 100, Level1LandmarkName
assert_table_length NUM_LANDMARKS
SpecialLandmarkName: db "SPECIAL@"
Level1LandmarkName: db "LEVEL 1@"

View File

@ -60,16 +60,12 @@ InitMapNameSign::
ld c, a
ld a, [wPrevLandmark]
cp c
ret z
cp LANDMARK_SPECIAL
ret
.CheckSpecialMap:
; These landmarks do not get pop-up signs.
cp -1
ret z
cp LANDMARK_SPECIAL ; redundant check
ret z
ld a, 1
and a
ret

View File

@ -167,17 +167,6 @@ Pokedex_GetLandmark:
ld a, [wMapNumber]
ld c, a
call GetWorldMapLocation
cp LANDMARK_SPECIAL
jr nz, .load
ld a, [wBackupMapGroup]
ld b, a
ld a, [wBackupMapNumber]
ld c, a
call GetWorldMapLocation
.load
ld [wDexCurLocation], a
ret

View File

@ -185,13 +185,6 @@ TownMap_GetCurrentLandmark:
ld a, [wMapNumber]
ld c, a
call GetWorldMapLocation
cp LANDMARK_SPECIAL
ret nz
ld a, [wBackupMapGroup]
ld b, a
ld a, [wBackupMapNumber]
ld c, a
call GetWorldMapLocation
ret
TownMap_InitCursorAndPlayerIconPositions:
@ -200,14 +193,6 @@ TownMap_InitCursorAndPlayerIconPositions:
ld a, [wMapNumber]
ld c, a
call GetWorldMapLocation
cp LANDMARK_SPECIAL
jr nz, .LoadLandmark
ld a, [wBackupMapGroup]
ld b, a
ld a, [wBackupMapNumber]
ld c, a
call GetWorldMapLocation
.LoadLandmark:
ld [wPokegearMapPlayerIconLandmark], a
ld [wPokegearMapCursorLandmark], a
ret
@ -2126,16 +2111,6 @@ FlyMap:
ld a, [wMapNumber]
ld c, a
call GetWorldMapLocation
; If we're not in a valid location, i.e. Pokecenter floor 2F,
; the backup map information is used.
cp LANDMARK_SPECIAL
jr nz, .CheckRegion
ld a, [wBackupMapGroup]
ld b, a
ld a, [wBackupMapNumber]
ld c, a
call GetWorldMapLocation
.CheckRegion:
; Johto fly map
push af
ld a, FLY_1 ; first Johto flypoint