Annotate battle tower text bug

This commit is contained in:
PikalaxALT
2015-11-20 15:15:32 -05:00
parent 812976cee6
commit 7b3090e22a
51 changed files with 361 additions and 353 deletions

View File

@@ -1437,13 +1437,13 @@ Functioncc91a: ; cc91a
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, BGPals ld hl, BGPals
ld de, wMapPals ld de, UnknBGPals
ld a, [rBGP] ld a, [rBGP]
ld b, a ld b, a
ld c, $7 ld c, $7
call CopyPals call CopyPals
ld hl, OBPals ld hl, OBPals
ld de, Unkn2Pals ld de, UnknOBPals
ld a, [rBGP] ld a, [rBGP]
ld b, a ld b, a
ld c, $2 ld c, $2
@@ -1465,7 +1465,7 @@ Functioncc94b: ; cc94b
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, OBPals + $10 ld hl, OBPals + $10
ld de, Unkn2Pals + $10 ld de, UnknOBPals + $10
ld a, [rOBP0] ld a, [rOBP0]
ld b, a ld b, a
ld c, $2 ld c, $2

View File

@@ -2571,12 +2571,12 @@ Functionc8e52: ; c8e52 (32:4e52)
push bc push bc
push af push af
ld hl, BGPals ; BGPals ld hl, BGPals ; BGPals
ld de, wMapPals ; wd000 ld de, UnknBGPals ; wd000
ld b, a ld b, a
ld c, $1 ld c, $1
call CopyPals call CopyPals
ld hl, OBPals + 8 ld hl, OBPals + 8
ld de, Unkn2Pals + 8 ld de, UnknOBPals + 8
pop af pop af
ld b, a ld b, a
ld c, $1 ld c, $1
@@ -2598,12 +2598,12 @@ Functionc8e7f: ; c8e7f (32:4e7f)
push bc push bc
push af push af
ld hl, BGPals + 8 ld hl, BGPals + 8
ld de, wMapPals + 8 ld de, UnknBGPals + 8
ld b, a ld b, a
ld c, $1 ld c, $1
call CopyPals call CopyPals
ld hl, OBPals ; OBPals ld hl, OBPals ; OBPals
ld de, Unkn2Pals ; wd040 ld de, UnknOBPals ; wd040
pop af pop af
ld b, a ld b, a
ld c, $1 ld c, $1

View File

@@ -2916,7 +2916,7 @@ ForcePlayerMonChoice: ; 3d227
call ExitMenu call ExitMenu
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
call WaitBGMap call WaitBGMap
call ClearSGB call GetMemSGBLayout
call SetPalettes call SetPalettes
xor a xor a
ld c, a ld c, a
@@ -2935,7 +2935,7 @@ ForcePlayerMonChoice: ; 3d227
call DelayFrame call DelayFrame
call _LoadHPBar call _LoadHPBar
call WriteBackup call WriteBackup
call ClearSGB call GetMemSGBLayout
call SetPalettes call SetPalettes
call SendOutPkmnText call SendOutPkmnText
call NewBattleMonStatus call NewBattleMonStatus
@@ -5372,7 +5372,7 @@ Function3e299:
call _LoadHPBar call _LoadHPBar
call WriteBackup call WriteBackup
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
call ClearSGB call GetMemSGBLayout
call SetPalettes call SetPalettes
jp BattleMenu jp BattleMenu
; 3e2f5 ; 3e2f5
@@ -5454,7 +5454,7 @@ Function3e358: ; 3e358
call ClearSprites call ClearSprites
call _LoadHPBar call _LoadHPBar
call WriteBackup call WriteBackup
call ClearSGB call GetMemSGBLayout
call SetPalettes call SetPalettes
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld [CurBattleMon], a ld [CurBattleMon], a
@@ -8450,7 +8450,7 @@ Function3f486: ; 3f486
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef GetUnownLetter
ld de, VTiles2 ld de, VTiles2
predef Function5108b predef FrontpicPredef
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
ret ret
@@ -8659,7 +8659,7 @@ InitEnemyWildmon: ; 3f607
ld [wdef4], a ld [wdef4], a
.skip_unown .skip_unown
ld de, VTiles2 ld de, VTiles2
predef Function5108b predef FrontpicPredef
xor a xor a
ld [TrainerClass], a ld [TrainerClass], a
ld [hFillBox], a ld [hFillBox], a

