Skip to content

Commit

Permalink
did some more stuff
Browse files Browse the repository at this point in the history
...something something PlayState line 5895
  • Loading branch information
Joalor64GH authored Jun 2, 2024
1 parent c72f0f8 commit 3961ee9
Show file tree
Hide file tree
Showing 38 changed files with 33,818 additions and 162 deletions.
33,433 changes: 33,433 additions & 0 deletions art/flashFiles/PixelArial11BoldLatin.sfd

Large diffs are not rendered by default.

Binary file removed assets/fonts/FridayNightFunkin-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/comic.ttf
Binary file not shown.
Binary file removed assets/fonts/funkin.otf
Binary file not shown.
Binary file removed assets/fonts/pixel.otf
Binary file not shown.
Binary file added assets/fonts/pixel.ttf
Binary file not shown.
Binary file modified assets/fonts/vcr.ttf
Binary file not shown.
Binary file removed assets/fonts/vcrEXTD.ttf
Binary file not shown.
Binary file removed assets/fonts/vcrSmooth.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion source/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Init extends FlxState

coolText = new FlxText(20, FlxG.height - 80, 1000, "", 22);
coolText.scrollFactor.set();
coolText.setFormat("VCR OSD Mono", 26, 0xFFffffff, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
coolText.setFormat(Paths.font('vcr.ttf'), 26, 0xFFffffff, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(coolText);

var loadingSpeen:FlxSprite = new FlxSprite(FlxG.width - 91, FlxG.height - 91).loadGraphic(Paths.image("loader/loader"));
Expand Down
126 changes: 10 additions & 116 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import meta.ButtplugUtils;
import core.ToastCore;
import meta.video.*;
import debug.FPS;
import openfl.Lib;
import lime.system.System as LimeSystem;
import lime.utils.Log as LimeLogger;
#if sys
Expand Down Expand Up @@ -181,7 +180,16 @@ class Main extends Sprite
#end

LimeLogger.println(msg);
Lib.application.window.alert(msg + '\nIf you think this shouldn\'t have happened, report this error to GitHub repository! Please? Thanks :)\nhttps://github.com/Joalor64GH/Joalor64-Engine-Rewrite/', 'Error!');

FlxG.bitmap.dumpCache();
FlxG.bitmap.clearCache();

if (FlxG.sound.music != null)
FlxG.sound.music.stop();

DiscordClient.shutdown();

Lib.application.window.alert(msg + '\nIf you think this shouldn\'t have happened, report this error to GitHub repository! Please? Thanks :)\nhttps://github.com/Joalor64GH/Joalor64-Engine-Rewrite/issues', 'Error!');
LimeSystem.exit(1);
}

Expand All @@ -191,7 +199,6 @@ class Main extends Sprite
var newVol:Float = 0.3;

var focused:Bool = true;

var focusMusicTween:FlxTween;

function onWindowFocusOut()
Expand Down Expand Up @@ -236,124 +243,11 @@ class Main extends Sprite

class Joalor64Game extends FlxGame
{
// var _viewingCrash:Bool = false;

public function new(gameWidth:Int = 0, gameHeight:Int = 0, initialState:Class<FlxState>, updateFramerate:Int = 60, drawFramerate:Int = 60, skipSplash:Bool = false, startFullscreen:Bool = false)
{
super(gameWidth, gameHeight, initialState, updateFramerate, drawFramerate, skipSplash, startFullscreen);
_customSoundTray = Joalor64SoundTray;
}

/*
override function create(_):Void {
try {
super.create(_);
removeChild(soundTray);
addChild(soundTray);
}
catch (e:Exception)
return exceptionCaught(e, 'create');
}
override function onFocus(_):Void {
try super.onFocus(_) catch (e:Exception)
return exceptionCaught(e, 'onFocus');
}
override function onFocusLost(_):Void {
try super.onFocusLost(_) catch (e:Exception)
return exceptionCaught(e, 'onFocusLost');
}
override function onEnterFrame(_):Void {
try super.onEnterFrame(_) catch (e:Exception)
return exceptionCaught(e, 'onEnterFrame');
}
override function update():Void {
if (_viewingCrash) return;
try super.update() catch (e:Exception)
return exceptionCaught(e, 'update');
}
override function draw():Void {
try super.draw() catch (e:Exception)
return exceptionCaught(e, 'draw');
}
@:allow(flixel.FlxG)
override function onResize(_):Void {
if (_viewingCrash) return;
super.onResize(_);
}
private function exceptionCaught(e:Exception, ?func:String = null)
{
#if CRASH_HANDLER
if (_viewingCrash) return;
var path:String;
var fileStack:Array<String> = [];
var dateNow:String = Date.now().toString();
var println = #if sys Sys.println #else trace #end;
dateNow = StringTools.replace(dateNow, " ", "_");
dateNow = StringTools.replace(dateNow, ":", "'");
path = 'crash/J64E_${dateNow}.txt';
for (stackItem in CallStack.exceptionStack(true)) {
switch (stackItem) {
case CFunction:
fileStack.push('Non-Haxe (C) Function');
case Module(moduleName):
fileStack.push('Module (${moduleName})');
case FilePos(s, file, line, col):
fileStack.push('${file} (line ${line})');
case Method(className, method):
fileStack.push('${className} (method ${method})');
case LocalFunction(name):
fileStack.push('Local Function (${name})');
}
println(stackItem);
}
fileStack.insert(0, "Exception: " + e.message);
final msg:String = fileStack.join('\n');
try
{
if (!FileSystem.exists("crash/"))
FileSystem.createDirectory("crash/");
File.saveContent(path, '${msg}\n');
}
catch (e:Exception)
trace('Couldn\'t save error message "${e.message}"');
final funcThrew:String = '${func != null ? ' thrown at "${func}" function' : ""}';
println(msg + funcThrew);
println(e.message);
println('Crash dump saved in ${Path.normalize(path)}');
FlxG.bitmap.dumpCache();
FlxG.bitmap.clearCache();
if (FlxG.sound.music != null)
FlxG.sound.music.stop();
DiscordClient.shutdown();
Main.instance.addChild(new backend.CrashHandler(e.details()));
_viewingCrash = true;
#else
throw e;
#end
}
*/
}

class Joalor64SoundTray extends flixel.system.ui.FlxSoundTray
Expand Down
1 change: 1 addition & 0 deletions source/backend/CrashHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import openfl.ui.Keyboard;
* @see https://github.com/crowplexus/Forever-Engine/
*/

// old code, keeping for archival purposes
class CrashHandler extends Sprite
{
var errorTitle:RotatableTextField;
Expand Down
6 changes: 3 additions & 3 deletions source/import.hx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ import js.html.*;
#end

// Joalor64 Engine Imports
import animateatlas.AtlasFrameMaker;

#if desktop
import meta.data.dependency.Discord;
#end

import animateatlas.AtlasFrameMaker;

import meta.data.alphabet.Alphabet;
import meta.data.Conductor;
import meta.data.Conductor.BPMChangeEvent;
Expand All @@ -67,6 +66,7 @@ import meta.ArtemisIntegration;
import meta.Controls;
import meta.data.options.*;
import meta.data.alphabet.*;
import meta.data.input.*;
import meta.data.*;
import meta.state.*;
import meta.substate.*;
Expand Down
9 changes: 6 additions & 3 deletions source/meta/data/ClientPrefs.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package meta.data;

import flixel.input.keyboard.FlxKey;

class ClientPrefs {
public static var downScroll:Bool = false;
public static var middleScroll:Bool = false;
Expand Down Expand Up @@ -42,6 +40,7 @@ class ClientPrefs {
public static var language:String = 'en';
public static var displayMilliseconds:Bool = true;
public static var weekendScore:Bool = false;
public static var inputSystem:String = 'Default';
public static var gameplaySettings:Map<String, Dynamic> = [
'scrollspeed' => 1.0,
'scrolltype' => 'multiplicative',
Expand Down Expand Up @@ -152,6 +151,7 @@ class ClientPrefs {
FlxG.save.data.language = language;
FlxG.save.data.displayMilliseconds = displayMilliseconds;
FlxG.save.data.weekendScore = weekendScore;
FlxG.save.data.inputSystem = inputSystem;

FlxG.save.flush();

Expand Down Expand Up @@ -236,7 +236,6 @@ class ClientPrefs {
if(FlxG.save.data.comboOffset != null) {
comboOffset = FlxG.save.data.comboOffset;
}

if(FlxG.save.data.ratingOffset != null) {
ratingOffset = FlxG.save.data.ratingOffset;
}
Expand Down Expand Up @@ -270,6 +269,7 @@ class ClientPrefs {
if(FlxG.save.data.screenScaleMode != null) {
screenScaleMode = FlxG.save.data.screenScaleMode;
}

if(FlxG.save.data.gameplaySettings != null)
{
var savedMap:Map<String, Dynamic> = FlxG.save.data.gameplaySettings;
Expand All @@ -288,6 +288,7 @@ class ClientPrefs {
{
FlxG.sound.muted = FlxG.save.data.mute;
}

if (FlxG.save.data.checkForUpdates != null)
{
checkForUpdates = FlxG.save.data.checkForUpdates;
Expand All @@ -313,6 +314,8 @@ class ClientPrefs {
displayMilliseconds = FlxG.save.data.displayMilliseconds;
if(FlxG.save.data.weekendScore != null)
weekendScore = FlxG.save.data.weekendScore;
if(FlxG.save.data.inputSystem != null)
inputSystem = FlxG.save.data.inputSystem;

var save:FlxSave = new FlxSave();
save.bind('controls_v2', 'ninjamuffin99');
Expand Down
1 change: 0 additions & 1 deletion source/meta/data/CustomFadeTransition.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class CustomFadeTransition extends FlxSubState
{
var camList = FlxG.cameras.list;
camera = camList[camList.length - 1];

rhombus.cameras = [camera];

super.update(elapsed);
Expand Down
6 changes: 3 additions & 3 deletions source/meta/data/input/InputSystem.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package meta.data.input;

import haxe.macro.Type.AbstractType;
import objects.*;
import objects.userinterface.note.*;

// wip
class InputSystem {
public var holdArray:Array<Bool> = [];
public var pressArray:Array<Bool> = [];
Expand All @@ -19,12 +18,13 @@ class InputSystem {
Reflect.field(PlayState.instance, "noteMissPress")(key);
}

public function callOnScripts(script,args) {
public function callOnScripts(script, args) {
Reflect.field(PlayState.instance, "callOnScripts")(script,args);
}

public function noteMissed(note:Note) {}
public function updateNote(note:Note, elapsed:Float) {}

public function keyPressed(key:Int) {}
public function keysCheck():Void {}
}
Loading

0 comments on commit 3961ee9

Please sign in to comment.