update kiss-tools

This commit is contained in:
2024-07-12 14:08:40 -06:00
parent 8317eec14c
commit 60e9571633
8 changed files with 24 additions and 44 deletions

View File

@@ -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

View File

@@ -1,7 +0,0 @@
package hollywoo;
import kiss.Prelude;
import kiss.List;
@:build(kiss.Kiss.build())
class HFloat {}

View File

@@ -1,4 +0,0 @@
(defNew [&prop :Float value])
(method stringify [] "$value")
(method parse [:String data] (new HFloat (Std.parseFloat data)))

View File

@@ -1,7 +0,0 @@
package hollywoo;
import kiss.Prelude;
import kiss.List;
@:build(kiss.Kiss.build())
class HInt {}

View File

@@ -1,4 +0,0 @@
(defNew [&prop :Int value])
(method stringify [] "$value")
(method parse [:String data] (new HInt (Std.parseInt data)))

View File

@@ -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)

View File

@@ -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;

View File

@@ -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<StagePosition> stagePositions
(new JsonMap stagePositionsJson (new StagePosition 0 0 0))
:JsonMap<JsonableArray<LightSource>> lightSources
(new JsonMap lightSourceJsonFile (new JsonableArray [] defaultLightSource))
:JsonMap<HFloat> delayLengths
(new JsonMap delayLengthsJson (new HFloat 0.5))
:JsonMap<JsonArray<LightSource>> lightSources
(new JsonMap lightSourceJsonFile (new JsonArray [] defaultLightSource))
:JsonMap<JsonFloat> delayLengths
(new JsonMap delayLengthsJson (new JsonFloat 0.5))
:JsonStringMap voiceLineMatches
(new JsonMap voiceLineMatchesJson (new JsonableString ""))
:JsonMap<HFloat> miscFloats
(new JsonMap miscFloatJson (new HFloat 0))
(new JsonMap voiceLineMatchesJson (new JsonString ""))
:JsonMap<JsonFloat> miscFloats
(new JsonMap miscFloatJson (new JsonFloat 0))
:Map<String,Float->Void> miscFloatChangeEvents (new Map)
:JsonMap<HInt> miscInts
(new JsonMap miscIntJson (new HInt 0))
:JsonMap<JsonInt> miscInts
(new JsonMap miscIntJson (new JsonInt 0))
:Map<String,Int->Void> miscIntChangeEvents (new Map)
:JsonStringMap positionRelativity
(new JsonMap positionRelativityJson (new JsonableString ""))
(new JsonMap positionRelativityJson (new JsonString ""))
:Map<String,String> sceneMusic (new Map)
:Map<String,Float> 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
}))