More stats screen shenanigans

This commit is contained in:
PikalaxALT 2015-12-22 22:19:33 -05:00
parent d08199c79d
commit 30b37da387
16 changed files with 219 additions and 223 deletions

View File

@ -2,7 +2,7 @@
const SCGB_00 const SCGB_00
const SCGB_01 const SCGB_01
const SCGB_02 const SCGB_02
const SCGB_03 const SCGB_STATS_SCREEN_HP_PALS
const SCGB_04 const SCGB_04
const SCGB_05 const SCGB_05
const SCGB_06 const SCGB_06
@ -31,5 +31,5 @@
const SCGB_1D const SCGB_1D
const SCGB_1E const SCGB_1E
SCGB_FC EQU -4 SCGB_PARTY_MENU_HP_PALS EQU -4
SCGB_RAM EQU -1 SCGB_RAM EQU -1

View File

@ -117,8 +117,8 @@ Function8ad1: ; 8ad1
ret ret
; 8ade ; 8ade
Function8ade: ; 8ade SGB layout $fc SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
ld hl, wcd9b ld hl, wHPPals
ld a, [wSGBPals] ld a, [wSGBPals]
ld e, a ld e, a
ld d, $0 ld d, $0
@ -399,10 +399,10 @@ endr
ret ret
; 8c8a ; 8c8a
Function8c8a: ; 8c8a LoadStatsScreenPals: ; 8c8a
call CheckCGB call CheckCGB
ret z ret z
ld hl, Unknown_8f6a ld hl, StatsScreenPals
ld b, 0 ld b, 0
dec c dec c
rept 2 rept 2
@ -734,8 +734,8 @@ ApplyAttrMap: ; 96b3
ret ret
; 96f3 ; 96f3
Function96f3: ; 96f3 CGB layout $fc CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
ld hl, wcd9b ld hl, wHPPals
ld a, [wSGBPals] ld a, [wSGBPals]
ld e, a ld e, a
ld d, $0 ld d, $0
@ -746,16 +746,15 @@ Function96f3: ; 96f3 CGB layout $fc
inc a inc a
ld e, a ld e, a
hlcoord 11, 2, AttrMap hlcoord 11, 2, AttrMap
ld bc, $28 ld bc, 2 * SCREEN_WIDTH
ld a, [wSGBPals] ld a, [wSGBPals]
.asm_970b .loop
and a and a
jr z, .asm_9712 jr z, .done
add hl, bc add hl, bc
dec a dec a
jr .asm_970b jr .loop
.done
.asm_9712
lb bc, 2, 8 lb bc, 2, 8
ld a, e ld a, e
call FillBoxCGB call FillBoxCGB
@ -966,7 +965,6 @@ Function981a: ; 981a
ld a, $10 ld a, $10
jr nz, .okay jr nz, .okay
ld a, $20 ld a, $20
.okay .okay
ld [rJOYP], a ld [rJOYP], a
ld a, $30 ld a, $30
@ -980,7 +978,7 @@ Function981a: ; 981a
ld [rJOYP], a ld [rJOYP], a
ld a, $30 ld a, $30
ld [rJOYP], a ld [rJOYP], a
call Function9a7a call SGBDelayCycles
pop bc pop bc
dec b dec b
jr nz, .loop jr nz, .loop
@ -1004,10 +1002,10 @@ Function9853: ; 9853
ld [hSGB], a ld [hSGB], a
call Function98eb call Function98eb
call Function99b4 call Function99b4
call Function9a7a call SGBDelayCycles
call Function993f call Function993f
call Function992c call Function992c
call Function9a7a call SGBDelayCycles
call Function993f call Function993f
ld hl, PalPacket_9d66 ld hl, PalPacket_9d66
call Function981a call Function981a
@ -1113,7 +1111,7 @@ Function9911: ; 9911
ld hl, PalPacket_9d56 ld hl, PalPacket_9d56
call Function981a call Function981a
call Function992c call Function992c
call Function9a7a call SGBDelayCycles
call Function993f call Function993f
ld hl, PalPacket_9d66 ld hl, PalPacket_9d66
call Function981a call Function981a
@ -1147,7 +1145,7 @@ Function993f: ; 993f
Function994a: ; 994a Function994a: ; 994a
ld hl, PalPacket_9d26 ld hl, PalPacket_9d26
call Function981a call Function981a
call Function9a7a call SGBDelayCycles
ld a, [rJOYP] ld a, [rJOYP]
and $3 and $3
cp $3 cp $3
@ -1157,26 +1155,26 @@ Function994a: ; 994a
rept 2 rept 2
ld a, [rJOYP] ld a, [rJOYP]
endr endr
call Function9a7a call SGBDelayCycles
call Function9a7a call SGBDelayCycles
ld a, $30 ld a, $30
ld [rJOYP], a ld [rJOYP], a
call Function9a7a call SGBDelayCycles
call Function9a7a call SGBDelayCycles
ld a, $10 ld a, $10
ld [rJOYP], a ld [rJOYP], a
rept 6 rept 6
ld a, [rJOYP] ld a, [rJOYP]
endr endr
call Function9a7a call SGBDelayCycles
call Function9a7a call SGBDelayCycles
ld a, $30 ld a, $30
ld [rJOYP], a ld [rJOYP], a
rept 3 rept 3
ld a, [rJOYP] ld a, [rJOYP]
endr endr
call Function9a7a call SGBDelayCycles
call Function9a7a call SGBDelayCycles
ld a, [rJOYP] ld a, [rJOYP]
and $3 and $3
cp $3 cp $3
@ -1194,7 +1192,7 @@ endr
Function99ab: ; 99ab Function99ab: ; 99ab
ld hl, PalPacket_9d16 ld hl, PalPacket_9d16
call Function981a call Function981a
jp Function9a7a jp SGBDelayCycles
; 99b4 ; 99b4
Function99b4: ; 99b4 Function99b4: ; 99b4
@ -1319,16 +1317,16 @@ DrawDefaultTiles: ; 0x9a64
ret ret
; 0x9a7a ; 0x9a7a
Function9a7a: ; 9a7a SGBDelayCycles: ; 9a7a
ld de, $1b58 ld de, 7000
.asm_9a7d .wait
nop nop
nop nop
nop nop
dec de dec de
ld a, d ld a, d
or e or e
jr nz, .asm_9a7d jr nz, .wait
ret ret
; 9a86 ; 9a86

