tiny chart fix
This commit is contained in:
@@ -13,10 +13,11 @@ class BaseGameParser {
|
||||
result.scrollSpeed = data.speed;
|
||||
result.stage = data.stage;
|
||||
|
||||
var p2isGF:Bool = false;
|
||||
result.strumLines.push({
|
||||
characters: [data.player2],
|
||||
type: 0,
|
||||
position: data.player2.startsWith("gf") ? "girlfriend" : "dad",
|
||||
position: (p2isGF = data.player2.startsWith("gf")) ? "girlfriend" : "dad",
|
||||
notes: []
|
||||
});
|
||||
result.strumLines.push({
|
||||
@@ -25,7 +26,7 @@ class BaseGameParser {
|
||||
position: "boyfriend",
|
||||
notes: []
|
||||
});
|
||||
if (data.gf != "none") {
|
||||
if (!p2isGF && data.gf != "none") {
|
||||
result.strumLines.push({
|
||||
characters: [data.gf != null ? data.gf : "gf"],
|
||||
type: 2,
|
||||
|
||||
@@ -86,29 +86,33 @@ class Chart {
|
||||
fromMods: Paths.assetsTree.existsSpecific(chartPath, "TEXT", MODS)
|
||||
};
|
||||
|
||||
var valid:Bool = true;
|
||||
if (!Assets.exists(chartPath)) {
|
||||
Logs.trace('Chart for song ${songName} ($difficulty) at "$chartPath" was not found.', ERROR, RED);
|
||||
return base;
|
||||
valid = false;
|
||||
}
|
||||
var data:Dynamic = null;
|
||||
try {
|
||||
data = Json.parse(Assets.getText(chartPath));
|
||||
if (valid)
|
||||
data = Json.parse(Assets.getText(chartPath));
|
||||
} catch(e) {
|
||||
Logs.trace('Could not parse chart for song ${songName} ($difficulty): ${Std.string(e)}', ERROR, RED);
|
||||
}
|
||||
|
||||
/**
|
||||
* CHART CONVERSION
|
||||
*/
|
||||
#if REGION
|
||||
if (Reflect.hasField(data, "codenameChart") && Reflect.field(data, "codenameChart") == true) {
|
||||
// codename chart
|
||||
base = data;
|
||||
} else {
|
||||
// base game chart
|
||||
BaseGameParser.parse(data, base);
|
||||
if (data != null) {
|
||||
/**
|
||||
* CHART CONVERSION
|
||||
*/
|
||||
#if REGION
|
||||
if (Reflect.hasField(data, "codenameChart") && Reflect.field(data, "codenameChart") == true) {
|
||||
// codename chart
|
||||
base = data;
|
||||
} else {
|
||||
// base game chart
|
||||
BaseGameParser.parse(data, base);
|
||||
}
|
||||
#end
|
||||
}
|
||||
#end
|
||||
|
||||
if (base.meta == null)
|
||||
base.meta = loadChartMeta(songName, difficulty, base.fromMods);
|
||||
|
||||
@@ -238,8 +238,10 @@ class FreeplayState extends MusicBeatState
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
|
||||
#if sys
|
||||
if (FlxG.keys.justPressed.EIGHT && Sys.args().contains("-livereload"))
|
||||
convertChart();
|
||||
#end
|
||||
|
||||
if (controls.ACCEPT && !dontPlaySongThisFrame)
|
||||
select();
|
||||
|
||||
@@ -92,19 +92,11 @@ class ModsFolder {
|
||||
Paths.assetsTree.clearCache();
|
||||
FlxG.bitmap.reset();
|
||||
Paths.assetsTree.removeLibrary(loadedMods[mod]);
|
||||
Assets.unloadLibrary('mods/$mod'.toLowerCase());
|
||||
|
||||
loadedMods[mod] = null;
|
||||
}
|
||||
|
||||
public static function prepareLibrary(libName:String, force:Bool = false) {
|
||||
if (Assets.hasLibrary(libName)) {
|
||||
if (force)
|
||||
Assets.unloadLibrary(libName);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
var assets:AssetManifest = new AssetManifest();
|
||||
assets.name = libName;
|
||||
assets.version = 2;
|
||||
@@ -119,7 +111,6 @@ class ModsFolder {
|
||||
lib.prefix = 'assets/';
|
||||
@:privateAccess
|
||||
openLib.__proxy = cast(lib, lime.utils.AssetLibrary);
|
||||
Assets.registerLibrary(libName, openLib);
|
||||
return openLib;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package funkin.native;
|
||||
|
||||
typedef HiddenProcess = sys.io.Process;
|
||||
typedef HiddenProcess = #if sys sys.io.Process #else Dynamic #end;
|
||||
@@ -23,6 +23,7 @@ import flixel.addons.transition.TransitionData;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxRect;
|
||||
import lime.app.Application;
|
||||
import funkin.system.modules.*;
|
||||
|
||||
#if ALLOW_MULTITHREADING
|
||||
import sys.thread.Thread;
|
||||
@@ -199,7 +200,6 @@ class Main extends Sprite
|
||||
|
||||
FlxG.fixedTimestep = false;
|
||||
|
||||
refreshAssets();
|
||||
|
||||
FlxG.scaleMode = scaleMode = new FunkinRatioScaleMode();
|
||||
|
||||
@@ -214,7 +214,6 @@ class Main extends Sprite
|
||||
#if MOD_SUPPORT
|
||||
ModsFolder.switchMod(modToLoad.getDefault(Options.lastLoadedMod));
|
||||
#end
|
||||
|
||||
initTransition();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package funkin.system.framerate;
|
||||
|
||||
import openfl.display.Bitmap;
|
||||
import openfl.display.BitmapData;
|
||||
import flixel.math.FlxPoint;
|
||||
import openfl.events.KeyboardEvent;
|
||||
import openfl.display.DisplayObject;
|
||||
@@ -23,10 +25,18 @@ class Framerate extends Sprite {
|
||||
public static var debugMode:Bool = false;
|
||||
public static var offset:FlxPoint = new FlxPoint();
|
||||
|
||||
public var bgSprite:Sprite;
|
||||
public var bgSprite:Bitmap;
|
||||
|
||||
public var categories:Array<FramerateCategory> = [];
|
||||
|
||||
@:isVar public static var __bitmap(get, null):BitmapData = null;
|
||||
|
||||
private static function get___bitmap():BitmapData {
|
||||
if (__bitmap == null)
|
||||
__bitmap = new BitmapData(1, 1, 0xFF000000);
|
||||
return __bitmap;
|
||||
}
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
if (instance != null) throw "Cannot create another instance";
|
||||
@@ -43,10 +53,10 @@ class Framerate extends Sprite {
|
||||
}
|
||||
});
|
||||
|
||||
bgSprite = new Sprite();
|
||||
bgSprite.graphics.beginFill(0xFF000000);
|
||||
bgSprite.graphics.drawRect(0, 0, 1, 1);
|
||||
bgSprite.graphics.endFill();
|
||||
if (__bitmap == null)
|
||||
__bitmap = new BitmapData(1, 1, 0xFF000000);
|
||||
|
||||
bgSprite = new Bitmap(__bitmap);
|
||||
bgSprite.alpha = 0;
|
||||
addChild(bgSprite);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.system.framerate;
|
||||
|
||||
import openfl.display.Bitmap;
|
||||
import openfl.text.TextFormat;
|
||||
import openfl.display.Sprite;
|
||||
import openfl.text.TextField;
|
||||
@@ -8,7 +9,7 @@ class FramerateCategory extends Sprite {
|
||||
public var title:TextField;
|
||||
public var text:TextField;
|
||||
|
||||
public var bgSprite:Sprite;
|
||||
public var bgSprite:Bitmap;
|
||||
|
||||
private var _text:String = "";
|
||||
|
||||
@@ -19,10 +20,7 @@ class FramerateCategory extends Sprite {
|
||||
this.title = new TextField();
|
||||
this.text = new TextField();
|
||||
|
||||
bgSprite = new Sprite();
|
||||
bgSprite.graphics.beginFill(0xFF000000);
|
||||
bgSprite.graphics.drawRect(0, 0, 1, 1);
|
||||
bgSprite.graphics.endFill();
|
||||
bgSprite = new Bitmap(Framerate.__bitmap);
|
||||
bgSprite.alpha = 0.5;
|
||||
addChild(bgSprite);
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.system.modules;
|
||||
|
||||
import lime.media.AudioManager;
|
||||
import flixel.system.FlxSound;
|
||||
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.system.modules;
|
||||
|
||||
import lime.system.System;
|
||||
import funkin.windows.WindowsAPI;
|
||||
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.system.modules;
|
||||
|
||||
import openfl.utils.AssetCache;
|
||||
import openfl.display.BitmapData;
|
||||
Reference in New Issue
Block a user