ref: 1ab4b59d869195e89e2fd2e285809fab6f7318e5
parent: d1d186d1ee30c7b3e1934a395da01d03c69cbe55
author: yenatch <[email protected]>
date: Mon Dec 30 23:09:00 EST 2013
clean up some labels in battle asm
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -1049,12 +1049,12 @@
jr z, Function3c710
Function3c70b: ; 3c70b
ld hl, EnemyMonHPHi
- jr asm_3c713
+ jr Function3c713
Function3c710: ; 3c710
ld hl, BattleMonHP
-asm_3c713
+Function3c713: ; 3c713
ld a, [hli]
or [hl]
ret
@@ -2122,7 +2122,7 @@
ld [$d0ec], a
call Function3cf4a
jp z, Function3c0e5
- jr asm_3cdca
+ jr Function3cdca
.asm_3cdba
ld a, $1
@@ -2132,8 +2132,9 @@
xor a
ld [$d0ec], a
ret
+; 3cdca
-asm_3cdca
+Function3cdca: ; 3cdca
ld a, [$ffcb]
cp $1
jr z, .asm_3cde6
@@ -2143,7 +2144,7 @@
call ClearBox
call Function3d2b3
ld a, $1
- call asm_3cf78
+ call Function3cf78
jr .asm_3cdfc
.asm_3cde6
@@ -2150,7 +2151,7 @@
ld a, [CurPartyMon]
push af
ld a, $1
- call asm_3cf78
+ call Function3cf78
call ClearSprites
call Function309d
pop af
@@ -2381,11 +2382,12 @@
ld a, [hli]
or [hl]
ld a, $0
- jr nz, asm_3cf78
+ jr nz, Function3cf78
inc a
ret
+; 3cf78
-asm_3cf78
+Function3cf78: ; 3cf78
push af
xor a
ld [$c718], a
@@ -2399,7 +2401,7 @@
jr .asm_3cf92
.asm_3cf8f
- call asm_3d517
+ call Function3d517
.asm_3cf92
call Function3d57a
@@ -2760,7 +2762,7 @@
ld [$d0ec], a
call Function3cf4a
jp z, Function3c0e5
- jp asm_3cdca
+ jp Function3cdca
; 3d1aa
Function3d1aa: ; 3d1aa
@@ -3253,7 +3255,7 @@
Function3d4e1: ; 3d4e1
call Function3d714
- jr nc, asm_3d517
+ jr nc, Function3d517
call Function3d557
call Function3d533
jr c, .asm_3d4f1
@@ -3276,8 +3278,9 @@
ld [$c711], a
call Function309d
jp Function3e3ad
+; 3d517
-asm_3d517
+Function3d517: ; 3d517
call Function3d557
call Function3d533
jr c, .asm_3d522
@@ -4037,12 +4040,12 @@
Function3da74: ; 3da74
call Function3da85
- jr asm_3da7c
+ jr Function3da7c
Function3da79: ; 3da79
call Function3da97
-asm_3da7c
+Function3da7c: ; 3da7c
ld b, h
ld c, l
callab CheckShininess
@@ -8252,12 +8255,12 @@
ld a, [PlayerSubStatus4]
bit 4, a
ld hl, BattleAnimCmd_DD
- jr nz, asm_3f46f
+ jr nz, Function3f46f
Function3f447: ; 3f447
ld a, [$c6fe]
and a
ld hl, BattleAnimCmd_E2
- jr nz, asm_3f46f
+ jr nz, Function3f46f
ld a, [CurPartySpecies]
push af
ld a, [BattleMonSpecies]
@@ -8271,8 +8274,9 @@
pop af
ld [CurPartySpecies], a
ret
+; 3f46f
-asm_3f46f
+Function3f46f: ; 3f46f
ld a, [hBattleTurn]
push af
xor a
@@ -8288,12 +8292,12 @@
ld a, [EnemySubStatus4]
bit 4, a
ld hl, BattleAnimCmd_DD
- jr nz, asm_3f4b4
+ jr nz, Function3f4b4
Function3f486: ; 3f486
ld a, [$c6fa]
and a
ld hl, BattleAnimCmd_E2
- jr nz, asm_3f4b4
+ jr nz, Function3f4b4
ld a, [CurPartySpecies]
push af
ld a, [EnemyMonSpecies]
@@ -8309,8 +8313,9 @@
pop af
ld [CurPartySpecies], a
ret
+; 3f4b4
-asm_3f4b4
+Function3f4b4: ; 3f4b4
ld a, [hBattleTurn]
push af
call SetEnemyTurn
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -183,7 +183,7 @@
call CantMove
call UpdateBattleMonInParty
- ld hl, $5f48
+ ld hl, Function3df48
call CallBattleCore
ld a, $1
ld [$ffd4], a
@@ -443,7 +443,7 @@
call StdBattleTextBox
call CantMove
call UpdateEnemyMonInParty
- ld hl, $6036
+ ld hl, Function3e036
call CallBattleCore
ld a, $1
ld [$ffd4], a
@@ -697,7 +697,7 @@
and $60
call z, PlayFXAnimID
- ld hl, $5f48
+ ld hl, Function3df48
call CallBattleCore
ld a, $1
@@ -3801,7 +3801,7 @@
.asm_3548d
ld a, [DefaultFlypoint]
ld hl, PartyMon1Nickname
- call $38a2
+ call GetNick
ld a, $22
call Function0x355bd
ld a, [hli]
@@ -3825,7 +3825,7 @@
call StdBattleTextBox
ld a, [EnemyMonSpecies]
ld [CurSpecies], a
- call $3856
+ call GetBaseData
ld a, [$d239]
ld c, a
push bc
@@ -3833,7 +3833,7 @@
call Function0x355bd
ld a, [hl]
ld [CurSpecies], a
- call $3856
+ call GetBaseData
ld a, [$d238]
pop bc
ld b, a
@@ -3884,7 +3884,7 @@
add hl, bc
ld a, [hl]
ld [$d265], a
- call $343b
+ call GetPokemonName
jr .asm_35544
.asm_35532
@@ -3921,7 +3921,7 @@
.asm_3556b
ld a, [EnemyMonSpecies]
ld [$d265], a
- call $343b
+ call GetPokemonName
ld hl, BeatUpAttackText
call StdBattleTextBox
jp EnemyAttackDamage
@@ -5917,7 +5917,7 @@
call _GetBattleVar
set 4, [hl]
call UpdateOpponentInParty
- ld hl, $6c76
+ ld hl, Function3ec76
call CallBattleCore
ld de, $0105
call Function0x37e54
@@ -6039,13 +6039,13 @@
call _GetBattleVar
set 6, [hl]
call UpdateOpponentInParty
- ld hl, $6c39
+ ld hl, Function3ec39
call CallBattleCore
ld de, $0109
call Function0x37e54
call RefreshBattleHuds
call PrintParalyze
- ld hl, $5de9
+ ld hl, Function3dde9
jp CallBattleCore
; 361ac
@@ -6837,10 +6837,10 @@
call SwitchTurn
- ld hl, $6c39
+ ld hl, Function3ec39
call CallBattleCore
- ld hl, $6c76
+ ld hl, Function3ec76
call CallBattleCore
jp SwitchTurn
@@ -6857,10 +6857,10 @@
call SwitchTurn
- ld hl, $6c39
+ ld hl, Function3ec39
call CallBattleCore
- ld hl, $6c76
+ ld hl, Function3ec76
call CallBattleCore
jp SwitchTurn
@@ -7291,7 +7291,7 @@
ld hl, DraggedOutText
call StdBattleTextBox
- ld hl, $5c23
+ ld hl, Function3dc23
jp CallBattleCore
.asm_368ca
@@ -7354,7 +7354,7 @@
call DelayFrames
ld hl, $c535
ld bc, $050b
- call $0fb6
+ call ClearBox
ld c, $14
call DelayFrames
ld a, [PartyCount]
@@ -7382,13 +7382,13 @@
ld a, d
ld [CurPartyMon], a
- ld hl, $5b32
+ ld hl, Function3db32
call CallBattleCore
ld hl, DraggedOutText
call StdBattleTextBox
- ld hl, $5c23
+ ld hl, Function3dc23
jp CallBattleCore
.asm_36969
@@ -8130,7 +8130,7 @@
cp $10
ret nz
.asm_36db0
- ld hl, $5e51
+ ld hl, Function3de51
jp CallBattleCore
; 36db6
@@ -8202,11 +8202,11 @@
call _GetBattleVar
set 6, [hl]
call UpdateOpponentInParty
- ld hl, $6c39
+ ld hl, Function3ec39
call CallBattleCore
call UpdateBattleHuds
call PrintParalyze
- ld hl, $5de9
+ ld hl, Function3dde9
jp CallBattleCore
.asm_36e49
call Function0x37e77
@@ -8781,16 +8781,16 @@
pop hl
.asm_37199
jr z, .asm_371a3 ; 37199 $8
- ld hl, $4c9f
+ ld hl, GetHalfMaxHP
call CallBattleCore
jr .asm_371a9 ; 371a1 $6
.asm_371a3
- ld hl, $4cac
+ ld hl, GetMaxHP
call CallBattleCore
.asm_371a9
call Function0x37e01
call SwitchTurn
- ld hl, $4cef
+ ld hl, Function3ccef
call CallBattleCore
call SwitchTurn
call UpdateUserInParty
@@ -8851,7 +8851,7 @@
inc de
inc de
ld bc, $0004
- call $3026
+ call CopyBytes
ld a, [hBattleTurn]
and a
jr z, .asm_3723a ; 3722e $a
@@ -8878,7 +8878,7 @@
ld e, l
pop hl
ld bc, $000c
- call $3026
+ call CopyBytes
ld bc, $ffe2
add hl, bc
push de
@@ -8893,10 +8893,10 @@
inc de
and a
jr z, .asm_3726c ; 37262 $8
- cp $a6
- ld a, $1
+ cp SKETCH
+ ld a, 1
jr z, .asm_3726c ; 37268 $2
- ld a, $5
+ ld a, 5
.asm_3726c
ld [hli], a
dec b
@@ -8904,7 +8904,7 @@
pop hl
ld a, [hl]
ld [$d265], a
- call $343b
+ call GetPokemonName
ld hl, EnemyStats
ld de, PlayerStats
ld bc, $000a
@@ -9514,10 +9514,10 @@
ld a, BANK(AICheckPlayerMaxHP)
rst FarCall
jr c, .asm_378f3 ; 378d1 $20
- ld hl, $4c8e
+ ld hl, GetQuarterMaxHP
call CallBattleCore
call SwitchTurn
- ld hl, $4cef
+ ld hl, Function3ccef
call CallBattleCore
call SwitchTurn
ld hl, RegainedHealthText
@@ -9688,20 +9688,15 @@
call DelayFrames
call Function1d6e
-
callba Function3d2f7
-
callba Function3d380
-
call ClearPalettes
-
callba Function3ed9f
-
call Function1c17
call ClearSprites
- ld hl, $c4a1
- ld bc, $040a
+ hlcoord 1, 0
+ lb bc, 4, 10
call ClearBox
ld b, 1
@@ -9710,13 +9705,11 @@
call Function0x37a67
callba Function3d2e0
-
jp c, EndMoveEffect
ld hl, Function3e459
call CallBattleCore
call Function0x37ab1
-
ret
.Enemy
@@ -9737,19 +9730,19 @@
xor a
ld [$c718], a
- ld hl, $5517
+ ld hl, Function3d517
call CallBattleCore
- ld hl, $557a
+ ld hl, Function3d57a
call CallBattleCore
ld a, 1
ld [$d265], a
- ld hl, $6cab
+ ld hl, Function3ecab
call CallBattleCore
- ld hl, $5c23
+ ld hl, Function3dc23
call CallBattleCore
jr Function0x37ab1
@@ -9764,12 +9757,12 @@
ld a, 1
ld [$d0ec], a
- call $1d6e
+ call Function1d6e
- ld hl, $68e4
+ ld hl, Function3e8e4
call CallBattleCore
- call $1c17
+ call Function1c17
xor a
ld [$d0ec], a
@@ -9783,8 +9776,8 @@
and a
ret z
- call $1d6e
- ld hl, $68e4
+ call Function1d6e
+ ld hl, Function3e8e4
call CallBattleCore
ld a, [OTPartyCount]
add $4