summaryrefslogtreecommitdiff
path: root/engine/battle/bank_e_misc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/bank_e_misc.asm')
-rwxr-xr-x[-rw-r--r--]engine/battle/bank_e_misc.asm62
1 files changed, 31 insertions, 31 deletions
diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/bank_e_misc.asm
index 78b27108..33af6f6f 100644..100755
--- a/engine/battle/bank_e_misc.asm
+++ b/engine/battle/bank_e_misc.asm
@@ -1,5 +1,5 @@
; formats a string at wMovesString that lists the moves at wMoves
-FormatMovesString: ; 39b87 (e:5b87)
+FormatMovesString:
ld hl, wMoves
ld de, wMovesString
ld b, $0
@@ -24,7 +24,7 @@ FormatMovesString: ; 39b87 (e:5b87)
jr .copyNameLoop
.doneCopyingName
ld a, b
- ld [wcd6c], a
+ ld [wNumMovesMinusOne], a
inc b
ld a, $4e ; line break
ld [de], a
@@ -52,49 +52,49 @@ FormatMovesString: ; 39b87 (e:5b87)
ret
; XXX this is called in a few places, but it doesn't appear to do anything useful
-Func_39bd5: ; 39bd5 (e:5bd5)
- ld a, [wd11b]
- cp $1
- jr nz, .asm_39be6
+InitList:
+ ld a, [wInitListType]
+ cp INIT_ENEMYOT_LIST
+ jr nz, .notEnemy
ld hl, wEnemyPartyCount
ld de, wEnemyMonOT
ld a, ENEMYOT_NAME
- jr .asm_39c18
-.asm_39be6
- cp $4
- jr nz, .calcAttackStat4
+ jr .done
+.notEnemy
+ cp INIT_PLAYEROT_LIST
+ jr nz, .notPlayer
ld hl, wPartyCount
ld de, wPartyMonOT
ld a, PLAYEROT_NAME
- jr .asm_39c18
-.calcAttackStat4
- cp $5
- jr nz, .asm_39c02
- ld hl, wStringBuffer2 + 11
+ jr .done
+.notPlayer
+ cp INIT_MON_LIST
+ jr nz, .notMonster
+ ld hl, wItemList
ld de, MonsterNames
ld a, MONSTER_NAME
- jr .asm_39c18
-.asm_39c02
- cp $2
- jr nz, .asm_39c10
+ jr .done
+.notMonster
+ cp INIT_BAG_ITEM_LIST
+ jr nz, .notBag
ld hl, wNumBagItems
ld de, ItemNames
ld a, ITEM_NAME
- jr .asm_39c18
-.asm_39c10
- ld hl, wStringBuffer2 + 11
+ jr .done
+.notBag
+ ld hl, wItemList
ld de, ItemNames
ld a, ITEM_NAME
-.asm_39c18
+.done
ld [wNameListType], a
ld a, l
- ld [wList], a
+ ld [wListPointer], a
ld a, h
- ld [wList + 1], a
+ ld [wListPointer + 1], a
ld a, e
- ld [wcf8d], a
+ ld [wUnusedCF8D], a
ld a, d
- ld [wcf8e], a
+ ld [wUnusedCF8D + 1], a
ld bc, ItemPrices
ld a, c
ld [wItemPrices], a
@@ -102,10 +102,10 @@ Func_39bd5: ; 39bd5 (e:5bd5)
ld [wItemPrices + 1], a
ret
-; get species of mon e in list [wcc49] for LoadMonData
-GetMonSpecies: ; 39c37 (e:5c37)
+; get species of mon e in list [wMonDataLocation] for LoadMonData
+GetMonSpecies:
ld hl, wPartySpecies
- ld a, [wcc49]
+ ld a, [wMonDataLocation]
and a
jr z, .getSpecies
dec a
@@ -119,4 +119,4 @@ GetMonSpecies: ; 39c37 (e:5c37)
add hl, de
ld a, [hl]
ld [wcf91], a
- ret \ No newline at end of file
+ ret