update kiss & fix some things
This commit is contained in:
@@ -50,6 +50,17 @@
|
||||
`(let [,name .set (dictGet scenes ,sceneKey)]
|
||||
,@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
|
||||
// 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.
|
||||
|
@@ -1967,7 +1967,7 @@ class Movie<Set, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsona
|
||||
};
|
||||
} 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)) {
|
||||
miscIntChangeEvents[key] = onChange;
|
||||
} else null;
|
||||
@@ -1978,7 +1978,7 @@ class Movie<Set, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsona
|
||||
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)) {
|
||||
miscFloatChangeEvents[key] = onChange;
|
||||
} else null;
|
||||
|
@@ -497,7 +497,8 @@
|
||||
(unless (positionsInThisScene.contains positionKey)
|
||||
(positionsInThisScene.push positionKey)))
|
||||
// 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)]
|
||||
(ifLet [relativeKey .value (positionRelativity.get positionKey)
|
||||
@@ -969,6 +970,7 @@
|
||||
(when cc
|
||||
(TimerWithPause.delay cc (* strobeSec 2 (+ 1 times))))))
|
||||
|
||||
@:keep
|
||||
(method :Void handleCaption [:Bool skipping :String name]
|
||||
(when showCaptions
|
||||
(whenLet [desc (dictGet soundDescriptions name)
|
||||
@@ -979,6 +981,7 @@
|
||||
(makeCC null
|
||||
(director.hideCaption id))) true)))
|
||||
|
||||
@:keep
|
||||
(method :Int miscInt [:String key &opt :Int defaultVal :Int->Void onChange]
|
||||
(when onChange
|
||||
(dictSet miscIntChangeEvents key onChange))
|
||||
@@ -990,6 +993,7 @@
|
||||
defaultVal
|
||||
}))
|
||||
|
||||
@:keep
|
||||
(method :Float miscFloat [:String key &opt :Float defaultVal :Float->Void onChange]
|
||||
(when onChange
|
||||
(dictSet miscFloatChangeEvents key onChange))
|
||||
@@ -1569,7 +1573,6 @@
|
||||
(director.hideTitleCard)
|
||||
(cc))
|
||||
|
||||
// TODO interp reader macro (hard to do for this one)
|
||||
(hollywooMacro timedTitleCardV2 [time lines &opt label]
|
||||
`(commands
|
||||
SHOWTITLECARD ,lines
|
||||
|
Reference in New Issue
Block a user