mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Handle white out transition from overworld (incl. battle) to game menu (#27)
This commit is contained in:
parent
866729d024
commit
ad345222ae
@ -335,3 +335,4 @@ DEF NUM_BOARD_EVENTS EQU const_value - 1
|
||||
const_def
|
||||
const ABANDONED_LEVEL ; 0
|
||||
const CLEARED_LEVEL ; 1
|
||||
const WHITED_OUT_IN_LEVEL ; 2
|
||||
|
@ -57,6 +57,7 @@ BoardMenuScript::
|
||||
.exit:
|
||||
wait 300
|
||||
exitoverworld ABANDONED_LEVEL
|
||||
endall
|
||||
|
||||
.ConfirmExitText:
|
||||
text "Abandon level and"
|
||||
|
@ -55,7 +55,7 @@ EndSpaceScript::
|
||||
callasm .FadeOutSlow ; 800 ms
|
||||
wait 400
|
||||
exitoverworld CLEARED_LEVEL
|
||||
end
|
||||
endall
|
||||
|
||||
.FadeOutSlow:
|
||||
; clear spaces left sprites
|
||||
|
@ -15,10 +15,8 @@ Script_Whiteout:
|
||||
checkflag ENGINE_BUG_CONTEST_TIMER
|
||||
iftrue .bug_contest
|
||||
callasm HalveCoins
|
||||
callasm GetWhiteoutSpawn
|
||||
farscall Script_AbortBugContest
|
||||
special WarpToSpawnPoint
|
||||
newloadmap MAPSETUP_WARP
|
||||
exitoverworld WHITED_OUT_IN_LEVEL
|
||||
endall
|
||||
|
||||
.bug_contest
|
||||
@ -32,9 +30,17 @@ OverworldBGMap:
|
||||
call ClearPalettes
|
||||
call ClearScreen
|
||||
call WaitBGMap2
|
||||
call HideSprites
|
||||
call DisableOverworldHUD
|
||||
xor a
|
||||
ld [wDisplaySecondarySprites], a
|
||||
farcall ClearSpriteAnims
|
||||
call ClearSprites
|
||||
call LoadStandardFont
|
||||
call LoadFrame
|
||||
call RotateThreePalettesLeft
|
||||
ret
|
||||
ld a, FALSE
|
||||
ld [wText2bpp], a
|
||||
jp SpeechTextbox1bpp
|
||||
|
||||
BattleBGMap:
|
||||
ld b, CGB_BATTLE_GRAYSCALE
|
||||
|
@ -1157,6 +1157,8 @@ Script_loadtrainer:
|
||||
|
||||
Script_startbattle:
|
||||
call DisableOverworldHUD
|
||||
ld a, FALSE
|
||||
ld [wText2bpp], a
|
||||
call BufferScreen
|
||||
predef StartBattle
|
||||
ld a, [wBattleResult]
|
||||
@ -1175,6 +1177,8 @@ Script_reloadmapafterbattle:
|
||||
ld hl, wBattleScriptFlags
|
||||
ld d, [hl]
|
||||
ld [hl], 0
|
||||
ld a, TRUE
|
||||
ld [wText2bpp], a
|
||||
ld a, [wBattleResult]
|
||||
and ~BATTLERESULT_BITMASK
|
||||
cp LOSE
|
||||
|
Loading…
Reference in New Issue
Block a user