mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 07:27:12 +00:00
CLEANED JSON LOL
This commit is contained in:
parent
38bb4848a5
commit
f31813c9db
BIN
assets/data/smash/smash.json
Normal file
BIN
assets/data/smash/smash.json
Normal file
Binary file not shown.
|
@ -362,7 +362,7 @@ class ChartingState extends MusicBeatState
|
||||||
"song": curSong,
|
"song": curSong,
|
||||||
"bpm": Conductor.bpm,
|
"bpm": Conductor.bpm,
|
||||||
"sections": sections.length,
|
"sections": sections.length,
|
||||||
'notes': getNotes
|
'notes': sections
|
||||||
};
|
};
|
||||||
|
|
||||||
var data:String = Json.stringify(json);
|
var data:String = Json.stringify(json);
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Main extends Sprite
|
||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
addChild(new FlxGame(0, 0, ChartingState));
|
addChild(new FlxGame(0, 0, PlayState));
|
||||||
|
|
||||||
#if !mobile
|
#if !mobile
|
||||||
addChild(new FPS(10, 3, 0xFFFFFF));
|
addChild(new FPS(10, 3, 0xFFFFFF));
|
||||||
|
|
|
@ -71,7 +71,7 @@ class PlayState extends MusicBeatState
|
||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
if (SONG == null)
|
if (SONG == null)
|
||||||
SONG = Song.loadFromJson('tutorial');
|
SONG = Song.loadFromJson('smash');
|
||||||
|
|
||||||
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png);
|
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png);
|
||||||
// bg.setGraphicSize(Std.int(bg.width * 2.5));
|
// bg.setGraphicSize(Std.int(bg.width * 2.5));
|
||||||
|
|
|
@ -3,6 +3,8 @@ package;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import lime.utils.Assets;
|
import lime.utils.Assets;
|
||||||
|
|
||||||
|
using StringTools;
|
||||||
|
|
||||||
class Song
|
class Song
|
||||||
{
|
{
|
||||||
public var song:String;
|
public var song:String;
|
||||||
|
@ -32,7 +34,17 @@ class Song
|
||||||
var daSong:String = '';
|
var daSong:String = '';
|
||||||
var daSectionLengths:Array<Int> = [];
|
var daSectionLengths:Array<Int> = [];
|
||||||
|
|
||||||
var songData = Json.parse(Assets.getText('assets/data/' + jsonInput + '/' + jsonInput + '.json'));
|
var rawJson = Assets.getText('assets/data/' + jsonInput + '/' + jsonInput + '.json').trim();
|
||||||
|
|
||||||
|
while (!rawJson.endsWith("}"))
|
||||||
|
{
|
||||||
|
rawJson = rawJson.substr(0, rawJson.length - 1);
|
||||||
|
// LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE
|
||||||
|
}
|
||||||
|
|
||||||
|
trace(rawJson);
|
||||||
|
|
||||||
|
var songData = Json.parse(rawJson);
|
||||||
|
|
||||||
daNotes = songData.notes;
|
daNotes = songData.notes;
|
||||||
daSong = songData.song;
|
daSong = songData.song;
|
||||||
|
|
Loading…
Reference in a new issue