pokered/engine/events/set_blackout_map.asm

26 lines
388 B
NASM
Raw Normal View History

2016-09-18 01:17:57 +00:00
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"