From 42e393bd9c9ad6ad470bb5fb4ed0296ed949efcf Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 22 Sep 2025 16:14:48 -0500 Subject: [PATCH] update deps and rebuild --- haxe_libraries/kiss-tools.hxml | 4 +- haxe_libraries/kiss.hxml | 6 +- src/hollywoo/Movie.hx | 1064 +++++++++----------------------- src/hollywoo/Movie.kiss | 2 +- 4 files changed, 309 insertions(+), 767 deletions(-) diff --git a/haxe_libraries/kiss-tools.hxml b/haxe_libraries/kiss-tools.hxml index 63aecb3..f6a109e 100644 --- a/haxe_libraries/kiss-tools.hxml +++ b/haxe_libraries/kiss-tools.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss-tools#5a19e61489e61cdc721af4b44584b642b25b6ad2" into kiss-tools/0.0.0/git/5a19e61489e61cdc721af4b44584b642b25b6ad2 +# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss-tools#e1323fb0b64ef3532bce137d128aa2fb62e26329" into kiss-tools/0.0.0/git/e1323fb0b64ef3532bce137d128aa2fb62e26329 -lib kiss --cp ${HAXE_LIBCACHE}/kiss-tools/0.0.0/git/5a19e61489e61cdc721af4b44584b642b25b6ad2/src/ +-cp ${HAXE_LIBCACHE}/kiss-tools/0.0.0/git/e1323fb0b64ef3532bce137d128aa2fb62e26329/src/ -D kiss-tools=0.0.0 \ No newline at end of file diff --git a/haxe_libraries/kiss.hxml b/haxe_libraries/kiss.hxml index d956a63..43e205c 100644 --- a/haxe_libraries/kiss.hxml +++ b/haxe_libraries/kiss.hxml @@ -1,12 +1,12 @@ -# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss#84b09821f2f2e4b055038af3609170fbdf71cbd9" into kiss/0.0.1/git/84b09821f2f2e4b055038af3609170fbdf71cbd9 -# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/git/84b09821f2f2e4b055038af3609170fbdf71cbd9" +# @install: lix --silent download "git:https://k7izh9.gitea.cloud/kiss-lang/kiss#5da754d5ab24b69afefee18cf3b464bd80896d2c" into kiss/0.0.1/git/5da754d5ab24b69afefee18cf3b464bd80896d2c +# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/git/5da754d5ab24b69afefee18cf3b464bd80896d2c" -lib haxe-strings -lib hscript -lib tink_json -lib tink_macro -lib tink_syntaxhub -lib uuid --cp ${HAXE_LIBCACHE}/kiss/0.0.1/git/84b09821f2f2e4b055038af3609170fbdf71cbd9/src +-cp ${HAXE_LIBCACHE}/kiss/0.0.1/git/5da754d5ab24b69afefee18cf3b464bd80896d2c/src -D kiss=0.0.1 -w -WUnusedPattern --macro kiss.KissFrontend.use() \ No newline at end of file diff --git a/src/hollywoo/Movie.hx b/src/hollywoo/Movie.hx index 2cbc680..4b6d4a2 100644 --- a/src/hollywoo/Movie.hx +++ b/src/hollywoo/Movie.hx @@ -75,17 +75,17 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { if (Prelude.truthy(json.exists("showCaptions"))) { var v:Bool = tink.Json.parse(json['showCaptions']); @@ -98,17 +98,17 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { json["showCaptions"] = tink.Json.stringify(v); sys.io.File.saveContent(".Movie.json", haxe.Json.stringify(json)); @@ -128,17 +128,17 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { if (Prelude.truthy(json.exists("playMode"))) { var v:PlayMode = tink.Json.parse(json['playMode']); @@ -151,17 +151,17 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { json["playMode"] = tink.Json.stringify(v); sys.io.File.saveContent(".Movie.json", haxe.Json.stringify(json)); @@ -210,7 +210,7 @@ class Movie) return { scavenged = true; { - var t = 0;var c = 0; + var t = 0; var c = 0; { { for (key => actor in movie.actors) { @@ -294,12 +294,12 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { if (Prelude.truthy(json.exists("playVoiceTracksForSilentDialog"))) { var v:Bool = tink.Json.parse(json['playVoiceTracksForSilentDialog']); @@ -348,17 +348,17 @@ class Movie = haxe.Json.parse(content); + final content = sys.io.File.getContent(".Movie.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); { json["playVoiceTracksForSilentDialog"] = tink.Json.stringify(v); sys.io.File.saveContent(".Movie.json", haxe.Json.stringify(json)); @@ -398,11 +398,11 @@ class Movie = Json.parse(lineJson); + }), "") : String); final lines:haxe.DynamicAccess = Json.parse(lineJson); { voiceTracksPerActor[actorName] = Prelude.add(1, actorNumVoiceTracks); voiceTracks[trackKey] = track; @@ -669,9 +667,9 @@ class Movie>(), actorAndPropPositionKeys : new FuzzyMap(), propOrder : new kiss.List([]), props : new FuzzyMap>(), camera : camera, time : time, perspective : perspective }; @@ -784,9 +782,9 @@ class Movie = Lambda.flatten([for (propKey => prop in scene.props) { + final scene = _currentScene(); final sceneKey = FuzzyMapTools.bestMatch(scenes, sceneKey); final sceneLightSources = lightSources.get(sceneKey).elements; final propLightSources:Array = Lambda.flatten([for (propKey => prop in scene.props) { if (Prelude.truthy(lightSources.exists(propKey))) [for (ls in lightSources.get(propKey).elements) { director.offsetLightSource(ls, prop.position); }] else new kiss.List([]); - }]);final actorLightSources:Array = Lambda.flatten([for (actorKey => character in scene.characters) { + }]); final actorLightSources:Array = Lambda.flatten([for (actorKey => character in scene.characters) { if (Prelude.truthy(lightSources.exists(actorKey))) [for (ls in lightSources.get(actorKey).elements) { director.offsetLightSource(ls, character.stagePosition); }] else new kiss.List([]); - }]);final allLightSources:Array = Lambda.flatten(new kiss.List([sceneLightSources, propLightSources, actorLightSources])); + }]); final allLightSources:Array = Lambda.flatten(new kiss.List([sceneLightSources, propLightSources, actorLightSources])); { director.showLighting(scene.time, allLightSources, scene.camera); }; @@ -909,7 +907,7 @@ class Movie> = new Map(); public function resolvePosition(position:Dynamic, holder:String):StagePosition return { { - final _sHCv5zDq8t8NQ6UjNDqoQA:Dynamic = position; + final _uNpFsfLBhkkDQncjT1t5p3:Dynamic = position; { - switch [_sHCv5zDq8t8NQ6UjNDqoQA] { + switch [_uNpFsfLBhkkDQncjT1t5p3] { case [positionKey] if (Prelude.truthy({ - final _cwbUoYSGnrU5bY3aMKWLZQ:Dynamic = Std.isOfType(positionKey, String); + final _g4UJXVXxtDXLKXr1BpouFe:Dynamic = Std.isOfType(positionKey, String); { - _cwbUoYSGnrU5bY3aMKWLZQ; + _g4UJXVXxtDXLKXr1BpouFe; }; })):{ { final positionKey:String = positionKey; { { - final _tT6uihqaLLbWsrgTPsucwG = sceneKey; + final _9DZfmAfQ1M1gnXjYTGfJVP = sceneKey; { - if (Prelude.truthy(_tT6uihqaLLbWsrgTPsucwG)) _tT6uihqaLLbWsrgTPsucwG else throw kiss.Prelude.runtimeInsertAssertionMessage("resolvePosition() should be called in the context of a scene", "/Users/nat/repos/hollywoo/src/hollywoo/Movie.kiss:495:17: Assertion failed: \nFrom:[(assert sceneKey \"resolvePosition() should be called in the context of a scene\")]", 4); + if (Prelude.truthy(_9DZfmAfQ1M1gnXjYTGfJVP)) _9DZfmAfQ1M1gnXjYTGfJVP else throw kiss.Prelude.runtimeInsertAssertionMessage("resolvePosition() should be called in the context of a scene", "/Users/nat/repos/hollywoo/src/hollywoo/Movie.kiss:495:17: Assertion failed: \nFrom:[(assert sceneKey \"resolvePosition() should be called in the context of a scene\")]", 4); }; }; { @@ -978,20 +976,20 @@ class Movie>)) { - final _nFFpPbbzguruothc9Wjsx4 = _pFwjjQdNpNki9NRomhFa62;final ending = _nFFpPbbzguruothc9Wjsx4[0];final extension = _nFFpPbbzguruothc9Wjsx4[1]; + for (_2YR1DeK67EEE8mugWecb7x in (Prelude.intersect(overrideEndings, overrideExtensions) : Array>)) { + final _bX683NJrsPyuMofRUDTaAz = _2YR1DeK67EEE8mugWecb7x; final ending = _bX683NJrsPyuMofRUDTaAz[0]; final extension = _bX683NJrsPyuMofRUDTaAz[1]; { { final possibleOverride = (Prelude.add("", Std.string({ @@ -1180,9 +1166,7 @@ class Movie [::... dir] failed"; }; }; - case _5u8esoYqJJWqPUfxuUQzrf if (Prelude.greaterThan(_5u8esoYqJJWqPUfxuUQzrf.length, 1)):{ - final _ = _5u8esoYqJJWqPUfxuUQzrf.slice(0, Prelude.subtract(_5u8esoYqJJWqPUfxuUQzrf.length, 1));final dir = _5u8esoYqJJWqPUfxuUQzrf[Prelude.subtract(_5u8esoYqJJWqPUfxuUQzrf.length, 1)]; + case _cWZtcKVnwjFVrxjnrHxuM6 if (Prelude.greaterThan(_cWZtcKVnwjFVrxjnrHxuM6.length, 1)):{ + final _ = _cWZtcKVnwjFVrxjnrHxuM6.slice(0, Prelude.subtract(_cWZtcKVnwjFVrxjnrHxuM6.length, 1)); final dir = _cWZtcKVnwjFVrxjnrHxuM6[Prelude.subtract(_cWZtcKVnwjFVrxjnrHxuM6.length, 1)]; { { if (Prelude.truthy(!Prelude.truthy(assetPaths.existsExactly(dir)))) { @@ -1274,7 +1258,7 @@ class MovieVoid; public final director:Director; public var doingSomething = false; - public final CANCEL_COMMAND = "CANCEL CHOICE"; - public function withCancel(choices) return { - new kiss.List([CANCEL_COMMAND]).concat(choices); - } public function new(director:Director, lightSourceJsonFile:String, defaultLightSource:LightSource, stagePositionsJson:String, delayLengthsJson:String, voiceLineMatchesJson:String, miscFloatJson:String, miscIntJson:String, positionRelativityJson:String) { stagePositions = new JsonMap(stagePositionsJson, new StagePosition(0, 0, 0)); lightSources = new JsonMap(lightSourceJsonFile, new JsonArray(new kiss.List([]), defaultLightSource)); @@ -1396,7 +1370,7 @@ class Movie>)) { - final _vDa9HJsyNqCHTY7PLUuJKJ = _4urq8FLVcyEo9LTQHcVQHp;final key = _vDa9HJsyNqCHTY7PLUuJKJ[0];final ls = _vDa9HJsyNqCHTY7PLUuJKJ[1]; - { - key => ls; - }; - }]; - { - director.chooseString("Remove which light source?", withCancel(stringArr), function(choice) return { - if (Prelude.truthy(Prelude.areEqual(choice, CANCEL_COMMAND))) cc() else { - final ls = stringMap[choice]; - { - arr.elements.remove(ls); - lightSources.put(sceneKey, arr); - _updateLighting(); - cc(); - }; - }; - }); - }; - }; - }; - shortcutHandler.registerItem("[r]emove [l]ight source", removeLightSource); - function connectLightSourceToProp(cc) return { - if (Prelude.truthy(doingSomething)) { - return; - } else null; - doingSomething = true; - lastCommand = connectLightSourceToProp; - { - final arr = lightSources.get(sceneKey);final stringArr = [for (ls in arr) { - ls.stringify(); - }];final stringMap = [for (_jJUVpsLz3yZ4JtpDVmwyTy in (Prelude.zipThrow(stringArr, arr) : Array>)) { - final _7ShSGvXfiX7dzjrfkjjnAU = _jJUVpsLz3yZ4JtpDVmwyTy;final key = _7ShSGvXfiX7dzjrfkjjnAU[0];final ls = _7ShSGvXfiX7dzjrfkjjnAU[1]; - { - key => ls; - }; - }]; - { - director.chooseString("Connect which light source?", withCancel(stringArr), function(choice) return { - if (Prelude.truthy(Prelude.areEqual(choice, CANCEL_COMMAND))) cc() else { - final ls = stringMap[choice];final propsArr = [for (elem in _currentScene().props.keys()) { - elem; - }]; - { - director.chooseString("Connect to which prop?", withCancel(propsArr), function(propChoice) return { - if (Prelude.truthy(Prelude.areEqual(propChoice, CANCEL_COMMAND))) cc() else { - final prop = _currentScene().props[propChoice];final relativeLS = director.offsetLightSource(ls, opposite(prop.position));final propLightSources = lightSources.get(propChoice); - { - arr.elements.remove(ls); - lightSources.put(sceneKey, arr); - propLightSources.elements.push(relativeLS); - lightSources.put(propChoice, propLightSources); - _updateLighting(); - cc(); - }; - }; - }); - }; - }; - }); - }; - }; - }; - shortcutHandler.registerItem("[c]onnect [l]ight source to [p]rop", connectLightSourceToProp); - function connectLightSourceToActor(cc) return { - if (Prelude.truthy(doingSomething)) { - return; - } else null; - doingSomething = true; - lastCommand = connectLightSourceToActor; - { - final arr = lightSources.get(sceneKey);final stringArr = [for (ls in arr) { - ls.stringify(); - }];final stringMap = [for (_kytXcxUyCkukSfmiiunbXs in (Prelude.zipThrow(stringArr, arr) : Array>)) { - final _9uHg364a1KJnum1ipRiPB = _kytXcxUyCkukSfmiiunbXs;final key = _9uHg364a1KJnum1ipRiPB[0];final ls = _9uHg364a1KJnum1ipRiPB[1]; - { - key => ls; - }; - }]; - { - director.chooseString("Connect which light source?", withCancel(stringArr), function(choice) return { - if (Prelude.truthy(Prelude.areEqual(choice, CANCEL_COMMAND))) cc() else { - final ls = stringMap[choice];final actorArr = [for (elem in _currentScene().characters.keys()) { - elem; - }]; - { - director.chooseString("Connect to which actor?", withCancel(actorArr), function(actorChoice) return { - if (Prelude.truthy(Prelude.areEqual(actorChoice, CANCEL_COMMAND))) cc() else { - final character = _currentScene().characters[actorChoice];final relativeLS = director.offsetLightSource(ls, opposite(character.stagePosition));final actorLightSources = lightSources.get(actorChoice); - { - arr.elements.remove(ls); - lightSources.put(sceneKey, arr); - actorLightSources.elements.push(relativeLS); - lightSources.put(actorChoice, actorLightSources); - _updateLighting(); - cc(); - }; - }; - }); - }; - }; - }); - }; - }; - }; - shortcutHandler.registerItem("[c]onnect [l]ight source to [a]ctor", connectLightSourceToActor); - }; + { }; }; }; } - private function _strobe(skipping:Bool, prop:Bool, actorOrPropKey:String, strobeSec:Float, times:Int, ?cc:Continuation):Void { + @:keep private function _strobe(skipping:Bool, prop:Bool, actorOrPropKey:String, strobeSec:Float, times:Int, ?cc:Continuation):Void { if (Prelude.truthy(skipping)) { if (Prelude.truthy(cc)) { cc(); @@ -1876,13 +1418,13 @@ class Movie, cc:Continuation, ?volumeMod:Float) return { + @:keep public function awaitPlaySounds(skipping:Bool, names:Array, cc:Continuation, ?volumeMod:Float) return { { - final names = names.copy();final inputDelayKey = inputKey(); + final names = names.copy(); final inputDelayKey = inputKey(); { var currentSound = ""; final endCC = function() { @@ -2489,10 +2031,10 @@ class Movie otherCharacter in _currentScene().characters) { if (Prelude.truthy({ - final _a29gFUzobZtiL5ux6xAD3Z:Dynamic = Prelude.areEqual(position.x, otherCharacter.stagePosition.x); + final _onwakoJfPMKR7wjuFJBvZn:Dynamic = Prelude.areEqual(position.x, otherCharacter.stagePosition.x); { - if (Prelude.truthy(_a29gFUzobZtiL5ux6xAD3Z)) { - final _kKssVs2zAn2iqHavBbMnLX:Dynamic = Prelude.areEqual(position.y, otherCharacter.stagePosition.y); + if (Prelude.truthy(_onwakoJfPMKR7wjuFJBvZn)) { + final _hBabos65ovVtfroA4EHEL7:Dynamic = Prelude.areEqual(position.y, otherCharacter.stagePosition.y); { - if (Prelude.truthy(_kKssVs2zAn2iqHavBbMnLX)) { - final _hXBcF1yMKuYSwMQSSsZHUf:Dynamic = Prelude.areEqual(position.z, otherCharacter.stagePosition.z); + if (Prelude.truthy(_hBabos65ovVtfroA4EHEL7)) { + final _wEp9yxNgdyvNgHvJnMeWEY:Dynamic = Prelude.areEqual(position.z, otherCharacter.stagePosition.z); { - _hXBcF1yMKuYSwMQSSsZHUf; + _wEp9yxNgdyvNgHvJnMeWEY; }; - } else _kKssVs2zAn2iqHavBbMnLX; + } else _hBabos65ovVtfroA4EHEL7; }; - } else _a29gFUzobZtiL5ux6xAD3Z; + } else _onwakoJfPMKR7wjuFJBvZn; }; })) { moveCharacter(name, new StagePosition(position.x, position.y, Prelude.add(otherCharacter.stagePosition.z, zPerLayer)), otherCharacter.stageFacing, cc); @@ -2708,9 +2250,9 @@ class Movie c in _currentScene().characters) { director.hideCharacter(c, _currentScene().camera, function() { @@ -2751,7 +2293,7 @@ class Movie, cc:Continuation) return { + @:keep public function intercut(actorNamesToSceneNames:Map, cc:Continuation) return { intercutMap = new FuzzyMap(); { for (actor => scene in actorNamesToSceneNames) { @@ -2843,11 +2385,11 @@ class Movie, cc:Continuation) return { + @:keep public function showTitleCard(lines:Array, cc:Continuation) return { { for (line in Prelude.filter(lines)) { dialogHistory.push(Super(line)); @@ -2857,15 +2399,15 @@ class Movie();final headingIndices = new Map();final headingData = new Map>>(); + }]; final headings = new kiss.List([]); final edgeCaseCredits = new Map(); final headingIndices = new Map(); final headingData = new Map>>(); { { - for (_5bu9XrYtitFLoNL1fK37sX in Prelude.enumerate(creditsData)) { - final _qshQu1j2CUjTSSARRhQJYF = _5bu9XrYtitFLoNL1fK37sX;final idx = _qshQu1j2CUjTSSARRhQJYF[0];final data = _qshQu1j2CUjTSSARRhQJYF[1]; + for (_pa3tL46QtbNV9zkLNXQxdf in Prelude.enumerate(creditsData)) { + final _3mVsa5reQhbJgzQ1yi9fWn = _pa3tL46QtbNV9zkLNXQxdf; final idx = _3mVsa5reQhbJgzQ1yi9fWn[0]; final data = _3mVsa5reQhbJgzQ1yi9fWn[1]; { switch data { - case _LFL7Cwggf3uVqKYRUERq2 if (Prelude.truthy(Prelude.isNull(_LFL7Cwggf3uVqKYRUERq2))):{ + case _baPMWxer7Gedp9wktUBQ9j if (Prelude.truthy(Prelude.isNull(_baPMWxer7Gedp9wktUBQ9j))):{ { }; }; case [heading] | [heading, ""]:{ @@ -3048,29 +2590,29 @@ class Movie