View File

@ -583,8 +583,7 @@ Place2DMenuCursor: ; 24329
ret ret
; 24374 ; 24374
_BackUpTiles:: ; 24374 _PushWindow:: ; 24374
; Push the window
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $7 ld a, $7

View File

@ -143,15 +143,14 @@ PlacePartyHPBar: ; 500cf
ld d, $6 ld d, $6
ld b, $0 ld b, $0
call DrawBattleHPBar call DrawBattleHPBar
ld hl, wcd9b ld hl, wHPPals
ld a, [wSGBPals] ld a, [wSGBPals]
ld c, a ld c, a
ld b, $0 ld b, $0
add hl, bc add hl, bc
call SetHPPal call SetHPPal
ld b, SCGB_FC ld b, SCGB_PARTY_MENU_HP_PALS
call GetSGBLayout call GetSGBLayout
.skip .skip
ld hl, wSGBPals ld hl, wSGBPals
inc [hl] inc [hl]

View File

@ -66,7 +66,7 @@ StatsScreenMain: ; 0x4dcd2
and $7f and $7f
ld hl, StatsScreenPointerTable ld hl, StatsScreenPointerTable
rst JumpTable rst JumpTable
call Function4dd3a ; check for keys? call StatsScreen_WaitAnim ; check for keys?
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr z, .loop jr z, .loop
@ -88,7 +88,7 @@ StatsScreenBattle: ; 4dcf7
and $7f and $7f
ld hl, StatsScreenPointerTable ld hl, StatsScreenPointerTable
rst JumpTable rst JumpTable
call Function4dd3a call StatsScreen_WaitAnim
callba Function100dfd callba Function100dfd
jr c, .exit jr c, .exit
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
@ -100,44 +100,46 @@ StatsScreenBattle: ; 4dcf7
; 4dd2a ; 4dd2a
StatsScreenPointerTable: ; 4dd2a StatsScreenPointerTable: ; 4dd2a
dw MonStatsInit ; regular pokémon jumptable_start
dw EggStatsInit ; egg jumptable MonStatsInit ; regular pokémon
dw StatsScreenWaitCry jumptable EggStatsInit ; egg
dw Function4ddac jumptable StatsScreenWaitCry
dw Function4ddc6 jumptable EggStatsJoypad
dw StatsScreenWaitCry jumptable StatsScreen_LoadPage
dw Function4ddd6 jumptable StatsScreenWaitCry
dw Function4dd6c jumptable MonStatsJoypad
jumptable StatsScreen_Exit
; 4dd3a ; 4dd3a
Function4dd3a: ; 4dd3a (13:5d3a) StatsScreen_WaitAnim: ; 4dd3a (13:5d3a)
ld hl, wcf64 ld hl, wcf64
bit 6, [hl] bit 6, [hl]
jr nz, .asm_4dd49 jr nz, .try_anim
bit 5, [hl] bit 5, [hl]
jr nz, .asm_4dd56 jr nz, .finish
call DelayFrame call DelayFrame
ret ret
.asm_4dd49
.try_anim
callba SetUpPokeAnim callba SetUpPokeAnim
jr nc, .asm_4dd56 jr nc, .finish
ld hl, wcf64 ld hl, wcf64
res 6, [hl] res 6, [hl]
.asm_4dd56 .finish
ld hl, wcf64 ld hl, wcf64
res 5, [hl] res 5, [hl]
callba Function10402d callba Function10402d
ret ret
Function4dd62: ; 4dd62 (13:5d62) StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
and $80 and $80
or h or h
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
Function4dd6c: ; 4dd6c (13:5d6c) StatsScreen_Exit: ; 4dd6c (13:5d6c)
ld hl, wJumptableIndex ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
ret ret
@ -151,16 +153,17 @@ MonStatsInit: ; 4dd72 (13:5d72)
call Function4ddf2 call Function4ddf2
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
jr z, .asm_4dd9b jr z, .egg
call Function4deea call StatsScreen_InitUpperHalf
ld hl, wcf64 ld hl, wcf64
set 4, [hl] set 4, [hl]
ld h, $4 ld h, StatsScreen_LoadPageTableIndex
call Function4dd62 call StatsScreen_SetJumptableIndex
ret ret
.asm_4dd9b
ld h, $1 .egg
call Function4dd62 ld h, EggStatsInitTableIndex
call StatsScreen_SetJumptableIndex
ret ret
EggStatsInit: ; 4dda1 EggStatsInit: ; 4dda1
@ -172,24 +175,26 @@ EggStatsInit: ; 4dda1
; 0x4ddac ; 0x4ddac
Function4ddac: ; 4ddac (13:5dac) EggStatsJoypad: ; 4ddac (13:5dac)
call Function4de2c call StatsScreen_GetJoypad
jr nc, .asm_4ddb7 jr nc, .check
ld h, $0 ld h, MonStatsInitTableIndex
call Function4dd62 call StatsScreen_SetJumptableIndex
ret
.asm_4ddb7
bit 0, a
jr nz, .asm_4ddc0
and $c3
jp Function4de54
.asm_4ddc0
ld h, $7
call Function4dd62
ret ret
Function4ddc6: ; 4ddc6 (13:5dc6) .check
call Function4dfb6 bit A_BUTTON_F, a
jr nz, .quit
and D_DOWN | D_UP | A_BUTTON | B_BUTTON
jp StatsScreen_JoypadAction
.quit
ld h, StatsScreen_ExitTableIndex
call StatsScreen_SetJumptableIndex
ret
StatsScreen_LoadPage: ; 4ddc6 (13:5dc6)
call StatsScreen_LoadGFX
ld hl, wcf64 ld hl, wcf64
res 4, [hl] res 4, [hl]
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
@ -197,16 +202,16 @@ Function4ddc6: ; 4ddc6 (13:5dc6)
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
Function4ddd6: ; 4ddd6 (13:5dd6) MonStatsJoypad: ; 4ddd6 (13:5dd6)
call Function4de2c call StatsScreen_GetJoypad
jr nc, .asm_4dde1 jr nc, .next
ld h, $0 ld h, MonStatsInitTableIndex
call Function4dd62 call StatsScreen_SetJumptableIndex
ret ret
.asm_4dde1 .next
and $f3 and D_DOWN | D_UP | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
jp Function4de54 jp StatsScreen_JoypadAction
StatsScreenWaitCry: ; 4dde6 (13:5de6) StatsScreenWaitCry: ; 4dde6 (13:5de6)
call IsSFXPlaying call IsSFXPlaying
@ -241,7 +246,7 @@ Function4ddf2: ; 4ddf2 (13:5df2)
and a and a
ret ret
Function4de2c: ; 4de2c (13:5e2c) StatsScreen_GetJoypad: ; 4de2c (13:5e2c)
call GetJoypad call GetJoypad
ld a, [MonType] ld a, [MonType]
cp BREEDMON cp BREEDMON
@ -254,7 +259,7 @@ Function4de2c: ; 4de2c (13:5e2c)
pop de pop de
pop hl pop hl
ld a, [wMenuJoypad] ld a, [wMenuJoypad]
and $c0 and D_DOWN | D_UP
jr nz, .set_carry jr nz, .set_carry
ld a, [wMenuJoypad] ld a, [wMenuJoypad]
jr .clear_flags jr .clear_flags
@ -269,100 +274,102 @@ Function4de2c: ; 4de2c (13:5e2c)
scf scf
ret ret
Function4de54: ; 4de54 (13:5e54) StatsScreen_JoypadAction: ; 4de54 (13:5e54)
push af push af
ld a, [wcf64] ld a, [wcf64]
and $3 and $3
ld c, a ld c, a
pop af pop af
bit 1, a bit B_BUTTON_F, a
jp nz, Function4dee4 jp nz, .b_button
bit 5, a bit D_LEFT_F, a
jr nz, .asm_4dec7 jr nz, .d_left
bit 4, a bit D_RIGHT_F, a
jr nz, .asm_4debd jr nz, .d_right
bit 0, a bit A_BUTTON_F, a
jr nz, .asm_4deb8 jr nz, .a_button
bit 6, a bit D_UP_F, a
jr nz, .asm_4dea0 jr nz, .d_up
bit 7, a bit D_DOWN_F, a
jr nz, .asm_4de77 jr nz, .d_down
jr .asm_4dece jr .done
.asm_4de77 .d_down
ld a, [MonType] ld a, [MonType]
cp BOXMON cp BOXMON
jr nc, .asm_4dece jr nc, .done
and a and a
ld a, [PartyCount] ld a, [PartyCount]
jr z, .asm_4de87 jr z, .next_mon
ld a, [OTPartyCount] ld a, [OTPartyCount]
.asm_4de87 .next_mon
ld b, a ld b, a
ld a, [CurPartyMon] ld a, [CurPartyMon]
inc a inc a
cp b cp b
jr z, .asm_4dece jr z, .done
ld [CurPartyMon], a ld [CurPartyMon], a
ld b, a ld b, a
ld a, [MonType] ld a, [MonType]
and a and a
jr nz, .asm_4dede jr nz, .load_mon
ld a, b ld a, b
inc a inc a
ld [wd0d8], a ld [wd0d8], a
jr .asm_4dede jr .load_mon
.asm_4dea0 .d_up
ld a, [CurPartyMon] ld a, [CurPartyMon]
and a and a
jr z, .asm_4dece jr z, .done
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
ld b, a ld b, a
ld a, [MonType] ld a, [MonType]
and a and a
jr nz, .asm_4dede jr nz, .load_mon
ld a, b ld a, b
inc a inc a
ld [wd0d8], a ld [wd0d8], a
jr .asm_4dede jr .load_mon
.asm_4deb8 .a_button
ld a, c ld a, c
cp $3 cp $3
jr z, Function4dee4 jr z, .b_button
.asm_4debd .d_right
inc c inc c
ld a, $3 ld a, $3
cp c cp c
jr nc, .asm_4decf jr nc, .set_page
ld c, $1 ld c, $1
jr .asm_4decf jr .set_page
.asm_4dec7 .d_left
dec c dec c
jr nz, .asm_4decf jr nz, .set_page
ld c, $3 ld c, $3
jr .asm_4decf jr .set_page
.asm_4dece .done
ret ret
.asm_4decf
.set_page
ld a, [wcf64] ld a, [wcf64]
and $fc and %11111100
or c or c
ld [wcf64], a ld [wcf64], a
ld h, $4 ld h, StatsScreen_LoadPageTableIndex
call Function4dd62 call StatsScreen_SetJumptableIndex
ret
.asm_4dede
ld h, $0
call Function4dd62
ret ret
Function4dee4: ; 4dee4 (13:5ee4) .load_mon
ld h, $7 ld h, MonStatsInitTableIndex
call Function4dd62 call StatsScreen_SetJumptableIndex
ret ret
Function4deea: ; 4deea (13:5eea) .b_button: ; 4dee4 (13:5ee4)
call Function4df45 ld h, StatsScreen_ExitTableIndex
call StatsScreen_SetJumptableIndex
ret
StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
call .PlaceHPBar
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, [CurBaseData] ; wd236 (aliases: BaseDexNo) ld a, [CurBaseData] ; wd236 (aliases: BaseDexNo)
@ -379,13 +386,13 @@ Function4deea: ; 4deea (13:5eea)
call PrintNum call PrintNum
hlcoord 14, 0 hlcoord 14, 0
call PrintLevel call PrintLevel
ld hl, Unknown_4df77 ld hl, .NicknamePointers
call Function4e528 call GetNicknamePointer
call Function4e505 call CopyNickname
hlcoord 8, 2 hlcoord 8, 2
call PlaceString call PlaceString
hlcoord 18, 0 hlcoord 18, 0
call Function4df66 call .PlaceGenderChar
hlcoord 9, 4 hlcoord 9, 4
ld a, "/" ld a, "/"
ld [hli], a ld [hli], a
@ -393,12 +400,12 @@ Function4deea: ; 4deea (13:5eea)
ld [wd265], a ld [wd265], a
call GetPokemonName call GetPokemonName
call PlaceString call PlaceString
call Function4df8f call StatsScreen_PlaceHorizontalDivider
call Function4df9b call StatsScreen_PlacePageSwitchArrows
call Function4dfa6 call StatsScreen_PlaceShinyIcon
ret ret
Function4df45: ; 4df45 (13:5f45) .PlaceHPBar: ; 4df45 (13:5f45)
ld hl, TempMonHP ld hl, TempMonHP
ld a, [hli] ld a, [hli]
ld b, a ld b, a
@ -410,12 +417,12 @@ Function4df45: ; 4df45 (13:5f45)
callba ComputeHPBarPixels callba ComputeHPBarPixels
ld hl, wcda1 ld hl, wcda1
call SetHPPal call SetHPPal
ld b, SCGB_03 ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout call GetSGBLayout
call DelayFrame call DelayFrame
ret ret
Function4df66: ; 4df66 (13:5f66) .PlaceGenderChar: ; 4df66 (13:5f66)
push hl push hl
callba GetGender callba GetGender
pop hl pop hl
@ -428,11 +435,11 @@ Function4df66: ; 4df66 (13:5f66)
ret ret
; 4df77 (13:5f77) ; 4df77 (13:5f77)
Unknown_4df77: ; 4df77 .NicknamePointers: ; 4df77
dw PartyMonNicknames dw PartyMonNicknames
dw OTPartyMonNicknames dw OTPartyMonNicknames
dw sBoxMonNicknames dw sBoxMonNicknames
dw wd002 dw wBufferMonNick
; 4df7f ; 4df7f
Function4df7f: ; 4df7f Function4df7f: ; 4df7f
@ -448,7 +455,7 @@ Function4df7f: ; 4df7f
ret ret
; 4df8f ; 4df8f
Function4df8f: ; 4df8f (13:5f8f) StatsScreen_PlaceHorizontalDivider: ; 4df8f (13:5f8f)
hlcoord 0, 7 hlcoord 0, 7
ld b, SCREEN_WIDTH ld b, SCREEN_WIDTH
ld a, "_" ld a, "_"
@ -458,14 +465,14 @@ Function4df8f: ; 4df8f (13:5f8f)
jr nz, .loop jr nz, .loop
ret ret
Function4df9b: ; 4df9b (13:5f9b) StatsScreen_PlacePageSwitchArrows: ; 4df9b (13:5f9b)
hlcoord 12, 6 hlcoord 12, 6
ld [hl], "◀" ld [hl], "◀"
hlcoord 19, 6 hlcoord 19, 6
ld [hl], "▶" ld [hl], "▶"
ret ret
Function4dfa6: ; 4dfa6 (13:5fa6) StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6)
ld bc, TempMonDVs ld bc, TempMonDVs
callba CheckShininess callba CheckShininess
ret nc ret nc
@ -473,15 +480,15 @@ Function4dfa6: ; 4dfa6 (13:5fa6)
ld [hl], "<SHINY>" ld [hl], "<SHINY>"
ret ret
Function4dfb6: ; 4dfb6 (13:5fb6) StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [BaseDexNo] ; wd236 (aliases: BaseDexNo) ld a, [BaseDexNo] ; wd236 (aliases: BaseDexNo)
ld [wd265], a ld [wd265], a
ld [CurSpecies], a ld [CurSpecies], a
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function4dfda call .ClearBox
call DrawStatsScreenPage call .PageTilemap
call Function4dfed call .LoadPals
ld hl, wcf64 ld hl, wcf64
bit 4, [hl] bit 4, [hl]
jr nz, .place_frontpic jr nz, .place_frontpic
@ -492,7 +499,7 @@ Function4dfb6: ; 4dfb6 (13:5fb6)
call StatsScreen_PlaceFrontpic call StatsScreen_PlaceFrontpic
ret ret
Function4dfda: ; 4dfda (13:5fda) .ClearBox: ; 4dfda (13:5fda)
ld a, [wcf64] ld a, [wcf64]
and $3 and $3
ld c, a ld c, a
@ -502,17 +509,17 @@ Function4dfda: ; 4dfda (13:5fda)
call ClearBox call ClearBox
ret ret
Function4dfed: ; 4dfed (13:5fed) .LoadPals: ; 4dfed (13:5fed)
ld a, [wcf64] ld a, [wcf64]
and $3 and $3
ld c, a ld c, a
callba Function8c8a callba LoadStatsScreenPals
call DelayFrame call DelayFrame
ld hl, wcf64 ld hl, wcf64
set 5, [hl] set 5, [hl]
ret ret
DrawStatsScreenPage: ; 4e002 (13:6002) .PageTilemap: ; 4e002 (13:6002)
ld a, [wcf64] ld a, [wcf64]
and $3 and $3
dec a dec a
@ -755,8 +762,8 @@ endr
ld de, TempMonID ld de, TempMonID
call PrintNum call PrintNum
ld hl, .OTNamePointers ld hl, .OTNamePointers
call Function4e528 call GetNicknamePointer
call Function4e505 call CopyNickname
callba CheckNickErrors callba CheckNickErrors
hlcoord 2, 13 hlcoord 2, 13
call PlaceString call PlaceString
@ -964,9 +971,9 @@ EggStatsScreen: ; 4e33a
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wcda1 ld hl, wcda1
call SetHPPal call SetHPPal
ld b, SCGB_03 ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout call GetSGBLayout
call Function4df8f call StatsScreen_PlaceHorizontalDivider
ld de, EggString ld de, EggString
hlcoord 8, 1 hlcoord 8, 1
call PlaceString call PlaceString
@ -1101,7 +1108,7 @@ Function4e4cd: ; 4e4cd (13:64cd)
pop bc pop bc
ret ret
Function4e505: ; 4e505 (13:6505) CopyNickname: ; 4e505 (13:6505)
ld de, StringBuffer1 ld de, StringBuffer1
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
jr .okay ; uuterly pointless jr .okay ; uuterly pointless
@ -1123,7 +1130,7 @@ Function4e505: ; 4e505 (13:6505)
pop de pop de
ret ret
Function4e528: ; 4e528 (13:6528) GetNicknamePointer: ; 4e528 (13:6528)
ld a, [MonType] ld a, [MonType]
add a add a
ld c, a ld c, a
@ -1133,7 +1140,7 @@ Function4e528: ; 4e528 (13:6528)
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld a, [MonType] ld a, [MonType]
cp $3 cp BREEDMON
ret z ret z
ld a, [CurPartyMon] ld a, [CurPartyMon]
jp SkipNames jp SkipNames