View File

@@ -30,3 +30,6 @@
const SCGB_1C const SCGB_1C
const SCGB_1D const SCGB_1D
const SCGB_1E const SCGB_1E
SCGB_FC EQU -4
SCGB_RAM EQU -1

View File

@@ -208,6 +208,9 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
; 1f814e ; 1f814e
BattleTowerTrainers: ; 1f814e BattleTowerTrainers: ; 1f814e
; The trainer class is not used in Crystal 1.0 due to a bug.
; Instead, the sixth character in the trainer's name is used.
; See misc/battle_tower_47.asm
db "HANSON@@@@", FISHER db "HANSON@@@@", FISHER
db "SAWYER@@@@", POKEMANIAC db "SAWYER@@@@", POKEMANIAC
db "MASUDA@@@@", GUITARIST db "MASUDA@@@@", GUITARIST

View File

@@ -26,7 +26,7 @@ Predef_StartBattle: ; 8c20f
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wMapPals ld hl, UnknBGPals
ld bc, 8 palettes ld bc, 8 palettes
xor a xor a
call ByteFill call ByteFill
@@ -661,7 +661,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
ld [rSVBK], a ld [rSVBK], a
call .copypals call .copypals
push hl push hl
ld de, wMapPals + 8 * 7 ld de, UnknBGPals + 8 * 7
ld bc, $8 ld bc, $8
call CopyBytes call CopyBytes
pop hl pop hl
@@ -680,15 +680,15 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
ret ret
.copypals: ; 8c677 (23:4677) .copypals: ; 8c677 (23:4677)
ld de, wMapPals + 8 * 7 ld de, UnknBGPals + 8 * 7
call .copy call .copy
ld de, BGPals + 8 * 7 ld de, BGPals + 8 * 7
call .copy call .copy
ld de, Unkn2Pals + 8 * 6 ld de, UnknOBPals + 8 * 6
call .copy call .copy
ld de, OBPals + 8 * 6 ld de, OBPals + 8 * 6
call .copy call .copy
ld de, Unkn2Pals + 8 * 7 ld de, UnknOBPals + 8 * 7
call .copy call .copy
ld de, OBPals + 8 * 7 ld de, OBPals + 8 * 7

View File

@@ -650,7 +650,7 @@ Function1723c: ; 1723c (5:723c)
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef GetUnownLetter
pop de pop de
predef_jump Function5108b predef_jump FrontpicPredef
Function17254: ; 17254 (5:7254) Function17254: ; 17254 (5:7254)
push af push af
@@ -775,7 +775,7 @@ Function1728f: ; 1728f (5:728f)
Function17363: ; 17363 (5:7363) Function17363: ; 17363 (5:7363)
ld [PlayerHPPal], a ld [PlayerHPPal], a
ld b, $b ld b, SCGB_0B
ld c, $0 ld c, $0
jp GetSGBLayout jp GetSGBLayout

View File

@@ -1621,7 +1621,7 @@ Functione0c37: ; e0c37 (38:4c37)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e0c93 ld hl, Palette_e0c93
ld de, wMapPals ld de, UnknBGPals
ld bc, $48 ld bc, $48
call CopyBytes call CopyBytes
pop af pop af
@@ -1751,7 +1751,7 @@ Functione1190: ; e1190
ld a, $93 ld a, $93
ld [rLCDC], a ld [rLCDC], a
call WaitBGMap call WaitBGMap
ld b, $18 ld b, SCGB_18
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals

View File

@@ -117,7 +117,7 @@ Function8ad1: ; 8ad1
ret ret
; 8ade ; 8ade
Function8ade: ; 8ade Function8ade: ; 8ade SGB layout $fc
ld hl, wcd9b ld hl, wcd9b
ld a, [wcda9] ld a, [wcda9]
ld e, a ld e, a
@@ -149,7 +149,7 @@ Function8b07: ; 8b07
call CheckCGB call CheckCGB
ret z ret z
ld hl, Palette8b2f ld hl, Palette8b2f
ld de, wMapPals ld de, UnknBGPals
ld bc, $0008 ld bc, $0008
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@@ -200,7 +200,7 @@ Function8b4d: ; 8b4d
jp Function9809 jp Function9809
.asm_8b5c .asm_8b5c
ld de, Unkn2Pals ld de, UnknOBPals
ld a, $3b ld a, $3b
call GetAthPalletFromPalettes9df6 call GetAthPalletFromPalettes9df6
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
@@ -216,7 +216,7 @@ Function8b67: ; 8b67
jp Function9809 jp Function9809
.asm_8b76 .asm_8b76
ld de, Unkn2Pals ld de, UnknOBPals
ld a, $3c ld a, $3c
call GetAthPalletFromPalettes9df6 call GetAthPalletFromPalettes9df6
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
@@ -248,7 +248,7 @@ Function8b81: ; 8b81
jp Function9809 jp Function9809
.asm_8bb2 .asm_8bb2
ld de, Unkn2Pals ld de, UnknOBPals
ld a, c ld a, c
call Function9775 call Function9775
call Function9643 call Function9643
@@ -275,7 +275,7 @@ endr
asm_8bd7 asm_8bd7
push hl push hl
ld hl, wMapPals ld hl, UnknBGPals
ld de, $0008 ld de, $0008
.asm_8bde .asm_8bde
and a and a
@@ -338,7 +338,7 @@ Function8c1d: ; 8c1d
call Function976b call Function976b
.asm_8c33 .asm_8c33
ld de, wMapPals ld de, UnknBGPals
call Function9643 call Function9643
call Function9699 call Function9699
call Function96b3 call Function96b3
@@ -412,11 +412,11 @@ endr
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld a, [hli] ld a, [hli]
ld [wMapPals], a ld [UnknBGPals], a
ld [wMapPals + 8 * 2], a ld [UnknBGPals + 8 * 2], a
ld a, [hl] ld a, [hl]
ld [wMapPals + 1], a ld [UnknBGPals + 1], a
ld [wMapPals + 8 * 2 + 1], a ld [UnknBGPals + 8 * 2 + 1], a
pop af pop af
ld [rSVBK], a ld [rSVBK], a
call Function96a4 call Function96a4
@@ -458,7 +458,7 @@ endr
ret ret
.asm_8cf0 .asm_8cf0
ld de, wMapPals ld de, UnknBGPals
ld bc, $0008 ld bc, $0008
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@@ -525,7 +525,7 @@ INCLUDE "predef/cgb.asm"
Function95f0: ; 95f0 Function95f0: ; 95f0
ld hl, Palette_9608 ld hl, Palette_9608
ld de, wMapPals ld de, UnknBGPals
ld bc, 8 ld bc, 8
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@@ -544,7 +544,7 @@ Palette_9608: ; 9608
CopyFourPalettes: ; 9610 CopyFourPalettes: ; 9610
ld de, wMapPals ld de, UnknBGPals
ld c, $4 ld c, $4
CopyPalettes: ; 9615 CopyPalettes: ; 9615
@@ -644,9 +644,9 @@ Function9673: ; 9673
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wMapPals ld hl, UnknBGPals
ld c, $8 ld c, 8
.asm_9683 .loop
ld a, $ff ld a, $ff
rept 4 rept 4
ld [hli], a ld [hli], a
@@ -656,7 +656,7 @@ rept 4
ld [hli], a ld [hli], a
endr endr
dec c dec c
jr nz, .asm_9683 jr nz, .loop
pop af pop af
ld [rSVBK], a ld [rSVBK], a
pop hl pop hl
@@ -676,7 +676,7 @@ Function9699: ; 9699
; 96a4 ; 96a4
Function96a4: ; 96a4 Function96a4: ; 96a4
ld hl, wMapPals ld hl, UnknBGPals
ld de, BGPals ld de, BGPals
ld bc, $0080 ld bc, $0080
ld a, $5 ld a, $5
@@ -728,7 +728,7 @@ Function96b3: ; 96b3
ret ret
; 96f3 ; 96f3
Function96f3: ; 96f3 Function96f3: ; 96f3 CGB layout $fc
ld hl, wcd9b ld hl, wcd9b
ld a, [wcda9] ld a, [wcda9]
ld e, a ld e, a
@@ -759,7 +759,7 @@ Function96f3: ; 96f3
Function971a: ; 971a Function971a: ; 971a
ld hl, Palettes_b681 ld hl, Palettes_b681
ld de, Unkn2Pals ld de, UnknOBPals
ld bc, $0010 ld bc, $0010
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@@ -843,7 +843,7 @@ Function977a: ; 977a
dec c dec c
jr nz, .asm_9787 jr nz, .asm_9787
ld hl, Palettes_979c ld hl, Palettes_979c
ld de, Unkn2Pals + 8 * 2 ld de, UnknOBPals + 8 * 2
ld bc, $0010 ld bc, $0010
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@@ -1047,7 +1047,7 @@ Function9890:: ; 9890
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wMapPals ld hl, UnknBGPals
call Function98df call Function98df
ld hl, BGPals ld hl, BGPals
call Function98df call Function98df
@@ -1058,13 +1058,13 @@ Function9890:: ; 9890
Function98df: ; 98df Function98df: ; 98df
ld c, $40 ld c, $40
.asm_98e1 .loop
ld a, $ff ld a, $ff
ld [hli], a ld [hli], a
ld a, $7f ld a, $7f
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_98e1 jr nz, .loop
ret ret
; 98eb ; 98eb
@@ -1974,7 +1974,7 @@ endr
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wMapPals ld hl, UnknBGPals
ld b, $8 ld b, $8
.asm_b210 .asm_b210
ld a, [de] ld a, [de]
@@ -2010,9 +2010,9 @@ endr
ld bc, $40 ld bc, $40
ld hl, MapObjectPals ld hl, MapObjectPals
call AddNTimes call AddNTimes
ld de, Unkn2Pals ld de, UnknOBPals
ld bc, $40 ld bc, $40
ld a, $5 ; BANK(Unkn2Pals) ld a, $5 ; BANK(UnknOBPals)
call FarCopyWRAM call FarCopyWRAM
ld a, [wPermission] ld a, [wPermission]
@@ -2037,7 +2037,7 @@ rept 4
inc hl inc hl
endr endr
.asm_b26d .asm_b26d
ld de, wMapPals + 8 * 6 + 2 ld de, UnknBGPals + 8 * 6 + 2
ld bc, 4 ld bc, 4
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM

View File

@@ -637,10 +637,10 @@ GetCreditsPalette: ; 109b2c
push af push af
push hl push hl
add wMapPals % $100 add UnknBGPals % $100
ld e, a ld e, a
ld a, 0 ld a, 0
adc wMapPals / $100 adc UnknBGPals / $100
ld d, a ld d, a
ld bc, 24 ld bc, 24
call CopyBytes call CopyBytes

View File

@@ -524,7 +524,7 @@ IntroScene1: ; e495b (39:495b)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_365ad ld hl, Palette_365ad
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_365ad ld hl, Palette_365ad
@@ -597,7 +597,7 @@ IntroScene3: ; e49fd (39:49fd)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e5edd ld hl, Palette_e5edd
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e5edd ld hl, Palette_e5edd
@@ -662,7 +662,7 @@ IntroScene5: ; e4a7a (39:4a7a)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_365ad ld hl, Palette_365ad
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_365ad ld hl, Palette_365ad
@@ -759,7 +759,7 @@ IntroScene7: ; e4b3f (39:4b3f)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e5edd ld hl, Palette_e5edd
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e5edd ld hl, Palette_e5edd
@@ -909,7 +909,7 @@ IntroScene11: ; e4c86 (39:4c86)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_365ad ld hl, Palette_365ad
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_365ad ld hl, Palette_365ad
@@ -1034,7 +1034,7 @@ IntroScene13: ; e4d6d (39:4d6d)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e5edd ld hl, Palette_e5edd
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e5edd ld hl, Palette_e5edd
@@ -1143,7 +1143,7 @@ IntroScene15: ; e4e40 (39:4e40)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e77dd ld hl, Palette_e77dd
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e77dd ld hl, Palette_e77dd
@@ -1217,7 +1217,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e6d6d ld hl, Palette_e6d6d
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e6d6d ld hl, Palette_e6d6d
@@ -1291,7 +1291,7 @@ IntroScene19: ; e4f7e (39:4f7e)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e77dd ld hl, Palette_e77dd
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e77dd ld hl, Palette_e77dd
@@ -1459,7 +1459,7 @@ IntroScene26: ; e50bb (39:50bb)
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, Palette_e679d ld hl, Palette_e679d
ld de, wMapPals ld de, UnknBGPals
ld bc, $80 ld bc, $80
call CopyBytes call CopyBytes
ld hl, Palette_e679d ld hl, Palette_e679d
@@ -1785,7 +1785,7 @@ endr
ld bc, $8 ld bc, $8
call CopyBytes call CopyBytes
pop bc pop bc
ld de, wMapPals ld de, UnknBGPals
ld a, c ld a, c
add e add e
ld e, a ld e, a

View File

@@ -1244,7 +1244,7 @@ Function8220f: ; 8220f
rept 3 rept 3
add hl, hl add hl, hl
endr endr
ld de, wMapPals ld de, UnknBGPals
add hl, de add hl, de
ld de, wc608 ld de, wc608
ld bc, 8 ld bc, 8

View File

@@ -31,7 +31,7 @@ Function1dd709: ; 1dd709
call PlaceString call PlaceString
call EnableLCD call EnableLCD
call WaitBGMap call WaitBGMap
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
call DelayFrame call DelayFrame

View File

@@ -8,7 +8,7 @@ _DummyGame: ; e1e5b (38:5e5b)
Functione1e67: ; e1e67 (38:5e67) Functione1e67: ; e1e67 (38:5e67)
call DisableLCD call DisableLCD
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
callab Function8cf53 callab Function8cf53
ld hl, LZ_e2221 ld hl, LZ_e2221

View File

@@ -52,11 +52,11 @@ _EvolutionAnimation: ; 4e607
ld [PlayerHPPal], a ld [PlayerHPPal], a
ld c, $0 ld c, $0
call Function4e703 call .GetSGBLayout
ld a, [Buffer1] ld a, [Buffer1]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [CurSpecies], a ld [CurSpecies], a
call Function4e708 call .PlaceFrontpic
ld de, VTiles2 ld de, VTiles2
ld hl, VTiles2 tile $31 ld hl, VTiles2 tile $31
@@ -65,11 +65,11 @@ _EvolutionAnimation: ; 4e607
ld a, $31 ld a, $31
ld [wd1ec], a ld [wd1ec], a
call Evolution_FlashFrontpics call .ReplaceFrontpic
ld a, [Buffer2] ld a, [Buffer2]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [CurSpecies], a ld [CurSpecies], a
call Function4e711 call .LoadFrontpic
ld a, [Buffer1] ld a, [Buffer1]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [CurSpecies], a ld [CurSpecies], a
@@ -90,14 +90,14 @@ _EvolutionAnimation: ; 4e607
call DelayFrames call DelayFrames
ld c, $1 ld c, $1
call Function4e703 call .GetSGBLayout
call Function4e726 call .AnimationSequence
jr c, .pressed_b jr c, .cancel_evo
ld a, $cf ld a, -7 * 7
ld [wd1ec], a ld [wd1ec], a
call Evolution_FlashFrontpics call .ReplaceFrontpic
xor a xor a
ld [wd1ed], a ld [wd1ed], a
@@ -105,7 +105,7 @@ _EvolutionAnimation: ; 4e607
ld [PlayerHPPal], a ld [PlayerHPPal], a
ld c, $0 ld c, $0
call Function4e703 call .GetSGBLayout
call Function4e7a6 call Function4e7a6
callba Function8cf53 callba Function8cf53
call Function4e794 call Function4e794
@@ -134,7 +134,7 @@ _EvolutionAnimation: ; 4e607
.asm_4e6de .asm_4e6de
ret ret
.pressed_b .cancel_evo
ld a, $1 ld a, $1
ld [wd1ed], a ld [wd1ed], a
@@ -142,7 +142,7 @@ _EvolutionAnimation: ; 4e607
ld [PlayerHPPal], a ld [PlayerHPPal], a
ld c, $0 ld c, $0
call Function4e703 call .GetSGBLayout
call Function4e7a6 call Function4e7a6
callba Function8cf53 callba Function8cf53
call Function4e794 call Function4e794
@@ -153,38 +153,38 @@ _EvolutionAnimation: ; 4e607
ret ret
; 4e703 ; 4e703
Function4e703: ; 4e703 .GetSGBLayout: ; 4e703
ld b, $b ld b, SCGB_0B
jp GetSGBLayout jp GetSGBLayout
; 4e708 ; 4e708
Function4e708: ; 4e708 .PlaceFrontpic: ; 4e708
call GetBaseData call GetBaseData
hlcoord 7, 2 hlcoord 7, 2
jp PrepMonFrontpic jp PrepMonFrontpic
; 4e711 ; 4e711
Function4e711: ; 4e711 .LoadFrontpic: ; 4e711
call GetBaseData call GetBaseData
ld a, $1 ld a, $1
ld [wc2c6], a ld [wc2c6], a
ld de, VTiles2 ld de, VTiles2
predef Function5108b predef FrontpicPredef
xor a xor a
ld [wc2c6], a ld [wc2c6], a
ret ret
; 4e726 ; 4e726
Function4e726: ; 4e726 .AnimationSequence: ; 4e726
call ClearJoypad call ClearJoypad
lb bc, 1, 14 lb bc, 1, 2 * 7 ; flash b times, wait c frames in between
.loop .loop
push bc push bc
call Evolution_CheckPressedB call .WaitFrames_CheckPressedB
pop bc pop bc
jr c, .pressed_b jr c, .exit_sequence
push bc push bc
call Evolution_NextFrame call .Flash
pop bc pop bc
inc b inc b
rept 2 rept 2
@@ -194,31 +194,30 @@ endr
and a and a
ret ret
.pressed_b .exit_sequence
scf scf
ret ret
; 4e741 ; 4e741
Evolution_NextFrame: ; 4e741 .Flash: ; 4e741
.loop ld a, -7 * 7 ; new stage
ld a, -49
ld [wd1ec], a ld [wd1ec], a
call Evolution_FlashFrontpics call .ReplaceFrontpic
ld a, 49 ld a, 7 * 7 ; previous stage
ld [wd1ec], a ld [wd1ec], a
call Evolution_FlashFrontpics call .ReplaceFrontpic
dec b dec b
jr nz, .loop jr nz, .Flash
ret ret
; 4e755 ; 4e755
Evolution_FlashFrontpics: ; 4e755 .ReplaceFrontpic: ; 4e755
push bc push bc
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 7, 2 hlcoord 7, 2
lb bc, 7, 7 lb bc, 7, 7
ld de, $d ld de, SCREEN_WIDTH - 7
.loop1 .loop1
push bc push bc
.loop2 .loop2
@@ -238,8 +237,7 @@ Evolution_FlashFrontpics: ; 4e755
ret ret
; 4e779 ; 4e779
Evolution_CheckPressedB: ; 4e779 .WaitFrames_CheckPressedB: ; 4e779
.loop
call DelayFrame call DelayFrame
push bc push bc
call JoyTextDelay call JoyTextDelay
@@ -247,16 +245,16 @@ Evolution_CheckPressedB: ; 4e779
pop bc pop bc
and B_BUTTON and B_BUTTON
jr nz, .pressed_b jr nz, .pressed_b
.loop2 .loop3
dec c dec c
jr nz, .loop jr nz, .WaitFrames_CheckPressedB
and a and a
ret ret
.pressed_b .pressed_b
ld a, [wd1e9] ld a, [wd1e9]
and a and a
jr nz, .loop2 jr nz, .loop3
scf scf
ret ret
; 4e794 ; 4e794
@@ -281,18 +279,18 @@ Function4e7a6: ; 4e7a6
ld a, [hl] ld a, [hl]
push af push af
ld [hl], $0 ld [hl], $0
.asm_4e7b8 .loop
call Function4e7cf call Function4e7cf
jr nc, .asm_4e7c2 jr nc, .done
call Function4e80c call Function4e80c
jr .asm_4e7b8 jr .loop
.asm_4e7c2 .done
ld c, $20 ld c, $20
.asm_4e7c4 .loop2
call Function4e80c call Function4e80c
dec c dec c
jr nz, .asm_4e7c4 jr nz, .loop2
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@@ -319,7 +317,7 @@ Function4e7cf: ; 4e7cf
Function4e7e8: ; 4e7e8 Function4e7e8: ; 4e7e8
push de push de
ld de, $4858 lb de, $48, $58
ld a, $13 ld a, $13
call _InitSpriteAnimStruct call _InitSpriteAnimStruct
ld hl, $b ld hl, $b
@@ -342,6 +340,7 @@ Function4e7e8: ; 4e7e8
Function4e80c: ; 4e80c Function4e80c: ; 4e80c
push bc push bc
callab Function8cf69 callab Function8cf69
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
ld a, [hVBlankCounter] ld a, [hVBlankCounter]
and $e and $e
srl a srl a
@@ -350,9 +349,9 @@ rept 2
endr endr
and $7 and $7
ld b, a ld b, a
ld hl, Sprites + 3 ld hl, Sprites + 3 ; attributes
ld c, $28 ld c, 40
.asm_4e823 .loop
ld a, [hl] ld a, [hl]
or b or b
ld [hli], a ld [hli], a
@@ -360,7 +359,7 @@ rept 3
inc hl inc hl
endr endr
dec c dec c
jr nz, .asm_4e823 jr nz, .loop
pop bc pop bc
call DelayFrame call DelayFrame
ret ret

