aboutsummaryrefslogtreecommitdiffstats
path: root/engine/movie
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
committerdannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
commita02a98ee7ada1a658e28698484058be2796dc0df (patch)
tree945986054565bd8b5212fc755415096050d1d3a8 /engine/movie
parentUse long option flags for rgbgfx, same as tools/gfx (diff)
parentUse `const_skip` (diff)
downloadpokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/movie')
-rw-r--r--engine/movie/credits.asm8
-rw-r--r--engine/movie/evolution.asm16
-rw-r--r--engine/movie/hall_of_fame.asm14
-rw-r--r--engine/movie/intro.asm4
-rw-r--r--engine/movie/oak_speech/init_player_data.asm2
-rw-r--r--engine/movie/oak_speech/oak_speech.asm20
-rw-r--r--engine/movie/oak_speech/oak_speech2.asm4
-rw-r--r--engine/movie/title.asm6
-rw-r--r--engine/movie/trade.asm18
-rw-r--r--engine/movie/trade2.asm10
10 files changed, 52 insertions, 50 deletions
diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm
index 489569d1..7a24b0b8 100644
--- a/engine/movie/credits.asm
+++ b/engine/movie/credits.asm
@@ -65,7 +65,7 @@ DisplayCreditsMon:
xor a
ldh [hAutoBGTransferEnabled], a
ld hl, rLCDC
- set 3, [hl]
+ set rLCDC_BG_TILEMAP, [hl]
call SaveScreenTilesToBuffer2
call FillMiddleOfScreenWithWhite
call GetNextCreditsMon
@@ -80,7 +80,7 @@ DisplayCreditsMon:
ldh [rBGP], a
call UpdateGBCPal_BGP
ld hl, rLCDC
- res 3, [hl]
+ res rLCDC_BG_TILEMAP, [hl]
ld a, 1
ldh [hAutoBGTransferEnabled], a
ld b, 0
@@ -117,8 +117,8 @@ GetNextCreditsMon:
ld hl, CreditsMons
add hl, bc
ld a, [hl]
- ld [wcf91], a
- ld [wd0b5], a
+ ld [wCurPartySpecies], a
+ ld [wCurSpecies], a
hlcoord 8, 6
call GetMonHeader
call LoadFrontSpriteByMonIndex
diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm
index 37e10188..99f14322 100644
--- a/engine/movie/evolution.asm
+++ b/engine/movie/evolution.asm
@@ -2,9 +2,9 @@ EvolveMon:
push hl
push de
push bc
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
push af
- ld a, [wd0b5]
+ ld a, [wCurSpecies]
push af
xor a
ld [wLowHealthAlarm], a
@@ -23,16 +23,16 @@ EvolveMon:
ld c, 0
call EvolutionSetWholeScreenPalette
ld a, [wEvoNewSpecies]
- ld [wcf91], a
- ld [wd0b5], a
+ ld [wCurPartySpecies], a
+ ld [wCurSpecies], a
call Evolution_LoadPic
ld de, vFrontPic
ld hl, vBackPic
ld bc, 7 * 7
call CopyVideoData
ld a, [wEvoOldSpecies]
- ld [wcf91], a
- ld [wd0b5], a
+ ld [wCurPartySpecies], a
+ ld [wCurSpecies], a
call Evolution_LoadPic
ld a, $1
ldh [hAutoBGTransferEnabled], a
@@ -71,9 +71,9 @@ EvolveMon:
ld c, 0
call EvolutionSetWholeScreenPalette
pop af
- ld [wd0b5], a
+ ld [wCurSpecies], a
pop af
- ld [wcf91], a
+ ld [wCurPartySpecies], a
pop bc
pop de
pop hl
diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm
index 5f441343..5be7d8c5 100644
--- a/engine/movie/hall_of_fame.asm
+++ b/engine/movie/hall_of_fame.asm
@@ -12,7 +12,7 @@ AnimateHallOfFame:
call FillMemory
call EnableLCD
ld hl, rLCDC
- set 3, [hl]
+ set rLCDC_BG_TILEMAP, [hl]
xor a
ld hl, wHallOfFame
ld bc, HOF_TEAM
@@ -87,7 +87,7 @@ AnimateHallOfFame:
xor a
ldh [hWY], a
ld hl, rLCDC
- res 3, [hl]
+ res rLCDC_BG_TILEMAP, [hl]
ret
HallOfFameText:
@@ -100,8 +100,8 @@ HoFShowMonOrPlayer:
ld a, $c0
ldh [hSCX], a
ld a, [wHoFMonSpecies]
- ld [wcf91], a
- ld [wd0b5], a
+ ld [wCurPartySpecies], a
+ ld [wCurSpecies], a
ld [wBattleMonSpecies2], a
ld [wWholeScreenPaletteMonSpecies], a
ld a, [wHoFMonOrPlayer]
@@ -180,13 +180,13 @@ HoFDisplayMonInfo:
ld de, HoFMonInfoText
call PlaceString
hlcoord 1, 4
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld a, [wHoFMonLevel]
hlcoord 8, 7
call PrintLevelCommon
ld a, [wHoFMonSpecies]
- ld [wd0b5], a
+ ld [wCurSpecies], a
hlcoord 3, 9
predef PrintMonType
ret
@@ -290,7 +290,7 @@ HoFRecordMonInfo:
ld [hli], a
ld e, l
ld d, h
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld bc, NAME_LENGTH
jp CopyData
diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm
index 691f9c78..ef2374da 100644
--- a/engine/movie/intro.asm
+++ b/engine/movie/intro.asm
@@ -116,8 +116,8 @@ PlayShootingStar:
call EnableLCD
ld hl, rLCDC
- res 5, [hl]
- set 3, [hl]
+ res rLCDC_WINDOW_ENABLE, [hl]
+ set rLCDC_BG_TILEMAP, [hl]
ld c, 64
call DelayFrames
farcall AnimateShootingStar
diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm
index 592aa5f0..25b6067d 100644
--- a/engine/movie/oak_speech/init_player_data.asm
+++ b/engine/movie/oak_speech/init_player_data.asm
@@ -10,7 +10,7 @@ InitPlayerData2:
ld [wPlayerID + 1], a
ld a, $ff
- ld [wUnusedD71B], a
+ ld [wUnusedPlayerDataByte], a
ld a, 90 ; initialize happiness to 90
ld [wPikachuHappiness], a
diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm
index 3884d271..6cdf3e56 100644
--- a/engine/movie/oak_speech/oak_speech.asm
+++ b/engine/movie/oak_speech/oak_speech.asm
@@ -4,11 +4,11 @@ PrepareOakSpeech:
ld a, [wOptions]
push af
; Retrieve BIT_DEBUG_MODE set in DebugMenu for StartNewGameDebug.
- ; BUG: StartNewGame carries over bit 5 from previous save files,
+ ; BUG: StartNewGame carries over BIT_ALWAYS_ON_BIKE from previous save files,
; which causes CheckForceBikeOrSurf to not return.
- ; To fix this in debug builds, reset bit 5 here or in StartNewGame.
+ ; To fix this in debug builds, reset BIT_ALWAYS_ON_BIKE here or in StartNewGame.
; In non-debug builds, the instructions can be removed.
- ld a, [wd732]
+ ld a, [wStatusFlags6]
push af
ld a, [wPrinterSettings]
push af
@@ -27,7 +27,7 @@ PrepareOakSpeech:
pop af
ld [wPrinterSettings], a
pop af
- ld [wd732], a
+ ld [wStatusFlags6], a
pop af
ld [wOptions], a
pop af
@@ -60,7 +60,7 @@ OakSpeech:
predef InitPlayerData2
ld hl, wNumBoxItems
ld a, POTION
- ld [wcf91], a
+ ld [wCurItem], a
ld a, 1
ld [wItemQuantity], a
call AddItemToInventory
@@ -69,7 +69,7 @@ OakSpeech:
call PrepareForSpecialWarp
xor a
ldh [hTileAnimations], a
- ld a, [wd732]
+ ld a, [wStatusFlags6]
bit BIT_DEBUG_MODE, a
jp nz, .skipSpeech
ld de, ProfOakPic
@@ -81,8 +81,8 @@ OakSpeech:
call GBFadeOutToWhite
call ClearScreen
ld a, STARTER_PIKACHU
- ld [wd0b5], a
- ld [wcf91], a
+ ld [wCurSpecies], a
+ ld [wCurPartySpecies], a
call GetMonHeader
hlcoord 6, 4
call LoadFlippedFrontSpriteByMonIndex
@@ -114,8 +114,8 @@ OakSpeech:
lb bc, BANK(RedPicFront), $00
call IntroDisplayPicCenteredOrUpperRight
call GBFadeInFromWhite
- ld a, [wd72d]
- and a
+ ld a, [wStatusFlags3]
+ and a ; ???
jr nz, .next
ld hl, OakSpeechText3
call PrintText
diff --git a/engine/movie/oak_speech/oak_speech2.asm b/engine/movie/oak_speech/oak_speech2.asm
index cf657a7f..39dcf001 100644
--- a/engine/movie/oak_speech/oak_speech2.asm
+++ b/engine/movie/oak_speech/oak_speech2.asm
@@ -72,7 +72,7 @@ OakSpeechSlidePicLeft:
ld c, 10
call DelayFrames
pop de
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld bc, NAME_LENGTH
call CopyData
call Delay3
@@ -209,7 +209,7 @@ GetDefaultName:
.foundName
ld h, d
ld l, e
- ld de, wcd6d
+ ld de, wNameBuffer
ld bc, NAME_BUFFER_LENGTH
jp CopyData
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index d0a97a6f..2c4b61fb 100644
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -11,9 +11,11 @@ PrepareTitleScreen::
xor a
ldh [hWY], a
ld [wLetterPrintingDelayFlags], a
- ld hl, wd732
+ ld hl, wStatusFlags6
ld [hli], a
+ assert wStatusFlags6 + 1 == wStatusFlags7
ld [hli], a
+ assert wStatusFlags7 + 1 == wElite4Flags
ld [hl], a
ld a, BANK(Music_TitleScreen)
ld [wAudioROMBank], a
@@ -152,7 +154,7 @@ DisplayTitleScreen:
call PlaySound
.loop
xor a
- ld [wUnusedCC5B], a
+ ld [wUnusedFlag], a
ld [wTitleScreenScene], a
ld [wTitleScreenScene + 1], a
ld [wTitleScreenScene + 2], a
diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm
index 7143701b..990f1788 100644
--- a/engine/movie/trade.asm
+++ b/engine/movie/trade.asm
@@ -174,8 +174,8 @@ LoadTradingGFXAndMonNames:
call ClearSprites
ld a, $ff
ld [wUpdateSpritesEnabled], a
- ld hl, wd730
- set 6, [hl] ; turn on instant text printing
+ ld hl, wStatusFlags5
+ set BIT_NO_TEXT_DELAY, [hl]
ld a, [wOnSGB]
and a
ld a, $e4 ; non-SGB OBP0
@@ -188,14 +188,14 @@ LoadTradingGFXAndMonNames:
xor a
ldh [hAutoBGTransferEnabled], a
ld a, [wTradedPlayerMonSpecies]
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wStringBuffer
ld bc, NAME_LENGTH
call CopyData
ld a, [wTradedEnemyMonSpecies]
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
jp GetMonName
Trade_LoadMonPartySpriteGfx:
@@ -221,8 +221,8 @@ Trade_SwapNames:
Trade_Cleanup:
xor a
call LoadGBPal
- ld hl, wd730
- res 6, [hl] ; turn off instant text printing
+ ld hl, wStatusFlags5
+ res BIT_NO_TEXT_DELAY, [hl]
ret
Trade_ShowPlayerMon:
@@ -731,8 +731,8 @@ Trade_CircleOAM3:
; a = species
Trade_LoadMonSprite:
- ld [wcf91], a
- ld [wd0b5], a
+ ld [wCurPartySpecies], a
+ ld [wCurSpecies], a
ld [wWholeScreenPaletteMonSpecies], a
ld b, SET_PAL_POKEMON_WHOLE_SCREEN
ld c, 0
diff --git a/engine/movie/trade2.asm b/engine/movie/trade2.asm
index 98d1158e..d4a4b635 100644
--- a/engine/movie/trade2.asm
+++ b/engine/movie/trade2.asm
@@ -3,10 +3,10 @@ Trade_PrintPlayerMonInfoText:
ld de, Trade_MonInfoText
call PlaceString
ld a, [wTradedPlayerMonSpecies]
- ld [wd11e], a
+ ld [wPokedexNum], a
predef IndexToPokedex
hlcoord 9, 0
- ld de, wd11e
+ ld de, wPokedexNum
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber
hlcoord 5, 2
@@ -25,14 +25,14 @@ Trade_PrintEnemyMonInfoText:
ld de, Trade_MonInfoText
call PlaceString
ld a, [wTradedEnemyMonSpecies]
- ld [wd11e], a
+ ld [wPokedexNum], a
predef IndexToPokedex
hlcoord 9, 10
- ld de, wd11e
+ ld de, wPokedexNum
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber
hlcoord 5, 12
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
hlcoord 8, 14
ld de, wTradedEnemyMonOT