diff --git a/tct-vscode-editor/haxe_libraries/kiss.hxml b/tct-vscode-editor/haxe_libraries/kiss.hxml index 2a0b23d..7edac94 100644 --- a/tct-vscode-editor/haxe_libraries/kiss.hxml +++ b/tct-vscode-editor/haxe_libraries/kiss.hxml @@ -1,12 +1,12 @@ -# @install: lix --silent download "gh://github.com/kiss-lang/kiss#3aa41cbcc0e9e5f87004f56f8b29b6d793c9cdf3" into kiss/0.0.1/github/3aa41cbcc0e9e5f87004f56f8b29b6d793c9cdf3 -# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/3aa41cbcc0e9e5f87004f56f8b29b6d793c9cdf3" +# @install: lix --silent download "gh://github.com/kiss-lang/kiss#bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba" into kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba +# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba" -lib haxe-strings -lib hscript -lib tink_json -lib tink_macro -lib tink_syntaxhub -lib uuid --cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/3aa41cbcc0e9e5f87004f56f8b29b6d793c9cdf3/src +-cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba/src -D kiss=0.0.1 -w -WUnusedPattern --macro kiss.KissFrontend.use() \ No newline at end of file diff --git a/tct/haxe_libraries/kiss.hxml b/tct/haxe_libraries/kiss.hxml index bb6ec3d..7edac94 100644 --- a/tct/haxe_libraries/kiss.hxml +++ b/tct/haxe_libraries/kiss.hxml @@ -1,12 +1,12 @@ -# @install: lix --silent download "gh://github.com/kiss-lang/kiss#d46e386972dd893a690fd20427613bd9dca5a60d" into kiss/0.0.1/github/d46e386972dd893a690fd20427613bd9dca5a60d -# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/d46e386972dd893a690fd20427613bd9dca5a60d" +# @install: lix --silent download "gh://github.com/kiss-lang/kiss#bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba" into kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba +# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba" -lib haxe-strings -lib hscript -lib tink_json -lib tink_macro -lib tink_syntaxhub -lib uuid --cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/d46e386972dd893a690fd20427613bd9dca5a60d/src +-cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/bbb5dcf426a6834c2b16a1f2b5b9fa6014b8d4ba/src -D kiss=0.0.1 -w -WUnusedPattern --macro kiss.KissFrontend.use() \ No newline at end of file diff --git a/tct/src/tct/conversions/FountainToHollywoo.kiss b/tct/src/tct/conversions/FountainToHollywoo.kiss index d6adc65..a99b411 100644 --- a/tct/src/tct/conversions/FountainToHollywoo.kiss +++ b/tct/src/tct/conversions/FountainToHollywoo.kiss @@ -107,4 +107,30 @@ (FileConversionProject.registerConversion (new tct.StreamConversion "Delay" "fountain" "hollywoo" ->stream (isScreenLine stream.content) - ->stream "DELAY ##\"$(stream.content.trim)\"##\n")) \ No newline at end of file + ->stream "DELAY ##\"$(stream.content.trim)\"##\n")) + +(function newSceneConversion [engine command setArgs newCamera] + (FileConversionProject.registerConversion + (new tct.StreamConversion "New scene (hollywoo-${engine})" "fountain" "hollywoo" + ->stream (stream.startsWithOneOf ["INT." "EXT." "INT./EXT."]) + ->stream { + (let [fullHeading (stream.content.trim) + perspectiveAbbr (stream.expect "perspective" ->(stream.takeUntilAndDrop " ")) + perspective (case perspectiveAbbr ("INT." "Interior") ("EXT." "Exterior") ("INT./EXT." "Mixed") (never otherwise)) + location (.trim (stream.expect "location" ->(stream.takeUntilLastAndDrop "-"))) + setKey "${perspectiveAbbr} ${location}" + time {(stream.dropWhitespace) stream.content} + timeEnumValue (case (time.trim) ("MORNING" "Morning") ("DAY" "Day") ("EVENING" "Evening") ("NIGHT" "Night") (otherwise ""))] +"(preload + (${command} \"${setKey}\" ${setArgs}) + (newSceneFromSet \"${fullHeading}\" \"${setKey}\" ${timeEnumValue} ${perspective} ${newCamera})) +SETSCENE \"${fullHeading}\"" + ) + }))) +(FileConversionProject.registerConversion + (new tct.StreamConversion "Return to scene" "fountain" "hollywoo" + ->stream (stream.startsWithOneOf ["INT." "EXT." "INT./EXT."]) + ->stream { + (let [fullHeading (stream.content.trim)] + "SETSCENE \"${fullHeading}\"") + })) \ No newline at end of file diff --git a/tct/src/tct/conversions/FountainToHollywooFlixel.kiss b/tct/src/tct/conversions/FountainToHollywooFlixel.kiss index d02258f..4c9d0ae 100644 --- a/tct/src/tct/conversions/FountainToHollywooFlixel.kiss +++ b/tct/src/tct/conversions/FountainToHollywooFlixel.kiss @@ -12,4 +12,6 @@ "(withActorCC \"${name}\" $actorVar (linearMotionTo $actorVar cc ))")) "\n") - "\n"))) \ No newline at end of file + "\n"))) + +(newSceneConversion "flixel" "newFlxSet" #"(assetPath "images" )"# "(new FlxCamera)") \ No newline at end of file