mirror of
https://github.com/pret/pokegold.git
synced 2026-09-30 19:06:45 -05:00
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:
@@ -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
|
||||
|
||||
@@ -55,7 +55,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
|
||||
|
||||
@@ -62,10 +62,10 @@ SpecialsPointers::
|
||||
add_special CardFlip
|
||||
add_special UnusedMemoryGame ; unused
|
||||
add_special ClearBGPalettesBufferScreen ; unused
|
||||
add_special FadeOutPalettes
|
||||
add_special FadeBlackQuickly
|
||||
add_special FadeInPalettes
|
||||
add_special FadeInQuickly
|
||||
add_special FadeOutToWhite
|
||||
add_special FadeOutToBlack
|
||||
add_special FadeInFromWhite
|
||||
add_special FadeInFromBlack
|
||||
add_special ReloadSpritesNoPalettes, 2
|
||||
add_special ClearBGPalettes
|
||||
add_special UpdateTimePals
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,7 +20,7 @@ MACRO mapsetup
|
||||
ENDM
|
||||
|
||||
MapSetupScript_Teleport:
|
||||
mapsetup FadeOutPalettes
|
||||
mapsetup FadeOutToWhite
|
||||
mapsetup ResetPlayerObjectAction
|
||||
mapsetup JumpRoamMons
|
||||
MapSetupScript_Warp:
|
||||
@@ -43,7 +43,7 @@ MapSetupScript_Warp:
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInToMusic
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
db -1 ; end
|
||||
@@ -67,7 +67,7 @@ MapSetupScript_BadWarp:
|
||||
mapsetup SpawnInFacingDown
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup FadeToMapMusic
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
db -1 ; end
|
||||
@@ -93,7 +93,7 @@ MapSetupScript_Connection:
|
||||
MapSetupScript_Fall:
|
||||
mapsetup ResetPlayerObjectAction
|
||||
MapSetupScript_Door:
|
||||
mapsetup FadeOutPalettes
|
||||
mapsetup FadeOutToWhite
|
||||
MapSetupScript_Train:
|
||||
mapsetup EnterMapWarp
|
||||
mapsetup LoadMapAttributes
|
||||
@@ -111,7 +111,7 @@ MapSetupScript_Train:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup FadeToMapMusic
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup UpdateRoamMons
|
||||
@@ -130,7 +130,7 @@ MapSetupScript_ReloadMap:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup ForceMapMusic
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
db -1 ; end
|
||||
@@ -148,7 +148,7 @@ MapSetupScript_LinkReturn:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup EnableTextAcceleration
|
||||
@@ -169,7 +169,7 @@ MapSetupScript_Continue:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInPalettes
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
db -1 ; end
|
||||
|
||||
@@ -2637,7 +2637,7 @@ ForcePlayerMonChoice:
|
||||
call LoadTilemapToTempTilemap
|
||||
call WaitBGMap
|
||||
call GetMemSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
xor a
|
||||
ret
|
||||
|
||||
@@ -2655,7 +2655,7 @@ ForcePlayerMonChoice:
|
||||
call _LoadHPBar
|
||||
call CloseWindow
|
||||
call GetMemSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call SendOutMonText
|
||||
call NewBattleMonStatus
|
||||
call BreakAttraction
|
||||
@@ -2699,7 +2699,7 @@ PickPartyMonInBattle:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
ret c
|
||||
@@ -2786,7 +2786,7 @@ LostBattle:
|
||||
; Grayscale
|
||||
ld b, SCGB_BATTLE_GRAYSCALE
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
jr .end
|
||||
|
||||
.LostLinkBattle:
|
||||
@@ -4774,7 +4774,7 @@ BattleMenu_Pack:
|
||||
and BATTLERESULT_BITMASK
|
||||
ld [wBattleResult], a ; WIN
|
||||
call ClearWindowData
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
scf
|
||||
ret
|
||||
|
||||
@@ -4793,7 +4793,7 @@ BattleMenuPKMN_Loop:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
jr c, .Cancel
|
||||
@@ -4823,7 +4823,7 @@ BattleMenuPKMN_Loop:
|
||||
call CloseWindow
|
||||
call LoadTilemapToTempTilemap
|
||||
call GetMemSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
jp BattleMenu
|
||||
|
||||
Battle_StatsScreen:
|
||||
@@ -4900,7 +4900,7 @@ TryPlayerSwitch:
|
||||
call _LoadHPBar
|
||||
call CloseWindow
|
||||
call GetMemSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, [wCurPartyMon]
|
||||
ld [wCurBattleMon], a
|
||||
PlayerSwitch:
|
||||
@@ -6727,7 +6727,7 @@ FinishBattleAnim:
|
||||
push hl
|
||||
ld b, SCGB_BATTLE_COLORS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
pop hl
|
||||
pop de
|
||||
@@ -8093,7 +8093,7 @@ _DisplayLinkRecord:
|
||||
call WaitBGMap2
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld c, 8
|
||||
call DelayFrames
|
||||
call WaitPressAorB_BlinkCursor
|
||||
@@ -8568,7 +8568,7 @@ InitBattleDisplay:
|
||||
call HideSprites
|
||||
ld b, SCGB_BATTLE_COLORS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, $90
|
||||
ldh [hWY], a
|
||||
xor a
|
||||
|
||||
@@ -29,7 +29,7 @@ BattleCommand_BatonPass:
|
||||
call ClearBox
|
||||
ld b, SCGB_BATTLE_COLORS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call BatonPass_LinkPlayerSwitch
|
||||
|
||||
ld hl, PassedBattleMonEntrance
|
||||
|
||||
@@ -16,4 +16,4 @@ _ReturnToBattle_UseBall:
|
||||
call CloseWindow
|
||||
call LoadStandardMenuHeader
|
||||
call WaitBGMap
|
||||
jp SetPalettes
|
||||
jp SetDefaultBGPAndOBP
|
||||
|
||||
@@ -251,7 +251,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
|
||||
ld c, 150
|
||||
|
||||
@@ -1065,7 +1065,7 @@ TilesetColorPicker: ; unreferenced
|
||||
ld [wDebugTilesetCurColor], a
|
||||
ldh [hMapAnims], a
|
||||
call ClearSprites
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call WaitBGMap2
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
|
||||
@@ -421,7 +421,7 @@ DebugRoom_EditPagedValues:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
.resume
|
||||
call DelayFrame
|
||||
call JoyTextDelay
|
||||
|
||||
@@ -76,7 +76,7 @@ DisplayCaughtContestMonStats:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
.Health:
|
||||
|
||||
@@ -37,7 +37,7 @@ PlaceDiplomaOnScreen:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ PlayWhirlpoolSound:
|
||||
ret
|
||||
|
||||
BlindingFlash:
|
||||
farcall FadeOutPalettes
|
||||
farcall FadeOutToWhite
|
||||
ld hl, wStatusFlags
|
||||
set STATUSFLAGS_FLASH_F, [hl]
|
||||
farcall ReplaceTimeOfDayPals
|
||||
farcall UpdateTimeOfDayPal
|
||||
ld b, SCGB_MAPPALS
|
||||
call GetSGBLayout
|
||||
farcall FadeInPalettes
|
||||
farcall FadeInFromWhite
|
||||
ret
|
||||
|
||||
ShakeHeadbuttTree:
|
||||
@@ -58,7 +58,7 @@ ShakeHeadbuttTree:
|
||||
jr .loop
|
||||
|
||||
.done
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call WaitBGMap
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
|
||||
@@ -39,7 +39,7 @@ RedCredits::
|
||||
ld [wMusicFadeID + 1], a
|
||||
ld a, 10
|
||||
ld [wMusicFade], a
|
||||
farcall FadeOutPalettes
|
||||
farcall FadeOutToWhite
|
||||
xor a
|
||||
ld [wVramState], a
|
||||
ldh [hMapAnims], a
|
||||
@@ -59,7 +59,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
|
||||
@@ -250,7 +250,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
|
||||
@@ -383,7 +383,7 @@ _HallOfFamePC:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, [wCurPartySpecies]
|
||||
call PlayMonCry
|
||||
and a
|
||||
@@ -545,7 +545,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
|
||||
|
||||
@@ -220,7 +220,7 @@ CutDownTreeOrGrass:
|
||||
ld [hl], a
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call UpdateSprites
|
||||
call DelayFrame
|
||||
ld a, [wCutWhirlpoolAnimationType]
|
||||
@@ -1156,7 +1156,7 @@ DisappearWhirlpool:
|
||||
ld [hl], a
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
ld a, [wCutWhirlpoolAnimationType]
|
||||
ld e, a
|
||||
farcall PlayWhirlpoolSound
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -35,7 +35,7 @@ ClosePokepic::
|
||||
call GetMemSGBLayout
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call ApplyTilemap
|
||||
call UpdateSprites
|
||||
call LoadStandardFont
|
||||
|
||||
@@ -64,7 +64,7 @@ _UnownPrinter:
|
||||
|
||||
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
|
||||
.joy_loop
|
||||
call JoyTextDelay
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
@@ -741,7 +742,7 @@ INCLUDE "gfx/pack/pack.pal"
|
||||
|
||||
_CGB_Pokepic:
|
||||
call _CGB_MapPals
|
||||
call SwapTextboxPalettes
|
||||
call LoadOverworldAttrmapPals
|
||||
ld de, SCREEN_WIDTH
|
||||
hlcoord 0, 0, wAttrmap
|
||||
ld a, [wMenuBorderTopCoord]
|
||||
|
||||
@@ -1126,7 +1126,7 @@ INCLUDE "data/trainers/palettes.asm"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1716,7 +1716,7 @@ ChooseMonToUseItemOn:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
ret
|
||||
@@ -1733,7 +1733,7 @@ ItemActionText:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuActionText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
pop bc
|
||||
pop de
|
||||
|
||||
@@ -574,7 +574,7 @@ GiveItem:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
jr c, .finish
|
||||
@@ -1426,7 +1426,7 @@ Pack_InitColors:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_PACKPALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ ChooseMonToLearnTMHM:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
push af
|
||||
|
||||
@@ -1950,7 +1950,7 @@ LoadTradeScreenBorderGFX:
|
||||
SetTradeRoomBGPals:
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
jp SetPalettes
|
||||
jp SetDefaultBGPAndOBP
|
||||
|
||||
PlaceTradeScreenTextbox:
|
||||
hlcoord 0, 0
|
||||
|
||||
@@ -64,7 +64,7 @@ endc
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
pop de
|
||||
|
||||
hlcoord 2, 8
|
||||
|
||||
@@ -139,7 +139,7 @@ InitMysteryGiftLayout:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_MYSTERY_GIFT
|
||||
call GetSGBLayout
|
||||
jp SetPalettes
|
||||
jp SetDefaultBGPAndOBP
|
||||
|
||||
.Load3GFX:
|
||||
ld b, 3
|
||||
|
||||
@@ -576,7 +576,7 @@ RestoreOverworldMapTiles:
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
call CopyBytes
|
||||
call CloseSRAM
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
xor a ; sScratch
|
||||
call OpenSRAM
|
||||
ld hl, sScratch
|
||||
|
||||
@@ -55,7 +55,7 @@ NamingScreen:
|
||||
call .GetNamingScreenSetup
|
||||
call WaitBGMap
|
||||
call WaitTop
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call NamingScreen_InitNameEntry
|
||||
ret
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ _Option:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
|
||||
.joypad_loop
|
||||
call JoyTextDelay
|
||||
|
||||
@@ -667,7 +667,7 @@ CheckBackupSaveFile:
|
||||
CheckTextDelay:
|
||||
; Fix options if text delay is invalid
|
||||
ld hl, wTextboxFlags
|
||||
res NO_TEXT_DELAY_F, [hl]
|
||||
res TEXT_DELAY_F, [hl]
|
||||
ld a, [wOptions]
|
||||
and TEXT_DELAY_MASK
|
||||
cp TEXT_DELAY_FAST
|
||||
@@ -678,7 +678,7 @@ CheckTextDelay:
|
||||
ret z
|
||||
ld a, [wOptions]
|
||||
and ~TEXT_DELAY_MASK
|
||||
or (1 << FAST_TEXT_DELAY_F) | (1 << NO_TEXT_DELAY_F)
|
||||
or (1 << FAST_TEXT_DELAY_F) | (1 << TEXT_DELAY_F)
|
||||
ld [wOptions], a
|
||||
ret
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -66,7 +66,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
|
||||
|
||||
@@ -68,7 +68,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
|
||||
@@ -316,7 +316,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
|
||||
|
||||
@@ -20,7 +20,7 @@ InitDisplayForHallOfFame:
|
||||
ld hl, .SavingRecordText
|
||||
call PrintText
|
||||
call WaitBGMap2
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
.SavingRecordText:
|
||||
@@ -56,5 +56,5 @@ InitDisplayForRedCredits:
|
||||
ldh [hSCX], a
|
||||
call EnableLCD
|
||||
call WaitBGMap2
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
@@ -17,7 +17,7 @@ SplashScreen:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_GAMEFREAK_LOGO
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
|
||||
|
||||
@@ -1119,11 +1119,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]
|
||||
@@ -1163,7 +1161,7 @@ WildBattleScript:
|
||||
reloadmapafterbattle
|
||||
end
|
||||
|
||||
CanUseSweetScent::
|
||||
CanEncounterWildMonInThisTile::
|
||||
ld hl, wStatusFlags
|
||||
bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
|
||||
jr nz, .no
|
||||
|
||||
@@ -27,10 +27,10 @@ ReanchorBGMap_NoOAMUpdate::
|
||||
res 2, [hl]
|
||||
ld a, $90
|
||||
ldh [hWY], a
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
ld a, HIGH(vBGMap1)
|
||||
call .LoadBGMapAddrIntoHRAM
|
||||
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
|
||||
call HDMATransferTilemapAndAttrmap_Menu
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
ldh [hWY], a
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,7 +13,7 @@ BlankScreen:
|
||||
ld a, $7
|
||||
call ByteFill
|
||||
call WaitBGMap2
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
SpawnPlayer:
|
||||
|
||||
@@ -121,25 +121,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
|
||||
|
||||
|
||||
@@ -2044,7 +2044,7 @@ Script_changeblock:
|
||||
Script_reloadmappart::
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call GetMovementPermissions
|
||||
call ApplyTilemap
|
||||
call UpdateSprites
|
||||
|
||||
@@ -46,5 +46,5 @@ NewPokedexEntry:
|
||||
ld [wTempMonDVs + 1], a
|
||||
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
@@ -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
|
||||
@@ -1748,7 +1748,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
|
||||
@@ -1994,7 +1994,7 @@ _FlyMap:
|
||||
call Pokegear_DummyFunction
|
||||
ld b, SCGB_POKEGEAR_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
.loop
|
||||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
@@ -2315,7 +2315,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
|
||||
@@ -2763,7 +2763,7 @@ EntireFlyMap: ; unreferenced
|
||||
ld [wTownMapCursorCoordinates + 1], a
|
||||
ld b, SCGB_POKEGEAR_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
.loop
|
||||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -647,7 +647,7 @@ Hatch_UpdateFrontpicBGMapCenter:
|
||||
predef PlaceGraphic
|
||||
pop af
|
||||
call Hatch_LoadFrontpicPal
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
jp WaitBGMap
|
||||
|
||||
EggHatch_DoAnimFrame:
|
||||
|
||||
@@ -490,7 +490,7 @@ MailboxPC:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PrintPartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
farcall PartyMenuSelect
|
||||
jr c, .exit2
|
||||
|
||||
@@ -34,7 +34,7 @@ ReadAnyMail:
|
||||
ld a, [wCurMailIndex]
|
||||
ld e, a
|
||||
farcall LoadMailPalettes
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
xor a
|
||||
ldh [hJoyPressed], a
|
||||
call .loop
|
||||
|
||||
@@ -173,7 +173,7 @@ SwitchPartyMons:
|
||||
call AddNTimes
|
||||
ld [hl], "▷"
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
|
||||
farcall PartyMenuSelect
|
||||
@@ -1150,7 +1150,7 @@ SetUpMoveList:
|
||||
hlcoord 10, 4
|
||||
predef ListMovePP
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, [wNumMoves]
|
||||
inc a
|
||||
ld [w2DMenuNumRows], a
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -721,7 +721,7 @@ OTString:
|
||||
|
||||
StatsScreen_PlaceFrontpic:
|
||||
push bc
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld hl, wTempMonDVs
|
||||
call GetUnownLetter
|
||||
hlcoord 0, 0
|
||||
@@ -782,7 +782,7 @@ EggStatsScreen:
|
||||
call WaitBGMap
|
||||
ld a, 1
|
||||
ldh [hBGMapMode], a
|
||||
call SetPalettes ; pals
|
||||
call SetDefaultBGPAndOBP
|
||||
hlcoord 0, 0
|
||||
call PrepMonFrontpic
|
||||
ld a, [wTempMonHappiness]
|
||||
|
||||
@@ -217,7 +217,7 @@ PrintPartyMonPage1:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_STATS_SCREEN_HP_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
PrintPartyMonPage2:
|
||||
@@ -284,7 +284,7 @@ PrintPartyMonPage2:
|
||||
call WaitBGMap
|
||||
ld b, SCGB_STATS_SCREEN_HP_PALS
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
.PrintTempMonStats:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -62,14 +62,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
|
||||
@@ -77,14 +77,14 @@ FadeOutPalettes::
|
||||
call ConvertTimePalsIncHL
|
||||
ret
|
||||
|
||||
FadeInQuickly:
|
||||
FadeInFromBlack:
|
||||
ld c, $0
|
||||
call GetTimePalFade
|
||||
ld b, $4
|
||||
call ConvertTimePalsIncHL
|
||||
ret
|
||||
|
||||
FadeBlackQuickly:
|
||||
FadeOutToBlack:
|
||||
ld c, $9
|
||||
call GetTimePalFade
|
||||
ld b, $4
|
||||
|
||||
20
home/map.asm
20
home/map.asm
@@ -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
|
||||
@@ -234,7 +234,7 @@ LoadMapTimeOfDay::
|
||||
ld [wSpriteUpdatesEnabled], a
|
||||
farcall ReplaceTimeOfDayPals
|
||||
farcall UpdateTimeOfDayPal
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call .ClearBGMap
|
||||
call .PushAttrmap
|
||||
ret
|
||||
@@ -2265,7 +2265,7 @@ FadeToMenu::
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadStandardMenuHeader
|
||||
farcall FadeOutPalettes
|
||||
farcall FadeOutToWhite
|
||||
call ClearSprites
|
||||
call DisableSpriteUpdates
|
||||
ret
|
||||
@@ -2288,7 +2288,7 @@ FinishExitMenu::
|
||||
ld b, SCGB_MAPPALS
|
||||
call GetSGBLayout
|
||||
call WaitBGMap2
|
||||
farcall FadeInPalettes
|
||||
farcall FadeInFromWhite
|
||||
call EnableSpriteUpdates
|
||||
ret
|
||||
|
||||
@@ -2329,7 +2329,7 @@ ReloadTilesetAndPalettes::
|
||||
ld c, a
|
||||
call SwitchToAnyMapAttributesBank
|
||||
farcall UpdateTimeOfDayPal
|
||||
call OverworldTextModeSwitch
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call LoadTilesetGFX
|
||||
ld a, 8
|
||||
call SkipMusic
|
||||
|
||||
@@ -287,8 +287,8 @@ ReloadSpritesNoPalettes::
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
SwapTextboxPalettes::
|
||||
homecall _SwapTextboxPalettes
|
||||
LoadOverworldAttrmapPals::
|
||||
homecall _LoadOverworldAttrmapPals
|
||||
ret
|
||||
|
||||
ScrollBGMapPalettes::
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,7 +20,7 @@ ScrollingMenu::
|
||||
ld hl, wVramState
|
||||
bit 0, [hl]
|
||||
jp nz, UpdateTimePals
|
||||
jp SetPalettes
|
||||
jp SetDefaultBGPAndOBP
|
||||
|
||||
InitScrollingMenu::
|
||||
ld a, [wMenuBorderTopCoord]
|
||||
|
||||
@@ -579,7 +579,7 @@ PokeFluteTerminator:: ; unreferenced
|
||||
PlaceHLTextAtBC::
|
||||
ld a, [wTextboxFlags]
|
||||
push af
|
||||
set NO_TEXT_DELAY_F, a
|
||||
set TEXT_DELAY_F, a
|
||||
ld [wTextboxFlags], a
|
||||
|
||||
call DoTextUntilTerminator
|
||||
|
||||
@@ -136,12 +136,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
|
||||
@@ -149,7 +149,7 @@ SetPalettes::
|
||||
ldh [rOBP1], a
|
||||
ret
|
||||
|
||||
.SetPalettesForGameBoyColor:
|
||||
.SetDefaultBGPAndOBPForGameBoyColor:
|
||||
push de
|
||||
ld a, %11100100
|
||||
call DmgToCgbBGPals
|
||||
|
||||
@@ -6,7 +6,7 @@ RefreshScreen::
|
||||
rst Bankswitch
|
||||
|
||||
call ReanchorBGMap_NoOAMUpdate
|
||||
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
|
||||
call HDMATransferTilemapAndAttrmap_Menu
|
||||
call LoadFonts_NoOAMUpdate
|
||||
|
||||
pop af
|
||||
@@ -29,8 +29,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,16 +50,16 @@ 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -58,13 +58,13 @@ FastShipBed:
|
||||
writetext FastShipBedText1
|
||||
waitbutton
|
||||
closetext
|
||||
special FadeBlackQuickly
|
||||
special FadeOutToBlack
|
||||
special ReloadSpritesNoPalettes
|
||||
special HealParty
|
||||
playmusic MUSIC_HEAL
|
||||
pause 60
|
||||
special RestartMapMusic
|
||||
special FadeInQuickly
|
||||
special FadeInFromBlack
|
||||
opentext
|
||||
writetext FastShipBedText2
|
||||
waitbutton
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -156,7 +156,7 @@ TeleportGuyScript:
|
||||
waitbutton
|
||||
closetext
|
||||
playsound SFX_WARP_TO
|
||||
special FadeOutPalettes
|
||||
special FadeOutToWhite
|
||||
waitsfx
|
||||
warp NEW_BARK_TOWN, 13, 6
|
||||
end
|
||||
|
||||
@@ -123,7 +123,7 @@ LancesRoomLanceScript:
|
||||
pause 30
|
||||
closetext
|
||||
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth
|
||||
special FadeOutPalettes
|
||||
special FadeOutToWhite
|
||||
pause 15
|
||||
warp HALL_OF_FAME, 4, 13
|
||||
end
|
||||
|
||||
@@ -108,12 +108,12 @@ MrPokemonsHouse_OakScript:
|
||||
writetext MrPokemonsHouse_MrPokemonHealText
|
||||
waitbutton
|
||||
closetext
|
||||
special FadeBlackQuickly
|
||||
special FadeOutToBlack
|
||||
special ReloadSpritesNoPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
special HealParty
|
||||
pause 60
|
||||
special FadeInQuickly
|
||||
special FadeInFromBlack
|
||||
special RestartMapMusic
|
||||
opentext
|
||||
writetext MrPokemonText_ImDependingOnYou
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -92,12 +92,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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ Route26HealHouseTeacherScript:
|
||||
writetext Route26HealHouseRestAWhileText
|
||||
waitbutton
|
||||
closetext
|
||||
special FadeBlackQuickly
|
||||
special FadeOutToBlack
|
||||
special ReloadSpritesNoPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
special HealParty
|
||||
pause 60
|
||||
special FadeInQuickly
|
||||
special FadeInFromBlack
|
||||
special RestartMapMusic
|
||||
opentext
|
||||
writetext Route26HealHouseKeepAtItText
|
||||
|
||||
@@ -72,7 +72,7 @@ Route35NationalParkGateLeavingContestEarlyScript:
|
||||
closetext
|
||||
scall Route35NationalParkGate_EnterContest
|
||||
playsound SFX_ENTER_DOOR
|
||||
special FadeOutPalettes
|
||||
special FadeOutToWhite
|
||||
waitsfx
|
||||
warp 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
|
||||
warp NATIONAL_PARK_BUG_CONTEST, 10, 47
|
||||
|
||||
@@ -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
|
||||
warp 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
|
||||
warp NATIONAL_PARK_BUG_CONTEST, 33, 18
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,10 +164,10 @@ LanceHealsCommon:
|
||||
writetext LanceHealsText1
|
||||
waitbutton
|
||||
closetext
|
||||
special FadeOutPalettes
|
||||
special FadeOutToWhite
|
||||
playsound SFX_FULL_HEAL
|
||||
special HealParty
|
||||
special FadeInPalettes
|
||||
special FadeInFromWhite
|
||||
opentext
|
||||
writetext LanceHealsText2
|
||||
waitbutton
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user