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_01
const SCGB_02
const SCGB_03
const SCGB_STATS_SCREEN_HP_PALS
const SCGB_04
const SCGB_05
const SCGB_06
@ -31,5 +31,5 @@
const SCGB_1D
const SCGB_1E
SCGB_FC EQU -4
SCGB_PARTY_MENU_HP_PALS EQU -4
SCGB_RAM EQU -1

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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