Hollywoo loading screen/allow threaded loading
This commit is contained in:
@@ -56,5 +56,6 @@ interface Director<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop,
|
||||
|
||||
function rollCredits(credits:Array<CreditsLine>, cc:Continuation):Void;
|
||||
|
||||
function doLoading(_load:Void->Void, cc:Continuation):Void;
|
||||
function cleanup():Void;
|
||||
}
|
||||
|
@@ -38,10 +38,15 @@
|
||||
(defMacro end []
|
||||
`{
|
||||
(method doPreload [:Void->Void cc]
|
||||
(set isLoading true)
|
||||
(collectedBlocks preload)
|
||||
(set isLoading false)
|
||||
(cc))
|
||||
(director.showTitleCard ["LOADING"]
|
||||
(makeCC
|
||||
(set isLoading true)
|
||||
(director.doLoading ->:Void {
|
||||
(collectedBlocks preload)
|
||||
(set isLoading false)
|
||||
} (makeCC
|
||||
(director.hideTitleCard)
|
||||
(cc))))))
|
||||
(method doCleanup []
|
||||
(director.cleanup)
|
||||
(set lastInstructionPointer -2)
|
||||
|
@@ -374,8 +374,11 @@
|
||||
|
||||
(hollywooMethod timedTitleCard true [time :Array<String> lines :Continuation cc]
|
||||
(let [cc ->{(director.hideTitleCard)(cc)}]
|
||||
(director.showTitleCard lines cc)
|
||||
(delay time cc)))
|
||||
(director.showTitleCard lines
|
||||
(makeCC
|
||||
// Allow skipping
|
||||
(director.startWaitForInput cc)
|
||||
(delay time cc)))))
|
||||
|
||||
// TODO themed titleCard (wait for song or sound)
|
||||
|
||||
|
Reference in New Issue
Block a user