new latest build
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1354
|
||||
1360
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
function beatHit(curBeat) {
|
||||
switch(curBeat) {
|
||||
case 16:
|
||||
gfSpeed = 2;
|
||||
case 48:
|
||||
gfSpeed = 1;
|
||||
case 80:
|
||||
gfSpeed = 2;
|
||||
case 112:
|
||||
gfSpeed = 1;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -28,6 +28,7 @@ import haxe.xml.Access;
|
||||
|
||||
using StringTools;
|
||||
|
||||
@:allow(funkin.mods.ModsFolder)
|
||||
class TitleState extends MusicBeatState
|
||||
{
|
||||
static var initialized:Bool = false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.mods;
|
||||
|
||||
import funkin.menus.TitleState;
|
||||
import funkin.system.Main;
|
||||
import openfl.utils.AssetCache;
|
||||
import flixel.util.FlxSignal.FlxTypedSignal;
|
||||
@@ -8,6 +9,7 @@ import openfl.utils.AssetManifest;
|
||||
import openfl.utils.AssetLibrary;
|
||||
import flixel.graphics.FlxGraphic;
|
||||
import flixel.util.FlxSignal.FlxTypedSignal;
|
||||
import flixel.FlxG;
|
||||
|
||||
#if MOD_SUPPORT
|
||||
import sys.FileSystem;
|
||||
@@ -74,7 +76,12 @@ class ModsFolder {
|
||||
|
||||
Main.refreshAssets();
|
||||
onModSwitch.dispatch(ModsFolder.currentModFolder);
|
||||
FlxG.resetState();
|
||||
if (FlxG.sound.music != null && FlxG.sound.music.playing)
|
||||
FlxG.sound.music.fadeOut(0.25, 0, function(t) {
|
||||
FlxG.sound.music.stop();
|
||||
});
|
||||
TitleState.initialized = false;
|
||||
FlxG.switchState(new TitleState());
|
||||
}
|
||||
|
||||
public static function unloadMod(mod:String) {
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
package funkin.mods;
|
||||
|
||||
import lime.utils.Log;
|
||||
import lime.utils.AssetLibrary;
|
||||
import lime.utils.Assets as LimeAssets;
|
||||
import lime.utils.AssetManifest;
|
||||
|
||||
import haxe.io.Path;
|
||||
import lime.app.Event;
|
||||
import lime.app.Future;
|
||||
import lime.app.Promise;
|
||||
import lime.media.AudioBuffer;
|
||||
import lime.graphics.Image;
|
||||
import lime.net.HTTPRequest;
|
||||
import lime.text.Font;
|
||||
import lime.utils.AssetType;
|
||||
import lime.utils.Bytes;
|
||||
|
||||
#if MOD_SUPPORT
|
||||
@@ -124,7 +116,7 @@ class ModsFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
|
||||
|
||||
public override function exists(asset:String, type:String):Bool {
|
||||
if(!__parseAsset(asset)) return false;
|
||||
|
||||
trace('$folderPath: $_parsedAsset: ${FileSystem.exists(getAssetPath())}');
|
||||
return FileSystem.exists(getAssetPath());
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,7 @@ class Main extends Sprite
|
||||
Paths.assetsTree = new AssetsLibraryList();
|
||||
|
||||
Logs.init();
|
||||
|
||||
// TODO: Mod switching
|
||||
Paths.init();
|
||||
ModsFolder.init();
|
||||
#if MOD_SUPPORT
|
||||
ModsFolder.switchMod("introMod");
|
||||
@@ -187,8 +186,6 @@ class Main extends Sprite
|
||||
|
||||
if (FlxG.game.soundTray != null)
|
||||
FlxG.game.soundTray.text.setTextFormat(new TextFormat(Paths.font("vcr.ttf")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function initTransition() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.system;
|
||||
|
||||
import flixel.graphics.frames.FlxFramesCollection;
|
||||
import haxe.io.Path;
|
||||
import funkin.mods.LimeLibrarySymbol;
|
||||
import flixel.FlxG;
|
||||
@@ -21,6 +22,14 @@ class Paths
|
||||
|
||||
public static var assetsTree:AssetsLibraryList;
|
||||
|
||||
public static var tempFramesCache:Map<String, FlxFramesCollection> = [];
|
||||
|
||||
public static function init() {
|
||||
FlxG.signals.preStateSwitch.add(function() {
|
||||
tempFramesCache.clear();
|
||||
});
|
||||
}
|
||||
|
||||
public static function getPath(file:String, type:AssetType, library:Null<String>, skipModsVerification:Bool = false)
|
||||
{
|
||||
if (library != null)
|
||||
@@ -163,8 +172,14 @@ class Paths
|
||||
return FlxAtlasFrames.fromSparrow(image(key, library), file('images/$key.xml', library));
|
||||
}
|
||||
|
||||
inline static public function getFrames(key:String, ?library:String) {
|
||||
return CoolUtil.loadFrames(Paths.image(key, library, true));
|
||||
static public function getFrames(key:String, ?library:String) {
|
||||
if (tempFramesCache.exists(key)) {
|
||||
if (tempFramesCache[key].parent.bitmap.readable)
|
||||
return tempFramesCache[key];
|
||||
else
|
||||
tempFramesCache[key] = null;
|
||||
}
|
||||
return tempFramesCache[key] = CoolUtil.loadFrames(Paths.image(key, library, true));
|
||||
}
|
||||
inline static public function getSparrowAtlasAlt(key:String)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user