pokered/engine/events/set_blackout_map.asm
Rangi b29e5ee203 Add subdirectories to data/ similar to pokecrystal
Top level text/ is now solely for the former text/maps/ files, and other files are in their respective subdirectories in data/.
2020-07-03 11:51:00 -04:00

25 lines
388 B
NASM

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/maps/rest_house_maps.asm"