diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-02 23:30:21 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-02 23:30:21 -0400 |
| commit | f275790aec4a796ed969b099364abfdf25385967 (patch) | |
| tree | c56edfd01a61e9aa0e3c3ee8a046e66b5a1984e4 /engine/events/set_blackout_map.asm | |
| parent | Actually run .travis/webhook.sh (diff) | |
| download | pokeyellow-f275790aec4a796ed969b099364abfdf25385967.tar.gz pokeyellow-f275790aec4a796ed969b099364abfdf25385967.tar.xz pokeyellow-f275790aec4a796ed969b099364abfdf25385967.zip | |
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" |
