mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-02-06 19:47:30 +00:00
lil files cleanup
This commit is contained in:
parent
7ebc7e4ffb
commit
6b595165be
|
@ -206,4 +206,7 @@
|
||||||
<!-- <haxedef name="NG_FORCE_EXPIRED_SESSION" if="debug" /> -->
|
<!-- <haxedef name="NG_FORCE_EXPIRED_SESSION" if="debug" /> -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- <prebuild haxe="trace('prebuilding');"/> -->
|
||||||
|
<!-- <postbuild haxe="art/Postbuild.hx"/> -->
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
package;
|
|
||||||
|
|
||||||
import flixel.util.FlxStringUtil;
|
|
||||||
|
|
||||||
using StringTools;
|
|
||||||
|
|
||||||
class ChartParser
|
|
||||||
{
|
|
||||||
static public function parse(songName:String, section:Int):Array<Dynamic>
|
|
||||||
{
|
|
||||||
var IMG_WIDTH:Int = 8;
|
|
||||||
var regex:EReg = new EReg("[ \t]*((\r\n)|\r|\n)[ \t]*", "g");
|
|
||||||
|
|
||||||
var csvData = FlxStringUtil.imageToCSV(Paths.file('data/' + songName + '/' + songName + '_section' + section + '.png'));
|
|
||||||
|
|
||||||
var lines:Array<String> = regex.split(csvData);
|
|
||||||
var rows:Array<String> = lines.filter(function(line) return line != "");
|
|
||||||
csvData.replace("\n", ',');
|
|
||||||
|
|
||||||
var heightInTiles = rows.length;
|
|
||||||
var widthInTiles = 0;
|
|
||||||
|
|
||||||
var row:Int = 0;
|
|
||||||
|
|
||||||
// LMAOOOO STOLE ALL THIS FROM FLXBASETILEMAP LOLOL
|
|
||||||
|
|
||||||
var dopeArray:Array<Int> = [];
|
|
||||||
while (row < heightInTiles)
|
|
||||||
{
|
|
||||||
var rowString = rows[row];
|
|
||||||
if (rowString.endsWith(","))
|
|
||||||
rowString = rowString.substr(0, rowString.length - 1);
|
|
||||||
var columns = rowString.split(",");
|
|
||||||
|
|
||||||
if (columns.length == 0)
|
|
||||||
{
|
|
||||||
heightInTiles--;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (widthInTiles == 0)
|
|
||||||
{
|
|
||||||
widthInTiles = columns.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
var column = 0;
|
|
||||||
var pushedInColumn:Bool = false;
|
|
||||||
while (column < widthInTiles)
|
|
||||||
{
|
|
||||||
// the current tile to be added:
|
|
||||||
var columnString = columns[column];
|
|
||||||
var curTile = Std.parseInt(columnString);
|
|
||||||
|
|
||||||
if (curTile == null)
|
|
||||||
throw 'String in row $row, column $column is not a valid integer: "$columnString"';
|
|
||||||
|
|
||||||
if (curTile == 1)
|
|
||||||
{
|
|
||||||
if (column < 4)
|
|
||||||
dopeArray.push(column + 1);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var tempCol = (column + 1) * -1;
|
|
||||||
tempCol += 4;
|
|
||||||
dopeArray.push(tempCol);
|
|
||||||
}
|
|
||||||
|
|
||||||
pushedInColumn = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
column++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pushedInColumn)
|
|
||||||
dopeArray.push(0);
|
|
||||||
|
|
||||||
row++;
|
|
||||||
}
|
|
||||||
return dopeArray;
|
|
||||||
}
|
|
||||||
}
|
|
11
source/animate/AnimTestStage.hx
Normal file
11
source/animate/AnimTestStage.hx
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package animate;
|
||||||
|
|
||||||
|
import flixel.FlxState;
|
||||||
|
|
||||||
|
class AnimTestStage extends FlxState
|
||||||
|
{
|
||||||
|
override function create()
|
||||||
|
{
|
||||||
|
super.create();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue