Merge pull request #756 from mid-kid/master

Rub a dub dub, thanks for the grub
This commit is contained in:
Rangi 2020-08-18 16:35:15 -04:00 committed by GitHub
commit 0b31d12dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 185 additions and 181 deletions

View File

@ -59,7 +59,8 @@ Music_LookYoungster_Ch1:
rest 1
rest 16
sound_loop 0, .mainloop
sound_ret
sound_ret ; unused
Music_LookYoungster_Ch2:
stereo_panning TRUE, FALSE
@ -156,7 +157,8 @@ Music_LookYoungster_Ch2:
note C_, 1
rest 1
sound_loop 0, .mainloop
sound_ret
sound_ret ; unused
Music_LookYoungster_Ch3:
stereo_panning TRUE, TRUE
@ -290,4 +292,5 @@ Music_LookYoungster_Ch3:
note G#, 1
rest 1
sound_loop 0, .mainloop
sound_ret
sound_ret ; unused

View File

@ -282,6 +282,7 @@
charmap "「", $70
charmap "」", $71
charmap "』", $73
charmap "・", $74
charmap "⋯", $75
charmap " ", $7f

View File

@ -673,7 +673,7 @@ StartTrainerBattle_LoadPokeBallGraphics:
call CopyBytes
pop af
ldh [rSVBK], a
ld a, 1
ld a, TRUE
ldh [hCGBPalUpdate], a
call DelayFrame
call BattleStart_CopyTilemapAtOnce

View File

@ -4920,7 +4920,7 @@ LoadBattleMenu2:
ret
.mobile
farcall Function100b12
farcall Mobile_LoadBattleMenu
ld a, [wcd2b]
and a
ret z
@ -5311,7 +5311,7 @@ CheckAmuletCoin:
MoveSelectionScreen:
call IsMobileBattle
jr nz, .not_mobile
farcall MobileMoveSelectionScreen
farcall Mobile_MoveSelectionScreen
ret
.not_mobile

View File

@ -1417,7 +1417,7 @@ BattleAnim_SetBGPals:
call CopyPals
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1438,7 +1438,7 @@ BattleAnim_SetOBPals:
call CopyPals
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -2546,7 +2546,7 @@ BGEffects_LoadBGPal0_OBPal1:
pop bc
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -2573,7 +2573,7 @@ BGEffects_LoadBGPal1_OBPal0:
pop bc
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -448,7 +448,7 @@ Function81c33:
hlcoord 15, 2
ld de, wc608 + 2
call Function81ca7
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ld a, $3
ld [wJumptableIndex], a
@ -1227,7 +1227,7 @@ Function822a3:
call Function81ca7
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
call DelayFrame
ret

View File

@ -167,7 +167,7 @@ INCBIN "gfx/overworld/heal_machine.2bpp"
ld bc, 1 palettes
ld a, BANK(wOBPals2)
call FarCopyWRAM
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -231,7 +231,7 @@ INCLUDE "gfx/overworld/heal_machine.pal"
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -39,7 +39,7 @@ LoadPoisonBGPals:
jr nz, .loop
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ld c, 4
call DelayFrames

View File

@ -189,7 +189,7 @@ _CGB_PokegearPals:
ld a, BANK(wBGPals1)
call FarCopyWRAM
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -243,7 +243,7 @@ _CGB_StatsScreenHPPals:
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -282,7 +282,7 @@ _CGB_Pokedex:
call FarCopyWRAM
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -317,7 +317,7 @@ _CGB_BillsPC:
call InitPartyMenuOBPals
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -339,7 +339,7 @@ Function9009:
call InitPartyMenuOBPals
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -362,7 +362,7 @@ _CGB_PokedexUnownMode:
call InitPartyMenuOBPals
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -415,7 +415,7 @@ _CGB_SlotMachine:
call ByteFill
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -433,7 +433,7 @@ _CGB_BetaTitleScreen:
call FillBoxCGB
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -573,7 +573,7 @@ _CGB_Evolution:
call WipeAttrmap
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -591,7 +591,7 @@ _CGB_GSTitleScreen:
ld a, SCGB_DIPLOMA
ld [wDefaultSGBLayout], a
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -725,7 +725,7 @@ _CGB_TrainerCard:
ld [hl], a
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -749,7 +749,7 @@ _CGB_MoveList:
call FillBoxCGB
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -759,7 +759,7 @@ _CGB_BetaPikachuMinigame:
call WipeAttrmap
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -771,7 +771,7 @@ _CGB_PokedexSearchOption:
call WipeAttrmap
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -819,7 +819,7 @@ _CGB_PackPals:
call FillBoxCGB
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -877,7 +877,7 @@ _CGB_MagnetTrain:
call FillBoxCGB
call ApplyAttrmap
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -150,7 +150,7 @@ Function8b07: ; unreferenced
call FarCopyWRAM
call ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -352,7 +352,7 @@ ApplyHPBarPals:
ld bc, 4
ld a, BANK(wBGPals2)
call FarCopyWRAM
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -157,7 +157,7 @@ MG_Mobile_Layout01:
.asm_49467
farcall ApplyAttrmap
farcall ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret

