blob: e84602406b92aa1746d3ef747c25d3eac67001a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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/maps/rest_house_maps.asm"
|