View File

@ -10,7 +10,7 @@ SpecialBuenasPassword: ; 8af6b
add c add c
add $2 add $2
ld [wMenuBorderRightCoord], a ld [wMenuBorderRightCoord], a
call BackUpTiles call PushWindow
call DoNthMenu ; menu call DoNthMenu ; menu
callba Buena_ExitMenu callba Buena_ExitMenu
ld b, $0 ld b, $0

View File

@ -3,7 +3,7 @@
LoadMenuDataHeader:: LoadMenuDataHeader::
call CopyMenuDataHeader call CopyMenuDataHeader
call BackUpTiles call PushWindow
ret ret
CopyMenuDataHeader:: CopyMenuDataHeader::
@ -160,7 +160,7 @@ _YesNoBox:: ; 1dd9
ld [wMenuBorderTopCoord], a ld [wMenuBorderTopCoord], a
add 4 add 4
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
InterpretTwoOptionMenu:: ; 1dfe InterpretTwoOptionMenu:: ; 1dfe
call VerticalMenu call VerticalMenu
@ -200,7 +200,7 @@ YesNoMenuDataHeader:: ; 1e1d
OffsetMenuDataHeader:: ; 1e2e OffsetMenuDataHeader:: ; 1e2e
call _OffsetMenuDataHeader call _OffsetMenuDataHeader
call BackUpTiles call PushWindow
ret ret
; 1e35 ; 1e35