View File

@ -180,12 +180,12 @@ DoAnimFrame:
ld a, [hl]
sla a
sla a
ld d, $2
ld d, 2
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
add $3
add 3
ld [hl], a
call .Sprites_Sine
@ -204,7 +204,7 @@ DoAnimFrame:
ld a, [hl]
inc a
ld [hl], a
ld d, $2
ld d, 2
call .Sprites_Sine
ld hl, SPRITEANIMSTRUCT_YOFFSET
@ -391,7 +391,7 @@ DoAnimFrame:
inc [hl]
.move_vertical
ld a, e
ld d, $20
ld d, 32
call .Sprites_Sine
ld hl, SPRITEANIMSTRUCT_YOFFSET
@ -456,10 +456,10 @@ DoAnimFrame:
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
cp $30
cp 48
jr c, .asm_8d4cd
dec [hl]
ld d, $28
ld d, 40
call .Sprites_Sine
ld hl, SPRITEANIMSTRUCT_YOFFSET
@ -492,8 +492,8 @@ DoAnimFrame:
ld a, [hl]
and a
jr z, .asm_8d51c
ld d, a
ld d, a
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@ -759,11 +759,11 @@ DoAnimFrame:
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld a, [hl]
add $2
add 2
ld [hl], a
xor $ff
inc a
ld d, $20
ld d, 32
call .Sprites_Sine
ld hl, SPRITEANIMSTRUCT_YOFFSET
@ -777,13 +777,13 @@ DoAnimFrame:
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
cp $14
cp 20
jr nc, .asm_8d67f
add $2
add 2
ld [hl], a
xor $ff
inc a
ld d, $20
ld d, 32
call .Sprites_Sine
ld hl, SPRITEANIMSTRUCT_YOFFSET
@ -799,7 +799,6 @@ DoAnimFrame:
inc [hl]
inc [hl]
inc [hl]
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]

View File

@ -135,16 +135,16 @@ _InitSpriteAnimStruct::
; Back up the structure address to bc.
ld c, l
ld b, h
; Value [wSpriteAnimCount] is initially set to -1. Set it to
; the number of objects loaded into this array.
; Increment [wSpriteAnimCount], skipping a 0 value.
ld hl, wSpriteAnimCount
inc [hl]
ld a, [hl]
and a
jr nz, .initialized
jr nz, .nonzero
inc [hl]
.nonzero
.initialized
; Get row a of SpriteAnimSeqData, copy the pointer into de
pop af
ld e, a
@ -228,9 +228,9 @@ DeinitializeAllSprites:
UpdateAnimFrame:
call InitSpriteAnimBuffer ; init WRAM
call GetSpriteAnimFrame ; read from a memory array
cp -3
cp dowait_command
jr z, .done
cp -4
cp delanim_command
jr z, .delete
call GetFrameOAMPointer
; add byte to [wCurAnimVTile]

View File

@ -1141,7 +1141,7 @@ EvoStoneEffect:
cp EVERSTONE
jr z, .NoEffect
ld a, $1
ld a, TRUE
ld [wForceEvolution], a
farcall EvolvePokemon

View File

