Skip to content

Commit

Permalink
that broke a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jun 1, 2024
1 parent b0f1df6 commit 38a7e92
Show file tree
Hide file tree
Showing 59 changed files with 643 additions and 481 deletions.
8 changes: 4 additions & 4 deletions source/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Init extends FlxState
add(bg);

epicLogo = new FlxSprite().loadGraphic(Paths.image('loader/startupLogo'));
epicLogo.antialiasing = ClientPrefs.data.globalAntialiasing;
epicLogo.antialiasing = ClientPrefs.globalAntialiasing;
epicLogo.screenCenter();
add(epicLogo);

Expand All @@ -46,7 +46,7 @@ class Init extends FlxState

var loadingSpeen:FlxSprite = new FlxSprite(FlxG.width - 91, FlxG.height - 91).loadGraphic(Paths.image("loader/loader"));
loadingSpeen.angularVelocity = 180;
loadingSpeen.antialiasing = ClientPrefs.data.globalAntialiasing;
loadingSpeen.antialiasing = ClientPrefs.globalAntialiasing;
add(loadingSpeen);

FlxG.sound.play(Paths.sound('startup'));
Expand Down Expand Up @@ -85,7 +85,7 @@ class Init extends FlxState
function loadEverything()
{
Localization.loadLanguages();
Localization.switchLanguage(ClientPrefs.data.language);
Localization.switchLanguage(ClientPrefs.language);

#if html5
Paths.initPaths();
Expand Down Expand Up @@ -145,7 +145,7 @@ class Init extends FlxState
ClientPrefs.loadPrefs();

#if CHECK_FOR_UPDATES
if (ClientPrefs.data.checkForUpdates && !OutdatedState.leftState)
if (ClientPrefs.checkForUpdates && !OutdatedState.leftState)
OutdatedState.updateCheck();
#end

Expand Down
7 changes: 6 additions & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ class Main extends Sprite
addChild(game);

// joalor64game crash handlers don't quite work
// yeah
#if CRASH_HANDLER
@:privateAccess
Lib.current.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onError);
#end

fpsVar = new FPS(10, 10, 0xFFFFFF);
addChild(fpsVar);
Expand Down Expand Up @@ -233,14 +236,15 @@ class Main extends Sprite

class Joalor64Game extends FlxGame
{
var _viewingCrash:Bool = false;
// 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(_);
Expand Down Expand Up @@ -349,6 +353,7 @@ class Joalor64Game extends FlxGame
throw e;
#end
}
*/
}

class Joalor64SoundTray extends flixel.system.ui.FlxSoundTray
Expand Down
2 changes: 1 addition & 1 deletion source/meta/ArtemisIntegration.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ArtemisIntegration {

public static function initialize ():Void {
#if sys
if (ClientPrefs.data.enableArtemis) {
if (ClientPrefs.enableArtemis) {
trace ("attempting to initialize artemis integration...");
// get the file that says what the local artemis webserver's url is.
// the file not being there is a pretty good indication that the user doesn't have artemis so if it isn't there just don't enable this integration
Expand Down
6 changes: 2 additions & 4 deletions source/meta/Colorblind.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package meta;

import openfl.filters.BitmapFilter;
import openfl.filters.ColorMatrixFilter;
import flixel.FlxG;
import meta.data.ClientPrefs;

// some code from Forever Engine, some from Flixel Demos
class Colorblind {
Expand Down Expand Up @@ -48,7 +46,7 @@ class Colorblind {
];

public static function updateFilter(){
if (!ClientPrefs.data.shaders){
if (!ClientPrefs.shaders){
if (filters.length > 0)
filters = [];
return;
Expand All @@ -57,7 +55,7 @@ class Colorblind {
filters = [];
FlxG.game.setFilters(filters);

var curFilter = ClientPrefs.data.colorBlindFilter;
var curFilter = ClientPrefs.colorBlindFilter;
if (colorBlindFilters.get(curFilter) != null){
var daFilter = colorBlindFilters.get(curFilter).filter;

Expand Down
2 changes: 1 addition & 1 deletion source/meta/MusicBeatState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class MusicBeatState extends modcharting.ModchartMusicBeatState
{
var lastChange = Conductor.getBPMFromSeconds(Conductor.songPosition);

var shit = ((Conductor.songPosition - ClientPrefs.data.noteOffset) - lastChange.songTime) / lastChange.stepCrochet;
var shit = ((Conductor.songPosition - ClientPrefs.noteOffset) - lastChange.songTime) / lastChange.stepCrochet;
curDecStep = lastChange.stepTime + shit;
curStep = lastChange.stepTime + Math.floor(shit);
}
Expand Down
2 changes: 1 addition & 1 deletion source/meta/MusicBeatSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MusicBeatSubstate extends FlxSubState
{
var lastChange = Conductor.getBPMFromSeconds(Conductor.songPosition);

var shit = ((Conductor.songPosition - ClientPrefs.data.noteOffset) - lastChange.songTime) / lastChange.stepCrochet;
var shit = ((Conductor.songPosition - ClientPrefs.noteOffset) - lastChange.songTime) / lastChange.stepCrochet;
curDecStep = lastChange.stepTime + shit;
curStep = lastChange.stepTime + Math.floor(shit);
}
Expand Down
4 changes: 2 additions & 2 deletions source/meta/data/Achievements.hx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class AttachedAchievement extends FlxSprite {
super(x, y);

changeAchievement(name);
antialiasing = ClientPrefs.data.globalAntialiasing;
antialiasing = ClientPrefs.globalAntialiasing;
}

public function changeAchievement(tag:String) {
Expand Down Expand Up @@ -335,7 +335,7 @@ class AchievementObject extends FlxSpriteGroup {
achievementIcon.scrollFactor.set();
achievementIcon.setGraphicSize(Std.int(achievementIcon.width * (2 / 3)));
achievementIcon.updateHitbox();
achievementIcon.antialiasing = ClientPrefs.data.globalAntialiasing;
achievementIcon.antialiasing = ClientPrefs.globalAntialiasing;

var achievementName:FlxText = new FlxText(achievementIcon.x + achievementIcon.width + 20, achievementIcon.y + 16, 280, Achievements.achievementsStuff[id][0], 16);
achievementName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, LEFT);
Expand Down
Loading

0 comments on commit 38a7e92

Please sign in to comment.