View File

@@ -495,7 +495,7 @@ Function283b2: ; 283b2
call PlaceWholeStringInBoxAtOnce call PlaceWholeStringInBoxAtOnce
call RotateThreePalettesRight call RotateThreePalettesRight
call ClearScreen call ClearScreen
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
call Function3200 call Function3200
ret ret
@@ -1585,7 +1585,7 @@ Function28ade: ; 28ade
Function28b22: ; 28b22 Function28b22: ; 28b22
call RotateThreePalettesRight call RotateThreePalettesRight
call ClearScreen call ClearScreen
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
call Function3200 call Function3200
xor a xor a
@@ -1889,7 +1889,7 @@ Function28b87: ; 28b87
call DelayFrames call DelayFrames
call ClearTileMap call ClearTileMap
call LoadFontsBattleExtra call LoadFontsBattleExtra
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
@@ -2401,7 +2401,7 @@ Function2914e: ; 2914e
pop bc pop bc
ld [hl], b ld [hl], b
call WaitBGMap call WaitBGMap
ld b, $1b ld b, SCGB_1B
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
@@ -2672,7 +2672,7 @@ Function29348: ; 29348
lb bc, 3, 12 lb bc, 3, 12
call Function297db call Function297db
call WaitBGMap call WaitBGMap
ld b, $1b ld b, SCGB_1B
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
@@ -2812,7 +2812,7 @@ Function2942e: ; 2942e
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wPlayerMinimized] ld a, [wPlayerMinimized]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, SCGB_1A
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
@@ -2838,7 +2838,7 @@ Function29461: ; 29461
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wPlayerWrapCount] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, SCGB_1A
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals

