diff --git a/haxe_libraries/hollywoo.hxml b/haxe_libraries/hollywoo.hxml index 1d6fb58..0a424dc 100644 --- a/haxe_libraries/hollywoo.hxml +++ b/haxe_libraries/hollywoo.hxml @@ -1,6 +1,6 @@ -# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#cc37d8d33bccb9507af9418171ac1ae809c53660" into hollywoo/0.0.0/github/cc37d8d33bccb9507af9418171ac1ae809c53660 -# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/cc37d8d33bccb9507af9418171ac1ae809c53660" +# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#bdba63cc6132c347bd98045bb30bbae3022ca0b5" into hollywoo/0.0.0/github/bdba63cc6132c347bd98045bb30bbae3022ca0b5 +# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/bdba63cc6132c347bd98045bb30bbae3022ca0b5" -lib kiss -lib kiss-tools --cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/cc37d8d33bccb9507af9418171ac1ae809c53660/src/ +-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/bdba63cc6132c347bd98045bb30bbae3022ca0b5/src/ -D hollywoo=0.0.0 \ No newline at end of file diff --git a/src/hollywoo_flixel/FlxDirector.kiss b/src/hollywoo_flixel/FlxDirector.kiss index 32b7675..4ad2944 100644 --- a/src/hollywoo_flixel/FlxDirector.kiss +++ b/src/hollywoo_flixel/FlxDirector.kiss @@ -1140,13 +1140,4 @@ (set FlxG.mouse.visible false)) (method :FlxLightSource offsetLightSource [:FlxLightSource source :StagePosition offset] - (new FlxLightSource (for point source.points (FlxPoint.get (+ point.x offset.x) (+ point.y offset.y))) source.color)) - -// I'll be proven wrong, but for now I actually think position -// is a reasonable indicator of identity for props and actors -// that are *currently* in the scene: -(method :Bool propEquals [:FlxSprite propA :FlxSprite propB] - (and (= propA.x propB.x) (= propA.y propB.y))) - -(method :Bool actorEquals [:ActorFlxSprite actorA :ActorFlxSprite actorB] - (and (= actorA.x actorB.x) (= actorA.y actorB.y))) \ No newline at end of file + (new FlxLightSource (for point source.points (FlxPoint.get (+ point.x offset.x) (+ point.y offset.y))) source.color)) \ No newline at end of file diff --git a/src/hollywoo_flixel/HollywooFlixelDSL.kiss b/src/hollywoo_flixel/HollywooFlixelDSL.kiss index 1a4f91c..a35f50b 100644 --- a/src/hollywoo_flixel/HollywooFlixelDSL.kiss +++ b/src/hollywoo_flixel/HollywooFlixelDSL.kiss @@ -219,18 +219,8 @@ (linearMotion skipping cSprite (+ destX xOffset) (+ destY yOffset) speed (when (= lastCSprite cSprite) cc)))))) @:keep -(method linearMotionTo [:Bool skipping :FlxSprite sprite :String positionKey :Float speed &opt :Void->Void cc :String soundLoop :Float volumeMod :Array connectedSprites] - (let [holderType (typeCase [sprite] - // Try-catch: Sometimes I've used ActorFlxSprite for props - ([:ActorFlxSprite actorSprite] - (try - (hollywoo.Movie.PositionHolder.Actor - (getActorName actorSprite)) - (catch [e] - (hollywoo.Movie.PositionHolder.Prop (getPropName actorSprite))))) - ([:FlxSprite propSprite] (hollywoo.Movie.PositionHolder.Prop (getPropName propSprite))) - (never otherwise)) - position (resolvePosition positionKey holderType)] +(method linearMotionTo [:Bool skipping :FlxSprite sprite :String spriteKey :String positionKey :Float speed &opt :Void->Void cc :String soundLoop :Float volumeMod :Array connectedSprites] + (let [position (resolvePosition positionKey spriteKey)] (linearMotion skipping sprite position.x position.y speed cc soundLoop volumeMod connectedSprites))) (defMacro _linearMotionTo [withMacro await objectKey positionKey speed soundLoop volumeMod connectedSprites] @@ -238,6 +228,7 @@ (linearMotionTo skipping o + realKey_o ,positionKey ,speed ,(if (eval await) `cc `null)