1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-29 16:26:48 +00:00

lil code comments for FlxAnimate and ParseAnimate

This commit is contained in:
Cameron Taylor 2021-09-02 19:00:01 -04:00
parent 49a5c30b90
commit 1480335bcb
3 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -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);