From f15cd2804ee98ad310a437d41cfe1bc1eab57f2d Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 6 Jan 2022 19:11:59 -0700 Subject: [PATCH] fuzzy intercut map --- .../hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss | 2 +- projects/hollywoo/src/hollywoo/Movie.kiss | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss index 9002db99..fc97054c 100644 --- a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss +++ b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss @@ -259,7 +259,7 @@ (let [[x y] (case position (Center [(/ 1280 2) (/ 720 2)]) - (otherwise (throw "not implemented")))] + (otherwise (throw "screen position not implemented")))] (let [width (min (max prop.width PROP_MIN_WIDTH) PROP_MAX_WIDTH)] (prop.setGraphicSize width) diff --git a/projects/hollywoo/src/hollywoo/Movie.kiss b/projects/hollywoo/src/hollywoo/Movie.kiss index 959106f0..20c43777 100644 --- a/projects/hollywoo/src/hollywoo/Movie.kiss +++ b/projects/hollywoo/src/hollywoo/Movie.kiss @@ -35,11 +35,11 @@ (prop &mut :String sceneKey "") (method _currentScene [] (dictGet scenes sceneKey)) - (prop &mut :Map intercutMap) + (prop &mut :FuzzyMap intercutMap) (prop &mut :Map altIdx (new Map)) (method :Void showDialog [actorName dialogType wryly text cc] (when intercutMap - (whenLet [sceneForActor (dictGet intercutMap actorName)] + (whenLet [sceneForActor (try (dictGet intercutMap actorName) (catch [e] null))] (setScene sceneForActor ->{}))) (let [cc ->:Void {(director.hideDialog) (cc)} @@ -267,7 +267,9 @@ // Dialogue: (hollywooMethod intercut false [:Map actorNamesToSceneNames :Continuation cc] - (set intercutMap actorNamesToSceneNames) + (set intercutMap (new FuzzyMap)) + (doFor =>actor scene actorNamesToSceneNames + (dictSet intercutMap actor scene)) (cc)) (hollywooMethod endIntercut false [:Continuation cc]