mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Apply most of pokecrystal PR 1105
This commit is contained in:
parent
971c4aa2c7
commit
5c4d982702
@ -53,10 +53,10 @@ SpecialsPointers::
|
||||
add_special CardFlip
|
||||
add_special UnusedMemoryGame ; unused
|
||||
add_special ClearBGPalettesBufferScreen ; unused
|
||||
add_special FadeOutPalettesToWhite
|
||||
add_special FadeOutPalettesToBlack
|
||||
add_special FadeInPalettesFromWhite
|
||||
add_special FadeInPalettesFromBlack
|
||||
add_special FadeOutToWhite
|
||||
add_special FadeOutToBlack
|
||||
add_special FadeInFromWhite
|
||||
add_special FadeInFromBlack
|
||||
add_special ReloadSpritesNoPalettes ; bank 0
|
||||
add_special ClearBGPalettes ; bank 0
|
||||
add_special UpdateTimePals ; bank 0
|
||||
|
@ -33,8 +33,8 @@ MapSetupCommands:
|
||||
add_mapsetup LoadMapAttributes ; 1a
|
||||
add_mapsetup LoadMapAttributes_SkipObjects ; 1b
|
||||
add_mapsetup ClearBGPalettes ; 1c
|
||||
add_mapsetup FadeOutPalettesToWhite ; 1d
|
||||
add_mapsetup FadeInPalettesFromWhite ; 1e
|
||||
add_mapsetup FadeOutToWhite ; 1d
|
||||
add_mapsetup FadeInFromWhite ; 1e
|
||||
add_mapsetup GetMapScreenCoords ; 1f
|
||||
add_mapsetup GetWarpDestCoords ; 20
|
||||
add_mapsetup SpawnInFacingDown ; 21
|
||||
|
@ -44,7 +44,7 @@ MapSetupScript_EnterLevel:
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInToMusic
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ConstructAndEnableOverworldHUD
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
@ -54,7 +54,7 @@ MapSetupScript_EnterLevel:
|
||||
MapSetupScript_Teleport:
|
||||
mapsetup ResetPlayerObjectAction
|
||||
MapSetupScript_Fly:
|
||||
mapsetup FadeOutPalettesToWhite
|
||||
mapsetup FadeOutToWhite
|
||||
mapsetup JumpRoamMons
|
||||
MapSetupScript_Warp:
|
||||
mapsetup DisableLCD
|
||||
@ -78,7 +78,7 @@ MapSetupScript_Warp:
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInToMusic
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup AnchorPointAfterWarp
|
||||
@ -106,7 +106,7 @@ MapSetupScript_BadWarp:
|
||||
mapsetup SpawnInFacingDown
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup FadeToMapMusic
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup AnchorPointAfterWarp
|
||||
@ -138,7 +138,7 @@ MapSetupScript_Connection:
|
||||
MapSetupScript_Fall:
|
||||
mapsetup ResetPlayerObjectAction
|
||||
MapSetupScript_Door:
|
||||
mapsetup FadeOutPalettesToWhite
|
||||
mapsetup FadeOutToWhite
|
||||
MapSetupScript_Train:
|
||||
mapsetup BackupMapObjects
|
||||
mapsetup EnterMapWarp
|
||||
@ -158,7 +158,7 @@ MapSetupScript_Train:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup FadeToMapMusic
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup UpdateRoamMons
|
||||
@ -180,7 +180,7 @@ MapSetupScript_ReloadMap:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup ForceMapMusic
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup EnableOverworldHUD
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
@ -205,7 +205,7 @@ MapSetupScript_ExitViewMap:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup SpawnInCustomFacing ; restore player's facing if in branch space
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup EnableOverworldHUD
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
@ -226,7 +226,7 @@ MapSetupScript_LinkReturn:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
mapsetup EnableTextAcceleration
|
||||
@ -249,7 +249,7 @@ MapSetupScript_Continue:
|
||||
mapsetup LoadMapPalettes
|
||||
mapsetup RefreshMapSprites
|
||||
mapsetup PlayMapMusicBike
|
||||
mapsetup FadeInPalettesFromWhite
|
||||
mapsetup FadeInFromWhite
|
||||
mapsetup ConstructAndEnableOverworldHUD
|
||||
mapsetup ActivateMapAnims
|
||||
mapsetup LoadWildMonData
|
||||
|
@ -35,14 +35,14 @@
|
||||
|
||||
#### Overworld map scrolling
|
||||
|
||||
- **LoadScreenTilemap**: From the metatile-based 24x20 map in wSurroundingTiles, load the corresponding 20x18 tiles to wTilemap. Later, BackupBGMap* from ScrollMap* copies new row/column from wTilemap to wBGMapBuffer. _ScrollBGMapPalettes populates wBGMapPalBuffer based on the tiles at wBGMapBuffer. These are read during vblank by UpdateBGMapBuffer.
|
||||
- **LoadScreenAttrmapPals**: Load wAttrmap palette numbers based on the tileset palettes of the current map. Called only by LoadScreenTilemapAndAttrmapPals.
|
||||
- **LoadScreenTilemapAndAttrmapPals**: LoadScreenTilemap + LoadScreenAttrmapPals. Often used to reload screen after closing a text box.
|
||||
- **LoadOverworldTilemap**: From the metatile-based 24x20 map in wSurroundingTiles, load the corresponding 20x18 tiles to wTilemap. Later, BackupBGMap* from ScrollMap* copies new row/column from wTilemap to wBGMapBuffer. _ScrollBGMapPalettes populates wBGMapPalBuffer based on the tiles at wBGMapBuffer. These are read during vblank by UpdateBGMapBuffer.
|
||||
- **LoadOverworldAttrmapPals**: Load wAttrmap palette numbers based on the tileset palettes of the current map. Called only by LoadOverworldTilemapAndAttrmapPals.
|
||||
- **LoadOverworldTilemapAndAttrmapPals**: LoadOverworldTilemap + LoadOverworldAttrmapPals. Often used to reload screen after closing a text box.
|
||||
|
||||
#### Overworld map anchoring
|
||||
|
||||
- **ReanchorBGMap_NoOAMUpdate**: LoadScreenTilemapAndAttrmapPals + HDMATransferTilemapAndAttrmap_OpenAndCloseMenu, then fill BG map with all black while Window is displayed, finally anchor map and objects. Shall by followed by CopyTilemapAtOnce or by a HDMATransferTilemapAndAttrmap_* to redraw the screen.
|
||||
- **OpenText1bpp**, **OpenText2bpp**: ClearMenuAndWindowData + ReanchorBGMap_NoOAMUpdate + SpeechTextbox1bpp + HDMATransferTilemapAndAttrmap_OpenAndCloseMenu + hide Window
|
||||
- **ReanchorBGMap_NoOAMUpdate**: LoadOverworldTilemapAndAttrmapPals + HDMATransferTilemapAndAttrmap_Menu, then fill BG map with all black while Window is displayed, finally anchor map and objects. Shall by followed by CopyTilemapAtOnce or by a HDMATransferTilemapAndAttrmap_* to redraw the screen.
|
||||
- **OpenText1bpp**, **OpenText2bpp**: ClearMenuAndWindowData + ReanchorBGMap_NoOAMUpdate + SpeechTextbox1bpp + HDMATransferTilemapAndAttrmap_Menu + hide Window
|
||||
- **OpenText1bpp**: Loads 1bpp font (LoadFont_NoOAMUpdate)
|
||||
- **OpenText2bpp**: Doesn't load 2bpp font
|
||||
- **RefreshScreen**: Same as OpenText functions but doesn't call any SpeechTextbox
|
||||
@ -55,7 +55,7 @@
|
||||
- **HDMATransfer1bpp**: Copy 1bpp tiles via HDMA. Maximum 16 tiles per frame
|
||||
- **HDMATransfer2bpp**: Copy 2bpp tiles via HDMA. No hardcoded limit. Timing considers 1 tile per hblank
|
||||
- **Get1bppViaHDMA**, **Get2bppViaHDMA**: Call Copy1bpp or Copy2bpp if LCD disabled. HDMATransfer1bpp or HDMATransfer2bpp otherwise
|
||||
- **HDMATransferTilemapAndAttrmap_OpenAndCloseMenu**, **HDMATransferTilemapAndAttrmap_OverworldEffect**: Similar, but with slightly different scanline timing. So they're essentially like RefreshScreen minus the anchoring part.
|
||||
- **HDMATransferTilemapAndAttrmap_Menu**, **HDMATransferTilemapAndAttrmap_Overworld**: Similar, but with slightly different scanline timing. So they're essentially like RefreshScreen minus the anchoring part.
|
||||
|
||||
#### HUD
|
||||
|
||||
@ -69,8 +69,8 @@
|
||||
|
||||
## Scripts
|
||||
|
||||
- **refreshscreen**: RefreshScreen
|
||||
- **reloadmappart**: LoadScreenTilemapAndAttrmapPals + GetMovementPermissions + HDMATransferTilemapAndAttrmap_OverworldEffect + UpdateSprites. Similar to refreshscreen, but does not reanchor. On the other hand, it refreshes movement permissions. Often used after a block change or field move, which can affect collisions.
|
||||
- **reanchormap**: RefreshScreen
|
||||
- **refreshmap**: LoadOverworldTilemapAndAttrmapPals + GetMovementPermissions + HDMATransferTilemapAndAttrmap_Overworld + UpdateSprites. Similar to reanchormap, but does not reanchor. On the other hand, it refreshes movement permissions. Often used after a block change or field move, which can affect collisions.
|
||||
|
||||
## Changes
|
||||
|
||||
@ -130,19 +130,19 @@
|
||||
### Overworld workflow
|
||||
|
||||
1) ``OverworldLoop`` is called from ``GameMenu_WorldMap`` with either ``hMapEntryMethod`` = ``MAPSETUP_ENTERLEVEL`` or ``hMapEntryMethod`` = ``MAPSETUP_CONTINUE``.
|
||||
2) ``StartMap`` resets ``wCurTurn`` and ``wCurSpace`` if ``MAPSETUP_ENTERLEVEL``. ``StartMap`` sets ``hCurBoardEvent`` to ``BOARDEVENT_DISPLAY_MENU``. ``wScriptFlags2`` is cleared. ``wMapStatus`` is set to ``MAPSTATUS_HANDLE`` causing ``HandleMap`` to be called.
|
||||
2) ``StartMap`` resets ``wCurTurn`` and ``wCurSpace`` if ``MAPSETUP_ENTERLEVEL``. ``StartMap`` sets ``hCurBoardEvent`` to ``BOARDEVENT_DISPLAY_MENU``. ``wEnabledPlayerEvents`` is cleared. ``wMapStatus`` is set to ``MAPSTATUS_HANDLE`` causing ``HandleMap`` to be called.
|
||||
3) ``MapEvents`` (from ``HandleMap``) calls ``PlayerEvents``. ``CheckBoardEvent`` queues ``BoardMenuScript`` which is executed by ``ScriptEvents``.
|
||||
4) ``BoardMenuScript.Upkeep`` saves the game, clears ``wTurnData[]``, increases ``wCurTurn``, and loads current space to ``wCurSpaceStruct[]``.
|
||||
- If player exits, the ``exitoverworld`` script sets ``wMapStatus`` to ``MAPSTATUS_DONE``. This causes ``OverworldLoop`` to return back to the game menu. **Exit this workflow**.
|
||||
5) Player rolls die and the animation plays. After the animation, ``wDisplaySecondarySprites.SECONDARYSPRITES_SPACES_LEFT_F`` is set and ``hCurBoardEvent`` is set to ``BOARDEVENT_HANDLE_BOARD``. At the end of this ``HandleMap`` iteration, ``CheckPlayerState`` sets ``wMapEventStatus`` to ``MAPEVENTS_ON`` (``wScriptFlags2`` is not touched so it remains cleared).
|
||||
6) In the next ``HandleMap`` iteration, ``CheckBoardEvent`` from ``PlayerEvents`` jumps to ``.board`` and then to ``.no_space_effect`` due to ``wScriptFlags2[4]`` not being set.
|
||||
5) Player rolls die and the animation plays. After the animation, ``wDisplaySecondarySprites.SECONDARYSPRITES_SPACES_LEFT_F`` is set and ``hCurBoardEvent`` is set to ``BOARDEVENT_HANDLE_BOARD``. At the end of this ``HandleMap`` iteration, ``CheckPlayerState`` sets ``wMapEventStatus`` to ``MAPEVENTS_ON`` (``wEnabledPlayerEvents`` is not touched so it remains cleared).
|
||||
6) In the next ``HandleMap`` iteration, ``CheckBoardEvent`` from ``PlayerEvents`` jumps to ``.board`` and then to ``.no_space_effect`` due to ``wEnabledPlayerEvents[4]`` not being set.
|
||||
7) Execution continues in ``PlayerEvents``; ``OWPlayerInput`` is eventually called, and thus ``DoPlayerMovement``. Here, ``StepTowardsNextSpace`` computes based on ``wCurSpaceNextSpace`` what direction key to write to ``wCurInput``, causing the player to begin a movement in that direction.
|
||||
8) The player may need to turn to a different direction through the ``ChangeDirectionScript`` (when ``DoPlayerMovement`` returns with ``PLAYERMOVEMENT_TURN``). Otherwise or after that, ``CheckPlayerState`` sets ``wMapEventStatus`` to ``MAPEVENTS_OFF``,
|
||||
9) When the step finishes (i.e. ``PLAYERSTEP_STOP_F`` becomes set) in some ``HandleMap`` iteration, ``CheckPlayerState`` sets ``wScriptFlags2`` to $ff and ``wMapEventStatus`` to ``MAPEVENTS_ON``.
|
||||
10) In the next ``HandleMap`` iteration, ``CheckBoardEvent.board`` is called with ``wScriptFlags2[4]`` set.
|
||||
- If ``wCurSpaceNextSpace`` matches ``NEXT_SPACE_IS_ANCHOR_POINT``: If player is at a tile with an anchor event, ``wCurSpaceNextSpace`` is updated with the next space byte of salid anchor event. ``wScriptFlags2[4]`` is reset. **Go back to 7**.
|
||||
- If player is not above a tile (``wPlayerTile``) with a space collision: ``wScriptFlags2[4]`` is reset. **Go back to 7**.
|
||||
- If player is above a tile, the corresponding space script is queued to be executed by ``ScriptEvents`` in the current ``HandleMap`` iteration. ``wScriptFlags2[4]`` is reset. **Continue to 11**.
|
||||
9) When the step finishes (i.e. ``PLAYERSTEP_STOP_F`` becomes set) in some ``HandleMap`` iteration, ``CheckPlayerState`` sets ``wEnabledPlayerEvents`` to $ff and ``wMapEventStatus`` to ``MAPEVENTS_ON``.
|
||||
10) In the next ``HandleMap`` iteration, ``CheckBoardEvent.board`` is called with ``wEnabledPlayerEvents[4]`` set.
|
||||
- If ``wCurSpaceNextSpace`` matches ``NEXT_SPACE_IS_ANCHOR_POINT``: If player is at a tile with an anchor event, ``wCurSpaceNextSpace`` is updated with the next space byte of salid anchor event. ``wEnabledPlayerEvents[4]`` is reset. **Go back to 7**.
|
||||
- If player is not above a tile (``wPlayerTile``) with a space collision: ``wEnabledPlayerEvents[4]`` is reset. **Go back to 7**.
|
||||
- If player is above a tile, the corresponding space script is queued to be executed by ``ScriptEvents`` in the current ``HandleMap`` iteration. ``wEnabledPlayerEvents[4]`` is reset. **Continue to 11**.
|
||||
11) The space script loads the value of ``wCurSpaceNextSpace`` into ``wCurSpace``, and loads the new space data to ``wCurSpaceStruct[]``. Unless the space is a Branch Space or a Union Space, ``wSpacesLeft`` is decreased.
|
||||
- If the space is a Branch Space, the branch data is loaded to ``wTempSpaceBranchStruct``. Then the player is prompted to choose a valid direction. ``wCurSpaceNextSpace`` is populated with the next space that corresponds to the chosen direction. **Go back to 6**.
|
||||
- If the space is an End Space, a fading out animation plays and then the ``exitoverworld`` script sets ``wMapStatus`` to ``MAPSTATUS_DONE``. This causes ``OverworldLoop`` to return back to the game menu. **Exit this workflow**.
|
||||
|
@ -257,7 +257,7 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[hScriptVar]` i
|
||||
## `$47`: `opentext`
|
||||
|
||||
|
||||
## `$48`: <code>refreshscreen [<i>dummy</i>=0]</code>
|
||||
## `$48`: <code>reanchormap [<i>dummy</i>=0]</code>
|
||||
|
||||
|
||||
## `$49`: `closetext`
|
||||
@ -419,7 +419,7 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[hScriptVar]` i
|
||||
## `$7B`: `reloadmap`
|
||||
|
||||
|
||||
## `$7C`: `reloadmappart`
|
||||
## `$7C`: `refreshmap`
|
||||
|
||||
|
||||
## `$7D`: <code>writecmdqueue <i>queue_pointer</i></code>
|
||||
|
@ -2655,7 +2655,7 @@ ForcePlayerMonChoice:
|
||||
call LoadTilemapToTempTilemap
|
||||
call WaitBGMap
|
||||
call GetMemCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
xor a
|
||||
ld c, a
|
||||
ret
|
||||
@ -2674,7 +2674,7 @@ ForcePlayerMonChoice:
|
||||
call _LoadHPBar
|
||||
call CloseWindow
|
||||
call GetMemCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call SendOutMonText
|
||||
call NewBattleMonStatus
|
||||
call BreakAttraction
|
||||
@ -2718,7 +2718,7 @@ JumpToPartyMenuAndPrintText:
|
||||
farcall WritePartyMenuTilemap
|
||||
farcall PlacePartyMenuText
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
@ -2817,7 +2817,7 @@ LostBattle:
|
||||
; Grayscale
|
||||
ld b, CGB_BATTLE_GRAYSCALE
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
jr .end
|
||||
|
||||
.LostLinkBattle:
|
||||
@ -4845,7 +4845,7 @@ BattleMenu_Pack:
|
||||
and BATTLERESULT_BITMASK
|
||||
ld [wBattleResult], a ; WIN
|
||||
call ClearMenuAndWindowData
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
scf
|
||||
ret
|
||||
|
||||
@ -4891,7 +4891,7 @@ BattleMenuPKMN_Loop:
|
||||
call CloseWindow
|
||||
call LoadTilemapToTempTilemap
|
||||
call GetMemCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
jp BattleMenu
|
||||
|
||||
.GetMenu:
|
||||
@ -4971,7 +4971,7 @@ TryPlayerSwitch:
|
||||
call _LoadHPBar
|
||||
call CloseWindow
|
||||
call GetMemCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, [wCurPartyMon]
|
||||
ld [wCurBattleMon], a
|
||||
PlayerSwitch:
|
||||
@ -6797,7 +6797,7 @@ FinishBattleAnim:
|
||||
push hl
|
||||
ld b, CGB_BATTLE_COLORS
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
pop hl
|
||||
pop de
|
||||
@ -8238,7 +8238,7 @@ _DisplayLinkRecord:
|
||||
call WaitBGMap2
|
||||
ld b, CGB_DIPLOMA
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld c, 8
|
||||
call DelayFrames
|
||||
call WaitPressAorB_BlinkCursor
|
||||
@ -8718,7 +8718,7 @@ InitBattleDisplay:
|
||||
call HideSprites
|
||||
ld b, CGB_BATTLE_COLORS
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, $90
|
||||
ldh [hWY], a
|
||||
xor a
|
||||
@ -8854,7 +8854,7 @@ BattleStartMessage:
|
||||
farcall Battle_GetTrainerName
|
||||
|
||||
ld hl, WantsToBattleText
|
||||
jr .PlaceBattleStartText
|
||||
jr .PrintBattleStartText
|
||||
|
||||
.wild
|
||||
call BattleCheckEnemyShininess
|
||||
@ -8894,18 +8894,18 @@ BattleStartMessage:
|
||||
jr nz, .NotFishing
|
||||
|
||||
ld hl, HookedPokemonAttackedText
|
||||
jr .PlaceBattleStartText
|
||||
jr .PrintBattleStartText
|
||||
|
||||
.NotFishing:
|
||||
ld hl, PokemonFellFromTreeText
|
||||
cp BATTLETYPE_TREE
|
||||
jr z, .PlaceBattleStartText
|
||||
jr z, .PrintBattleStartText
|
||||
ld hl, WildCelebiAppearedText
|
||||
cp BATTLETYPE_CELEBI
|
||||
jr z, .PlaceBattleStartText
|
||||
jr z, .PrintBattleStartText
|
||||
ld hl, WildPokemonAppearedText
|
||||
|
||||
.PlaceBattleStartText:
|
||||
.PrintBattleStartText:
|
||||
push hl
|
||||
farcall BattleStart_TrainerHuds
|
||||
pop hl
|
||||
|
@ -29,7 +29,7 @@ BattleCommand_BatonPass:
|
||||
call ClearBox
|
||||
ld b, CGB_BATTLE_COLORS
|
||||
call GetCGBLayout
|
||||
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
|
||||
|
@ -252,7 +252,7 @@ _ShowLinkBattleParticipants:
|
||||
farcall LinkBattle_TrainerHuds ; no need to farcall
|
||||
ld b, CGB_DIPLOMA
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ld a, $e4
|
||||
ldh [rOBP0], a
|
||||
ret
|
||||
|
@ -271,7 +271,7 @@ DEF DIE_MAX_NUMBER EQU 6
|
||||
set SECONDARYSPRITES_DIE_ROLL_F, [hl]
|
||||
ld a, 1
|
||||
ld [wDieRoll], a
|
||||
call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu ;
|
||||
call HDMATransferTilemapAndAttrmap_Menu ;
|
||||
call CloseText ; closetext
|
||||
|
||||
.rotate_die_loop
|
||||
@ -454,7 +454,7 @@ BoardMenu_OpenSubmenu:
|
||||
ld [wMenuReturn], a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadStandardMenuHeader
|
||||
farcall FadeOutPalettesToWhite
|
||||
farcall FadeOutToWhite
|
||||
call DisableOverworldHUD
|
||||
ld a, FALSE
|
||||
ld [wText2bpp], a
|
||||
@ -477,6 +477,6 @@ BoardMenu_CloseSubmenu:
|
||||
ld b, CGB_MAPPALS
|
||||
call GetCGBLayout
|
||||
call WaitBGMap2
|
||||
farcall FadeInPalettesFromWhite
|
||||
farcall FadeInFromWhite
|
||||
call EnableSpriteUpdates
|
||||
ret
|
||||
|
@ -1023,7 +1023,7 @@ TilesetColorPicker: ; unreferenced
|
||||
ld [wDebugTilesetCurColor], a
|
||||
ldh [hMapAnims], a
|
||||
call ClearSprites
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call WaitBGMap2
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
|
@ -606,7 +606,7 @@ DebugRoom_EditPagedValues:
|
||||
call WaitBGMap
|
||||
ld b, CGB_DIPLOMA
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
.resume
|
||||
call DelayFrame
|
||||
call JoyTextDelay
|
||||
|
@ -76,7 +76,7 @@ DisplayCaughtContestMonStats:
|
||||
call WaitBGMap
|
||||
ld b, CGB_DIPLOMA
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
ret
|
||||
|
||||
.Health:
|
||||
|
@ -31,7 +31,7 @@ PlaceDiplomaOnScreen:
|
||||
call WaitBGMap
|
||||
ld b, CGB_DIPLOMA
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
|
@ -27,14 +27,14 @@ UseFlashAuto::
|
||||
ret
|
||||
|
||||
BlindingFlash:
|
||||
farcall FadeOutPalettesToWhite
|
||||
farcall FadeOutToWhite
|
||||
ld hl, wStatusFlags
|
||||
set STATUSFLAGS_FLASH_F, [hl]
|
||||
farcall ReplaceTimeOfDayPals
|
||||
farcall UpdateTimeOfDayPal
|
||||
ld b, CGB_MAPPALS
|
||||
call GetCGBLayout
|
||||
farcall FadeInPalettesFromWhite
|
||||
farcall FadeInFromWhite
|
||||
ret
|
||||
|
||||
ShakeHeadbuttTree:
|
||||
@ -75,7 +75,7 @@ ShakeHeadbuttTree:
|
||||
jr .loop
|
||||
|
||||
.done
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
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 FadeOutPalettesToWhite
|
||||
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 FadeOutPalettesToWhite
|
||||
farcall FadeOutToWhite
|
||||
xor a
|
||||
ld [wVramState], a
|
||||
ldh [hMapAnims], a
|
||||
@ -252,7 +252,7 @@ AnimateHOFMonEntrance:
|
||||
ldh [hBGMapMode], a
|
||||
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call HOF_SlideBackpic
|
||||
xor a
|
||||
ld [wBoxAlignment], a
|
||||
@ -385,7 +385,7 @@ _HallOfFamePC:
|
||||
call WaitBGMap
|
||||
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
decoord 6, 5
|
||||
ld c, ANIM_MON_HOF
|
||||
predef HOF_AnimateFrontpic
|
||||
@ -535,7 +535,7 @@ HOF_AnimatePlayerPic:
|
||||
ld [wCurPartySpecies], a
|
||||
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
|
||||
call GetCGBLayout
|
||||
call SetPalettes
|
||||
call SetDefaultBGPAndOBP
|
||||
call HOF_SlideBackpic
|
||||
xor a
|
||||
ld [wBoxAlignment], a
|
||||
|
@ -27,7 +27,7 @@ ItemFinder:
|
||||
ret
|
||||
|
||||
.Script_FoundSomething:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
callasm .ItemfinderSound
|
||||
writetext .ItemfinderItemNearbyText
|
||||
@ -35,7 +35,7 @@ ItemFinder:
|
||||
end
|
||||
|
||||
.Script_FoundNothing:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
writetext .ItemfinderNopeText
|
||||
closetext
|
||||
|
@ -200,13 +200,13 @@ CheckMapForSomethingToCut:
|
||||
ret
|
||||
|
||||
Script_CutFromMenu:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
Script_Cut:
|
||||
callasm GetPartyNickname
|
||||
writetext UseCutText
|
||||
reloadmappart
|
||||
refreshmap
|
||||
callasm CutDownTreeOrGrass
|
||||
closetext
|
||||
end
|
||||
@ -220,7 +220,7 @@ CutDownTreeOrGrass:
|
||||
ld [hl], a
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call UpdateSprites
|
||||
call DelayFrame
|
||||
ld a, [wCutWhirlpoolAnimationType]
|
||||
@ -234,11 +234,11 @@ CutDownTreeOrGrass:
|
||||
ret
|
||||
|
||||
Script_CutAuto::
|
||||
refreshscreen
|
||||
reanchormap
|
||||
callasm CutDownTreeObject
|
||||
disappear LAST_TALKED
|
||||
special SetObjectToRemainHidden
|
||||
reloadmappart
|
||||
refreshmap
|
||||
end
|
||||
|
||||
CutDownTreeObject:
|
||||
@ -319,7 +319,7 @@ UseFlash:
|
||||
jp QueueScript
|
||||
|
||||
Script_UseFlash:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
writetext UseFlashTextScript
|
||||
callasm BlindingFlash
|
||||
@ -624,7 +624,7 @@ FlyFunction:
|
||||
ret
|
||||
|
||||
.FlyScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
callasm HideSprites
|
||||
special UpdateTimePals
|
||||
callasm FlyFromAnim
|
||||
@ -696,7 +696,7 @@ Script_WaterfallAuto::
|
||||
step_end
|
||||
|
||||
Script_WaterfallFromMenu:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
Script_UsedWaterfall:
|
||||
@ -865,13 +865,13 @@ EscapeRopeOrDig:
|
||||
text_end
|
||||
|
||||
.UsedEscapeRopeScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
writetext .UseEscapeRopeText
|
||||
sjump .UsedDigOrEscapeRopeScript
|
||||
|
||||
.UsedDigScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
writetext .UseDigText
|
||||
|
||||
@ -957,11 +957,11 @@ TeleportFunction:
|
||||
text_end
|
||||
|
||||
.TeleportScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
writetext .TeleportReturnText
|
||||
pause 60
|
||||
reloadmappart
|
||||
refreshmap
|
||||
closetext
|
||||
playsound SFX_WARP_TO
|
||||
applymovement PLAYER, .TeleportFrom
|
||||
@ -1027,7 +1027,7 @@ SetStrengthFlag:
|
||||
ret
|
||||
|
||||
Script_StrengthFromMenu:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
Script_UsedStrength:
|
||||
@ -1186,13 +1186,13 @@ TryWhirlpoolMenu:
|
||||
ret
|
||||
|
||||
Script_WhirlpoolFromMenu:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
Script_UsedWhirlpool:
|
||||
callasm GetPartyNickname
|
||||
writetext UseWhirlpoolText
|
||||
reloadmappart
|
||||
refreshmap
|
||||
callasm DisappearWhirlpool
|
||||
closetext
|
||||
end
|
||||
@ -1206,7 +1206,7 @@ DisappearWhirlpool:
|
||||
ld [hl], a
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
ld a, [wCutWhirlpoolAnimationType]
|
||||
ld e, a
|
||||
farcall PlayWhirlpoolSound
|
||||
@ -1285,14 +1285,14 @@ HeadbuttNothingText:
|
||||
text_end
|
||||
|
||||
HeadbuttFromMenuScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
HeadbuttScript:
|
||||
callasm GetPartyNickname
|
||||
writetext UseHeadbuttText
|
||||
|
||||
reloadmappart
|
||||
refreshmap
|
||||
callasm ShakeHeadbuttTree
|
||||
|
||||
callasm TreeMonEncounter
|
||||
@ -1382,7 +1382,7 @@ GetFacingObject:
|
||||
ret
|
||||
|
||||
RockSmashFromMenuScript:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
|
||||
RockSmashScript:
|
||||
@ -1618,7 +1618,7 @@ Fishing_CheckFacingUp:
|
||||
ret
|
||||
|
||||
Script_FishCastRod:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
loadmem hBGMapMode, $0
|
||||
special UpdateTimePals
|
||||
loademote EMOTE_ROD
|
||||
@ -1735,7 +1735,7 @@ BikeFunction:
|
||||
ret
|
||||
|
||||
Script_GetOnBike:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
loadvar VAR_MOVEMENT, PLAYER_BIKE
|
||||
writetext GotOnBikeText
|
||||
@ -1751,7 +1751,7 @@ Script_GetOnBike_Register:
|
||||
end
|
||||
|
||||
Script_GetOffBike:
|
||||
reloadmappart
|
||||
refreshmap
|
||||
special UpdateTimePals
|
||||
loadvar VAR_MOVEMENT, PLAYER_NORMAL
|
||||
writetext GotOffBikeText
|
||||
|
@ -212,7 +212,7 @@ _PlayersHousePC:
|
||||
call _PlayersPC
|
||||
and a
|
||||
jr nz, .changed_deco_tiles
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call ApplyTilemap
|
||||
call UpdateSprites
|
||||
call PC_PlayShutdownSound
|
||||
|
@ -35,7 +35,7 @@ ClosePokepic::
|
||||
call GetMemCGBLayout
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadOverworldTilemapAndAttrmapPals
|
||||
call ApplyTilemap
|
||||
call UpdateSprites
|
||||
call LoadStandardFont
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user