Removed old unused code
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
package funkin.backend.assets;
|
||||
|
||||
import lime.utils.AssetLibrary;
|
||||
|
||||
#if sys
|
||||
/**
|
||||
* Used to prevent crashes
|
||||
*/
|
||||
class ModdableAssetsFolder extends ModsFolderLibrary {
|
||||
public var oldLibrary:AssetLibrary;
|
||||
|
||||
public override function exists(id:String, type:String) {
|
||||
if (!id.startsWith("assets/") && !exists('assets/$id', type))
|
||||
return oldLibrary.exists(id, type);
|
||||
return super.exists(id, type);
|
||||
}
|
||||
|
||||
public override function getAsset(id:String, type:String):Dynamic {
|
||||
if (!id.startsWith("assets/")) {
|
||||
var possibleReplacement = getAsset('assets/$id', type);
|
||||
if (possibleReplacement != null)
|
||||
return possibleReplacement;
|
||||
return oldLibrary.getAsset(id, type);
|
||||
}
|
||||
return super.getAsset(id, type);
|
||||
}
|
||||
|
||||
public function new(folder:String, libName:String, oldLib:AssetLibrary) {
|
||||
super(folder, libName);
|
||||
oldLibrary = oldLib;
|
||||
trace(Type.getClassName(Type.getClass(oldLibrary)));
|
||||
}
|
||||
|
||||
private override function __parseAsset(asset:String):Bool {
|
||||
var prefix = 'assets/';
|
||||
if (!asset.startsWith(prefix)) return false;
|
||||
_parsedAsset = asset.substr(prefix.length);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#end
|
||||
@@ -141,25 +141,4 @@ class MemoryUtil {
|
||||
#end
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private static var _nb:Int = 0;
|
||||
private static var _nbD:Int = 0;
|
||||
private static var _zombie:Dynamic;
|
||||
|
||||
public static function destroyFlixelZombies() {
|
||||
#if cpp
|
||||
// Gc.enterGCFreeZone();
|
||||
|
||||
while ((_zombie = Gc.getNextZombie()) != null) {
|
||||
_nb++;
|
||||
if (_zombie is flixel.util.FlxDestroyUtil.IFlxDestroyable) {
|
||||
flixel.util.FlxDestroyUtil.destroy(cast(_zombie, flixel.util.FlxDestroyUtil.IFlxDestroyable));
|
||||
_nbD++;
|
||||
}
|
||||
}
|
||||
Sys.println('Zombies: ${_nb}; IFlxDestroyable Zombies: ${_nbD}');
|
||||
|
||||
// Gc.exitGCFreeZone();
|
||||
#end
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user