View File

@ -1,5 +1,5 @@
BackUpTiles:: ; 1c00 PushWindow:: ; 1c00
callab _BackUpTiles callab _PushWindow
ret ret
; 1c07 ; 1c07

View File

@ -9836,7 +9836,7 @@ AskRememberPassword: ; 4ae12
ld [wMenuBorderTopCoord], a ld [wMenuBorderTopCoord], a
add $4 add $4
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
call VerticalMenu call VerticalMenu
push af push af
ld c, 15 ld c, 15

View File

@ -1,9 +1,8 @@
Function104000:: ; 104000 Function104000:: ; 104000
ld hl, Function104006 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 104006
Function104006: ; 104006 .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -22,11 +21,10 @@ Function104006: ; 104006
; 10402d ; 10402d
Function10402d:: ; 10402d Function10402d:: ; 10402d
ld hl, Function104033 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 104033
Function104033: ; 104033 .Function
decoord 0, 0 decoord 0, 0
ld hl, wDecompressScratch ld hl, wDecompressScratch
call CutAndPasteTilemap call CutAndPasteTilemap
@ -38,11 +36,10 @@ Function104033: ; 104033
; 104047 ; 104047
Function104047: ; 104047 Function104047: ; 104047
ld hl, Function10404d ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 10404d
Function10404d: ; 10404d .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -54,11 +51,10 @@ Function10404d: ; 10404d
; 104061 ; 104061
ReloadMapPart:: ; 104061 ReloadMapPart:: ; 104061
ld hl, Function104067 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 104067
Function104067: ; 104067 .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -84,11 +80,10 @@ Function104067: ; 104067
Function104099: ; 104099 Function104099: ; 104099
ld hl, ReloadMapPart ; useless ld hl, ReloadMapPart ; useless
ld hl, Function1040a2 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 1040a2
Function1040a2: ; 1040a2 .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -114,11 +109,10 @@ Function1040a2: ; 1040a2
; 1040d4 ; 1040d4
Function1040d4: ; 1040d4 Function1040d4: ; 1040d4
ld hl, Function1040da ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 1040da
Function1040da: ; 1040da .Function
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld a, $3 ld a, $3
@ -134,16 +128,15 @@ Function1040da: ; 1040da
ld [rHDMA4], a ld [rHDMA4], a
ld a, $23 ld a, $23
ld [hDMATransfer], a ld [hDMATransfer], a
call Function1041a4 call WaitDMATransfer
ret ret
; 1040fb ; 1040fb
Function1040fb: ; 1040fb Function1040fb: ; 1040fb
ld hl, Function104101 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 104101
Function104101: ; 104101 .Function
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld a, $3 ld a, $3
@ -155,11 +148,10 @@ Function104101: ; 104101
Function104110:: ; 104110 Function104110:: ; 104110
; OpenText ; OpenText
ld hl, Function104116 ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 104116
Function104116: ; 104116 .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -186,11 +178,10 @@ Function104116: ; 104116
; 104148 ; 104148
Function104148: ; 104148 (41:4148) Function104148: ; 104148 (41:4148)
ld hl, Function10414e ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
; 10414e (41:414e)
Function10414e: ; 10414e .Function
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
ld hl, wBackupAttrMap ld hl, wBackupAttrMap
call CutAndPasteAttrMap call CutAndPasteAttrMap
@ -247,12 +238,12 @@ Function10419d: ; 10419d (41:419d)
ld a, $23 ld a, $23
ld [hDMATransfer], a ld [hDMATransfer], a
Function1041a4: ; 104a14 WaitDMATransfer: ; 104a14
.asm_1041a4 .loop
call DelayFrame call DelayFrame
ld a, [hDMATransfer] ld a, [hDMATransfer]
and a and a
jr nz, .asm_1041a4 jr nz, .loop
ret ret
Function1041ad: ; 1041ad (41:41ad) Function1041ad: ; 1041ad (41:41ad)

