update deps and add some macros
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/hollywoo#5343d8128f8e6b44417274cedcf6ab2f6756be42" into hollywoo/0.0.0/git/5343d8128f8e6b44417274cedcf6ab2f6756be42
|
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/hollywoo#b0726f1495d156f778190b491e1a2906a6d709f5" into hollywoo/0.0.0/git/b0726f1495d156f778190b491e1a2906a6d709f5
|
||||||
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/git/5343d8128f8e6b44417274cedcf6ab2f6756be42"
|
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/git/b0726f1495d156f778190b491e1a2906a6d709f5"
|
||||||
-lib kiss
|
-lib kiss
|
||||||
-lib kiss-tools
|
-lib kiss-tools
|
||||||
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/git/5343d8128f8e6b44417274cedcf6ab2f6756be42/src/
|
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/git/b0726f1495d156f778190b491e1a2906a6d709f5/src/
|
||||||
-D hollywoo=0.0.0
|
-D hollywoo=0.0.0
|
@@ -1,4 +1,4 @@
|
|||||||
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss-flixel#81dd066ebe275c5a6aab49d0aef8ac63068322a7" into kiss-flixel/0.0.0/git/81dd066ebe275c5a6aab49d0aef8ac63068322a7
|
# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss-flixel#101fe2613d72b92d4a31ad301a11c9403329a769" into kiss-flixel/0.0.0/git/101fe2613d72b92d4a31ad301a11c9403329a769
|
||||||
-lib flixel
|
-lib flixel
|
||||||
-lib flixel-addons
|
-lib flixel-addons
|
||||||
-lib flixel-ui
|
-lib flixel-ui
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
-lib kiss-tools
|
-lib kiss-tools
|
||||||
-lib lime
|
-lib lime
|
||||||
-lib openfl
|
-lib openfl
|
||||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/git/81dd066ebe275c5a6aab49d0aef8ac63068322a7/src/
|
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/git/101fe2613d72b92d4a31ad301a11c9403329a769/src/
|
||||||
-D kiss-flixel=0.0.0
|
-D kiss-flixel=0.0.0
|
||||||
--macro kiss_flixel.ShaderFrontend.use()
|
--macro kiss_flixel.ShaderFrontend.use()
|
@@ -171,6 +171,14 @@
|
|||||||
(when (FlxG.cameras.list.contains camera) (FlxG.cameras.remove camera ?destroy))
|
(when (FlxG.cameras.list.contains camera) (FlxG.cameras.remove camera ?destroy))
|
||||||
(when cc (cc)))
|
(when cc (cc)))
|
||||||
|
|
||||||
|
(hollywooMethod setCameraZoom [:Float zoom cc]
|
||||||
|
(withSceneCamera c (set c.zoom zoom)))
|
||||||
|
|
||||||
|
(hollywooMethod setCameraScroll [:String positionKey cc]
|
||||||
|
(let [p (resolvePosition positionKey "")]
|
||||||
|
(withSceneCamera c
|
||||||
|
(c.scroll.set p.x p.y))))
|
||||||
|
|
||||||
@:keep
|
@:keep
|
||||||
(method linearMotion [:Bool skipping :FlxSprite sprite :Float destX :Float destY :Float speed &opt :Void->Void cc :String soundLoop :Float volumeMod :Array<FlxSprite> connectedSprites]
|
(method linearMotion [:Bool skipping :FlxSprite sprite :Float destX :Float destY :Float speed &opt :Void->Void cc :String soundLoop :Float volumeMod :Array<FlxSprite> connectedSprites]
|
||||||
(unless (tweenedPositionsOfSpritesInScenes.exists sceneKey)
|
(unless (tweenedPositionsOfSpritesInScenes.exists sceneKey)
|
||||||
@@ -740,6 +748,7 @@
|
|||||||
(bar.destroy)
|
(bar.destroy)
|
||||||
(set bar null)))
|
(set bar null)))
|
||||||
|
|
||||||
|
// TODO make this a hollywoomethod and interp reader macro
|
||||||
(method overlayPropOnCurrentSet [propKey :Void->Void cc &opt z]
|
(method overlayPropOnCurrentSet [propKey :Void->Void cc &opt z]
|
||||||
(let [propKey (kiss.FuzzyMapTools.bestMatch props propKey)]
|
(let [propKey (kiss.FuzzyMapTools.bestMatch props propKey)]
|
||||||
(dictSet shownProps propKey true) // Don't scale when showing
|
(dictSet shownProps propKey true) // Don't scale when showing
|
||||||
@@ -763,6 +772,7 @@
|
|||||||
(prop &mut :FlxCamera inCamera)
|
(prop &mut :FlxCamera inCamera)
|
||||||
(prop &mut :FlxSprite outCameraPos)
|
(prop &mut :FlxSprite outCameraPos)
|
||||||
(prop &mut :FlxCamera outCamera)
|
(prop &mut :FlxCamera outCamera)
|
||||||
|
// TODO make this a hollywoomethod and interp reader macro
|
||||||
(method :Void tweenScene [:Bool skipping :String name :Float speed :Continuation cc &opt :Bool fromLeft :String soundLoop :Float volumeMod]
|
(method :Void tweenScene [:Bool skipping :String name :Float speed :Continuation cc &opt :Bool fromLeft :String soundLoop :Float volumeMod]
|
||||||
(when skipping
|
(when skipping
|
||||||
(setScene skipping name cc)
|
(setScene skipping name cc)
|
||||||
@@ -962,16 +972,23 @@
|
|||||||
(dictSet interp.globals "Read" hollywoo.Movie.PlayMode.Read)
|
(dictSet interp.globals "Read" hollywoo.Movie.PlayMode.Read)
|
||||||
(dictSet interp.globals "Watch" hollywoo.Movie.PlayMode.Watch)
|
(dictSet interp.globals "Watch" hollywoo.Movie.PlayMode.Watch)
|
||||||
|
|
||||||
|
(localFunction :Void handleNext [exp]
|
||||||
|
(case exp.def
|
||||||
|
((CallExp (object def (Symbol "commands")) commands)
|
||||||
|
(doFor c commands (handleNext c)))
|
||||||
|
((CallExp (object def (Symbol "label")) [(object def (Symbol "null"))])
|
||||||
|
0)
|
||||||
|
((CallExp (object def (Symbol "label")) [(object def (StrExp label))])
|
||||||
|
(dictSet labels label idx))
|
||||||
|
(otherwise
|
||||||
|
// TODO add more automatic labels
|
||||||
|
(instructions.insert idx++ ->[self skipping cc] {
|
||||||
|
(dictSet interp.globals "skipping" skipping)
|
||||||
|
(dictSet interp.globals "cc" cc)
|
||||||
|
(print (kiss.Reader.toString exp.def))
|
||||||
|
(interp.evalCC exp ->_ {})
|
||||||
|
}))))
|
||||||
(until (stream.isEmpty)
|
(until (stream.isEmpty)
|
||||||
(let [exp (interp.read stream)]
|
(let [exp (interp.read stream)]
|
||||||
(case exp.def
|
~(kiss.Reader.toString exp.def)
|
||||||
((CallExp (object def (Symbol "label")) [(object def (StrExp label))])
|
(handleNext exp)))))
|
||||||
(dictSet labels label idx))
|
|
||||||
(otherwise
|
|
||||||
// TODO add more automatic labels
|
|
||||||
(instructions.insert idx++ ->[self skipping cc] {
|
|
||||||
(dictSet interp.globals "skipping" skipping)
|
|
||||||
(dictSet interp.globals "cc" cc)
|
|
||||||
(print (kiss.Reader.toString exp.def))
|
|
||||||
(interp.evalCC exp ->_ {})
|
|
||||||
})))))))
|
|
@@ -122,12 +122,21 @@ class HollywooInterp {
|
|||||||
|
|
||||||
readTable["ROLLCREDITS "] = quickReaderMacro("(movie.rollCredits skipping $$1 cc $$2)");
|
readTable["ROLLCREDITS "] = quickReaderMacro("(movie.rollCredits skipping $$1 cc $$2)");
|
||||||
|
|
||||||
|
readTable["TIMEDTITLECARDV2 "] =
|
||||||
|
quickReaderMacro("(commands
|
||||||
|
(movie.showTitleCard $$2 cc)
|
||||||
|
(label $$3) // This will be null, and be fine, if it's not provided
|
||||||
|
(movie.delay skipping $$1 cc)
|
||||||
|
(movie.hideTitleCard cc)
|
||||||
|
)");
|
||||||
|
|
||||||
// HollywooFlixel-specific:
|
// HollywooFlixel-specific:
|
||||||
readTable["ADDTEMPCAMERA "] = quickReaderMacro("(movie.addTempCamera skipping $$1 $$2 $$3 cc)");
|
readTable["ADDTEMPCAMERA "] = quickReaderMacro("(movie.addTempCamera skipping $$1 $$2 $$3 cc)");
|
||||||
readTable["REMOVETEMPCAMERA "] = quickReaderMacro("(movie.removeTempCamera $$1 $$2 cc)");
|
readTable["REMOVETEMPCAMERA "] = quickReaderMacro("(movie.removeTempCamera $$1 $$2 cc)");
|
||||||
|
|
||||||
readTable["ACTORPLAYANIMATION"] = quickReaderMacro("(movie.actorPlayAnimation $$1 $$2 cc)");
|
readTable["ACTORPLAYANIMATION "] = quickReaderMacro("(movie.actorPlayAnimation $$1 $$2 cc)");
|
||||||
|
|
||||||
|
readTable["SETCAMERAZOOM "] = quickReaderMacro("(movie.setCameraZoom $$1 cc)");
|
||||||
|
readTable["SETCAMERASCROLL "] = quickReaderMacro("(movie.setCameraScroll $$1 cc)");
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user