pokecrystal-board/engine/events/whiteout.asm
mid-kid 81fff9bb80 Fix file permissions
I have no idea why this was a thing (do people store this repo on FAT32
flash drives or something?), but quite a bit of files had a permission
of 755. This isn't really a problem, but it's inconsistent and weird.
2018-04-01 17:05:10 +02:00

83 lines
1.3 KiB
NASM

Script_BattleWhiteout:: ; 0x124c1
callasm BattleBGMap
jump Script_Whiteout
; 0x124c8
Script_OverworldWhiteout:: ; 0x124c8
refreshscreen
callasm OverworldBGMap
Script_Whiteout: ; 0x124ce
writetext .WhitedOutText
waitbutton
special FadeOutPalettes
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
iftrue .bug_contest
callasm HalveMoney
callasm GetWhiteoutSpawn
farscall Script_AbortBugContest
special WarpToSpawnPoint
newloadmap MAPSETUP_WARP
endall
.bug_contest
jumpstd bugcontestresultswarp
; 0x124f5
.WhitedOutText: ; 0x124f5
; is out of useable #MON! whited out!
text_jump UnknownText_0x1c0a4e
db "@"
; 0x124fa
OverworldBGMap: ; 124fa
call ClearPalettes
call ClearScreen
call WaitBGMap2
call HideSprites
call RotateThreePalettesLeft
ret
; 1250a
BattleBGMap: ; 1250a
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
call SetPalettes
ret
; 12513
HalveMoney: ; 12513
farcall StubbedTrainerRankings_WhiteOuts
; Halve the player's money.
ld hl, wMoney
ld a, [hl]
srl a
ld [hli], a
ld a, [hl]
rra
ld [hli], a
ld a, [hl]
rra
ld [hl], a
ret
; 12527
GetWhiteoutSpawn: ; 12527
ld a, [wLastSpawnMapGroup]
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
farcall IsSpawnPoint
ld a, c
jr c, .yes
xor a ; SPAWN_HOME
.yes
ld [wDefaultSpawnpoint], a
ret
; 1253d