1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-05 17:00:39 +00:00

dynamic chart difficulties in progress

This commit is contained in:
Cameron Taylor 2022-01-31 14:16:28 -05:00
parent fc209188f2
commit 9f3a11a01a
3 changed files with 18 additions and 6 deletions

View file

@ -19,7 +19,7 @@ class Main extends Sprite
var framerate:Int = 60; // How many frames per second the game should run at.
#else
// TODO: This should probably be in the options menu?
var framerate:Int = 300; // How many frames per second the game should run at.
var framerate:Int = 144; // How many frames per second the game should run at.
#end
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets

View file

@ -12,6 +12,8 @@ typedef SwagSong =
{
var song:String;
var notes:FunnyNotes;
var difficulties:Array<String>;
var noteMap:Map<String, Array<SwagSection>>;
var bpm:Float;
var needsVoices:Bool;
var voiceList:Array<String>;
@ -119,6 +121,8 @@ class SongLoad
return {
song: 'Test',
notes: {easy: [], normal: [], hard: []},
difficulties: ["easy", "normal", "hard"],
noteMap: new Map(),
bpm: 150,
needsVoices: true,
player1: 'bf',
@ -210,10 +214,16 @@ class SongLoad
public static function parseJSONshit(rawJson:String):SwagSong
{
var swagShit:SwagSong = cast Json.parse(rawJson).song;
for (diff in Reflect.fields(Json.parse(rawJson).song.notes))
var songParsed:Dynamic = Json.parse(rawJson);
var swagShit:SwagSong = cast songParsed.song;
swagShit.difficulties = []; // reset it to default before load
swagShit.noteMap = new Map();
for (diff in Reflect.fields(songParsed.song.notes))
{
swagShit.difficulties.push(diff);
swagShit.noteMap[diff] = cast Reflect.field(songParsed.song.notes, diff);
castArrayToNoteData(swagShit.noteMap[diff]);
switch (diff)
{
case "easy":
@ -224,9 +234,11 @@ class SongLoad
case "hard":
castArrayToNoteData(swagShit.notes.hard);
}
trace(diff);
}
trace(swagShit.noteMap.toString());
trace('that was just notemap string lol');
swagShit.validScore = true;
trace("SONG SHIT ABOUTTA WEEK AGOOO");

View file

@ -182,7 +182,7 @@ class PolymodHandler
}
#end
public static function getAllMods():Array<ModMetadata>
public static function getAllMods():Array<#if cpp ModMetadata #else Dynamic #end> // this is shitty but ModMetadata isn't imported on HTML5! And I'm too lazy to actually do it properly!
{
#if cpp
trace('Scanning the mods folder...');