summaryrefslogtreecommitdiff
path: root/engine/link
diff options
context:
space:
mode:
authorentrpntr <12521136+entrpntr@users.noreply.github.com>2020-05-26 14:28:16 -0400
committerGitHub <noreply@github.com>2020-05-26 14:28:16 -0400
commit418ac97a9c2142aae82051e6bdb149c9103b7282 (patch)
treecf004df596ca9099dda5dc4ce8e924643e7c8207 /engine/link
parenta831702736defce904078495b013a4cdd55b9b41 (diff)
parentdac5598524c04c5ac220e7c9616484c01da70d60 (diff)
Merge pull request #37 from libjet/bank14
Disassemble bank $14
Diffstat (limited to 'engine/link')
-rwxr-xr-xengine/link/init_list.asm55
1 files changed, 55 insertions, 0 deletions
diff --git a/engine/link/init_list.asm b/engine/link/init_list.asm
new file mode 100755
index 00000000..b85cf001
--- /dev/null
+++ b/engine/link/init_list.asm
@@ -0,0 +1,55 @@
+InitList:
+; This entire function is useless.
+ ld a, [wInitListType]
+
+ cp INIT_ENEMYOT_LIST
+ jr nz, .check_party_ot_name
+ ld hl, wOTPartyCount
+ ld de, wOTPartyMonOT
+ ld a, ENEMY_OT_NAME
+ jr .done
+
+.check_party_ot_name
+ cp INIT_PLAYEROT_LIST
+ jr nz, .check_mon_name
+ ld hl, wPartyCount
+ ld de, wPartyMonOT
+ ld a, PARTY_OT_NAME
+ jr .done
+
+.check_mon_name
+ cp INIT_MON_LIST
+ jr nz, .check_item_name
+ ld hl, wCurMart
+ ld de, PokemonNames
+ ld a, MON_NAME
+ jr .done
+
+.check_item_name
+ cp INIT_BAG_ITEM_LIST
+ jr nz, .check_ob_item_name
+ ld hl, wNumItems
+ ld de, ItemNames
+ ld a, ITEM_NAME
+ jr .done
+
+.check_ob_item_name
+ ld hl, wCurMart
+ ld de, ItemNames
+ ld a, ITEM_NAME
+.done
+ ld [wNamedObjectTypeBuffer], a
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ ld a, e
+ ld [wUnusedCFFE], a
+ ld a, d
+ ld [wUnusedCFFE + 1], a
+ ld bc, ItemAttributes
+ ld a, c
+ ld [wItemAttributesPtr], a
+ ld a, b
+ ld [wItemAttributesPtr + 1], a
+ ret