Finish stats screen function labels

This commit is contained in:
PikalaxALT 2015-12-23 09:12:29 -05:00
parent 30b37da387
commit ddc05ec8dd
3 changed files with 40 additions and 33 deletions

View File

@ -5358,7 +5358,7 @@ BattleMenuPKMN_Loop:
jr BattleMenuPKMN_Loop jr BattleMenuPKMN_Loop
.Stats .Stats
call Function3e308 call Battle_StatsScreen
call CheckMobileBattleError call CheckMobileBattleError
jr c, .Cancel jr c, .Cancel
jp Function3e290 jp Function3e290
@ -5386,7 +5386,7 @@ BattleMenuPKMN_Loop:
ret ret
; 3e308 ; 3e308
Function3e308: ; 3e308 Battle_StatsScreen: ; 3e308
call DisableLCD call DisableLCD
ld hl, VTiles2 tile $31 ld hl, VTiles2 tile $31
ld de, VTiles0 ld de, VTiles0
@ -5401,7 +5401,7 @@ Function3e308: ; 3e308
call LowVolume call LowVolume
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
callba Function4dc7b callba BattleStatsScreenInit
call MaxVolume call MaxVolume
call DisableLCD call DisableLCD
ld hl, VTiles0 ld hl, VTiles0

View File

