Skip to content

Commit 221d9db

Browse files
committed
Fork Flixel Animate to Fix frameOffsetAngle, layer
1 parent d87ac41 commit 221d9db

2 files changed

Lines changed: 2 additions & 19 deletions

File tree

building/libs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<git name="hxcpp" url="https://github.com/CodenameCrew/cne-hxcpp" />
3434

35-
<git name="flixel-animate" url="https://github.com/MaybeMaru/flixel-animate/" skipDeps="true"/>
35+
<git name="flixel-animate" url="https://github.com/CodenameCrew/cne-flixel-animate/" skipDeps="true"/>
3636
</if>
3737

3838
<!-- Hxcpp Building -->

source/funkin/backend/FunkinSprite.hx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -366,26 +366,9 @@ class FunkinSprite extends FlxAnimate implements IBeatReceiver implements IOffse
366366
}
367367

368368
override function prepareDrawMatrix(matrix:FlxMatrix, camera:FlxCamera):Void {
369-
matrix.translate(-origin.x, -origin.y);
370-
371-
if (frameOffsetAngle != null && frameOffsetAngle != angle)
372-
{
373-
var angleOff = (frameOffsetAngle - angle) * FlxAngle.TO_RAD;
374-
var cos = Math.cos(angleOff);
375-
var sin = Math.sin(angleOff);
376-
// cos doesnt need to be negated
377-
matrix.rotateWithTrig(cos, -sin);
378-
matrix.translate(-frameOffset.x, -frameOffset.y);
379-
matrix.rotateWithTrig(cos, sin);
380-
}
381-
else
382-
matrix.translate(-frameOffset.x, -frameOffset.y);
383-
384-
matrix.translate(origin.x, origin.y);
385-
386369
super.prepareDrawMatrix(matrix, camera);
387370

388-
if(__shouldDoZoomFactor()) {
371+
if (__shouldDoZoomFactor()) {
389372
__prepareZoomFactor(_rect2, camera);
390373
matrix.setTo(
391374
matrix.a * _rect2.width, matrix.b * _rect2.height,

0 commit comments

Comments
 (0)