View File

@ -248,7 +248,7 @@ Function89261: ; 89261
ld [hl], a ld [hl], a
pop af pop af
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
call BackUpTiles call PushWindow
call Function8923c call Function8923c
call Function89209 call Function89209
call VerticalMenu call VerticalMenu

View File

@ -4563,7 +4563,7 @@ Function11a00e: ; 11a00e
ld [wMenuBorderRightCoord], a ld [wMenuBorderRightCoord], a
ld a, $5 ld a, $5
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
callba Function11765d callba Function11765d
callba Function117ab4 callba Function117ab4
callba MobileFunc_106462 callba MobileFunc_106462
@ -4586,7 +4586,7 @@ Function11a0ca: ; 11a0ca
ld [wMenuBorderRightCoord], a ld [wMenuBorderRightCoord], a
ld a, $11 ld a, $11
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
callba Function11765d callba Function11765d
callba Function17d3f6 callba Function17d3f6
callba MobileFunc_106462 callba MobileFunc_106462
@ -5270,7 +5270,7 @@ Function11a5b9: ; 11a5b9
ld [wMenuBorderRightCoord], a ld [wMenuBorderRightCoord], a
ld a, $5 ld a, $5
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
ld b, $6 ld b, $6
ld c, $14 ld c, $14
@ -5296,7 +5296,7 @@ Function11a5f5: ; 11a5f5
ld [wMenuBorderTopCoord], a ld [wMenuBorderTopCoord], a
ld a, $a ld a, $a
ld [wMenuBorderBottomCoord], a ld [wMenuBorderBottomCoord], a
call BackUpTiles call PushWindow
hlcoord 14, 6, AttrMap hlcoord 14, 6, AttrMap
ld b, $5 ld b, $5
ld c, $6 ld c, $6

