From a9519e401db0c8db0b96cee3c0130c3fe8a4a58b Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 6 Jun 2018 00:43:42 +0200 Subject: Disassemble map script function Part 1 of disassembling map loading functions --- home/map.asm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 home/map.asm (limited to 'home') diff --git a/home/map.asm b/home/map.asm new file mode 100644 index 0000000..2583643 --- /dev/null +++ b/home/map.asm @@ -0,0 +1,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 -- cgit v1.2.3