Harmonize engine/{movie, pokemon} with pokegold (renames GetSRAMBank to OpenSRAM)

To do: engine/{menus, overworld}
This commit is contained in:
Rangi
2020-06-17 17:03:38 -04:00
parent be93ab33a7
commit cc460a17b0
62 changed files with 395 additions and 395 deletions

View File

@@ -80,7 +80,7 @@ Credits::
push af
ld a, $5
ldh [hVBlank], a
ld a, $1
ld a, TRUE
ldh [hInMenu], a
xor a
ldh [hBGMapMode], a
@@ -198,7 +198,7 @@ Credits_UpdateGFXRequestPath:
Credits_RequestGFX:
xor a
ldh [hBGMapMode], a
ld a, $8
ld a, 8
ld [wRequested2bpp], a
jp Credits_Next
@@ -572,14 +572,17 @@ Credits_LoadBorderGFX:
dw CreditsPichuGFX + 16 tiles
dw CreditsPichuGFX + 32 tiles
dw CreditsPichuGFX + 48 tiles
dw CreditsSmoochumGFX
dw CreditsSmoochumGFX + 16 tiles
dw CreditsSmoochumGFX + 32 tiles
dw CreditsSmoochumGFX + 48 tiles
dw CreditsDittoGFX
dw CreditsDittoGFX + 16 tiles
dw CreditsDittoGFX + 32 tiles
dw CreditsDittoGFX + 48 tiles
dw CreditsIgglybuffGFX
dw CreditsIgglybuffGFX + 16 tiles
dw CreditsIgglybuffGFX + 32 tiles

View File

@@ -47,11 +47,13 @@ EvolutionAnimation:
call WaitBGMap
xor a
ldh [hBGMapMode], a
ld a, [wEvolutionOldSpecies]
ld [wPlayerHPPal], a
ld c, $0
ld c, FALSE
call .GetSGBLayout
ld a, [wEvolutionOldSpecies]
ld [wCurPartySpecies], a
ld [wCurSpecies], a
@@ -69,41 +71,45 @@ EvolutionAnimation:
ld [wCurPartySpecies], a
ld [wCurSpecies], a
call .LoadFrontpic
ld a, [wEvolutionOldSpecies]
ld [wCurPartySpecies], a
ld [wCurSpecies], a
ld a, $1
ld a, 1
ldh [hBGMapMode], a
call .check_statused
jr c, .skip_cry
ld a, [wEvolutionOldSpecies]
call PlayMonCry
.skip_cry
ld de, MUSIC_EVOLUTION
call PlayMusic
ld c, 80
call DelayFrames
ld c, $1
ld c, TRUE
call .GetSGBLayout
call .AnimationSequence
jr c, .cancel_evo
ld a, -7 * 7
ld [wEvolutionPicOffset], a
call .ReplaceFrontpic
xor a
ld [wEvolutionCanceled], a
ld a, [wEvolutionNewSpecies]
ld [wPlayerHPPal], a
ld c, $0
ld c, FALSE
call .GetSGBLayout
call .PlayEvolvedSFX
farcall ClearSpriteAnims
call .check_statused
@@ -133,14 +139,15 @@ EvolutionAnimation:
ret
.cancel_evo
ld a, $1
ld a, TRUE
ld [wEvolutionCanceled], a
ld a, [wEvolutionOldSpecies]
ld [wPlayerHPPal], a
ld c, $0
ld c, FALSE
call .GetSGBLayout
call .PlayEvolvedSFX
farcall ClearSpriteAnims
call .check_statused

View File

@@ -1,4 +1,4 @@
Copyright_GFPresents:
Copyright_GameFreakPresents:
; Play the copyright screen and GameFreak Presents sequence.
; Return carry if user cancels animation by pressing a button.
@@ -13,7 +13,7 @@ Copyright_GFPresents:
ldh [hJoyDown], a
ldh [hSCX], a
ldh [hSCY], a
ld a, $90
ld a, SCREEN_HEIGHT_PX
ldh [hWY], a
call WaitBGMap
ld b, SCGB_GAMEFREAK_LOGO
@@ -116,32 +116,23 @@ Copyright_GFPresents:
ret
PlaceGameFreakPresents:
ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, .dw
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
jumptable .scenes, wJumptableIndex
.dw
dw PlaceGameFreakPresents_0
dw PlaceGameFreakPresents_1
dw PlaceGameFreakPresents_2
dw PlaceGameFreakPresents_3
.scenes
dw GameFreakPresentsScene0
dw GameFreakPresentsScene1
dw GameFreakPresentsScene2
dw GameFreakPresentsScene3
PlaceGameFreakPresents_AdvanceIndex:
PlaceGameFreakPresents_NextScene:
ld hl, wJumptableIndex
inc [hl]
ret
PlaceGameFreakPresents_0:
GameFreakPresentsScene0:
ret
PlaceGameFreakPresents_1:
GameFreakPresentsScene1:
ld hl, wIntroSceneTimer
ld a, [hl]
cp $20
@@ -155,7 +146,7 @@ PlaceGameFreakPresents_1:
decoord 5, 10
ld bc, .end - .GAME_FREAK
call CopyBytes
call PlaceGameFreakPresents_AdvanceIndex
call PlaceGameFreakPresents_NextScene
ld de, SFX_GAME_FREAK_PRESENTS
call PlaySFX
ret
@@ -166,7 +157,7 @@ PlaceGameFreakPresents_1:
.end
db "@"
PlaceGameFreakPresents_2:
GameFreakPresentsScene2:
ld hl, wIntroSceneTimer
ld a, [hl]
cp $40
@@ -180,7 +171,7 @@ PlaceGameFreakPresents_2:
decoord 7, 11
ld bc, .end - .presents
call CopyBytes
call PlaceGameFreakPresents_AdvanceIndex
call PlaceGameFreakPresents_NextScene
ret
.presents
@@ -188,7 +179,7 @@ PlaceGameFreakPresents_2:
.end
db "@"
PlaceGameFreakPresents_3:
GameFreakPresentsScene3:
ld hl, wIntroSceneTimer
ld a, [hl]
cp $80
@@ -201,12 +192,12 @@ PlaceGameFreakPresents_3:
set 7, [hl]
ret
GameFreakLogoJumper:
PlaceGameFreakLogo:
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld e, [hl]
ld d, 0
ld hl, GameFreakLogoScenes
ld hl, .scenes
add hl, de
add hl, de
ld a, [hli]
@@ -214,7 +205,7 @@ GameFreakLogoJumper:
ld l, a
jp hl
GameFreakLogoScenes:
.scenes:
dw GameFreakLogoScene1
dw GameFreakLogoScene2
dw GameFreakLogoScene3
@@ -325,7 +316,7 @@ GameFreakLogoScene4:
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
inc [hl]
call PlaceGameFreakPresents_AdvanceIndex
call PlaceGameFreakPresents_NextScene
GameFreakLogoScene5:
ret