update kiss & fix some things
This commit is contained in:
@@ -50,6 +50,17 @@
|
|||||||
`(let [,name .set (dictGet scenes ,sceneKey)]
|
`(let [,name .set (dictGet scenes ,sceneKey)]
|
||||||
,@body))
|
,@body))
|
||||||
|
|
||||||
|
// Do something with the current scene's camera
|
||||||
|
(defMacro withSceneCamera [name &body body]
|
||||||
|
`(let [,name .camera (_currentScene)]
|
||||||
|
,@body
|
||||||
|
(cc)))
|
||||||
|
|
||||||
|
// like withSceneCamera, but you promise to call CC yourself in the body:
|
||||||
|
(defMacro withSceneCameraCC [name &body body]
|
||||||
|
`(let [,name .camera (_currentScene)]
|
||||||
|
,@body))
|
||||||
|
|
||||||
// When this file is loaded, all expressions in (preload <...>) will be collected. When (end) is called, they will
|
// When this file is loaded, all expressions in (preload <...>) will be collected. When (end) is called, they will
|
||||||
// be injected into a method called (doPreload).
|
// be injected into a method called (doPreload).
|
||||||
// This allows assets to be declared in Hollywoo files where they first appear, but still loaded before execution starts.
|
// This allows assets to be declared in Hollywoo files where they first appear, but still loaded before execution starts.
|
||||||
|
@@ -1967,7 +1967,7 @@ class Movie<Set, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsona
|
|||||||
};
|
};
|
||||||
} else null;
|
} else null;
|
||||||
}
|
}
|
||||||
public function miscInt(key:String, ?defaultVal:Int, ?onChange:(Int)->Void):Int return {
|
@:keep public function miscInt(key:String, ?defaultVal:Int, ?onChange:(Int)->Void):Int return {
|
||||||
if (Prelude.truthy(onChange)) {
|
if (Prelude.truthy(onChange)) {
|
||||||
miscIntChangeEvents[key] = onChange;
|
miscIntChangeEvents[key] = onChange;
|
||||||
} else null;
|
} else null;
|
||||||
@@ -1978,7 +1978,7 @@ class Movie<Set, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsona
|
|||||||
defaultVal;
|
defaultVal;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public function miscFloat(key:String, ?defaultVal:Float, ?onChange:(Float)->Void):Float return {
|
@:keep public function miscFloat(key:String, ?defaultVal:Float, ?onChange:(Float)->Void):Float return {
|
||||||
if (Prelude.truthy(onChange)) {
|
if (Prelude.truthy(onChange)) {
|
||||||
miscFloatChangeEvents[key] = onChange;
|
miscFloatChangeEvents[key] = onChange;
|
||||||
} else null;
|
} else null;
|
||||||
|
@@ -497,7 +497,8 @@
|
|||||||
(unless (positionsInThisScene.contains positionKey)
|
(unless (positionsInThisScene.contains positionKey)
|
||||||
(positionsInThisScene.push positionKey)))
|
(positionsInThisScene.push positionKey)))
|
||||||
// Store a record in the scene of which actors/props are using which position keys:
|
// Store a record in the scene of which actors/props are using which position keys:
|
||||||
(dictSet .actorAndPropPositionKeys (_currentScene) holder positionKey)
|
(when holder
|
||||||
|
(dictSet .actorAndPropPositionKeys (_currentScene) holder positionKey))
|
||||||
|
|
||||||
(let [pos (stagePositions.get positionKey)]
|
(let [pos (stagePositions.get positionKey)]
|
||||||
(ifLet [relativeKey .value (positionRelativity.get positionKey)
|
(ifLet [relativeKey .value (positionRelativity.get positionKey)
|
||||||
@@ -969,6 +970,7 @@
|
|||||||
(when cc
|
(when cc
|
||||||
(TimerWithPause.delay cc (* strobeSec 2 (+ 1 times))))))
|
(TimerWithPause.delay cc (* strobeSec 2 (+ 1 times))))))
|
||||||
|
|
||||||
|
@:keep
|
||||||
(method :Void handleCaption [:Bool skipping :String name]
|
(method :Void handleCaption [:Bool skipping :String name]
|
||||||
(when showCaptions
|
(when showCaptions
|
||||||
(whenLet [desc (dictGet soundDescriptions name)
|
(whenLet [desc (dictGet soundDescriptions name)
|
||||||
@@ -979,6 +981,7 @@
|
|||||||
(makeCC null
|
(makeCC null
|
||||||
(director.hideCaption id))) true)))
|
(director.hideCaption id))) true)))
|
||||||
|
|
||||||
|
@:keep
|
||||||
(method :Int miscInt [:String key &opt :Int defaultVal :Int->Void onChange]
|
(method :Int miscInt [:String key &opt :Int defaultVal :Int->Void onChange]
|
||||||
(when onChange
|
(when onChange
|
||||||
(dictSet miscIntChangeEvents key onChange))
|
(dictSet miscIntChangeEvents key onChange))
|
||||||
@@ -989,7 +992,8 @@
|
|||||||
(miscInts.put key (new JsonInt defaultVal)))
|
(miscInts.put key (new JsonInt defaultVal)))
|
||||||
defaultVal
|
defaultVal
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
@:keep
|
||||||
(method :Float miscFloat [:String key &opt :Float defaultVal :Float->Void onChange]
|
(method :Float miscFloat [:String key &opt :Float defaultVal :Float->Void onChange]
|
||||||
(when onChange
|
(when onChange
|
||||||
(dictSet miscFloatChangeEvents key onChange))
|
(dictSet miscFloatChangeEvents key onChange))
|
||||||
@@ -1569,7 +1573,6 @@
|
|||||||
(director.hideTitleCard)
|
(director.hideTitleCard)
|
||||||
(cc))
|
(cc))
|
||||||
|
|
||||||
// TODO interp reader macro (hard to do for this one)
|
|
||||||
(hollywooMacro timedTitleCardV2 [time lines &opt label]
|
(hollywooMacro timedTitleCardV2 [time lines &opt label]
|
||||||
`(commands
|
`(commands
|
||||||
SHOWTITLECARD ,lines
|
SHOWTITLECARD ,lines
|
||||||
|
Reference in New Issue
Block a user