From 1480335bcbc1144c46cccdc9677e36edae80c077 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 2 Sep 2021 19:00:01 -0400 Subject: [PATCH] lil code comments for FlxAnimate and ParseAnimate --- source/ChartingState.hx | 2 ++ source/animate/FlxAnimate.hx | 7 ++++++- source/animate/ParseAnimate.hx | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 525949295..d58870c67 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1096,6 +1096,8 @@ class ChartingState extends MusicBeatState if (debugSavepath) { + // file path to assumingly your assets folder in your SOURCE CODE assets folder!!! + // update this later so the save button ONLY appears when you compile in debug mode! sys.io.File.saveContent('../../../../assets/preload/data/$filename/$filename.json', data); } else diff --git a/source/animate/FlxAnimate.hx b/source/animate/FlxAnimate.hx index 242da3793..245d125d4 100644 --- a/source/animate/FlxAnimate.hx +++ b/source/animate/FlxAnimate.hx @@ -54,6 +54,7 @@ class FlxAnimate extends FlxSymbol override function draw() { // having this commented out fixes some wacky scaling bullshit? + // or fixes drawing it twice? // super.draw(); // renderFrame(coolParse.AN.TL, coolParse, true); @@ -85,7 +86,7 @@ class FlxAnimate extends FlxSymbol { trace(i.frameName); trace(i.depthString); - trace("random lol: " + i.randomLol); + // trace("random lol: " + i.randomLol); } for (swagMatrix in i.matrixArray) @@ -157,6 +158,9 @@ class FlxAnimate extends FlxSymbol changeFrame(-1); } + /** + * PARSES THE 'spritemap1.png' or whatever into a FlxAtlasFrames!!! + */ public static function fromAnimate(Source:FlxGraphicAsset, Description:String):FlxAtlasFrames { var graphic:FlxGraphic = FlxG.bitmap.add(Source); @@ -207,6 +211,7 @@ class FlxAnimate extends FlxSymbol } } +// handy json function that has some hashlink fix, see the thing in CoolUtils file to see the link / where i stole it from class JaySon { public static function parseFile(name:String) diff --git a/source/animate/ParseAnimate.hx b/source/animate/ParseAnimate.hx index 8d64429cb..deffb28ac 100644 --- a/source/animate/ParseAnimate.hx +++ b/source/animate/ParseAnimate.hx @@ -164,6 +164,7 @@ class ParseAnimate frameInput = frameArray[loopedFrameShit]; // see what happens when something has more than 2 layer? + // single frame stuff isn't fully implemented } else frameInput = frameArray[frameInput]; @@ -209,7 +210,7 @@ class ParseAnimate var inputFrame:Int = element.SI.FF; - // JANKY FIX, MAY NOT ACCOUNT FOR ALL SCENARIOS! + // JANKY FIX, MAY NOT ACCOUNT FOR ALL SCENARIOS OF SINGLE FRAME ANIMATIONS!! if (curLoopType == "SF") { // trace("LOOP SHIT: " + inputFrame);