View File

@ -226,7 +226,7 @@ Function1dc381: ; 1dc381
hlcoord 0, 0 hlcoord 0, 0
call _PrepMonFrontpic call _PrepMonFrontpic
call WaitBGMap call WaitBGMap
ld b, SCGB_03 ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
ret ret
@ -278,7 +278,7 @@ Function1dc47b: ; 1dc47b
ld de, TempMonSpeed ld de, TempMonSpeed
call .PrintTempMonStats call .PrintTempMonStats
call WaitBGMap call WaitBGMap
ld b, SCGB_03 ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
ret ret

View File

@ -12,8 +12,8 @@ Predef_LoadSGBLayoutCGB: ; 8d59
jr nz, .not_ram jr nz, .not_ram
ld a, [SGBPredef] ld a, [SGBPredef]
.not_ram .not_ram
cp SCGB_FC cp SCGB_PARTY_MENU_HP_PALS
jp z, Function96f3 jp z, CGB_ApplyPartyMenuHPPals
call Function9673 call Function9673
ld l, a ld l, a
ld h, 0 ld h, 0
@ -277,7 +277,7 @@ Palette8f52: ; 8f52
RGB 00, 00, 00 RGB 00, 00, 00
; 8f6a ; 8f6a
Unknown_8f6a: ; 8f6a StatsScreenPals: ; 8f6a
RGB 31, 19, 31 RGB 31, 19, 31
RGB 21, 31, 14 RGB 21, 31, 14

