diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-03 09:38:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-03 09:38:52 -0400 |
| commit | c85050497c1bd062e9cd40bf5b32fa3beca366cc (patch) | |
| tree | 9593ddd3ab820223ab580d5fc0ae133b485b8315 /engine/events/set_blackout_map.asm | |
| parent | Actually run .travis/webhook.sh (diff) | |
| parent | Add engine/movie/oak_speech/ subdirectory (diff) | |
| download | pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.gz pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.xz pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.zip | |
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/events/set_blackout_map.asm')
| -rw-r--r-- | engine/events/set_blackout_map.asm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/events/set_blackout_map.asm b/engine/events/set_blackout_map.asm new file mode 100644 index 00000000..14f0ba28 --- /dev/null +++ b/engine/events/set_blackout_map.asm @@ -0,0 +1,25 @@ +SetLastBlackoutMap: +; Set the map to return to when +; blacking out or using Teleport or Dig. +; Safari rest houses don't count. + + push hl + ld hl, SafariZoneRestHouses + ld a, [wCurMap] + ld b, a +.loop + ld a, [hli] + cp -1 + jr z, .notresthouse + cp b + jr nz, .loop + jr .done + +.notresthouse + ld a, [wLastMap] + ld [wLastBlackoutMap], a +.done + pop hl + ret + +INCLUDE "data/rest_house_maps.asm" |