View File

@@ -41,7 +41,7 @@ NamingScreen: ; 116c1
Function116f8: ; 116f8 Function116f8: ; 116f8
call ClearBGPalettes call ClearBGPalettes
ld b, $8 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout
call DisableLCD call DisableLCD
call Function11c51 call Function11c51

View File

@@ -20,7 +20,7 @@ Function5001d: ; 5001d
call ClearBGPalettes call ClearBGPalettes
call Function5003f call Function5003f
call WaitBGMap call WaitBGMap
ld b, $a ld b, SCGB_0A
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
call DelayFrame call DelayFrame
@@ -149,7 +149,7 @@ PlacePartyHPBar: ; 500cf
ld b, $0 ld b, $0
add hl, bc add hl, bc
call SetHPPal call SetHPPal
ld b, $fc ld b, SCGB_FC
call GetSGBLayout call GetSGBLayout
.skip .skip
@@ -162,7 +162,7 @@ PlacePartyHPBar: ; 500cf
inc b inc b
dec c dec c
jr nz, .loop jr nz, .loop
ld b, $a ld b, SCGB_0A
call GetSGBLayout call GetSGBLayout
ret ret
; 50117 ; 50117

View File

@@ -2363,7 +2363,7 @@ Function41401: ; 41401 (10:5401)
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wMapPals ld hl, UnknBGPals
ld bc, $40 ld bc, $40
xor a xor a
call ByteFill call ByteFill

View File

@@ -1952,7 +1952,7 @@ _FlyMap: ; 91af3
call Request1bpp call Request1bpp
call FlyMap call FlyMap
call Function91c8f call Function91c8f
ld b, $2 ld b, SCGB_02
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
.loop .loop
@@ -2378,7 +2378,7 @@ Function91d11: ; 91d11
call TownMapPals call TownMapPals
hlbgcoord 0, 0 hlbgcoord 0, 0
call TownMapBGUpdate call TownMapBGUpdate
ld b, $2 ld b, SCGB_02
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
xor a xor a

Some files were not shown because too many files have changed in this diff Show More