Improve some innacurate function names, labels, and comments (#1078)

[https://github.com/pret/pokecrystal/issues/1078#issue-1869550979 and https://github.com/pret/pokecrystal/issues/1078#issuecomment-1696394371]
This commit is contained in:
xCrystal
2024-01-07 12:38:00 +01:00
parent dbf6044650
commit bd6ceec193
107 changed files with 340 additions and 337 deletions

View File

@@ -29,7 +29,7 @@ DEF MAP_LENGTH EQU _RS
const DUNGEON
DEF NUM_ENVIRONMENTS EQU const_value - 1
; map palettes (wEnvironment)
; map palettes (wMapTimeOfDay)
const_def
const PALETTE_AUTO
const PALETTE_DAY

View File

@@ -56,7 +56,7 @@ DEF NUM_FRAMES EQU const_value
; wTextboxFlags::
const_def
const FAST_TEXT_DELAY_F ; 0
const NO_TEXT_DELAY_F ; 1
const TEXT_DELAY_F ; 1
; wGBPrinterBrightness::
DEF GBPRINTER_LIGHTEST EQU $00

View File

@@ -57,11 +57,11 @@ SpecialsPointers::
add_special CardFlip
add_special UnusedMemoryGame ; unused
add_special ClearBGPalettesBufferScreen ; unused
add_special FadeOutPalettes
add_special FadeOutToWhite
add_special BattleTowerFade
add_special FadeBlackQuickly
add_special FadeInPalettes
add_special FadeInQuickly
add_special FadeOutToBlack
add_special FadeInFromWhite
add_special FadeInFromBlack
add_special ReloadSpritesNoPalettes ; bank 0
add_special ClearBGPalettes ; bank 0
add_special UpdateTimePals ; bank 0

View File

@@ -33,8 +33,8 @@ MapSetupCommands:
add_mapsetup LoadMapAttributes ; 1a
add_mapsetup LoadMapAttributes_SkipObjects ; 1b
add_mapsetup ClearBGPalettes ; 1c
add_mapsetup FadeOutPalettes ; 1d
add_mapsetup FadeInPalettes ; 1e
add_mapsetup FadeOutToWhite ; 1d
add_mapsetup FadeInFromWhite ; 1e
add_mapsetup GetMapScreenCoords ; 1f
add_mapsetup GetWarpDestCoords ; 20
add_mapsetup SpawnInFacingDown ; 21

View File

@@ -23,7 +23,7 @@ ENDM
MapSetupScript_Teleport:
mapsetup ResetPlayerObjectAction
MapSetupScript_Fly:
mapsetup FadeOutPalettes
mapsetup FadeOutToWhite
mapsetup JumpRoamMons
MapSetupScript_Warp:
mapsetup DisableLCD
@@ -45,7 +45,7 @@ MapSetupScript_Warp:
mapsetup RefreshMapSprites
mapsetup PlayMapMusicBike
mapsetup FadeInToMusic
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
db -1 ; end
@@ -69,7 +69,7 @@ MapSetupScript_BadWarp:
mapsetup SpawnInFacingDown
mapsetup RefreshMapSprites
mapsetup FadeToMapMusic
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
db -1 ; end
@@ -96,7 +96,7 @@ MapSetupScript_Connection:
MapSetupScript_Fall:
mapsetup ResetPlayerObjectAction
MapSetupScript_Door:
mapsetup FadeOutPalettes
mapsetup FadeOutToWhite
MapSetupScript_Train:
mapsetup EnterMapWarp
mapsetup LoadMapAttributes
@@ -114,7 +114,7 @@ MapSetupScript_Train:
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites
mapsetup FadeToMapMusic
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
mapsetup UpdateRoamMons
@@ -133,7 +133,7 @@ MapSetupScript_ReloadMap:
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites
mapsetup ForceMapMusic
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
db -1 ; end
@@ -151,7 +151,7 @@ MapSetupScript_LinkReturn:
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites
mapsetup PlayMapMusicBike
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
mapsetup EnableTextAcceleration
@@ -172,7 +172,7 @@ MapSetupScript_Continue:
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites
mapsetup PlayMapMusicBike
mapsetup FadeInPalettes
mapsetup FadeInFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
db -1 ; end

View File

@@ -2745,7 +2745,7 @@ ForcePlayerMonChoice:
call LoadTilemapToTempTilemap
call WaitBGMap
call GetMemSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
xor a
ld c, a
ret
@@ -2764,7 +2764,7 @@ ForcePlayerMonChoice:
call _LoadHPBar
call CloseWindow
call GetMemSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call SendOutMonText
call NewBattleMonStatus
call BreakAttraction
@@ -2830,7 +2830,7 @@ JumpToPartyMenuAndPrintText:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
ret
@@ -2961,7 +2961,7 @@ LostBattle:
; Grayscale
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
jr .end
.LostLinkBattle:
@@ -5045,7 +5045,7 @@ BattleMenu_Pack:
and BATTLERESULT_BITMASK
ld [wBattleResult], a ; WIN
call ClearWindowData
call SetPalettes
call SetDefaultBGPAndOBP
scf
ret
@@ -5095,7 +5095,7 @@ BattleMenuPKMN_Loop:
call CloseWindow
call LoadTilemapToTempTilemap
call GetMemSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
jp BattleMenu
.GetMenu:
@@ -5181,7 +5181,7 @@ TryPlayerSwitch:
call _LoadHPBar
call CloseWindow
call GetMemSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld a, [wCurPartyMon]
ld [wCurBattleMon], a
PlayerSwitch:
@@ -6963,7 +6963,7 @@ FinishBattleAnim:
push hl
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
pop hl
pop de
@@ -8459,7 +8459,7 @@ _DisplayLinkRecord:
call WaitBGMap2
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld c, 8
call DelayFrames
call WaitPressAorB_BlinkCursor
@@ -8940,7 +8940,7 @@ InitBattleDisplay:
call HideSprites
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld a, $90
ldh [hWY], a
xor a

View File

@@ -29,7 +29,7 @@ BattleCommand_BatonPass:
call ClearBox
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently

View File

@@ -16,4 +16,4 @@ _ReturnToBattle_UseBall:
call CloseWindow
call LoadStandardMenuHeader
call WaitBGMap
jp SetPalettes
jp SetDefaultBGPAndOBP

View File

@@ -252,7 +252,7 @@ _ShowLinkBattleParticipants:
farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld a, $e4
ldh [rOBP0], a
ret

View File

@@ -1081,7 +1081,7 @@ TilesetColorPicker: ; unreferenced
ld [wDebugTilesetCurColor], a
ldh [hMapAnims], a
call ClearSprites
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call WaitBGMap2
xor a
ldh [hBGMapMode], a

View File

@@ -602,7 +602,7 @@ DebugRoom_EditPagedValues:
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
.resume
call DelayFrame
call JoyTextDelay

View File

@@ -608,7 +608,7 @@ Function1704e1:
bit 7, a
jr nz, .done
call .DoJumptable
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
jr .loop
.done
@@ -654,7 +654,7 @@ Function1704e1:
jr .NextJumptableFunction
.Jumptable_1:
call SetPalettes
call SetDefaultBGPAndOBP
call .NextJumptableFunction
.Jumptable_2:

View File

@@ -76,7 +76,7 @@ DisplayCaughtContestMonStats:
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
.Health:

View File

@@ -31,7 +31,7 @@ PlaceDiplomaOnScreen:
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
ret

View File

@@ -10,7 +10,7 @@ PlayWhirlpoolSound:
ret
BlindingFlash:
farcall FadeOutPalettes
farcall FadeOutToWhite
ld hl, wStatusFlags
set STATUSFLAGS_FLASH_F, [hl]
farcall ReplaceTimeOfDayPals
@@ -18,7 +18,7 @@ BlindingFlash:
ld b, SCGB_MAPPALS
call GetSGBLayout
farcall LoadOW_BGPal7
farcall FadeInPalettes
farcall FadeInFromWhite
ret
ShakeHeadbuttTree:
@@ -59,7 +59,7 @@ ShakeHeadbuttTree:
jr .loop
.done
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call WaitBGMap
xor a
ldh [hBGMapMode], a

View File

@@ -41,7 +41,7 @@ RedCredits::
ld [wMusicFadeID + 1], a
ld a, 10
ld [wMusicFade], a
farcall FadeOutPalettes
farcall FadeOutToWhite
xor a
ld [wVramState], a
ldh [hMapAnims], a
@@ -63,7 +63,7 @@ HallOfFame_FadeOutMusic:
ld [wMusicFadeID + 1], a
ld a, 10
ld [wMusicFade], a
farcall FadeOutPalettes
farcall FadeOutToWhite
xor a
ld [wVramState], a
ldh [hMapAnims], a
@@ -256,7 +256,7 @@ AnimateHOFMonEntrance:
ldh [hBGMapMode], a
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call HOF_SlideBackpic
xor a
ld [wBoxAlignment], a
@@ -389,7 +389,7 @@ _HallOfFamePC:
call WaitBGMap
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
decoord 6, 5
ld c, ANIM_MON_HOF
predef HOF_AnimateFrontpic
@@ -543,7 +543,7 @@ HOF_AnimatePlayerPic:
ld [wCurPartySpecies], a
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call HOF_SlideBackpic
xor a
ld [wBoxAlignment], a

View File

@@ -220,7 +220,7 @@ CutDownTreeOrGrass:
ld [hl], a
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call UpdateSprites
call DelayFrame
ld a, [wCutWhirlpoolAnimationType]
@@ -1179,7 +1179,7 @@ DisappearWhirlpool:
ld [hl], a
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
ld a, [wCutWhirlpoolAnimationType]
ld e, a
farcall PlayWhirlpoolSound

View File

@@ -212,7 +212,7 @@ _PlayersHousePC:
call _PlayersPC
and a
jr nz, .changed_deco_tiles
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call ApplyTilemap
call UpdateSprites
call PC_PlayShutdownSound

View File

@@ -35,7 +35,7 @@ ClosePokepic::
call GetMemSGBLayout
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call ApplyTilemap
call UpdateSprites
call LoadStandardFont

View File

@@ -64,7 +64,7 @@ _UnownPrinter:
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
.joy_loop
call JoyTextDelay

View File

@@ -49,12 +49,12 @@ SacredAshScript:
special HealParty
reloadmappart
playsound SFX_WARP_TO
special FadeOutPalettes
special FadeInPalettes
special FadeOutPalettes
special FadeInPalettes
special FadeOutPalettes
special FadeInPalettes
special FadeOutToWhite
special FadeInFromWhite
special FadeOutToWhite
special FadeInFromWhite
special FadeOutToWhite
special FadeInFromWhite
waitsfx
writetext .UseSacredAshText
playsound SFX_CAUGHT_MON

View File

@@ -30,7 +30,7 @@ SweetScentNothing:
end
SweetScentEncounter:
farcall CanUseSweetScent
farcall CanEncounterWildMonInThisTile
jr nc, .no_battle
ld hl, wStatusFlags2
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]

View File

@@ -9,7 +9,7 @@ OverworldWhiteoutScript::
Script_Whiteout:
writetext .WhitedOutText
waitbutton
special FadeOutPalettes
special FadeOutToWhite
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
@@ -39,7 +39,7 @@ OverworldBGMap:
BattleBGMap:
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
HalveMoney:

View File

@@ -29,6 +29,7 @@ LoadSGBLayoutCGB:
ret
CGBLayoutJumptable:
; entries correspond to SCGB_* constants (see constants/scgb_constants.asm)
table_width 2, CGBLayoutJumptable
dw _CGB_BattleGrayscale
dw _CGB_BattleColors

View File

@@ -1200,7 +1200,7 @@ LoadMapPals:
; Which palette group is based on whether we're outside or inside
ld a, [wEnvironment]
and 7
maskbits NUM_ENVIRONMENTS + 1
ld e, a
ld d, 0
ld hl, EnvironmentColorsPointers

View File

@@ -47,7 +47,7 @@ HDMATransferAttrmapToWRAMBank3:
call HDMATransferToWRAMBank3
ret
ReloadMapPart::
HDMATransferTilemapAndAttrmap_Overworld::
ld hl, .Function
jp CallInSafeGFXMode
@@ -66,19 +66,19 @@ ReloadMapPart::
ld a, $1
ldh [rVBK], a
ld hl, wScratchAttrmap
call HDMATransfer_Wait127Scanlines_toBGMap
call HDMATransfer_WaitForScanline128_toBGMap
ld a, $0
ldh [rVBK], a
ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines_toBGMap
call HDMATransfer_WaitForScanline128_toBGMap
pop af
ldh [rVBK], a
ei
ret
Mobile_ReloadMapPart:
ld hl, ReloadMapPart ; useless
Mobile_HDMATransferTilemapAndAttrmap_Overworld:
ld hl, HDMATransferTilemapAndAttrmap_Overworld ; useless
ld hl, .Function
jp CallInSafeGFXMode
@@ -144,8 +144,7 @@ Function1040fb: ; unreferenced
call HDMATransferToWRAMBank3
ret
OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
; OpenText
_HDMATransferTilemapAndAttrmap_Menu::
ld hl, .Function
jp CallInSafeGFXMode
@@ -167,17 +166,17 @@ OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
ld a, $1
ldh [rVBK], a
ld hl, wScratchAttrmap
call HDMATransfer_Wait123Scanlines_toBGMap
call HDMATransfer_WaitForScanline124_toBGMap
ld a, $0
ldh [rVBK], a
ld hl, wScratchTilemap
call HDMATransfer_Wait123Scanlines_toBGMap
call HDMATransfer_WaitForScanline124_toBGMap
pop af
ldh [rVBK], a
ei
ret
Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:
Mobile_HDMATransferTilemapAndAttrmap_Menu:
ld hl, .Function
jp CallInSafeGFXMode
@@ -196,11 +195,11 @@ Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:
ld a, $1
ldh [rVBK], a
ld hl, wScratchAttrmap
call HDMATransfer_Wait127Scanlines_toBGMap
call HDMATransfer_WaitForScanline128_toBGMap
ld a, $0
ldh [rVBK], a
ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines_toBGMap
call HDMATransfer_WaitForScanline128_toBGMap
ret
CallInSafeGFXMode:
@@ -246,7 +245,7 @@ WaitDMATransfer:
jr nz, .loop
ret
HDMATransfer_Wait127Scanlines_toBGMap:
HDMATransfer_WaitForScanline128_toBGMap:
; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c
@@ -255,9 +254,9 @@ HDMATransfer_Wait127Scanlines_toBGMap:
ldh a, [hBGMapAddress]
ld e, a
ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait127Scanlines
jr HDMATransfer_WaitForScanline128
HDMATransfer_Wait123Scanlines_toBGMap:
HDMATransfer_WaitForScanline124_toBGMap:
; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c
@@ -267,7 +266,7 @@ HDMATransfer_Wait123Scanlines_toBGMap:
ldh a, [hBGMapAddress]
ld e, a
ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait123Scanlines
jr HDMATransfer_WaitForScanline124
HDMATransfer_NoDI:
; HDMA transfer from hl to [hBGMapAddress]
@@ -328,11 +327,11 @@ HDMATransfer_NoDI:
res 7, [hl]
ret
HDMATransfer_Wait123Scanlines:
HDMATransfer_WaitForScanline124:
ld b, $7b
jr _continue_HDMATransfer
HDMATransfer_Wait127Scanlines:
HDMATransfer_WaitForScanline128:
ld b, $7f
_continue_HDMATransfer:
; a lot of waiting around for hardware registers
@@ -487,7 +486,7 @@ HDMATransfer2bpp::
ld d, h
ld e, l
ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines
call HDMATransfer_WaitForScanline128
; restore the previous bank
pop af
@@ -552,7 +551,7 @@ HDMATransfer1bpp::
ld d, h
ld e, l
ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines
call HDMATransfer_WaitForScanline128
pop af
ldh [rSVBK], a
@@ -574,13 +573,13 @@ HDMATransfer_OnlyTopFourRows:
ld c, $8
ld hl, wScratchTilemap + $80
debgcoord 0, 0, vBGMap1
call HDMATransfer_Wait127Scanlines
call HDMATransfer_WaitForScanline128
ld a, $0
ldh [rVBK], a
ld c, $8
ld hl, wScratchTilemap
debgcoord 0, 0, vBGMap1
call HDMATransfer_Wait127Scanlines
call HDMATransfer_WaitForScanline128
ret
.Copy:

View File

@@ -22,6 +22,7 @@ LoadSGBLayout:
jp hl
SGBLayoutJumptable:
; entries correspond to SCGB_* constants (see constants/scgb_constants.asm)
table_width 2, SGBLayoutJumptable
dw .SGB_BattleGrayscale
dw .SGB_BattleColors

View File

@@ -1726,7 +1726,7 @@ ChooseMonToUseItemOn:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
ret
@@ -1743,7 +1743,7 @@ ItemActionText:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuActionText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
pop bc
pop de

View File

@@ -574,7 +574,7 @@ GiveItem:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
jr c, .finish
@@ -1437,7 +1437,7 @@ Pack_InitColors:
call WaitBGMap
ld b, SCGB_PACKPALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
ret

View File

@@ -86,7 +86,7 @@ ChooseMonToLearnTMHM_NoRefresh:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
push af

View File

@@ -2085,7 +2085,7 @@ LoadTradeScreenBorderGFX:
SetTradeRoomBGPals:
farcall LoadTradeRoomBGPals ; just a nested farcall; so wasteful
call SetPalettes
call SetDefaultBGPAndOBP
ret
PlaceTradeScreenTextbox: ; unreferenced

View File

@@ -27,7 +27,7 @@ TestMobileTradeBorderTilemap: ; unreferenced
farcall LoadMobileTradeBorderTilemap ; useless to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call WaitBGMap
call JoyWaitAorB
call Call_ExitMenu

View File

@@ -66,7 +66,7 @@ endc
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
pop de
hlcoord 2, 8
@@ -1554,7 +1554,7 @@ InitMysteryGiftLayout:
call WaitBGMap
ld b, SCGB_MYSTERY_GIFT
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
.Load5GFX:
@@ -1726,7 +1726,7 @@ endr
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
StageDataForNameCard:
@@ -1851,7 +1851,7 @@ InitNameCardLayout:
call WaitBGMap
ld b, CRYSTAL_CGB_NAME_CARD
farcall GetCrystalCGBLayout
jp SetPalettes
jp SetDefaultBGPAndOBP
.Load6Row:
ld b, 6

View File

@@ -25,7 +25,7 @@ InitGender:
call LoadGenderScreenPal
call LoadGenderScreenLightBlueTile
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
ld hl, AreYouABoyOrAreYouAGirlText
call PrintText
ld hl, .MenuHeader

View File

@@ -30,7 +30,7 @@ MainMenu:
call ClearTilemapEtc
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld hl, wGameTimerPaused
res GAME_TIMER_PAUSED_F, [hl]
call MainMenu_GetWhichMenu

View File

@@ -703,7 +703,7 @@ RestoreOverworldMapTiles: ; unreferenced
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyBytes
call CloseSRAM
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
xor a ; sScratch
call OpenSRAM
ld hl, sScratch

View File

@@ -55,7 +55,7 @@ NamingScreen:
call .GetNamingScreenSetup
call WaitBGMap
call WaitTop
call SetPalettes
call SetDefaultBGPAndOBP
call NamingScreen_InitNameEntry
ret

View File

@@ -48,7 +48,7 @@ _Option:
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
.joypad_loop
call JoyTextDelay

View File

@@ -33,7 +33,7 @@ StartMenu::
call DrawVariableLengthMenuBox
call .DrawBugContestStatusBox
call SafeUpdateSprites
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call HDMATransferTilemapAndAttrmap_Menu
farcall LoadFonts_NoOAMUpdate
call .DrawBugContestStatus
call UpdateTimePals
@@ -514,7 +514,7 @@ StartMenu_Pokemon:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes ; load regular palettes?
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
jr c, .return ; if cancelled or pressed B

View File

@@ -68,7 +68,7 @@ TrainerCard:
call WaitBGMap
ld b, SCGB_TRAINER_CARD
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call WaitBGMap
ld hl, wJumptableIndex
xor a ; TRAINERCARDSTATE_PAGE1_LOADGFX

View File

@@ -72,7 +72,7 @@ Credits::
ldh [hLCDCPointer], a
call GetCreditsPalette
call SetPalettes
call SetDefaultBGPAndOBP
; BUG: Credits sequence changes move selection menu behavior (see docs/bugs_and_glitches.md)
ldh a, [hVBlank]
push af
@@ -321,7 +321,7 @@ ParseCredits:
xor a
ld [wCreditsBorderFrame], a ; frame
call GetCreditsPalette
call SetPalettes ; update hw pal registers
call SetDefaultBGPAndOBP ; update hw pal registers
jr .loop
.clear

View File

@@ -20,7 +20,7 @@ InitDisplayForHallOfFame:
ld hl, .SavingRecordText
call PrintText
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
ret
.SavingRecordText:
@@ -56,7 +56,7 @@ InitDisplayForRedCredits:
ldh [hSCX], a
call EnableLCD
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
ret
ResetDisplayBetweenHallOfFameMons:

View File

@@ -19,7 +19,7 @@ SplashScreen:
call WaitBGMap
ld b, SCGB_GAMEFREAK_LOGO
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ld c, 10
call DelayFrames

View File

@@ -1131,11 +1131,9 @@ TryTileCollisionEvent::
ret
RandomEncounter::
; Random encounter
call CheckWildEncounterCooldown
jr c, .nope
call CanUseSweetScent
call CanEncounterWildMonInThisTile
jr nc, .nope
ld hl, wStatusFlags2
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
@@ -1175,7 +1173,7 @@ WildBattleScript:
reloadmapafterbattle
end
CanUseSweetScent::
CanEncounterWildMonInThisTile::
ld hl, wStatusFlags
bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
jr nz, .no

View File

@@ -27,10 +27,10 @@ ReanchorBGMap_NoOAMUpdate::
ldh [hBGMapMode], a
ld a, $90
ldh [hWY], a
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
ld a, HIGH(vBGMap1)
call .LoadBGMapAddrIntoHRAM
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call HDMATransferTilemapAndAttrmap_Menu
farcall LoadOW_BGPal7
farcall ApplyPals
ld a, TRUE

View File

@@ -1,4 +1,6 @@
_LoadMapPart::
_LoadOverworldTilemap::
; From the metatile-based 24x20 map in wSurroundingTiles,
; load the corresponding 20x18 tiles to wTilemap.
ld hl, wSurroundingTiles
ld a, [wPlayerMetatileY]
and a

View File

@@ -13,7 +13,7 @@ BlankScreen:
ld a, $7
call ByteFill
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
ret
SpawnPlayer:

View File

@@ -125,25 +125,25 @@ UpdateOverworldMap:
.step_down
call .ScrollOverworldMapDown
call LoadMapPart
call LoadOverworldTilemap
call ScrollMapDown
ret
.step_up
call .ScrollOverworldMapUp
call LoadMapPart
call LoadOverworldTilemap
call ScrollMapUp
ret
.step_left
call .ScrollOverworldMapLeft
call LoadMapPart
call LoadOverworldTilemap
call ScrollMapLeft
ret
.step_right
call .ScrollOverworldMapRight
call LoadMapPart
call LoadOverworldTilemap
call ScrollMapRight
ret

View File

@@ -939,7 +939,7 @@ ApplyObjectFacing:
ret
.DisableTextTiles:
call LoadMapPart
call LoadOverworldTilemap
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
.loop
@@ -2160,9 +2160,9 @@ Script_changeblock:
Script_reloadmappart::
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call GetMovementPermissions
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
call UpdateSprites
ret
@@ -2206,7 +2206,7 @@ UnusedClosetextScript: ; unreferenced
closetext
Script_closetext:
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call HDMATransferTilemapAndAttrmap_Menu
call CloseText
ret

View File

@@ -232,7 +232,7 @@ LoadMapTimeOfDay:
ld [wSpriteUpdatesEnabled], a
farcall ReplaceTimeOfDayPals
farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call .ClearBGMap
call .PushAttrmap
ret

View File

@@ -46,5 +46,5 @@ NewPokedexEntry:
ld [wTempMonDVs + 1], a
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret

View File

@@ -103,7 +103,7 @@ PokeGear:
call InitPokegearTilemap
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ldh a, [hCGB]
and a
ret z
@@ -1796,7 +1796,7 @@ _TownMap:
ld [wTownMapCursorObjectPointer + 1], a
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ldh a, [hCGB]
and a
jr z, .dmg
@@ -2042,7 +2042,7 @@ _FlyMap:
call Pokegear_DummyFunction
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
.loop
call JoyTextDelay
ld hl, hJoyPressed
@@ -2363,7 +2363,7 @@ Pokedex_GetArea:
call TownMapBGUpdate
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
xor a
ldh [hBGMapMode], a
xor a ; JOHTO_REGION
@@ -2827,7 +2827,7 @@ EntireFlyMap: ; unreferenced
ld [wTownMapCursorCoordinates + 1], a
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
.loop
call JoyTextDelay
ld hl, hJoyPressed

View File

@@ -48,7 +48,7 @@ _BillsPC:
ld a, $1
.loop
ld [wMenuCursorPosition], a
call SetPalettes
call SetDefaultBGPAndOBP
xor a
ld [wWhichIndexSet], a
ldh [hBGMapMode], a
@@ -245,7 +245,7 @@ ClearPCItemScreen:
lb bc, 4, 18
call Textbox
call WaitBGMap2
call SetPalettes ; load regular palettes?
call SetDefaultBGPAndOBP
ret
CopyBoxmonToTempMon:

View File

@@ -659,7 +659,7 @@ Hatch_UpdateFrontpicBGMapCenter:
predef PlaceGraphic
pop af
call Hatch_LoadFrontpicPal
call SetPalettes
call SetDefaultBGPAndOBP
jp WaitBGMap
EggHatch_DoAnimFrame:

View File

@@ -490,7 +490,7 @@ MailboxPC:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
jr c, .exit2

View File

@@ -53,7 +53,7 @@ ReadAnyMail:
ld a, [wCurMailIndex]
ld e, a
farcall LoadMailPalettes
call SetPalettes
call SetDefaultBGPAndOBP
xor a
ldh [hJoyPressed], a
call .loop

View File

@@ -173,7 +173,7 @@ SwitchPartyMons:
call AddNTimes
ld [hl], "▷"
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
farcall PartyMenuSelect
@@ -1151,7 +1151,7 @@ SetUpMoveList:
hlcoord 10, 4
predef ListMovePP
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
ld a, [wNumMoves]
inc a
ld [w2DMenuNumRows], a

View File

@@ -5,7 +5,7 @@ SelectMonFromParty:
call ClearBGPalettes
call InitPartyMenuLayout
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
call PartyMenuSelect
call ReturnToMapWithSpeechTextbox
@@ -20,7 +20,7 @@ SelectTradeOrDayCareMon:
call WaitBGMap
ld b, SCGB_PARTY_MENU
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
call PartyMenuSelect
call ReturnToMapWithSpeechTextbox

View File

@@ -533,7 +533,7 @@ StatsScreen_LoadGFX:
ld hl, wStatsScreenFlags
bit 4, [hl]
jr nz, .place_frontpic
call SetPalettes
call SetDefaultBGPAndOBP
ret
.place_frontpic
@@ -834,16 +834,16 @@ StatsScreen_PlaceFrontpic:
.egg
call .AnimateEgg
call SetPalettes
call SetDefaultBGPAndOBP
ret
.no_cry
call .AnimateMon
call SetPalettes
call SetDefaultBGPAndOBP
ret
.cry
call SetPalettes
call SetDefaultBGPAndOBP
call .AnimateMon
ld a, [wCurPartySpecies]
call PlayMonCry2
@@ -1037,7 +1037,7 @@ endc
call PlaceString
ld hl, wStatsScreenFlags
set 5, [hl]
call SetPalettes ; pals
call SetDefaultBGPAndOBP
call DelayFrame
hlcoord 0, 0
call PrepMonFrontpic

View File

@@ -225,7 +225,7 @@ PrintPartyMonPage1:
call WaitBGMap
ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
PrintPartyMonPage2:
@@ -276,7 +276,7 @@ PrintPartyMonPage2:
call WaitBGMap
ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
ret
.PrintTempMonStats:

View File

@@ -1,4 +1,5 @@
_SwapTextboxPalettes::
_LoadOverworldAttrmapPals::
; Load wAttrmap palette numbers based on the tileset palettes of current map.
hlcoord 0, 0
decoord 0, 0, wAttrmap
ld b, SCREEN_HEIGHT

View File

@@ -112,14 +112,14 @@ _UpdateTimePals::
call DmgToCgbTimePals
ret
FadeInPalettes::
FadeInFromWhite::
ld c, $12
call GetTimePalFade
ld b, $4
call ConvertTimePalsDecHL
ret
FadeOutPalettes::
FadeOutToWhite::
call FillWhiteBGColor
ld c, $9
call GetTimePalFade
@@ -143,14 +143,14 @@ BattleTowerFade:
jr nz, .loop
ret
FadeInQuickly:
FadeInFromBlack:
ld c, $0
call GetTimePalFade
ld b, $4
call ConvertTimePalsIncHL
ret
FadeBlackQuickly:
FadeOutToBlack:
ld c, $9
call GetTimePalFade
ld b, $4
@@ -158,6 +158,7 @@ FadeBlackQuickly:
ret
FillWhiteBGColor:
; Copy white palette of wBGPals1 Pal0 into white palette of wBGPals1 Pal1-Pal6
ldh a, [rSVBK]
push af
ld a, BANK(wBGPals1)

View File

@@ -91,12 +91,12 @@ GetMapSceneID::
pop bc
ret
OverworldTextModeSwitch::
call LoadMapPart
call SwapTextboxPalettes
LoadOverworldTilemapAndAttrmapPals::
call LoadOverworldTilemap
call LoadOverworldAttrmapPals
ret
LoadMapPart::
LoadOverworldTilemap::
ldh a, [hROMBank]
push af
@@ -109,9 +109,9 @@ LoadMapPart::
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
ld a, BANK(_LoadMapPart)
ld a, BANK(_LoadOverworldTilemap)
rst Bankswitch
call _LoadMapPart
call _LoadOverworldTilemap
pop af
rst Bankswitch
@@ -1911,7 +1911,7 @@ FadeToMenu::
xor a
ldh [hBGMapMode], a
call LoadStandardMenuHeader
farcall FadeOutPalettes
farcall FadeOutToWhite
call ClearSprites
call DisableSpriteUpdates
ret
@@ -1935,7 +1935,7 @@ FinishExitMenu::
call GetSGBLayout
farcall LoadOW_BGPal7
call WaitBGMap2
farcall FadeInPalettes
farcall FadeInFromWhite
call EnableSpriteUpdates
ret
@@ -1977,7 +1977,7 @@ ReloadTilesetAndPalettes::
ld c, a
call SwitchToAnyMapAttributesBank
farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call LoadOverworldTilemapAndAttrmapPals
call LoadTilesetGFX
ld a, 9
call SkipMusic

View File

@@ -324,8 +324,8 @@ ReloadSpritesNoPalettes::
call DelayFrame
ret
SwapTextboxPalettes::
homecall _SwapTextboxPalettes
LoadOverworldAttrmapPals::
homecall _LoadOverworldAttrmapPals
ret
ScrollBGMapPalettes::

View File

@@ -15,7 +15,7 @@ PrintLetterDelay::
; non-scrolling text?
ld a, [wTextboxFlags]
bit NO_TEXT_DELAY_F, a
bit TEXT_DELAY_F, a
ret z
push hl

View File

@@ -20,7 +20,7 @@ ScrollingMenu::
ld hl, wVramState
bit 0, [hl]
jp nz, UpdateTimePals
jp SetPalettes
jp SetDefaultBGPAndOBP
InitScrollingMenu::
ld a, [wMenuBorderTopCoord]

View File

@@ -661,7 +661,7 @@ PokeFluteTerminator::
PlaceHLTextAtBC::
ld a, [wTextboxFlags]
push af
set NO_TEXT_DELAY_F, a
set TEXT_DELAY_F, a
ld [wTextboxFlags], a
call DoTextUntilTerminator

View File

@@ -143,12 +143,12 @@ endr
ld sp, hl
ret
SetPalettes::
SetDefaultBGPAndOBP::
; Inits the Palettes
; depending on the system the monochromes palettes or color palettes
ldh a, [hCGB]
and a
jr nz, .SetPalettesForGameBoyColor
jr nz, .SetDefaultBGPAndOBPForGameBoyColor
ld a, %11100100
ldh [rBGP], a
ld a, %11010000
@@ -156,7 +156,7 @@ SetPalettes::
ldh [rOBP1], a
ret
.SetPalettesForGameBoyColor:
.SetDefaultBGPAndOBPForGameBoyColor:
push de
ld a, %11100100
call DmgToCgbBGPals

View File

@@ -6,7 +6,7 @@ RefreshScreen::
rst Bankswitch
call ReanchorBGMap_NoOAMUpdate
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call HDMATransferTilemapAndAttrmap_Menu
call LoadFonts_NoOAMUpdate
pop af
@@ -31,8 +31,8 @@ CloseText::
call ClearWindowData
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call LoadOverworldTilemapAndAttrmapPals
call HDMATransferTilemapAndAttrmap_Menu
xor a
ldh [hBGMapMode], a
call SafeUpdateSprites
@@ -50,22 +50,22 @@ OpenText::
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
rst Bankswitch
call ReanchorBGMap_NoOAMUpdate ; clear bgmap
call ReanchorBGMap_NoOAMUpdate ; anchor bgmap
call SpeechTextbox
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap
call HDMATransferTilemapAndAttrmap_Menu ; transfer bgmap
call LoadFonts_NoOAMUpdate ; load font
pop af
rst Bankswitch
ret
_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
HDMATransferTilemapAndAttrmap_Menu::
ldh a, [hOAMUpdate]
push af
ld a, $1
ldh [hOAMUpdate], a
farcall OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall _HDMATransferTilemapAndAttrmap_Menu
pop af
ldh [hOAMUpdate], a

View File

@@ -32,7 +32,7 @@ Script_BattleRoomLoop:
promptbutton
closetext
special BattleTowerBattle ; predef StartBattle
special FadeOutPalettes
special FadeOutToWhite
reloadmap
ifnotequal $0, Script_FailedBattleTowerChallenge
readmem wNrOfBeatenBattleTowerTrainers
@@ -47,10 +47,10 @@ Script_BattleRoomLoop:
waitbutton
closetext
playmusic MUSIC_HEAL
special FadeOutPalettes
special FadeOutToWhite
special LoadMapPalettes
pause 60
special FadeInPalettes
special FadeInFromWhite
special RestartMapMusic
opentext
writetext Text_NextUpOpponentNo
@@ -74,7 +74,7 @@ Script_DontBattleNextOpponent:
special BattleTowerAction
playsound SFX_SAVE
waitsfx
special FadeOutPalettes
special FadeOutToWhite
special Reset
Script_DontSaveAndEndTheSession:
writetext Text_CancelYourBattleRoomChallenge
@@ -85,7 +85,7 @@ Script_DontSaveAndEndTheSession:
setval BATTLETOWERACTION_06
special BattleTowerAction
closetext
special FadeOutPalettes
special FadeOutToWhite
warpfacing UP, BATTLE_TOWER_1F, 7, 7
opentext
sjump Script_BattleTowerHopeToServeYouAgain

View File

@@ -31,10 +31,10 @@ DaisyScript:
writetext DaisyAlrightText
waitbutton
closetext
special FadeOutPalettes
special FadeOutToWhite
playmusic MUSIC_HEAL
pause 60
special FadeInPalettes
special FadeInFromWhite
special RestartMapMusic
opentext
writetext GroomedMonLooksContentText

View File

@@ -89,7 +89,7 @@ EcruteakGymClosed:
follow PLAYER, ECRUTEAKGYM_GRAMPS
applymovement PLAYER, EcruteakGymPlayerSlowStepDownMovement
stopfollow
special FadeOutPalettes
special FadeOutToWhite
playsound SFX_ENTER_DOOR
waitsfx
warp ECRUTEAK_CITY, 6, 27

View File

@@ -66,7 +66,7 @@ FastShip1FSailor1Script:
closetext
scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
setmapscene VERMILION_PORT, SCENE_VERMILIONPORT_LEAVE_SHIP
@@ -79,7 +79,7 @@ FastShip1FSailor1Script:
closetext
scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
setmapscene OLIVINE_PORT, SCENE_OLIVINEPORT_LEAVE_SHIP

View File

@@ -46,7 +46,7 @@ SSAquaGranddaughterBefore:
writetext SSAquaGranddaughterHasToFindGrandpaText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2
applymovement PLAYER, SSAquaCaptainsCabinWarpsToGrandpasCabinMovement
@@ -54,7 +54,7 @@ SSAquaGranddaughterBefore:
appear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1
turnobject PLAYER, UP
turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, UP
special FadeInQuickly
special FadeInFromBlack
turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, DOWN
showemote EMOTE_SHOCK, FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, 15
applymovement FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, SSAquaGranddaughterEntersCabinMovement

View File

@@ -67,14 +67,14 @@ FastShipBed:
writetext FastShipBedText1
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
special StubbedTrainerRankings_Healings
special HealParty
playmusic MUSIC_HEAL
pause 60
special RestartMapMusic
special FadeInQuickly
special FadeInFromBlack
opentext
writetext FastShipBedText2
waitbutton

View File

@@ -233,10 +233,10 @@ OlderHaircutBrotherScript:
writetext GoldenrodUndergroundOlderHaircutBrotherWatchItBecomeBeautifulText
waitbutton
closetext
special FadeOutPalettes
special FadeOutToWhite
playmusic MUSIC_HEAL
pause 60
special FadeInPalettes
special FadeInFromWhite
special RestartMapMusic
opentext
writetext GoldenrodUndergroundOlderHaircutBrotherAllDoneText
@@ -316,10 +316,10 @@ YoungerHaircutBrotherScript:
writetext GoldenrodUndergroundYoungerHaircutBrotherIllMakeItLookCoolText
waitbutton
closetext
special FadeOutPalettes
special FadeOutToWhite
playmusic MUSIC_HEAL
pause 60
special FadeInPalettes
special FadeInFromWhite
special RestartMapMusic
opentext
writetext GoldenrodUndergroundYoungerHaircutBrotherAllDoneText

View File

@@ -156,7 +156,7 @@ TeleportGuyScript:
waitbutton
closetext
playsound SFX_WARP_TO
special FadeOutPalettes
special FadeOutToWhite
waitsfx
warp NEW_BARK_TOWN, 13, 6
end

View File

@@ -123,7 +123,7 @@ LancesRoomLanceScript:
pause 30
closetext
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth
special FadeOutPalettes
special FadeOutToWhite
pause 15
warpfacing UP, HALL_OF_FAME, 4, 13
end

View File

@@ -31,11 +31,11 @@ MobileBattleRoomConsoleScript:
writetext MobileBattleRoom_HealText
pause 20
closetext
special FadeOutPalettes
special FadeOutToWhite
playmusic MUSIC_HEAL
special LoadMapPalettes
pause 60
special FadeInPalettes
special FadeInFromWhite
special RestartMapMusic
refreshscreen
.two_

View File

@@ -108,13 +108,13 @@ MrPokemonsHouse_OakScript:
writetext MrPokemonsHouse_MrPokemonHealText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
playmusic MUSIC_HEAL
special StubbedTrainerRankings_Healings
special HealParty
pause 60
special FadeInQuickly
special FadeInFromBlack
special RestartMapMusic
opentext
writetext MrPokemonText_ImDependingOnYou

View File

@@ -45,9 +45,9 @@ OlivineLighthouseJasmine:
closetext
special RestartMapMusic
cry AMPHAROS
special FadeOutPalettes
special FadeOutToWhite
pause 10
special FadeInPalettes
special FadeInFromWhite
opentext
writetext AmphyPaluPaluluText
waitbutton
@@ -119,10 +119,10 @@ OlivineLighthouseAmphy:
cry AMPHAROS
waitbutton
closetext
special FadeOutPalettes
special FadeInPalettes
special FadeOutPalettes
special FadeInPalettes
special FadeOutToWhite
special FadeInFromWhite
special FadeOutToWhite
special FadeInFromWhite
end
OlivineLighthouse6FSuperPotion:

View File

@@ -44,7 +44,7 @@ OlivinePortSailorAtGangwayScript:
waitsfx
applymovement PLAYER, OlivinePortEnterFastShipMovement
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse .FirstTime

View File

@@ -93,12 +93,12 @@ RadioTower5FRocketBossScript:
writetext RadioTower5FRocketBossAfterText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear RADIOTOWER5F_ROCKET
disappear RADIOTOWER5F_ROCKET_GIRL
pause 15
special FadeInQuickly
special FadeInFromBlack
setevent EVENT_BEAT_ROCKET_EXECUTIVEM_1
setevent EVENT_CLEARED_RADIO_TOWER
clearflag ENGINE_ROCKETS_IN_RADIO_TOWER

View File

@@ -26,11 +26,11 @@ Route24RocketScript:
writetext Route24RocketDisappearsText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear ROUTE24_ROCKET
pause 25
special FadeInQuickly
special FadeInFromBlack
playmapmusic
end

View File

@@ -12,13 +12,13 @@ Route26HealHouseTeacherScript:
writetext Route26HealHouseRestAWhileText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
special StubbedTrainerRankings_Healings
playmusic MUSIC_HEAL
special HealParty
pause 60
special FadeInQuickly
special FadeInFromBlack
special RestartMapMusic
opentext
writetext Route26HealHouseKeepAtItText

View File

@@ -72,7 +72,7 @@ Route35NationalParkGateLeavingContestEarlyScript:
closetext
scall Route35NationalParkGate_EnterContest
playsound SFX_ENTER_DOOR
special FadeOutPalettes
special FadeOutToWhite
waitsfx
warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47
end
@@ -109,7 +109,7 @@ Route35NationalParkGate_OkayToProceed:
special GiveParkBalls
scall Route35NationalParkGate_EnterContest
playsound SFX_ENTER_DOOR
special FadeOutPalettes
special FadeOutToWhite
waitsfx
special SelectRandomBugContestContestants
warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47

View File

@@ -73,14 +73,14 @@ Route36NationalParkGateLeavingContestEarlyScript:
writetext Route36NationalParkGateOfficer1WaitHereForAnnouncementText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
scall .CopyContestants
disappear ROUTE36NATIONALPARKGATE_OFFICER1
appear ROUTE36NATIONALPARKGATE_OFFICER2
applymovement PLAYER, Route36NationalParkGatePlayerWaitWithContestantsMovement
pause 15
special FadeInQuickly
special FadeInFromBlack
jumpstd BugContestResultsScript
.GoBackToContest:
@@ -89,7 +89,7 @@ Route36NationalParkGateLeavingContestEarlyScript:
closetext
turnobject PLAYER, LEFT
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18
end
@@ -172,7 +172,7 @@ Route36OfficerScriptContest:
special GiveParkBalls
turnobject PLAYER, LEFT
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
special SelectRandomBugContestContestants
warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18

View File

@@ -23,11 +23,11 @@ Red:
writetext RedLeavesText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear SILVERCAVEROOM3_RED
pause 15
special FadeInQuickly
special FadeInFromBlack
pause 30
special HealParty
refreshscreen

View File

@@ -36,14 +36,14 @@ TrainerGruntM1:
writetext TrainerGruntM1WhenTalkText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear SLOWPOKEWELLB1F_ROCKET1
disappear SLOWPOKEWELLB1F_ROCKET2
disappear SLOWPOKEWELLB1F_ROCKET3
disappear SLOWPOKEWELLB1F_ROCKET_GIRL
pause 15
special FadeInQuickly
special FadeInFromBlack
disappear SLOWPOKEWELLB1F_KURT
moveobject SLOWPOKEWELLB1F_KURT, 11, 6
appear SLOWPOKEWELLB1F_KURT
@@ -65,7 +65,7 @@ TrainerGruntM1:
clearevent EVENT_AZALEA_TOWN_SLOWPOKES
clearevent EVENT_KURTS_HOUSE_SLOWPOKE
clearevent EVENT_KURTS_HOUSE_KURT_1
special FadeOutPalettes
special FadeOutToWhite
special HealParty
pause 15
warp KURTS_HOUSE, 3, 3

View File

@@ -52,11 +52,11 @@ SproutTower3FRivalScene:
pause 15
closetext
playsound SFX_WARP_TO
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear SPROUTTOWER3F_RIVAL
waitsfx
special FadeInQuickly
special FadeInFromBlack
setscene SCENE_SPROUTTOWER3F_NOOP
special RestartMapMusic
end

View File

@@ -446,9 +446,9 @@ ExplodingTrap22:
end
VoltorbExplodingTrap:
special FadeOutPalettes
special FadeOutToWhite
cry VOLTORB
special FadeInPalettes
special FadeInFromWhite
setlasttalked -1
loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon VOLTORB, 23
@@ -456,9 +456,9 @@ VoltorbExplodingTrap:
end
GeodudeExplodingTrap:
special FadeOutPalettes
special FadeOutToWhite
cry GEODUDE
special FadeInPalettes
special FadeInFromWhite
setlasttalked -1
loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon GEODUDE, 21
@@ -466,9 +466,9 @@ GeodudeExplodingTrap:
end
KoffingExplodingTrap:
special FadeOutPalettes
special FadeOutToWhite
cry KOFFING
special FadeInPalettes
special FadeInFromWhite
setlasttalked -1
loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon KOFFING, 21

View File

@@ -107,7 +107,7 @@ RocketBaseBossFScript:
writetext RocketBaseBossRetreatText
waitbutton
closetext
special FadeBlackQuickly
special FadeOutToBlack
special ReloadSpritesNoPalettes
disappear TEAMROCKETBASEB2F_ROCKET1
disappear TEAMROCKETBASEB2F_ROCKET_GIRL
@@ -115,7 +115,7 @@ RocketBaseBossFScript:
disappear TEAMROCKETBASEB2F_ROCKET3
disappear TEAMROCKETBASEB2F_ROCKET4
pause 15
special FadeInQuickly
special FadeInFromBlack
setscene SCENE_TEAMROCKETBASEB2F_ELECTRODES
clearevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE
turnobject TEAMROCKETBASEB2F_LANCE, DOWN
@@ -164,11 +164,11 @@ LanceHealsCommon:
writetext LanceHealsText1
waitbutton
closetext
special FadeOutPalettes
special FadeOutToWhite
special StubbedTrainerRankings_Healings
playsound SFX_FULL_HEAL
special HealParty
special FadeInPalettes
special FadeInFromWhite
opentext
writetext LanceHealsText2
waitbutton

View File

@@ -50,7 +50,7 @@ VermilionPortSailorAtGangwayScript:
waitsfx
applymovement PLAYER, VermilionPortEnterFastShipMovement
playsound SFX_EXIT_BUILDING
special FadeOutPalettes
special FadeOutToWhite
waitsfx
setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
clearevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND

View File

@@ -309,7 +309,7 @@ Function11c1b9:
call ClearSprites
call ClearScreen
call Function11d323
call SetPalettes
call SetDefaultBGPAndOBP
call DisableLCD
ld hl, SelectStartGFX
ld de, vTiles2
@@ -319,7 +319,7 @@ Function11c1b9:
ld de, vTiles0
call Decompress
call EnableLCD
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
farcall ClearSpriteAnims
farcall LoadPokemonData
farcall Pokedex_ABCMode
@@ -374,7 +374,7 @@ EZChat_MasterLoop:
jr nz, .exit
call .DoJumptableFunction
farcall PlaySpriteAnimations
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
jr .loop
.exit
@@ -703,7 +703,7 @@ Function11c4be:
hlcoord 0, 14, wAttrmap
ld bc, $28
call ByteFill
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ret
String_11c4db:
@@ -898,7 +898,7 @@ Function11c618:
hlcoord 0, 6, wAttrmap
ld bc, $c8
call ByteFill
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ret
EZChatString_Stop_Mode_Cancel:
@@ -1498,7 +1498,7 @@ Function11c9ab:
hlcoord 0, 6, wAttrmap
ld bc, $c8
call ByteFill
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ret
Function11c9bd:
@@ -1588,7 +1588,7 @@ Function11ca19:
add hl, de
dec c
jr nz, .asm_11ca22
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ret
String_11ca38:
@@ -2000,7 +2000,7 @@ Function11cdaa:
hlcoord 0, 12, wAttrmap
ld bc, 4 * SCREEN_WIDTH
call ByteFill
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ret
String_11cdc7:

View File

@@ -113,7 +113,7 @@ InitMobileProfile:
call PlaceString
call Function48187
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
call StaticMenuJoypad
ld hl, wMenuCursorY
ld b, [hl]
@@ -354,7 +354,7 @@ Function48304:
ld a, $29
.asm_4833f
ld [wMenuScrollPosition], a
farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall Mobile_HDMATransferTilemapAndAttrmap_Menu
.asm_48348
call ScrollingMenu
ld de, $629
@@ -380,7 +380,7 @@ Function48304:
ld [wd003], a
.asm_48377
call Function48187
farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall Mobile_HDMATransferTilemapAndAttrmap_Menu
jp Function4840c
Function48383:

View File

@@ -221,7 +221,7 @@ Function4a94e:
ld [wd019], a
ld b, SCGB_PACKPALS
call GetSGBLayout
call SetPalettes
call SetDefaultBGPAndOBP
call Function4aa22
jr c, .asm_4a985
jr z, .asm_4a9a1
@@ -345,7 +345,7 @@ Function4aa34:
farcall PrintPartyMenuText
call Function4aab6
call WaitBGMap
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
call Function4ab1a
jr z, .asm_4aa66

View File

@@ -92,7 +92,7 @@ Function8919e:
Function891ab:
call Mobile22_SetBGMapMode1
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
call Mobile22_SetBGMapMode0
ret
@@ -618,7 +618,7 @@ Function894ca:
call Function895c7
call Function8949c
call Function8a60d
call SetPalettes
call SetDefaultBGPAndOBP
pop bc
ret
@@ -1237,7 +1237,7 @@ Function89844:
call Function897af
push bc
call WaitBGMap2
call SetPalettes
call SetDefaultBGPAndOBP
pop bc
ret
@@ -1713,7 +1713,7 @@ Function89b28:
call Function893e2
call Call_ExitMenu
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
ret
Function89b3b:
@@ -2063,7 +2063,7 @@ Function89d0d:
pop af
ldh [rSVBK], a
call SetPalettes
call SetDefaultBGPAndOBP
farcall PrintMail
call Mobile22_SetBGMapMode1
ld c, 24
@@ -2099,7 +2099,7 @@ Function89d75:
push hl
call Mobile22_SetBGMapMode0
call _hl_
farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall Mobile_HDMATransferTilemapAndAttrmap_Menu
pop hl
jr asm_89d90
@@ -2263,7 +2263,7 @@ Function89e6f:
hlcoord 10, 4, wAttrmap
call Function8a5a3
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
jp Function89e36
Function89e9a:
@@ -2298,7 +2298,7 @@ Function89eb9:
hlcoord 10, 4, wAttrmap
call Function8a5a3
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
jp Function89e36
Function89ee1:
@@ -2478,7 +2478,7 @@ Function89fce:
hlcoord 10, 4, wAttrmap
call Function8a5a3
call Function89448
call SetPalettes
call SetDefaultBGPAndOBP
call Function891ab
jp Function89e36
@@ -2826,7 +2826,7 @@ Function8a262:
call Function8b36c
call Function8b493
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
call Function8b5e7
ret
@@ -2917,7 +2917,7 @@ Function8a31c:
call Function8a4d3
call Function8a4fc
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
call Function8a383
jr c, .asm_8a370
jr z, .asm_8a34e

View File

@@ -565,7 +565,7 @@ Function8b677:
call Function8b6ed
call EnableLCD
call Function891ab
call SetPalettes
call SetDefaultBGPAndOBP
ret
Function8b690:

View File

@@ -304,7 +304,7 @@ Function10016f:
Function10020b:
xor a
ld [wc303], a
farcall FadeOutPalettes
farcall FadeOutToWhite
farcall Function106464
call HideSprites
call DelayFrame
@@ -426,7 +426,7 @@ Function100301:
ret
Function100320:
farcall Mobile_ReloadMapPart
farcall Mobile_HDMATransferTilemapAndAttrmap_Overworld
ret
Function100327: ; unreferenced
@@ -1411,7 +1411,7 @@ Function100902:
call PrintNum
ld de, SFX_TWO_PC_BEEPS
call PlaySFX
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld c, $3c
call DelayFrames
ret
@@ -1422,7 +1422,7 @@ Function100902:
call PlaceString
ld de, SFX_4_NOTE_DITTY
call PlaySFX
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld c, 120
call DelayFrames
ret
@@ -1448,7 +1448,7 @@ Function100989:
decoord 0, 0
call Function1009a5
call Function1009ae
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld hl, w3_dd68
decoord 0, 0, wAttrmap
call Function1009a5
@@ -4914,7 +4914,7 @@ Function10224b:
.asm_10225e
res 1, [hl]
res 2, [hl]
farcall Mobile_ReloadMapPart
farcall Mobile_HDMATransferTilemapAndAttrmap_Overworld
scf
ret
@@ -6483,7 +6483,7 @@ Function102dec:
ld a, $05
call FarCopyWRAM
farcall Function49742
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
ret

View File

@@ -462,7 +462,7 @@ Function1161d5:
pop af
ldh [rSVBK], a
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld a, $8
ld [wMusicFade], a
ld de, MUSIC_MOBILE_ADAPTER
@@ -498,7 +498,7 @@ Function116294:
ld de, wBGPals1 palette 7
ld bc, 1 palettes
call CopyBytes
call SetPalettes
call SetDefaultBGPAndOBP
pop af
ldh [rSVBK], a
ld a, $30
@@ -518,7 +518,7 @@ Function1162cb:
ld de, wOBPals1 palette 2
ld bc, 6 palettes
call CopyBytes
call SetPalettes
call SetDefaultBGPAndOBP
pop af
ldh [rSVBK], a
ret
@@ -623,7 +623,7 @@ Function11636e:
call CopyBytes
pop af
ldh [rSVBK], a
call SetPalettes
call SetDefaultBGPAndOBP
ldh a, [rSVBK]
push af
ld a, $1
@@ -637,7 +637,7 @@ Function11636e:
call UpdateSprites
pop af
ldh [rSVBK], a
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld a, $8
ld [wMusicFade], a
ld a, [wMapMusic]
@@ -672,7 +672,7 @@ Function1163c0:
call CopyBytes
pop af
ldh [rSVBK], a
call SetPalettes
call SetDefaultBGPAndOBP
call DelayFrame
ld a, $90
ldh [hWY], a
@@ -680,7 +680,7 @@ Function1163c0:
farcall _ClearSprites
pop af
ldh [rSVBK], a
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld a, [wLinkMode]
cp LINK_MOBILE
jr z, .asm_11642a
@@ -710,7 +710,7 @@ Function116441:
farcall Function17d405
ld a, $90
ldh [hWY], a
farcall ReloadMapPart
farcall HDMATransferTilemapAndAttrmap_Overworld
ld a, $8
ld [wMusicFade], a
ld a, [wMapMusic]

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