summaryrefslogtreecommitdiff
path: root/home/map.asm
blob: 258364383c4d661d54aa59fec5655808e1103011 (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
26
INCLUDE "constants.asm"

SECTION "Map functions", ROM0[$20FF]

; Runs a map script indexed by wMapScriptNumber
RunMapScript:: ; 20ff
	push hl
	push de
	push bc
	ld a, [wMapScriptNumber]
	add a, a
	add a, a
	ld d, 0
	ld e, a
	add hl, de
	ld a, [hli]
	ld h, [hl]
	ld l, a
	ld de, .return
	push de
	jp hl
.return
	pop bc
	pop de
	pop hl
	ret