@ -959,6 +959,15 @@ Intro_PlacePlayerSprite:
db 10 * 8 + 4, 9 * 8, 2
db 10 * 8 + 4, 10 * 8, 3
const_def
const TITLESCREENOPTION_MAIN_MENU
const TITLESCREENOPTION_DELETE_SAVE_DATA
const TITLESCREENOPTION_RESTART
const TITLESCREENOPTION_UNUSED
const TITLESCREENOPTION_RESET_CLOCK
NUM_TITLESCREENOPTIONS EQU const_value
IntroSequence:
callfar Copyright_GameFreakPresents
jr c, StartTitleScreen
@ -969,7 +978,7 @@ IntroSequence:
StartTitleScreen:
ldh a, [rSVBK]
push af
ld a, BANK(wBGPals1)
ld a, BANK(wLYOverrides)
ldh [rSVBK], a
call .TitleScreen
@ -999,8 +1008,8 @@ StartTitleScreen:
ld b, SCGB_DIPLOMA
call GetSGBLayout
call UpdateTimePals
ld a, [wIntroSceneFrameCounter]
cp $5
ld a, [wTitleScreenSelectedOption]
cp NUM_TITLESCREENOPTIONS
jr c, .ok
xor a
.ok
@ -1183,7 +1192,7 @@ TitleScreenMain:
ld a, [hl]
and D_LEFT + D_UP
cp D_LEFT + D_UP
jr z, .clock_reset
jr z, .reset_clock
; Press Start or A to start the game.
.check_start
@ -1193,14 +1202,14 @@ TitleScreenMain:
ret
.incave
ld a, 0
ld a, TITLESCREENOPTION_MAIN_MENU
jr .done
.delete_save_data
ld a, 1
ld a, TITLESCREENOPTION_DELETE_SAVE_DATA
.done
ld [wIntroSceneFrameCounter], a
ld [wTitleScreenSelectedOption], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@ -1223,9 +1232,9 @@ TitleScreenMain:
inc [hl]
ret
.clock_reset
ld a, 4
ld [wIntroSceneFrameCounter], a
.reset_clock
ld a, TITLESCREENOPTION_RESET_CLOCK
ld [wTitleScreenSelectedOption], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@ -1242,8 +1251,8 @@ TitleScreenEnd:
and a
ret nz
ld a, 2
ld [wIntroSceneFrameCounter], a
ld a, TITLESCREENOPTION_RESTART
ld [wTitleScreenSelectedOption], a
; Back to the intro.
ld hl, wJumptableIndex

View File

@ -308,7 +308,7 @@ GameFreakLogoScene4:
ld [wOBPals2 + 13], a
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1508,7 +1508,7 @@ Intro_Scene24_ApplyPaletteFade:
jr nz, .loop1
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1632,7 +1632,7 @@ CrystalIntro_UnownFade:
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1710,7 +1710,7 @@ Intro_Scene20_AppearUnown:
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1773,7 +1773,7 @@ endr
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1886,7 +1886,7 @@ Intro_RustleGrass:
dw IntroGrass2GFX
Intro_SetCGBPalUpdate:
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
@ -1903,7 +1903,7 @@ Intro_ClearBGPals:
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
call DelayFrame
call DelayFrame

View File

@ -10,7 +10,7 @@ _TitleScreen:
; Reset timing variables
ld hl, wJumptableIndex
ld [hli], a ; wJumptableIndex
ld [hli], a ; wIntroSceneFrameCounter
ld [hli], a ; wTitleScreenSelectedOption
ld [hli], a ; wTitleScreenTimer
ld [hl], a ; wTitleScreenTimer + 1
@ -74,7 +74,7 @@ _TitleScreen:
; 'CRYSTAL VERSION'
hlbgcoord 5, 9
ld bc, NAME_LENGTH ; length of version text
ld bc, 11 ; length of version text
ld a, 1
call ByteFill
@ -85,7 +85,7 @@ _TitleScreen:
call ByteFill
; Back to VRAM bank 0
ld a, $0
ld a, 0
ldh [rVBK], a
; Decompress logo
@ -108,14 +108,14 @@ _TitleScreen:
hlcoord 0, 3
lb bc, 7, 20
ld d, $80
ld e, $14
ld e, 20
call DrawTitleGraphic
; Draw copyright text
hlbgcoord 3, 0, vBGMap1
lb bc, 1, 13
ld d, $c
ld e, $10
ld e, 16
call DrawTitleGraphic
; Initialize running Suicune?
@ -125,14 +125,12 @@ _TitleScreen:
; Initialize background crystal
call InitializeBackground
; Save WRAM bank
; Update palette colors
ldh a, [rSVBK]
push af
; WRAM bank 5
ld a, BANK(wBGPals1)
ldh [rSVBK], a
; Update palette colors
ld hl, TitleScreenPalettes
ld de, wBGPals1
ld bc, 16 palettes
@ -143,7 +141,6 @@ _TitleScreen:
ld bc, 16 palettes
call CopyBytes
; Restore WRAM bank
pop af
ldh [rSVBK], a
@ -201,7 +198,7 @@ _TitleScreen:
ld a, -112
ldh [hWY], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
; Update BG Map 0 (bank 0)

View File

@ -88,7 +88,7 @@ UnusedTitleScreen:
pop af
ldh [rSVBK], a
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
ld de, MUSIC_TITLE

View File

@ -33,7 +33,7 @@ ReanchorBGMap_NoOAMUpdate::
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall LoadOW_BGPal7
farcall ApplyPals
ld a, $1
ld a, TRUE
ldh [hCGBPalUpdate], a
xor a
ldh [hBGMapMode], a

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