mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-09 00:04:42 +00:00
accomodate for map stuff IN PROGREESSSS
This commit is contained in:
parent
5d37413c35
commit
7e1dfd67d3
|
@ -552,7 +552,7 @@ class Character extends FlxSprite
|
|||
{
|
||||
var swagshit = SongLoad.loadFromJson('picospeaker', 'stress');
|
||||
|
||||
var notes = swagshit.notes[0];
|
||||
var notes = swagshit.extraNotes.get('picospeaker');
|
||||
|
||||
for (section in notes)
|
||||
{
|
||||
|
|
|
@ -132,14 +132,15 @@ class ChartingState extends MusicBeatState
|
|||
{
|
||||
_song = {
|
||||
song: 'Test',
|
||||
notes: [[]],
|
||||
notes: [],
|
||||
bpm: 150,
|
||||
needsVoices: true,
|
||||
player1: 'bf',
|
||||
player2: 'dad',
|
||||
speed: [1],
|
||||
speed: [],
|
||||
validScore: false,
|
||||
voiceList: ["BF", "BF-pixel"]
|
||||
voiceList: ["BF", "BF-pixel"],
|
||||
extraNotes: []
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Conductor
|
|||
var curBPM:Float = song.bpm;
|
||||
var totalSteps:Int = 0;
|
||||
var totalPos:Float = 0;
|
||||
for (i in 0...song.notes.length)
|
||||
for (i in 0...song.notes[SongLoad.curDiff].length)
|
||||
{
|
||||
if (song.notes[SongLoad.curDiff][i].changeBPM && song.notes[SongLoad.curDiff][i].bpm != curBPM)
|
||||
{
|
||||
|
|
|
@ -485,7 +485,8 @@ class FreeplayState extends MusicBeatState
|
|||
PlayState.SONG = SongLoad.loadFromJson(poop, songs[curSelected].songName.toLowerCase());
|
||||
PlayState.isStoryMode = false;
|
||||
PlayState.storyDifficulty = curDifficulty;
|
||||
SongLoad.curDiff = curDifficulty;
|
||||
// SongLoad.curDiff = Highscore.formatSong()
|
||||
SongLoad.curDiff = 'normal';
|
||||
|
||||
PlayState.storyWeek = songs[curSelected].week;
|
||||
trace('CUR WEEK' + PlayState.storyWeek);
|
||||
|
|
|
@ -10,29 +10,24 @@ using StringTools;
|
|||
typedef SwagSong =
|
||||
{
|
||||
var song:String;
|
||||
var notes:Array<Array<SwagSection>>;
|
||||
var notes:Map<String, Array<SwagSection>>;
|
||||
var bpm:Float;
|
||||
var needsVoices:Bool;
|
||||
var voiceList:Array<String>;
|
||||
var speed:Array<Float>;
|
||||
var speed:Map<String, Float>;
|
||||
|
||||
var player1:String;
|
||||
var player2:String;
|
||||
var validScore:Bool;
|
||||
var extraNotes:Map<String, Array<SwagSection>>;
|
||||
}
|
||||
|
||||
class SongLoad
|
||||
{
|
||||
public static var curDiff(default, set):Int;
|
||||
public static var curDiff:String = 'normal';
|
||||
public static var curNotes:Array<SwagSection>;
|
||||
public static var songData:SwagSong;
|
||||
|
||||
static function set_curDiff(val:Int):Int
|
||||
{
|
||||
// automatically changes the selected NOTES?
|
||||
return val;
|
||||
}
|
||||
|
||||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
||||
{
|
||||
var rawJson = Assets.getText(Paths.json(folder.toLowerCase() + '/' + jsonInput.toLowerCase())).trim();
|
||||
|
@ -68,7 +63,10 @@ class SongLoad
|
|||
swagShit.validScore = true;
|
||||
// swagShit.notes[0] = cast Json.parse(rawJson).song.notes[SongLoad.curDiff]; // by default uses
|
||||
|
||||
trace(swagShit);
|
||||
|
||||
songData = swagShit;
|
||||
// curNotes = songData.notes.get('normal');
|
||||
|
||||
return swagShit;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue