Skip to content

Commit

Permalink
YEAHHH
Browse files Browse the repository at this point in the history
1. Fixed icons not showing properly if you had Opponent Chart turned on
2. Fixed winning icons not playing (because of the previous commit)
3. The guns ascension now accounts for if you're playing as the opponent or not
  • Loading branch information
JordanSantiagoYT authored Oct 25, 2023
1 parent 209f739 commit f3c7b54
Show file tree
Hide file tree
Showing 10 changed files with 14,708 additions and 14,671 deletions.
1,704 changes: 852 additions & 852 deletions source/ClientPrefs.hx

Large diffs are not rendered by default.

676 changes: 338 additions & 338 deletions source/CreditsState.hx

Large diffs are not rendered by default.

1,452 changes: 726 additions & 726 deletions source/FreeplayState.hx

Large diffs are not rendered by default.

1,296 changes: 648 additions & 648 deletions source/GameplayChangersSubstate.hx

Large diffs are not rendered by default.

458 changes: 229 additions & 229 deletions source/Main.hx

Large diffs are not rendered by default.

1,320 changes: 660 additions & 660 deletions source/Paths.hx

Large diffs are not rendered by default.

852 changes: 426 additions & 426 deletions source/PauseSubState.hx

Large diffs are not rendered by default.

19,703 changes: 9,870 additions & 9,833 deletions source/PlayState.hx

Large diffs are not rendered by default.

296 changes: 148 additions & 148 deletions source/Song.hx
Original file line number Diff line number Diff line change
@@ -1,148 +1,148 @@
package;

import Section.SwagSection;
import haxe.Json;
import haxe.format.JsonParser;
import lime.utils.Assets;

#if sys
import sys.io.File;
import sys.FileSystem;
#end

using StringTools;

typedef SwagSong =
{
var song:String;
var notes:Array<SwagSection>;
var events:Array<Dynamic>;
var bpm:Float;
var needsVoices:Bool;
var speed:Float;

var player1:String;
var player2:String;
var gfVersion:String;
var stage:String;

var songCredit:String;

var arrowSkin:String;
var splashSkin:String;
var validScore:Bool;
}

class Song
{
public var song:String;
public var notes:Array<SwagSection>;
public var events:Array<Dynamic>;
public var bpm:Float;
public var needsVoices:Bool = true;
public var arrowSkin:String;
public var splashSkin:String;
public var speed:Float = 1;
public var stage:String;
public var songCredit:String;
public var player1:String = 'bf';
public var player2:String = 'dad';
public var gfVersion:String = 'gf';
public var gfVersion2:String = 'gf-bent';

private static function onLoadJson(songJson:Dynamic) // Convert old charts to newest format
{
if(songJson.gfVersion == null)
{
songJson.gfVersion = songJson.player3;
songJson.player3 = null;
}

if(songJson.events == null)
{
songJson.events = [];
for (secNum in 0...songJson.notes.length)
{
var sec:SwagSection = songJson.notes[secNum];

var i:Int = 0;
var notes:Array<Dynamic> = sec.sectionNotes;
var len:Int = notes.length;
while(i < len)
{
var note:Array<Dynamic> = notes[i];
if(note[1] < 0)
{
songJson.events.push([note[0], [[note[2], note[3], note[4]]]]);
notes.remove(note);
len = notes.length;
}
else i++;
}
}
}
}

public function new(song, notes, bpm)
{
this.song = song;
this.notes = notes;
this.bpm = bpm;
}

public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
{
var rawJson = null;

var formattedFolder:String = Paths.formatToSongPath(folder);
var formattedSong:String = Paths.formatToSongPath(jsonInput);
#if MODS_ALLOWED
var moddyFile:String = Paths.modsJson(formattedFolder + '/' + formattedSong);
if(FileSystem.exists(moddyFile)) {
rawJson = File.getContent(moddyFile).trim();
}
#end

if(rawJson == null) {
#if sys
rawJson = File.getContent(SUtil.getPath() + Paths.json(formattedFolder + '/' + formattedSong)).trim();
#else
rawJson = Assets.getText(Paths.json(formattedFolder + '/' + formattedSong)).trim();
#end
}

while (!rawJson.endsWith("}"))
{
rawJson = rawJson.substr(0, rawJson.length - 1);
// LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE
}

// FIX THE CASTING ON WINDOWS/NATIVE
// Windows???
// trace(songData);

// trace('LOADED FROM JSON: ' + songData.notes);
/*
for (i in 0...songData.notes.length)
{
trace('LOADED FROM JSON: ' + songData.notes[i].sectionNotes);
// songData.notes[i].sectionNotes = songData.notes[i].sectionNotes
}
daNotes = songData.notes;
daSong = songData.song;
daBpm = songData.bpm; */

var songJson:Dynamic = parseJSONshit(rawJson);
if(jsonInput != 'events') StageData.loadDirectory(songJson);
onLoadJson(songJson);
return songJson;
}

public static function parseJSONshit(rawJson:String):SwagSong
{
var swagShit:SwagSong = cast Json.parse(rawJson).song;
swagShit.validScore = true;
return swagShit;
}
}
package;