View File

@ -8,8 +8,8 @@ Predef_LoadSGBLayout: ; 864c
jr nz, .not_ram jr nz, .not_ram
ld a, [SGBPredef] ld a, [SGBPredef]
.not_ram .not_ram
cp SCGB_FC cp SCGB_PARTY_MENU_HP_PALS
jp z, Function8ade jp z, SGB_ApplyPartyMenuHPPals
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add hl, hl
@ -390,7 +390,7 @@ endr
pop bc pop bc
ld a, c ld a, c
and a and a
jr z, .asm_88ef jr z, .partymon
ld hl, wSGBPals + 3 ld hl, wSGBPals + 3
ld [hl], $e7 ld [hl], $e7
inc hl inc hl
@ -399,11 +399,11 @@ endr
ld [hl], $62 ld [hl], $62
inc hl inc hl
ld [hl], $c ld [hl], $c
jr .asm_8913 jr .done
.asm_88ef .partymon
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld bc, $30 ld bc, PARTYMON_STRUCT_LENGTH
ld a, [CurPartyMon] ld a, [CurPartyMon]
call AddNTimes call AddNTimes
ld c, l ld c, l
@ -419,7 +419,7 @@ endr
ld a, [hl] ld a, [hl]
ld [wSGBPals + 6], a ld [wSGBPals + 6], a
.asm_8913 .done
ld hl, wSGBPals ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret

View File

@ -1487,7 +1487,7 @@ PlayerHPPal:: ; cd99
EnemyHPPal:: ; cd9a EnemyHPPal:: ; cd9a
ds 1 ds 1
wcd9b:: ds 6 wHPPals:: ds PARTY_LENGTH
wcda1:: ds 8 wcda1:: ds 8
wSGBPals:: ds 48 ; cda9 wSGBPals:: ds 48 ; cda9
@ -1660,7 +1660,9 @@ GameTimerPause:: ; cfbc
ds 1 ds 1
wcfbe:: ds 2 wcfbe::
; SGB flags?
ds 2
InBattleTowerBattle:: ; cfc0 InBattleTowerBattle:: ; cfc0
; 0 not in BattleTower-Battle ; 0 not in BattleTower-Battle