Turn head down after landing on space (#21)

This commit is contained in:
xCrystal 2023-10-30 19:27:19 +01:00
parent a8b5145236
commit dadbc72764

View File

@ -3,59 +3,61 @@ BoardSpaceScripts:: ; used only for BANK(BoardSpaceScripts)
BlueSpaceScript:: BlueSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 400 scall LandedInRegularSpaceScript_BeforeSpaceEffect
scall LandedInRegularSpaceScript scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
RedSpaceScript:: RedSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 400 scall LandedInRegularSpaceScript_BeforeSpaceEffect
scall LandedInRegularSpaceScript scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
GreenSpaceScript:: GreenSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 400 scall LandedInRegularSpaceScript_BeforeSpaceEffect
scall LandedInRegularSpaceScript scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
ItemSpaceScript:: ItemSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 400 scall LandedInRegularSpaceScript_BeforeSpaceEffect
scall LandedInRegularSpaceScript scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
PokemonSpaceScript:: PokemonSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 600 scall LandedInRegularSpaceScript_BeforeSpaceEffect
wait 200
loadpikachudata loadpikachudata
startbattle startbattle
reloadmapafterbattle reloadmapafterbattle
wait 100 wait 100
scall LandedInRegularSpaceScript scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
MinigameSpaceScript:: MinigameSpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
wait 600 scall LandedInRegularSpaceScript_BeforeSpaceEffect
scall LandedInRegularSpaceScript wait 200
scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
EndSpaceScript:: EndSpaceScript::
; fading out will kick before reaching HandleMapBackground, so update sprites after any change ; fading out will kick before reaching HandleMapBackground, so update sprites after any change
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
wait 400 scall LandedInRegularSpaceScript_BeforeSpaceEffect
playmusic MUSIC_TRAINER_VICTORY playmusic MUSIC_TRAINER_VICTORY
wait 600 wait 600
callasm .FadeOutSlow ; 800 ms callasm .FadeOutSlow ; 800 ms
@ -75,16 +77,19 @@ EndSpaceScript::
GreySpaceScript:: GreySpaceScript::
scall ArriveToRegularSpaceScript scall ArriveToRegularSpaceScript
iftrue .not_landed iftrue .not_landed
scall LandedInRegularSpaceScript wait 300
turnobject PLAYER, DOWN
wait 100
scall LandedInRegularSpaceScript_AfterSpaceEffect
.not_landed .not_landed
end end
ArriveToRegularSpaceScript: ArriveToRegularSpaceScript:
playsound SFX_PRESENT playsound SFX_PRESENT
callasm ArriveToRegularSpace callasm .ArriveToRegularSpace
end end
ArriveToRegularSpace: .ArriveToRegularSpace:
; load new space ; load new space
ld a, [wCurSpaceNextSpace] ld a, [wCurSpaceNextSpace]
ld [wCurSpace], a ld [wCurSpace], a
@ -103,11 +108,17 @@ ArriveToRegularSpace:
; update sprites ; update sprites
jp UpdateActiveSprites jp UpdateActiveSprites
LandedInRegularSpaceScript: LandedInRegularSpaceScript_BeforeSpaceEffect:
callasm LandedInRegularSpace wait 300
turnobject PLAYER, DOWN
wait 100
end end
LandedInRegularSpace: LandedInRegularSpaceScript_AfterSpaceEffect:
callasm .LandedInRegularSpace
end
.LandedInRegularSpace:
; disable the space effect (turn the space into a grey space) ; disable the space effect (turn the space into a grey space)
ld a, [wCurSpaceXCoord] ld a, [wCurSpaceXCoord]
add 4 add 4