This commit is contained in:
lunarcleint
2022-12-26 15:45:51 -07:00
5 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# Friday Night Funkin' - Codename Engine (WIP)
## PLEASE NOTE - THIS IS STILL IN AN ALPHA STATE
## PLEASE NOTE - THIS IS STILL IN A BETA STATE
Early alpha of Codename Engine, known issues:
- Some options are missing
+1 -1
View File
@@ -1 +1 @@
1812
1799
+1 -2
View File
@@ -524,9 +524,8 @@ class PlayState extends MusicBeatState
Paths.getFolderContent('data/charts/', false, true, !fromMods)]) {
for(file in content) {
var ext = Path.extension(file).toLowerCase();
if (Script.scriptExtensions.contains(ext)) {
if (Script.scriptExtensions.contains(ext))
scripts.add(Script.create(file));
}
}
}
}
+1 -1
View File
@@ -152,7 +152,7 @@ class Conductor
var lastPos = lastSongPos;
if (lastSongPos != (lastSongPos = FlxG.sound.music.time)) {
// update conductor
var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Lib.getTimer()));
var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Main.time));
var elapsedAL = (lastSongPos - lastPos);
speed = FlxMath.bound(FlxMath.lerp(speed, timeUntilUpdate / elapsedAL, timeUntilUpdate / 1000), 0.85, 1.15);
songPosition = lastSongPos;
+9 -1
View File
@@ -12,7 +12,7 @@ import funkin.options.Options;
import flixel.FlxGame;
import flixel.FlxState;
import openfl.Assets;
import openfl.Lib;
import flash.Lib;
import openfl.display.FPS;
import openfl.display.Sprite;
import openfl.events.Event;
@@ -47,6 +47,8 @@ class Main extends Sprite
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets
public static var time:Int = 0;
// You can pretty much ignore everything from here on - your code should go in your states.
#if sys
@@ -126,7 +128,13 @@ class Main extends Sprite
#end
}
private static function getTimer():Int {
return time = Lib.getTimer();
}
public function loadGameSettings() {
@:privateAccess
FlxG.game.getTimer = getTimer;
#if sys
for(i in 0...4)
gameThreads.push(Thread.createWithEventLoop(function() {Thread.current().events.promise();}));