diff options
Diffstat (limited to 'res/scripts/common.lua')
-rw-r--r-- | res/scripts/common.lua | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 75b86a8..2197417 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -41,6 +41,7 @@ function StartCutscene() | |||
41 | local playerSprite = getSprite(playerId) | 41 | local playerSprite = getSprite(playerId) |
42 | playerSprite.controllable = false | 42 | playerSprite.controllable = false |
43 | character():halt(playerId) | 43 | character():halt(playerId) |
44 | message():displayCutsceneBars() | ||
44 | end | 45 | end |
45 | 46 | ||
46 | function DisplayMessage(msg, name, type) | 47 | function DisplayMessage(msg, name, type) |
@@ -107,21 +108,27 @@ function StopSound(soundId) | |||
107 | end | 108 | end |
108 | 109 | ||
109 | function FadeToBlack(length) | 110 | function FadeToBlack(length) |
110 | local progress = 0.0 | 111 | effect():fadeScreen(length, 1.0) |
111 | while progress < length do | 112 | repeat |
112 | progress = progress + coroutine.yield() | 113 | coroutine.yield() |
113 | setFadeoutProgress(progress / length) | 114 | until effect():isScreenFadeComplete() |
114 | end | ||
115 | setFadeoutProgress(1.0) | ||
116 | end | 115 | end |
117 | 116 | ||
118 | function RemoveFadeout(length) | 117 | function RemoveFadeout(length) |
119 | local progress = length | 118 | effect():fadeScreen(length, 0.0) |
120 | while progress > 0 do | 119 | repeat |
121 | progress = progress - coroutine.yield() | 120 | coroutine.yield() |
122 | setFadeoutProgress(progress / length) | 121 | until effect():isScreenFadeComplete() |
122 | end | ||
123 | |||
124 | function FadeMap(length, amount) | ||
125 | effect():fadeMap(length, amount) | ||
126 | end | ||
127 | |||
128 | function WaitForMapFade() | ||
129 | while not effect():isMapFadeComplete() do | ||
130 | coroutine.yield() | ||
123 | end | 131 | end |
124 | setFadeoutProgress(0.0) | ||
125 | end | 132 | end |
126 | 133 | ||
127 | function SetPartyDirection(spriteId, direction) | 134 | function SetPartyDirection(spriteId, direction) |