Skip to content

Commit

Permalink
hello
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Aug 28, 2024
1 parent d6f6944 commit fda7c5f
Show file tree
Hide file tree
Showing 10 changed files with 731 additions and 342 deletions.
1 change: 0 additions & 1 deletion source/funkin/backend/data/WeekData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import sys.FileSystem;
#end
import lime.utils.Assets;
import funkin.game.states.PlayState;
import openfl.utils.Assets as OpenFlAssets;
import haxe.Json;
import haxe.format.JsonParser;

Expand Down
14 changes: 7 additions & 7 deletions source/funkin/backend/funkinLua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -608,26 +608,26 @@ class FunkinLua
#end
});

Lua_helper.add_callback(lua, "loadSong", function(?name:String = null, ?difficultyNum:Int = -1)
{
if (name == null || name.length < 1)
name = PlayState.SONG.song;
Lua_helper.add_callback(lua, "loadSong", function(?name:String = null, ?difficultyNum:Int = -1) {
if(name == null || name.length < 1)
name = Song.loadedSongName;
if (difficultyNum == -1)
difficultyNum = PlayState.storyDifficulty;

var poop = Highscore.formatSong(name, difficultyNum);
PlayState.SONG = Song.loadFromJson(poop, name);
Song.loadFromJson(poop, name);
PlayState.storyDifficulty = difficultyNum;
game.persistentUpdate = false;
FlxG.state.persistentUpdate = false;
LoadingState.loadAndSwitchState(new PlayState());

FlxG.sound.music.pause();
FlxG.sound.music.volume = 0;
if (game.vocals != null)
if(game != null && game.vocals != null)
{
game.vocals.pause();
game.vocals.volume = 0;
}
FlxG.camera.followLerp = 0;
});

Lua_helper.add_callback(lua, "loadGraphic", function(variable:String, image:String, ?gridX:Int = 0, ?gridY:Int = 0)
Expand Down
2 changes: 0 additions & 2 deletions source/funkin/backend/handlers/CutsceneHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import flixel.FlxBasic;
import flixel.util.FlxSort;
import flixel.util.FlxDestroyUtil;
import flixel.addons.display.FlxPieDial;

typedef CutsceneEvent = {
var time:Float;
var func:Void->Void;
Expand Down Expand Up @@ -74,7 +73,6 @@ class CutsceneHandler extends FlxBasic

if(_canSkip && cutsceneTime > 0.1)
{
@:privateAccess
if(Controls.instance.pressed('accept'))
holdingTime = Math.max(0, Math.min(_timeToSkip, holdingTime + elapsed));
else if (holdingTime > 0)
Expand Down
3 changes: 2 additions & 1 deletion source/funkin/game/FPS.hx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ class FPS extends TextField

var memoryMegas:Float = 0;

#if openfl
/* #if openfl
memoryMegas = Math.abs(FlxMath.roundDecimal(System.totalMemory / 1000000, 1));
text += "\nMemory: " + memoryMegas + " MB";
#end
text += '\nAstro Engine: ' + EngineData.engineData.coreVersion;
*/
#if debug
text += '\nCommit: ${CommitMacro.commitNumber} [${CommitMacro.commitHash}]';
#end
Expand Down
Loading

0 comments on commit fda7c5f

Please sign in to comment.