2017-12-15 18:22:26 -08:00
|
|
|
InitList: ; 50db9
|
|
|
|
ld a, [wInitListType]
|
|
|
|
|
|
|
|
cp INIT_ENEMYOT_LIST
|
|
|
|
jr nz, .check_party_ot_name
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wOTPartyCount
|
|
|
|
ld de, wOTPartyMonOT
|
2017-12-15 18:22:26 -08:00
|
|
|
ld a, ENEMY_OT_NAME
|
|
|
|
jr .done
|
|
|
|
|
|
|
|
.check_party_ot_name
|
|
|
|
cp INIT_PLAYEROT_LIST
|
|
|
|
jr nz, .check_mon_name
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyCount
|
|
|
|
ld de, wPartyMonOT
|
2017-12-15 18:22:26 -08:00
|
|
|
ld a, PARTY_OT_NAME
|
|
|
|
jr .done
|
|
|
|
|
|
|
|
.check_mon_name
|
|
|
|
cp INIT_MON_LIST
|
|
|
|
jr nz, .check_item_name
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wCurMart
|
2017-12-15 18:22:26 -08:00
|
|
|
ld de, PokemonNames
|
2018-01-20 09:25:55 -08:00
|
|
|
ld a, MON_NAME
|
2017-12-15 18:22:26 -08:00
|
|
|
jr .done
|
|
|
|
|
|
|
|
.check_item_name
|
|
|
|
cp INIT_BAG_ITEM_LIST
|
|
|
|
jr nz, .check_ob_item_name
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wNumItems
|
2017-12-15 18:22:26 -08:00
|
|
|
ld de, ItemNames
|
|
|
|
ld a, ITEM_NAME
|
|
|
|
jr .done
|
|
|
|
|
|
|
|
.check_ob_item_name
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wCurMart
|
2017-12-15 18:22:26 -08:00
|
|
|
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 [wUnusedD102], a
|
|
|
|
ld a, d
|
|
|
|
ld [wUnusedD102 + 1], a
|
|
|
|
ld bc, ItemAttributes
|
|
|
|
ld a, c
|
|
|
|
ld [wItemAttributesPtr], a
|
|
|
|
ld a, b
|
|
|
|
ld [wItemAttributesPtr + 1], a
|
|
|
|
ret
|