aboutsummaryrefslogtreecommitdiffstats
path: root/engine/movie
diff options
context:
space:
mode:
authorSatoMew <SatoMew@users.noreply.github.com>2023-07-15 23:36:59 +0100
committerGitHub <noreply@github.com>2023-07-15 18:36:59 -0400
commitf46db37d508f0111ad44ad062ed3d83ba3282d1d (patch)
tree170af31852384f5a207918decf05e45a837d95d1 /engine/movie
parentAdd macros, constants, and labels for map scripts and text (#367) (diff)
downloadpokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.tar.gz
pokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.tar.xz
pokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.zip
Thoroughly document debug code (#410)
Diffstat (limited to 'engine/movie')
-rw-r--r--engine/movie/oak_speech/oak_speech.asm17
-rw-r--r--engine/movie/title.asm8
2 files changed, 16 insertions, 9 deletions
diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm
index 3a08372d..4ed4735e 100644
--- a/engine/movie/oak_speech/oak_speech.asm
+++ b/engine/movie/oak_speech/oak_speech.asm
@@ -3,6 +3,11 @@ PrepareOakSpeech:
push af
ld a, [wOptions]
push af
+ ; Retrieve BIT_DEBUG_MODE set in DebugMenu for StartNewGameDebug.
+ ; BUG: StartNewGame carries over bit 5 from previous save files,
+ ; which causes CheckForceBikeOrSurf to not return.
+ ; To fix this in debug builds, reset bit 5 here or in StartNewGame.
+ ; In non-debug builds, the instructions can be removed.
ld a, [wd732]
push af
ld hl, wPlayerName
@@ -24,6 +29,7 @@ PrepareOakSpeech:
call z, InitOptions
; These debug names are used for StartNewGameDebug.
; TestBattle uses the debug names from DebugMenu.
+ ; A variant of this process is performed in PrepareTitleScreen.
ld hl, DebugNewGamePlayerName
ld de, wPlayerName
ld bc, NAME_LENGTH
@@ -49,15 +55,15 @@ OakSpeech:
ld [wcf91], a
ld a, 1
ld [wItemQuantity], a
- call AddItemToInventory ; give one potion
+ call AddItemToInventory
ld a, [wDefaultMap]
ld [wDestinationMap], a
- call SpecialWarpIn
+ call PrepareForSpecialWarp
xor a
ldh [hTileAnimations], a
ld a, [wd732]
- bit 1, a ; possibly a debug mode bit
- jp nz, .skipChoosingNames
+ bit BIT_DEBUG_MODE, a
+ jp nz, .skipSpeech
ld de, ProfOakPic
lb bc, BANK(ProfOakPic), $00
call IntroDisplayPicCenteredOrUpperRight
@@ -93,7 +99,7 @@ OakSpeech:
ld hl, IntroduceRivalText
call PrintText
call ChooseRivalName
-.skipChoosingNames
+.skipSpeech
call GBFadeOutToWhite
call ClearScreen
ld de, RedPicFront
@@ -159,6 +165,7 @@ OakSpeechText1:
text_end
OakSpeechText2:
text_far _OakSpeechText2A
+ ; BUG: The cry played does not match the sprite displayed.
sound_cry_nidorina
text_far _OakSpeechText2B
text_end
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index ad5f6ebf..36a28b0d 100644
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -1,4 +1,4 @@
-CopyDebugName:
+CopyDebugName: ; unused
ld bc, NAME_LENGTH
jp CopyData
@@ -42,10 +42,10 @@ DisplayTitleScreen:
ld bc, 5 tiles
ld a, BANK(NintendoCopyrightLogoGraphics)
call FarCopyData2
- ld hl, GamefreakLogoGraphics
+ ld hl, GameFreakLogoGraphics
ld de, vTitleLogo2 tile (16 + 5)
ld bc, 9 tiles
- ld a, BANK(GamefreakLogoGraphics)
+ ld a, BANK(GameFreakLogoGraphics)
call FarCopyData2
ld hl, PokemonLogoGraphics
ld de, vTitleLogo
@@ -378,7 +378,7 @@ LoadCopyrightAndTextBoxTiles:
LoadCopyrightTiles:
ld de, NintendoCopyrightLogoGraphics
ld hl, vChars2 tile $60
- lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
+ lb bc, BANK(NintendoCopyrightLogoGraphics), (GameFreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
call CopyVideoData
hlcoord 2, 7
ld de, CopyrightTextString