import Section.SwagSection;
import haxe.Json;
import haxe.format.JsonParser;
import lime.utils.Assets;

#if sys
import sys.io.File;
import sys.FileSystem;
#end

using StringTools;

typedef SwagSong =
{
var song:String;
var notes:Array<SwagSection>;
var events:Array<Dynamic>;
var bpm:Float;
var needsVoices:Bool;
var speed:Float;

var player1:String;
var player2:String;
var gfVersion:String;
var stage:String;

var songCredit:String;

var arrowSkin:String;
var splashSkin:String;
var validScore:Bool;
}

class Song
{
public var song:String;
public var notes:Array<SwagSection>;
public var events:Array<Dynamic>;
public var bpm:Float;
public var needsVoices:Bool = true;
public var arrowSkin:String;
public var splashSkin:String;
public var speed:Float = 1;
public var stage:String;
public var songCredit:String;
public var player1:String = 'bf';
public var player2:String = 'dad';
public var gfVersion:String = 'gf';
public var gfVersion2:String = 'gf-bent';

private static function onLoadJson(songJson:Dynamic) // Convert old charts to newest format
{
if(songJson.gfVersion == null)
{
songJson.gfVersion = songJson.player3;
songJson.player3 = null;
}

if(songJson.events == null)
{
songJson.events = [];
for (secNum in 0...songJson.notes.length)
{
var sec:SwagSection = songJson.notes[secNum];

var i:Int = 0;
var notes:Array<Dynamic> = sec.sectionNotes;
var len:Int = notes.length;
while(i < len)
{
var note:Array<Dynamic> = notes[i];
if(note[1] < 0)
{
songJson.events.push([note[0], [[note[2], note[3], note[4]]]]);
notes.remove(note);
len = notes.length;
}
else i++;
}
}
}
}

public function new(song, notes, bpm)
{
this.song = song;
this.notes = notes;
this.bpm = bpm;
}

public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
{
var rawJson = null;

var formattedFolder:String = Paths.formatToSongPath(folder);
var formattedSong:String = Paths.formatToSongPath(jsonInput);
#if MODS_ALLOWED
var moddyFile:String = Paths.modsJson(formattedFolder + '/' + formattedSong);
if(FileSystem.exists(moddyFile)) {
rawJson = File.getContent(moddyFile).trim();
}
#end

if(rawJson == null) {
#if sys
rawJson = File.getContent(SUtil.getPath() + Paths.json(formattedFolder + '/' + formattedSong)).trim();
#else
rawJson = Assets.getText(Paths.json(formattedFolder + '/' + formattedSong)).trim();
#end
}

while (!rawJson.endsWith("}"))
{
rawJson = rawJson.substr(0, rawJson.length - 1);
// LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE
}

// FIX THE CASTING ON WINDOWS/NATIVE
// Windows???
// trace(songData);

// trace('LOADED FROM JSON: ' + songData.notes);
/*
for (i in 0...songData.notes.length)
{
trace('LOADED FROM JSON: ' + songData.notes[i].sectionNotes);
// songData.notes[i].sectionNotes = songData.notes[i].sectionNotes
}
daNotes = songData.notes;
daSong = songData.song;
daBpm = songData.bpm; */

var songJson:Dynamic = parseJSONshit(rawJson);
if(jsonInput != 'events') StageData.loadDirectory(songJson);
onLoadJson(songJson);
return songJson;
}

public static function parseJSONshit(rawJson:String):SwagSong
{
var swagShit:SwagSong = cast Json.parse(rawJson).song;
swagShit.validScore = true;
return swagShit;
}
}
Loading

0 comments on commit f3c7b54

Please sign in to comment.