From 3505dd026bb790a3a045865395062edfd6b21f84 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 31 Dec 2021 16:33:01 -0700 Subject: [PATCH] fix clunky actor sprite positioning --- .../hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss index 6823eefb..7262f5c9 100644 --- a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss +++ b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss @@ -32,7 +32,7 @@ (method :Void showCharacter [:Character character :Appearance appearance :Continuation cc] // TODO on the first appearance, show name and description (maybe? also probably not for all?) - // TODO also allow for manually defined flipped frames so text doesn't mirror + // TODO also allow for manually defined flipped frames so text on clothing doesn't mirror (set character.actor.flipX ?!(= character.stageFacing character.actor.defaultFacing)) (character.actor.setGraphicSize ACTOR_WIDTH) (character.actor.updateHitbox) @@ -45,6 +45,9 @@ (otherwise (throw "unsupported stage position"))) (/ character.actor.width 2))) (set character.actor.y ACTOR_Y) + (let [bottom (+ character.actor.y character.actor.height)] + (when (> bottom 720) + (-= character.actor.y (- bottom 720)))) (currentState.add character.actor) (cc))