@ -1,4 +1,4 @@
Function4dc7b: ; 4dc7b (13:5c7b) BattleStatsScreenInit: ; 4dc7b (13:5c7b)
ld a, [wLinkMode] ld a, [wLinkMode]
cp LINK_MOBILE cp LINK_MOBILE
jr nz, StatsScreenInit jr nz, StatsScreenInit
@ -6,13 +6,13 @@ Function4dc7b: ; 4dc7b (13:5c7b)
ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd) ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd)
and a and a
jr z, StatsScreenInit jr z, StatsScreenInit
jr Function4dc8f jr _BattleStatsScreenInit
StatsScreenInit: ; 4dc8a StatsScreenInit: ; 4dc8a
ld hl, StatsScreenMain ld hl, StatsScreenMain
jr StatsScreenInit_gotaddress jr StatsScreenInit_gotaddress
Function4dc8f: ; 4dc8f _BattleStatsScreenInit: ; 4dc8f
ld hl, StatsScreenBattle ld hl, StatsScreenBattle
jr StatsScreenInit_gotaddress jr StatsScreenInit_gotaddress
@ -150,7 +150,7 @@ MonStatsInit: ; 4dd72 (13:5d72)
call ClearBGPalettes call ClearBGPalettes
call ClearTileMap call ClearTileMap
callba Function10402d callba Function10402d
call Function4ddf2 call StatsScreen_CopyToTempMon
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
jr z, .egg jr z, .egg
@ -221,10 +221,10 @@ StatsScreenWaitCry: ; 4dde6 (13:5de6)
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
Function4ddf2: ; 4ddf2 (13:5df2) StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
ld a, [MonType] ld a, [MonType]
cp BREEDMON cp BREEDMON
jr nz, .asm_4de10 jr nz, .breedmon
ld a, [wBufferMon] ld a, [wBufferMon]
ld [CurSpecies], a ld [CurSpecies], a
call GetBaseData call GetBaseData
@ -232,17 +232,18 @@ Function4ddf2: ; 4ddf2 (13:5df2)
ld de, TempMon ld de, TempMon
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes call CopyBytes
jr .asm_4de2a jr .done
.asm_4de10
.breedmon
callba CopyPkmnToTempMon callba CopyPkmnToTempMon
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
jr z, .asm_4de2a jr z, .done
ld a, [MonType] ld a, [MonType]
cp BOXMON cp BOXMON
jr c, .asm_4de2a jr c, .done
callba CalcTempmonStats callba CalcTempmonStats
.asm_4de2a .done
and a and a
ret ret
@ -293,6 +294,7 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
bit D_DOWN_F, a bit D_DOWN_F, a
jr nz, .d_down jr nz, .d_down
jr .done jr .done
.d_down .d_down
ld a, [MonType] ld a, [MonType]
cp BOXMON cp BOXMON
@ -314,8 +316,9 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
jr nz, .load_mon jr nz, .load_mon
ld a, b ld a, b
inc a inc a
ld [wd0d8], a ld [wPartyMenuCursor], a
jr .load_mon jr .load_mon
.d_up .d_up
ld a, [CurPartyMon] ld a, [CurPartyMon]
and a and a
@ -328,8 +331,9 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
jr nz, .load_mon jr nz, .load_mon
ld a, b ld a, b
inc a inc a
ld [wd0d8], a ld [wPartyMenuCursor], a
jr .load_mon jr .load_mon
.a_button .a_button
ld a, c ld a, c
cp $3 cp $3
@ -341,11 +345,13 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
jr nc, .set_page jr nc, .set_page
ld c, $1 ld c, $1
jr .set_page jr .set_page
.d_left .d_left
dec c dec c
jr nz, .set_page jr nz, .set_page
ld c, $3 ld c, $3
jr .set_page jr .set_page
.done .done
ret ret
@ -443,6 +449,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
; 4df7f ; 4df7f
Function4df7f: ; 4df7f Function4df7f: ; 4df7f
; unreferenced
hlcoord 7, 0 hlcoord 7, 0
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
ld d, SCREEN_HEIGHT ld d, SCREEN_HEIGHT
@ -503,7 +510,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [wcf64] ld a, [wcf64]
and $3 and $3
ld c, a ld c, a
call Function4e4cd call StatsScreen_LoadPageIndicators
hlcoord 0, 8 hlcoord 0, 8
lb bc, 10, 20 lb bc, 10, 20
call ClearBox call ClearBox
@ -808,23 +815,23 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
jr .cry jr .cry
.egg .egg
call Function4e271 call .AnimateEgg
call SetPalettes call SetPalettes
ret ret
.no_cry .no_cry
call Function4e253 call .AnimateMon
call SetPalettes call SetPalettes
ret ret
.cry .cry
call SetPalettes call SetPalettes
call Function4e253 call .AnimateMon
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call PlayCry2 call PlayCry2
ret ret
Function4e253: ; 4e253 (13:6253) .AnimateMon: ; 4e253 (13:6253)
ld hl, wcf64 ld hl, wcf64
set 5, [hl] set 5, [hl]
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
@ -841,26 +848,26 @@ Function4e253: ; 4e253 (13:6253)
call _PrepMonFrontpic call _PrepMonFrontpic
ret ret
Function4e271: ; 4e271 (13:6271) .AnimateEgg: ; 4e271 (13:6271)
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp UNOWN cp UNOWN
jr z, .unown jr z, .unownegg
ld a, $1 ld a, TRUE
ld [wBoxAlignment], a ld [wBoxAlignment], a
call Function4e289 call .get_animation
ret ret
.unown .unownegg
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
call Function4e289 call .get_animation
ret ret
Function4e289: ; 4e289 (13:6289) .get_animation: ; 4e289 (13:6289)
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call IsAPokemon call IsAPokemon
ret c ret c
call Function4e307 call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00 ld de, VTiles2 tile $00
predef FrontpicPredef predef FrontpicPredef
hlcoord 0, 0 hlcoord 0, 0
@ -937,7 +944,7 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad)
xor a xor a
ret ret
Function4e307: ; 4e307 (13:6307) StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
nop nop
push hl push hl
push de push de
@ -1065,7 +1072,7 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
push de push de
ld a, $1 ld a, $1
ld [wBoxAlignment], a ld [wBoxAlignment], a
call Function4e307 call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00 ld de, VTiles2 tile $00
predef FrontpicPredef predef FrontpicPredef
pop de pop de
@ -1076,7 +1083,7 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
set 6, [hl] set 6, [hl]
ret ret
Function4e4cd: ; 4e4cd (13:64cd) StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd)
hlcoord 13, 5 hlcoord 13, 5
ld a, $36 ld a, $36
call .load_square call .load_square

View File

@ -6539,7 +6539,7 @@ Function102bac: ; 102bac
ld [CurPartyMon], a ld [CurPartyMon], a
call LowVolume call LowVolume
call ClearSprites call ClearSprites
callba Function4dc8f callba _BattleStatsScreenInit
ld a, [CurPartyMon] ld a, [CurPartyMon]
inc a inc a
ld [wMenuCursorY], a ld [wMenuCursorY], a