2018-06-24 17:10:37 -07:00
|
|
|
Script_BattleWhiteout::
|
2015-11-11 13:11:08 -08:00
|
|
|
callasm BattleBGMap
|
2019-03-10 13:39:31 -07:00
|
|
|
sjump Script_Whiteout
|
2015-11-11 13:11:08 -08:00
|
|
|
|
2020-07-17 05:37:03 -07:00
|
|
|
OverworldWhiteoutScript::
|
2024-02-10 15:16:00 -08:00
|
|
|
reanchormap
|
2015-11-11 13:11:08 -08:00
|
|
|
callasm OverworldBGMap
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
Script_Whiteout:
|
2015-11-11 13:11:08 -08:00
|
|
|
writetext .WhitedOutText
|
2015-11-25 07:16:29 -08:00
|
|
|
waitbutton
|
2024-02-10 15:16:00 -08:00
|
|
|
special FadeOutToWhite
|
2015-11-11 13:11:08 -08:00
|
|
|
pause 40
|
|
|
|
special HealParty
|
|
|
|
checkflag ENGINE_BUG_CONTEST_TIMER
|
|
|
|
iftrue .bug_contest
|
2023-09-02 14:16:35 -07:00
|
|
|
callasm HalveCoins
|
2015-11-11 13:11:08 -08:00
|
|
|
farscall Script_AbortBugContest
|
2023-10-23 09:40:08 -07:00
|
|
|
exitoverworld WHITED_OUT_IN_LEVEL
|
2018-02-02 18:09:17 -08:00
|
|
|
endall
|
2015-11-11 13:11:08 -08:00
|
|
|
|
|
|
|
.bug_contest
|
2020-06-10 13:44:16 -07:00
|
|
|
jumpstd BugContestResultsWarpScript
|
2015-11-11 13:11:08 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.WhitedOutText:
|
2019-10-20 15:24:17 -07:00
|
|
|
text_far _WhitedOutText
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-11-11 13:11:08 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
OverworldBGMap:
|
2015-11-11 13:11:08 -08:00
|
|
|
call ClearPalettes
|
|
|
|
call ClearScreen
|
2015-12-11 13:59:40 -08:00
|
|
|
call WaitBGMap2
|
2023-10-23 09:40:08 -07:00
|
|
|
call DisableOverworldHUD
|
|
|
|
xor a
|
|
|
|
ld [wDisplaySecondarySprites], a
|
|
|
|
farcall ClearSpriteAnims
|
|
|
|
call ClearSprites
|
|
|
|
call LoadStandardFont
|
|
|
|
call LoadFrame
|
2015-11-20 08:47:52 -08:00
|
|
|
call RotateThreePalettesLeft
|
2023-10-23 09:40:08 -07:00
|
|
|
ld a, FALSE
|
|
|
|
ld [wText2bpp], a
|
|
|
|
jp SpeechTextbox1bpp
|
2015-11-11 13:11:08 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
BattleBGMap:
|
2023-07-26 08:01:20 -07:00
|
|
|
ld b, CGB_BATTLE_GRAYSCALE
|
|
|
|
call GetCGBLayout
|
2024-02-10 15:16:00 -08:00
|
|
|
call SetDefaultBGPAndOBP
|
2015-11-11 13:11:08 -08:00
|
|
|
ret
|
|
|
|
|
2023-09-02 14:16:35 -07:00
|
|
|
HalveCoins:
|
|
|
|
; Halve the player's coins.
|
|
|
|
ld hl, wCoins
|
2015-11-11 13:11:08 -08:00
|
|
|
ld a, [hl]
|
|
|
|
srl a
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
rra
|
|
|
|
ld [hli], a
|
|
|
|
ld a, [hl]
|
|
|
|
rra
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GetWhiteoutSpawn:
|
2015-11-11 13:11:08 -08:00
|
|
|
ld a, [wLastSpawnMapGroup]
|
|
|
|
ld d, a
|
|
|
|
ld a, [wLastSpawnMapNumber]
|
|
|
|
ld e, a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall IsSpawnPoint
|
2015-11-11 13:11:08 -08:00
|
|
|
ld a, c
|
|
|
|
jr c, .yes
|
2023-07-25 06:33:08 -07:00
|
|
|
xor a ; SPAWN_LEVEL_1
|
2015-11-11 13:11:08 -08:00
|
|
|
|
|
|
|
.yes
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wDefaultSpawnpoint], a
|
2015-11-11 13:11:08 -08:00
|
|
|
ret
|