shithub: pokecrystal

Download patch

ref: ddc05ec8dd36eb88d48a5dab258f4daae85eadc3
parent: 30b37da3870217da1eaecca82bb77ca4343ada49
author: PikalaxALT <PikalaxALT@gmail.com>
date: Wed Dec 23 04:12:29 EST 2015

Finish stats screen function labels

--- a/battle/core.asm
+++ b/battle/core.asm
@@ -5358,7 +5358,7 @@
 	jr BattleMenuPKMN_Loop
 
 .Stats
-	call Function3e308
+	call Battle_StatsScreen
 	call CheckMobileBattleError
 	jr c, .Cancel
 	jp Function3e290
@@ -5386,7 +5386,7 @@
 	ret
 ; 3e308
 
-Function3e308: ; 3e308
+Battle_StatsScreen: ; 3e308
 	call DisableLCD
 	ld hl, VTiles2 tile $31
 	ld de, VTiles0
@@ -5401,7 +5401,7 @@
 	call LowVolume
 	xor a ; PARTYMON
 	ld [MonType], a
-	callba Function4dc7b
+	callba BattleStatsScreenInit
 	call MaxVolume
 	call DisableLCD
 	ld hl, VTiles0
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -1,4 +1,4 @@
-Function4dc7b: ; 4dc7b (13:5c7b)
+BattleStatsScreenInit: ; 4dc7b (13:5c7b)
 	ld a, [wLinkMode]
 	cp LINK_MOBILE
 	jr nz, StatsScreenInit
@@ -6,13 +6,13 @@
 	ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd)
 	and a
 	jr z, StatsScreenInit
-	jr Function4dc8f
+	jr _BattleStatsScreenInit
 
 StatsScreenInit: ; 4dc8a
 	ld hl, StatsScreenMain
 	jr StatsScreenInit_gotaddress
 
-Function4dc8f: ; 4dc8f
+_BattleStatsScreenInit: ; 4dc8f
 	ld hl, StatsScreenBattle
 	jr StatsScreenInit_gotaddress
 
@@ -150,7 +150,7 @@
 	call ClearBGPalettes
 	call ClearTileMap
 	callba Function10402d
-	call Function4ddf2
+	call StatsScreen_CopyToTempMon
 	ld a, [CurPartySpecies]
 	cp EGG
 	jr z, .egg
@@ -221,10 +221,10 @@
 	ld [wJumptableIndex], a
 	ret
 
-Function4ddf2: ; 4ddf2 (13:5df2)
+StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
 	ld a, [MonType]
 	cp BREEDMON
-	jr nz, .asm_4de10
+	jr nz, .breedmon
 	ld a, [wBufferMon]
 	ld [CurSpecies], a
 	call GetBaseData
@@ -232,17 +232,18 @@
 	ld de, TempMon
 	ld bc, PARTYMON_STRUCT_LENGTH
 	call CopyBytes
-	jr .asm_4de2a
-.asm_4de10
+	jr .done
+
+.breedmon
 	callba CopyPkmnToTempMon
 	ld a, [CurPartySpecies]
 	cp EGG
-	jr z, .asm_4de2a
+	jr z, .done
 	ld a, [MonType]
 	cp BOXMON
-	jr c, .asm_4de2a
+	jr c, .done
 	callba CalcTempmonStats
-.asm_4de2a
+.done
 	and a
 	ret
 
@@ -293,6 +294,7 @@
 	bit D_DOWN_F, a
 	jr nz, .d_down
 	jr .done
+
 .d_down
 	ld a, [MonType]
 	cp BOXMON
@@ -314,8 +316,9 @@
 	jr nz, .load_mon
 	ld a, b
 	inc a
-	ld [wd0d8], a
+	ld [wPartyMenuCursor], a
 	jr .load_mon
+
 .d_up
 	ld a, [CurPartyMon]
 	and a
@@ -328,8 +331,9 @@
 	jr nz, .load_mon
 	ld a, b
 	inc a
-	ld [wd0d8], a
+	ld [wPartyMenuCursor], a
 	jr .load_mon
+
 .a_button
 	ld a, c
 	cp $3
@@ -341,11 +345,13 @@
 	jr nc, .set_page
 	ld c, $1
 	jr .set_page
+
 .d_left
 	dec c
 	jr nz, .set_page
 	ld c, $3
 	jr .set_page
+
 .done
 	ret
 
@@ -443,6 +449,7 @@
 ; 4df7f
 
 Function4df7f: ; 4df7f
+; unreferenced
 	hlcoord 7, 0
 	ld bc, SCREEN_WIDTH
 	ld d, SCREEN_HEIGHT
@@ -503,7 +510,7 @@
 	ld a, [wcf64]
 	and $3
 	ld c, a
-	call Function4e4cd
+	call StatsScreen_LoadPageIndicators
 	hlcoord 0, 8
 	lb bc, 10, 20
 	call ClearBox
@@ -808,23 +815,23 @@
 	jr .cry
 
 .egg
-	call Function4e271
+	call .AnimateEgg
 	call SetPalettes
 	ret
 
 .no_cry
-	call Function4e253
+	call .AnimateMon
 	call SetPalettes
 	ret
 
 .cry
 	call SetPalettes
-	call Function4e253
+	call .AnimateMon
 	ld a, [CurPartySpecies]
 	call PlayCry2
 	ret
 
-Function4e253: ; 4e253 (13:6253)
+.AnimateMon: ; 4e253 (13:6253)
 	ld hl, wcf64
 	set 5, [hl]
 	ld a, [CurPartySpecies]
@@ -841,26 +848,26 @@
 	call _PrepMonFrontpic
 	ret
 
-Function4e271: ; 4e271 (13:6271)
+.AnimateEgg: ; 4e271 (13:6271)
 	ld a, [CurPartySpecies]
 	cp UNOWN
-	jr z, .unown
-	ld a, $1
+	jr z, .unownegg
+	ld a, TRUE
 	ld [wBoxAlignment], a
-	call Function4e289
+	call .get_animation
 	ret
 
-.unown
+.unownegg
 	xor a
 	ld [wBoxAlignment], a
-	call Function4e289
+	call .get_animation
 	ret
 
-Function4e289: ; 4e289 (13:6289)
+.get_animation: ; 4e289 (13:6289)
 	ld a, [CurPartySpecies]
 	call IsAPokemon
 	ret c
-	call Function4e307
+	call StatsScreen_LoadTextBoxSpaceGFX
 	ld de, VTiles2 tile $00
 	predef FrontpicPredef
 	hlcoord 0, 0
@@ -937,7 +944,7 @@
 	xor a
 	ret
 
-Function4e307: ; 4e307 (13:6307)
+StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
 	nop
 	push hl
 	push de
@@ -1065,7 +1072,7 @@
 	push de
 	ld a, $1
 	ld [wBoxAlignment], a
-	call Function4e307
+	call StatsScreen_LoadTextBoxSpaceGFX
 	ld de, VTiles2 tile $00
 	predef FrontpicPredef
 	pop de
@@ -1076,7 +1083,7 @@
 	set 6, [hl]
 	ret
 
-Function4e4cd: ; 4e4cd (13:64cd)
+StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd)
 	hlcoord 13, 5
 	ld a, $36
 	call .load_square
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -6539,7 +6539,7 @@
 	ld [CurPartyMon], a
 	call LowVolume
 	call ClearSprites
-	callba Function4dc8f
+	callba _BattleStatsScreenInit
 	ld a, [CurPartyMon]
 	inc a
 	ld [wMenuCursorY], a