diff options
| author | dannye <33dannye@gmail.com> | 2026-01-17 22:38:33 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2026-01-17 22:38:33 -0600 |
| commit | bc2354dd6626ce28bb9561547ed2107cfa56c18e (patch) | |
| tree | 5902d4c3389253c76b7c3351e0d7dfecb551c28d /engine/movie | |
| parent | Identify characters in `_OakSpeechText2B` and `Printer_GetMonStats.IDNo` (#144) (diff) | |
| parent | Use macros for `WildMonEncounterSlotChances` (#562) (diff) | |
| download | pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.gz pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.xz pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/movie')
| -rw-r--r-- | engine/movie/credits.asm | 27 | ||||
| -rw-r--r-- | engine/movie/evolution.asm | 2 | ||||
| -rw-r--r-- | engine/movie/hall_of_fame.asm | 2 | ||||
| -rw-r--r-- | engine/movie/intro.asm | 2 | ||||
| -rw-r--r-- | engine/movie/oak_speech/init_player_data.asm | 2 | ||||
| -rw-r--r-- | engine/movie/oak_speech/oak_speech.asm | 10 | ||||
| -rw-r--r-- | engine/movie/oak_speech/oak_speech2.asm | 4 | ||||
| -rw-r--r-- | engine/movie/splash.asm | 10 | ||||
| -rw-r--r-- | engine/movie/title.asm | 2 | ||||
| -rw-r--r-- | engine/movie/trade.asm | 4 |
10 files changed, 38 insertions, 27 deletions
diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index 149f51a7..dd8050bf 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -38,7 +38,7 @@ HallOfFamePC: ld [wNumCreditsMonsDisplayed], a jp Credits -FadeInCreditsText: +FadeInCredits: ld a, 1 ldh [hAutoBGTransferEnabled], a ld hl, HoFGBPalettes @@ -137,30 +137,33 @@ CreditsCopyTileMapToVRAM: CreditsLoadFont: call LoadFontTilePatterns - ld hl, vChars1 + ld hl, vFont ld bc, ($80 tiles) / 2 - call ZeroMemory + call ShiftFontColorIndex call LoadTextBoxTilePatterns ld hl, vChars2 tile $60 ld bc, ($20 tiles) / 2 - call ZeroMemory + call ShiftFontColorIndex ld hl, vChars2 tile $7e - ld bc, 1 tiles + ld bc, TILE_SIZE ld a, $ff ; solid black call FillMemory ret -ZeroMemory: -; zero bc bytes at hl +ShiftFontColorIndex: +; Zero every second byte at hl, writing a total of bc bytes. +; When used on VRAM font characters that contain only black and white shades, +; it shifts the color index: black -> light gray, allowing palette-controlled +; text fade-in during the Credits roll, while the black bars remain solid. ld [hl], 0 inc hl inc hl dec bc ld a, b or c - jr nz, ZeroMemory + jr nz, ShiftFontColorIndex ret FillFourRowsWithBlack: @@ -243,7 +246,7 @@ Credits: ; Roll credits .fadeInTextAndShowMon - call FadeInCreditsText + call FadeInCredits ld c, 102 jr .next1 @@ -255,7 +258,7 @@ Credits: ; Roll credits jr .nextCreditsScreen .fadeInText - call FadeInCreditsText + call FadeInCredits ld c, 132 jr .next2 @@ -275,7 +278,7 @@ ShowTheEndGFX: call FillMiddleOfScreenWithWhite ld de, TheEndGfx ld hl, vChars2 tile $60 - lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10 + lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / TILE_SIZE call CopyVideoData hlcoord 4, 8 ld de, TheEndTextString @@ -283,7 +286,7 @@ ShowTheEndGFX: hlcoord 4, 9 inc de call PlaceString - jp FadeInCreditsText + jp FadeInCredits TheEndTextString: ; "T H E E N D" diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index 9d24c0d5..d3b91b4f 100644 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -28,7 +28,7 @@ EvolveMon: call Evolution_LoadPic ld de, vFrontPic ld hl, vBackPic - ld bc, 7 * 7 + ld bc, PIC_SIZE call CopyVideoData ld a, [wEvoOldSpecies] ld [wCurPartySpecies], a diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm index 4afb23d3..7e0a419a 100644 --- a/engine/movie/hall_of_fame.asm +++ b/engine/movie/hall_of_fame.asm @@ -49,7 +49,7 @@ AnimateHallOfFame: ld a, c ld [wHoFPartyMonIndex], a ld hl, wPartyMon1Level - ld bc, wPartyMon2 - wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes ld a, [hl] ld [wHoFMonLevel], a diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index f018d860..1381d396 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -158,5 +158,5 @@ LoadPresentsGraphic: ; unreferenced GameFreakIntro: INCBIN "gfx/splash/gamefreak_presents.2bpp" INCBIN "gfx/splash/gamefreak_logo.2bpp" - ds 16, $00 ; blank tile + ds TILE_SIZE, $00 ; blank tile GameFreakIntroEnd: diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm index 9994be51..90fb8f0e 100644 --- a/engine/movie/oak_speech/init_player_data.asm +++ b/engine/movie/oak_speech/init_player_data.asm @@ -50,7 +50,7 @@ DEF START_MONEY EQU $3000 ld bc, wGameProgressFlagsEnd - wGameProgressFlags call FillMemory ; clear all game progress flags - jp InitializeMissableObjectsFlags + jp InitializeToggleableObjectsFlags InitializeEmptyList: xor a ; count diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm index 5cc80745..4d615126 100644 --- a/engine/movie/oak_speech/oak_speech.asm +++ b/engine/movie/oak_speech/oak_speech.asm @@ -125,6 +125,9 @@ OakSpeech: ld a, SFX_SHRINK call PlaySound pop af +; bug: switching ROM Bank should not happen outside of Home Bank +; This code does nothing, as PlaySound does all necessary Bank switch +; It looks like a leftover from an early development stage call BankswitchCommon ld c, 4 call DelayFrames @@ -151,6 +154,7 @@ OakSpeech: ld [wAudioFadeOutControl], a call StopAllMusic pop af +; bug: switching ROM Bank should not happen outside of Home Bank call BankswitchCommon ld c, 20 call DelayFrames @@ -163,23 +167,27 @@ OakSpeech: ld c, 50 call DelayFrames call GBFadeOutToWhite - call ClearScreen ; rip more tail-end optimizations + call ClearScreen ret OakSpeechText1: text_far _OakSpeechText1 text_end + OakSpeechText2: text_far _OakSpeechText2A sound_cry_pikachu text_far _OakSpeechText2B text_end + IntroducePlayerText: text_far _IntroducePlayerText text_end + IntroduceRivalText: text_far _IntroduceRivalText text_end + OakSpeechText3: text_far _OakSpeechText3 text_end diff --git a/engine/movie/oak_speech/oak_speech2.asm b/engine/movie/oak_speech/oak_speech2.asm index cedc8be7..9beb4945 100644 --- a/engine/movie/oak_speech/oak_speech2.asm +++ b/engine/movie/oak_speech/oak_speech2.asm @@ -187,7 +187,7 @@ DisplayIntroNameTextBox: .namestring db "NAME@" -INCLUDE "data/player_names.asm" +INCLUDE "data/player/names.asm" GetDefaultName: ; a = name index @@ -213,7 +213,7 @@ GetDefaultName: ld bc, NAME_BUFFER_LENGTH jp CopyData -INCLUDE "data/player_names_list.asm" +INCLUDE "data/player/names_list.asm" LinkMenuEmptyText: text_end diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm index 5b837591..8ac0c26e 100644 --- a/engine/movie/splash.asm +++ b/engine/movie/splash.asm @@ -15,7 +15,7 @@ LoadShootingStarGraphics: call CopyVideoData ld de, FallingStar ld hl, vChars1 tile $22 - lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10 + lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / TILE_SIZE call CopyVideoData ld hl, GameFreakLogoOAMData ld de, wShadowOAMSprite24 @@ -62,11 +62,11 @@ AnimateShootingStar: jr nz, .bigStarLoop ; Clear big star OAM. - ld hl, wShadowOAM + ld hl, wShadowOAMSprite00YCoord ld c, 4 - ld de, 4 + ld de, OBJ_SIZE .clearOAMLoop - ld [hl], 160 + ld [hl], SCREEN_HEIGHT_PX + OAM_Y_OFS add hl, de dec c jr nz, .clearOAMLoop @@ -145,7 +145,7 @@ AnimateShootingStar: ; shift the existing OAM entries down to make room for the next wave ld hl, wShadowOAMSprite04 ld de, wShadowOAM - ld bc, $50 + ld bc, OBJ_SIZE * 20 call CopyData pop af diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 0e9b651e..4ff22800 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -253,7 +253,7 @@ LoadCopyrightAndTextBoxTiles: LoadCopyrightTiles: ld de, NintendoCopyrightLogoGraphics ld hl, vChars2 tile $60 - lb bc, BANK(NintendoCopyrightLogoGraphics), (TextBoxGraphics + $10 - NintendoCopyrightLogoGraphics) / $10 ; bug: overflows into text box graphics and copies the "A" tile + lb bc, BANK(NintendoCopyrightLogoGraphics), (TextBoxGraphics + $10 - NintendoCopyrightLogoGraphics) / TILE_SIZE ; bug: overflows into text box graphics and copies the "A" tile call CopyVideoData hlcoord 2, 7 ld de, CopyrightTextString diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index 1af97969..f0c813bc 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -319,7 +319,7 @@ Trade_AnimateBallEnteringLinkCable: ld [wLinkCableAnimBulgeToggle], a add $7e ld hl, wShadowOAMSprite00TileID - ld de, 4 + ld de, OBJ_SIZE ld c, e .cycleLinkCableBulgeTile ld [hl], a @@ -606,7 +606,7 @@ Trade_AnimCircledMon: ldh [rBGP], a call UpdateCGBPal_BGP ld hl, wShadowOAMSprite00TileID - ld de, $4 + ld de, OBJ_SIZE ld c, $14 .loop ld a, [hl] |
