diff options
author | yenatch <yenatch@gmail.com> | 2014-06-16 22:52:59 -0700 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-06-16 22:53:56 -0700 |
commit | 541a9c73472db20472db5531cba196a0dcd148ea (patch) | |
tree | 0a28f28213a2e941267b9f1097b1b23a9bd8d1d7 /items | |
parent | 8639fcd29b0e929ec6cc236a209d0e07a495db14 (diff) |
Name the UpdateEnemyHUD predef.
Also start using hp palette constants.
Diffstat (limited to 'items')
-rw-r--r-- | items/item_effects.asm | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/items/item_effects.asm b/items/item_effects.asm index d3ab93151..617fc1618 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -3193,7 +3193,7 @@ Functionf8b9: ; f8b9 ld [$cfa9], a ld [MonType], a ld c, NUM_MOVES -.asm_f8ce +.loop ld a, [hli] and a ret z @@ -3214,30 +3214,36 @@ Functionf8b9: ; f8b9 inc [hl] pop hl dec c - jr nz, .asm_f8ce + jr nz, .loop ret ; f8ec Functionf8ec: ; f8ec - ld a, [StringBuffer1] + ld a, [StringBuffer1 + 0] push af - ld a, [$d074] + ld a, [StringBuffer1 + 1] push af + ld a, [MonType] and a + ld hl, PartyMon1Moves ld bc, PartyMon2 - PartyMon1 jr z, .asm_f91a + ld hl, OTPartyMon1Moves dec a jr z, .asm_f91a + ld hl, TempMonMoves dec a jr z, .asm_f915 + ld hl, TempMonMoves dec a jr z, .asm_f915 + ld hl, BattleMonMoves .asm_f915 @@ -3250,6 +3256,7 @@ Functionf8ec: ; f8ec .asm_f91d ld a, [hl] dec a + push hl ld hl, Moves + MOVE_PP ld bc, MOVE_LENGTH @@ -3260,18 +3267,19 @@ Functionf8ec: ; f8ec ld de, StringBuffer1 ld [de], a pop hl + push bc ld bc, PartyMon1PP - PartyMon1Moves ld a, [MonType] cp WILDMON jr nz, .asm_f942 ld bc, EnemyMonPP - EnemyMonMoves - .asm_f942 add hl, bc ld a, [hl] and $c0 pop bc + or b ld hl, $d074 ld [hl], a @@ -3282,10 +3290,11 @@ Functionf8ec: ; f8ec ld a, [hl] and $3f ld [$d265], a + pop af - ld [$d074], a + ld [StringBuffer1 + 1], a pop af - ld [StringBuffer1], a + ld [StringBuffer1 + 0], a ret ; f963 |