Skip to content

Commit

Permalink
expanded score text WHATTT YOOOO
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesisfeline committed Jun 26, 2024
1 parent 179a416 commit 1d5542b
Show file tree
Hide file tree
Showing 12 changed files with 307 additions and 62 deletions.
11 changes: 10 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
* text=auto eol=lf
* text=auto eol=lf

*.hxc linguist-language=Haxe
*.hscript linguist-language=Haxe
*.hx linguist-language=Haxe
*.hxs linguist-language=Haxe
*.xml linguist-language=XML
*.js linguist-language=JavaScript
*.md linguist-language=Markdown
*.json linguist-language=JSON
51 changes: 35 additions & 16 deletions source/funkin/Preferences.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ import funkin.save.Save;
*/
class Preferences
{
/**
* The framerate.
* @default `60`
*/
public static var framerate(get, set):Int;

static function get_framerate():Int
{
#if web
return 60;
#else
return Save?.instance?.options?.framerate ?? 60;
#end
}

/**
* Whenever to display a splash animation when perfectly hitting a note.
* @default `true`
Expand All @@ -41,6 +26,21 @@ class Preferences
return value;
}

/**
* The framerate.
* @default `60`
*/
public static var framerate(get, set):Int;

static function get_framerate():Int
{
#if web
return 60;
#else
return Save?.instance?.options?.framerate ?? 60;
#end
}

static function set_framerate(value:Int):Int
{
#if web
Expand Down Expand Up @@ -170,6 +170,25 @@ class Preferences
return value;
}

/**
* If disabled, the score text gets simplified to just the score display part.
* @default `false`
*/
public static var expandedScore(get, set):Bool;

static function get_expandedScore():Bool
{
return Save?.instance?.options?.expandedScore;
}

static function set_expandedScore(value:Bool):Bool
{
var save:Save = Save.instance;
save.options.expandedScore = value;
save.flush();
return value;
}

/**
* If enabled, an FPS and memory counter will be displayed even if this is not a debug build.
* @default `false`
Expand Down Expand Up @@ -233,7 +252,7 @@ class Preferences
save.flush();
return value;
}

/**
* Loads the user's preferences from the save data and apply them.
*/
Expand Down
20 changes: 20 additions & 0 deletions source/funkin/data/song/importer/FNFLegacyData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,30 @@ class LegacySongData
{
public var player1:String; // Boyfriend
public var player2:String; // Opponent
@:optional
public var gfVersion:String; // For Girlfriend (Psych Engine, i think)
@:optional
public var player3:String; // Deprecated in Psych, idk

@:jcustomparse(funkin.data.DataParse.eitherLegacyScrollSpeeds)
public var speed:Either<Float, LegacyScrollSpeeds>;
@:optional
public var stageDefault:Null<String>;
public var bpm:Float;
// FOR CHARTS MADE IN SOME ENGINES LIKE PSYCH:
// (Won't be actually parsed since these are here solely to get Psych charts working.)
@:optional
public var stage:String;
@:optional
public var arrowSkin:String;
@:optional
public var splashSkin:String;
@:optional
public var validScore:Bool;
// @:optional
// public var events:Array<Dynamic>; For some reason, the compiler doesn't like this shit. Thanks Haxe, very cool.
@:optional
public var needsVoices:Bool;

@:jcustomparse(funkin.data.DataParse.eitherLegacyNoteData)
public var notes:Either<Array<LegacyNoteSection>, LegacyNoteData>;
Expand Down Expand Up @@ -95,6 +113,8 @@ typedef LegacyNoteSection =
// BPM changes
public var ?changeBPM:Bool;
public var ?bpm:Float;
public var ?gfSection:Bool;
public var ?altAnim:Bool;
}

/**
Expand Down
Loading

0 comments on commit 1d5542b

Please sign in to comment.