From 60e95716333b077964589596081acc87ed8d9983 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 12 Jul 2024 14:08:40 -0600 Subject: [PATCH] update kiss-tools --- haxe_libraries/kiss-tools.hxml | 4 ++-- src/hollywoo/HFloat.hx | 7 ------- src/hollywoo/HFloat.kiss | 4 ---- src/hollywoo/HInt.hx | 7 ------- src/hollywoo/HInt.kiss | 4 ---- src/hollywoo/HollywooDSL.kiss | 2 +- src/hollywoo/Movie.hx | 6 ++++-- src/hollywoo/Movie.kiss | 34 +++++++++++++++++----------------- 8 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 src/hollywoo/HFloat.hx delete mode 100644 src/hollywoo/HFloat.kiss delete mode 100644 src/hollywoo/HInt.hx delete mode 100644 src/hollywoo/HInt.kiss diff --git a/haxe_libraries/kiss-tools.hxml b/haxe_libraries/kiss-tools.hxml index 25a5521..e66daa5 100644 --- a/haxe_libraries/kiss-tools.hxml +++ b/haxe_libraries/kiss-tools.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/kiss-lang/kiss-tools#66767a64a2de69155e641abcd2fbef925ff1af93" into kiss-tools/0.0.0/github/66767a64a2de69155e641abcd2fbef925ff1af93 +# @install: lix --silent download "gh://github.com/kiss-lang/kiss-tools#3462a9e61256e34535030da587910400a182eef4" into kiss-tools/0.0.0/github/3462a9e61256e34535030da587910400a182eef4 -lib kiss --cp ${HAXE_LIBCACHE}/kiss-tools/0.0.0/github/66767a64a2de69155e641abcd2fbef925ff1af93/src/ +-cp ${HAXE_LIBCACHE}/kiss-tools/0.0.0/github/3462a9e61256e34535030da587910400a182eef4/src/ -D kiss-tools=0.0.0 \ No newline at end of file diff --git a/src/hollywoo/HFloat.hx b/src/hollywoo/HFloat.hx deleted file mode 100644 index 4650bae..0000000 --- a/src/hollywoo/HFloat.hx +++ /dev/null @@ -1,7 +0,0 @@ -package hollywoo; - -import kiss.Prelude; -import kiss.List; - -@:build(kiss.Kiss.build()) -class HFloat {} diff --git a/src/hollywoo/HFloat.kiss b/src/hollywoo/HFloat.kiss deleted file mode 100644 index cc7717e..0000000 --- a/src/hollywoo/HFloat.kiss +++ /dev/null @@ -1,4 +0,0 @@ -(defNew [&prop :Float value]) - -(method stringify [] "$value") -(method parse [:String data] (new HFloat (Std.parseFloat data))) \ No newline at end of file diff --git a/src/hollywoo/HInt.hx b/src/hollywoo/HInt.hx deleted file mode 100644 index a4e16a8..0000000 --- a/src/hollywoo/HInt.hx +++ /dev/null @@ -1,7 +0,0 @@ -package hollywoo; - -import kiss.Prelude; -import kiss.List; - -@:build(kiss.Kiss.build()) -class HInt {} diff --git a/src/hollywoo/HInt.kiss b/src/hollywoo/HInt.kiss deleted file mode 100644 index abdf2a9..0000000 --- a/src/hollywoo/HInt.kiss +++ /dev/null @@ -1,4 +0,0 @@ -(defNew [&prop :Int value]) - -(method stringify [] "$value") -(method parse [:String data] (new HInt (Std.parseInt data))) \ No newline at end of file diff --git a/src/hollywoo/HollywooDSL.kiss b/src/hollywoo/HollywooDSL.kiss index 3291eb1..4f30128 100644 --- a/src/hollywoo/HollywooDSL.kiss +++ b/src/hollywoo/HollywooDSL.kiss @@ -1,6 +1,6 @@ (importWithDefAlias) (import hollywoo.StagePosition) -(import hollywoo.HFloat) +(import kiss_tools.JsonFloat) (import hollywoo.Director.Appearance) (import hollywoo.Director.StageFacing) (import hollywoo.Director.Continuation) diff --git a/src/hollywoo/Movie.hx b/src/hollywoo/Movie.hx index 0c47a52..9569674 100644 --- a/src/hollywoo/Movie.hx +++ b/src/hollywoo/Movie.hx @@ -14,8 +14,10 @@ import haxe.io.Path; import uuid.Uuid; import haxe.ds.Option; import kiss_tools.JsonMap; -import kiss_tools.JsonableArray; -import kiss_tools.JsonableString; +import kiss_tools.JsonArray; +import kiss_tools.JsonString; +import kiss_tools.JsonInt; +import kiss_tools.JsonFloat; import kiss_tools.TimerWithPause; using kiss.FuzzyMapTools; diff --git a/src/hollywoo/Movie.kiss b/src/hollywoo/Movie.kiss index e2dd900..5fcf81b 100644 --- a/src/hollywoo/Movie.kiss +++ b/src/hollywoo/Movie.kiss @@ -186,7 +186,7 @@ (if voiceLineKey { (#when debug - (voiceLineMatches.put text (new JsonableString voiceLineKey))) + (voiceLineMatches.put text (new JsonString voiceLineKey))) (dictGet (dictGet voiceLines actorName) voiceLineKey) } null)) @@ -630,20 +630,20 @@ [ :JsonMap stagePositions (new JsonMap stagePositionsJson (new StagePosition 0 0 0)) - :JsonMap> lightSources - (new JsonMap lightSourceJsonFile (new JsonableArray [] defaultLightSource)) - :JsonMap delayLengths - (new JsonMap delayLengthsJson (new HFloat 0.5)) + :JsonMap> lightSources + (new JsonMap lightSourceJsonFile (new JsonArray [] defaultLightSource)) + :JsonMap delayLengths + (new JsonMap delayLengthsJson (new JsonFloat 0.5)) :JsonStringMap voiceLineMatches - (new JsonMap voiceLineMatchesJson (new JsonableString "")) - :JsonMap miscFloats - (new JsonMap miscFloatJson (new HFloat 0)) + (new JsonMap voiceLineMatchesJson (new JsonString "")) + :JsonMap miscFloats + (new JsonMap miscFloatJson (new JsonFloat 0)) :MapVoid> miscFloatChangeEvents (new Map) - :JsonMap miscInts - (new JsonMap miscIntJson (new HInt 0)) + :JsonMap miscInts + (new JsonMap miscIntJson (new JsonInt 0)) :MapVoid> miscIntChangeEvents (new Map) :JsonStringMap positionRelativity - (new JsonMap positionRelativityJson (new JsonableString "")) + (new JsonMap positionRelativityJson (new JsonString "")) :Map sceneMusic (new Map) :Map sceneMusicVolume (new Map) &mut :String playingSceneMusic null @@ -695,7 +695,7 @@ (let [length (Std.parseFloat lengthStr)] (if (Math.isNaN length) (print "Failed to parse ${lengthStr}. leaving value the same") - (delayLengths.put lastDelay (new HFloat length))) + (delayLengths.put lastDelay (new JsonFloat length))) (cc))) { (print "no delay to redefine") @@ -720,7 +720,7 @@ (if (= v null) (print "Failed to parse ${valStr}. leaving value the same") { - (miscInts.put key (new HInt v)) + (miscInts.put key (new JsonInt v)) (ifLet [onChange (dictGet miscIntChangeEvents key)] (onChange v)) }) @@ -743,7 +743,7 @@ (if (Math.isNaN v) (print "Failed to parse ${valStr}. leaving value the same") { - (miscFloats.put key (new HFloat v)) + (miscFloats.put key (new JsonFloat v)) (ifLet [onChange (dictGet miscFloatChangeEvents key)] (onChange v)) }) @@ -818,7 +818,7 @@ (unlessCancel relativeKey (let [pos (resolvePosition positionKey null) anchorPos (resolvePosition relativeKey null)] - (positionRelativity.put positionKey (new JsonableString relativeKey)) + (positionRelativity.put positionKey (new JsonString relativeKey)) (stagePositions.put positionKey (new StagePosition (- pos.x anchorPos.x) (- pos.y anchorPos.y) (- pos.z anchorPos.z))))))) ] @@ -969,7 +969,7 @@ .value (miscInts.get key) { (when defaultVal - (miscInts.put key (new HInt defaultVal))) + (miscInts.put key (new JsonInt defaultVal))) defaultVal })) @@ -980,7 +980,7 @@ .value (miscFloats.get key) { (when defaultVal - (miscFloats.put key (new HFloat defaultVal))) + (miscFloats.put key (new JsonFloat defaultVal))) defaultVal }))