summaryrefslogtreecommitdiff
path: root/Hard-coded-logic.md
diff options
context:
space:
mode:
Diffstat (limited to 'Hard-coded-logic.md')
-rw-r--r--Hard-coded-logic.md17
1 files changed, 7 insertions, 10 deletions
diff --git a/Hard-coded-logic.md b/Hard-coded-logic.md
index a7997b9..c83ccf8 100644
--- a/Hard-coded-logic.md
+++ b/Hard-coded-logic.md
@@ -40,7 +40,7 @@ This is caused by `LoadTilesetGFX` in [home/map.asm](../blob/master/home/map.asm
This is caused by `ReturnFromMapSetupScript.CheckSpecialMap` in [engine/events/map_name_sign.asm](../blob/master/engine/events/map_name_sign.asm):
```asm
-.CheckSpecialMap: ; b8070
+.CheckSpecialMap:
; These landmarks do not get pop-up signs.
cp -1
ret z
@@ -59,7 +59,6 @@ This is caused by `ReturnFromMapSetupScript.CheckSpecialMap` in [engine/events/m
ld a, 1
and a
ret
-; b8089
```
@@ -89,17 +88,17 @@ There's no "outdoor-within-indoor" map environment, so the few maps in this situ
This is caused by `PokegearMap_KantoMap` and `PokegearMap_JohtoMap` in [engine/pokegear/pokegear.asm](../blob/master/engine/pokegear/pokegear.asm):
```asm
-PokegearMap_KantoMap: ; 90fe9 (24:4fe9)
+PokegearMap_KantoMap:
call TownMap_GetKantoLandmarkLimits
jr PokegearMap_ContinueMap
-PokegearMap_JohtoMap: ; 90fee (24:4fee)
+PokegearMap_JohtoMap:
ld d, SILVER_CAVE
ld e, NEW_BARK_TOWN
-PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
+PokegearMap_ContinueMap:
...
-TownMap_GetKantoLandmarkLimits: ; 910e8
+TownMap_GetKantoLandmarkLimits:
ld a, [wStatusFlags]
bit STATUSFLAGS_HALL_OF_FAME_F, a
jr z, .not_hof
@@ -138,7 +137,7 @@ If a map's music ID in [data/maps/maps.asm](../blob/master/data/maps/maps.asm) i
This is caused by `GetMapMusic` in [home/map.asm](../blob/master/home/map.asm):
```asm
-GetMapMusic:: ; 2cbd
+GetMapMusic::
push hl
push bc
ld de, MAP_MUSIC
@@ -181,7 +180,6 @@ GetMapMusic:: ; 2cbd
.clearedmahogany
ld de, MUSIC_CHERRYGROVE_CITY
jr .done
-; 2cff
```
This can cause problems if you add too many new songs, or rearrange the existing ones. A solution would be to redefine the special music constants in [constants/music_constants.asm](../blob/master/constants/music_constants.asm):
@@ -199,7 +197,7 @@ ENTER_MAP_MUSIC EQU $ff
And then edit `GetMapMusic`:
```asm
-GetMapMusic:: ; 2cbd
+GetMapMusic::
push hl
push bc
ld de, MAP_MUSIC
@@ -238,7 +236,6 @@ GetMapMusic:: ; 2cbd
.clearedmahogany
ld de, MUSIC_CHERRYGROVE_CITY
jr .done
-; 2cff
```
You'll also need to edit [data/maps/maps.asm](../blob/master/data/maps/maps.asm) so the Radio Tower maps use `MUSIC_RADIO_TOWER` instead of `RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY`.