diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-21 12:17:01 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-21 12:17:01 -0400 |
commit | 78bf5912c46d3421e2bf6b14be6effe8a08b2500 (patch) | |
tree | 625930ee6a8eca9a8fb6c42ec36b9f194647a92f | |
parent | 7faef5b8cfaf4ef953feaf3e69ea085f3da1d5d0 (diff) |
Spawn points when you start and finish the game
-rw-r--r-- | Hard-coded-logic.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Hard-coded-logic.md b/Hard-coded-logic.md index 9e94818..1c1cc01 100644 --- a/Hard-coded-logic.md +++ b/Hard-coded-logic.md @@ -7,6 +7,7 @@ Much of the game logic can be changed via the files in [data/](../blob/master/da - [Maps that don't display a location sign](#maps-that-dont-display-a-location-sign) - [Outdoor maps within indoor maps don't confuse Dig or Escape Rope](#outdoor-maps-within-indoor-maps-dont-confuse-dig-or-escape-rope) - [Landmark limits when scrolling in the Town Map](#landmark-limits-when-scrolling-in-the-town-map) +- [Spawn points when you start and finish the game](#spawn-points-when-you-start-and-finish-the-game) - [Trainer classes with different battle music](#trainer-classes-with-different-battle-music) - [`RIVAL1`'s first Pokémon has no held item](#rival1s-first-pokémon-has-no-held-item) - [`RIVAL1` and `RIVAL2` don't print their trainer class in battle](#rival1-and-rival2-dont-print-their-trainer-class-in-battle) @@ -115,6 +116,33 @@ TownMap_GetKantoLandmarkLimits: If you access a map that's outside the limits, then scrolling through the Town Map can underflow and go past the defined landmark data, displaying garbage. ([Video](https://www.youtube.com/watch?v=r32agevxdw4)) +## Spawn points when you start and finish the game + +These are defined in [engine/menus/intro_menu.asm](../blob/master/engine/menus/intro_menu.asm): + +```asm + ld a, LANDMARK_NEW_BARK_TOWN + ld [wPrevLandmark], a + + ld a, SPAWN_HOME + ld [wDefaultSpawnpoint], a +``` + +```asm +.SpawnAfterE4: + ld a, SPAWN_NEW_BARK + ld [wDefaultSpawnpoint], a + call PostCreditsSpawn + jp FinishContinueFunction + +SpawnAfterRed: + ld a, SPAWN_MT_SILVER + ld [wDefaultSpawnpoint], a +``` + +(The maps and coordinates that correspond to those spawn points are not hard-coded; they're in the `SpawnPoints` table in [data/maps/spawn_points.asm](../blob/master/data/maps/spawn_points.asm).) + + ## `RIVAL1`'s first Pokémon has no held item This is caused by `InitEnemyTrainer` in [engine/battle/core.asm](../blob/master/engine/battle/core.asm): |