diff --git a/source/TitleState.hx b/source/TitleState.hx index 05e6863d7..703c1d462 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -123,7 +123,7 @@ class TitleState extends MusicBeatState #if FREEPLAY FlxG.switchState(new FreeplayState()); #elseif ANIMATE - FlxG.switchState(new CutsceneAnimTestState()); + FlxG.switchState(new animate.AnimTestStage()); #elseif CHARTING FlxG.switchState(new ChartingState()); /* diff --git a/source/animate/AnimTestStage.hx b/source/animate/AnimTestStage.hx index 04e09011e..82a997a8b 100644 --- a/source/animate/AnimTestStage.hx +++ b/source/animate/AnimTestStage.hx @@ -1,11 +1,27 @@ package animate; +import flixel.FlxSprite; import flixel.FlxState; +import flixel.addons.display.FlxGridOverlay; class AnimTestStage extends FlxState { override function create() { + var bg:FlxSprite = FlxGridOverlay.create(32, 32); + add(bg); + + var swag:FlxAnimate = new FlxAnimate(0, 0); + add(swag); + super.create(); } + + override function update(elapsed:Float) + { + CoolUtil.mouseWheelZoom(); + CoolUtil.mouseCamDrag(); + + super.update(elapsed); + } } diff --git a/source/animate/FlxAnimate.hx b/source/animate/FlxAnimate.hx index 635cbe5f7..dc86c40ec 100644 --- a/source/animate/FlxAnimate.hx +++ b/source/animate/FlxAnimate.hx @@ -25,7 +25,7 @@ class FlxAnimate extends FlxSymbol public function new(x:Float, y:Float) { - var folder:String = 'tightBars'; + var folder:String = 'tightBarsLol'; coolParse = cast Json.parse(Assets.getText(Paths.file('images/' + folder + '/Animation.json'))); coolParse.AN.TL.L.reverse(); super(x, y, coolParse); @@ -46,6 +46,7 @@ class FlxAnimate extends FlxSymbol { for (spr in FlxSymbol.nestedShit.get(shit)) { + trace(shit); spr.draw(); } } diff --git a/source/animate/FlxSymbol.hx b/source/animate/FlxSymbol.hx index 749abbe7b..805bb684c 100644 --- a/source/animate/FlxSymbol.hx +++ b/source/animate/FlxSymbol.hx @@ -38,17 +38,13 @@ class FlxSymbol extends FlxSprite var symbolMap:Map = new Map(); - var drawQueue:Array = []; - public var daFrame:Int = 0; public var nestDepth:Int = 0; public var transformMatrix:Matrix = new Matrix(); - function renderFrame(TL:Timeline, coolParsed:Parsed, ?isMainLoop:Bool = false) + function renderFrame(TL:Timeline, coolParsed:Parsed, ?traceShit:Bool = false) { - drawQueue = []; - for (layer in TL.L) { // layer.FR.reverse(); @@ -78,11 +74,17 @@ class FlxSymbol extends FlxSprite // spr._matrix.concat(spr.transformMatrix); spr.origin.set(); - spr.origin.x += origin.x; - spr.origin.y += origin.y; + // Prob dont need these offset thingies??? + // spr.origin.x += origin.x; + // spr.origin.y += origin.y; spr.antialiasing = true; spr.draw(); + + if (traceShit) + { + trace(element.ASI.N); + } } else { @@ -121,11 +123,6 @@ class FlxSymbol extends FlxSprite } } } - - // drawQueue.reverse(); - // - // for (thing in drawQueue) - // thing.draw(); } function setDaMap(spr:FlxSymbol):Void