Skip to content

Commit

Permalink
fix crash handeler not working hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Aug 22, 2024
1 parent 06da4b3 commit 8467ec3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@
<haxedef name="HXCPP_CHECK_POINTER" if="release" />
<haxedef name="HXCPP_STACK_LINE" if="release" />
<haxedef name="HXCPP_STACK_TRACE" if="release" />

<haxedef name="no-debug" unless="debug" />
<haxedef name="HXCPP_GC_GENERATIONAL" />

<icon path="art/icon.png" />
Expand Down
6 changes: 6 additions & 0 deletions docs/docs.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
--define MODDING_ALLOWED
--define MODCHARTING_TOOLS
--define LEATHER
--define FLX_NO_HEALTH
--define FLX_NO_DEBUG
--define FLX_NO_POINT_POOL
--define CUSTOM_CLASSES
--define message.reporting pretty

--macro lime._internal.macros.DefineMacro.run()
--macro openfl.utils._internal.ExtraParamsMacro.include()
Expand All @@ -41,3 +46,4 @@
--cpp docs-bin/

-dce no

17 changes: 14 additions & 3 deletions source/game/Conductor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@ typedef TimeScaleChangeEvent = {
}

class Conductor {
/**
* The BPM (Beats Per Minute) of the current song.
*/
public static var bpm:Float = 100;
public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds
public static var stepCrochet:Float = crochet / 4; // steps in milliseconds
/**
* Beats in milliseconds
*/
public static var crochet:Float = ((60 / bpm) * 1000);
/**
* Steps in milliseconds
*/
public static var stepCrochet:Float = crochet / 4;
/**
* The position of the song in milliseconds.
*/
public static var songPosition:Float;
public static var lastSongPos:Float;
public static var offset:Float = 0;

public static var safeFrames:Int = 10;
Expand Down
3 changes: 0 additions & 3 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1704,8 +1704,6 @@ class PlayState extends MusicBeatState {

var noteBG:FlxSprite;

var babyArrow:StrumNote;

public function generateStaticArrows(pos:Float, ?isPlayer:Bool = false, ?showReminders:Bool = true):Void {
call("generateStaticArrows", [pos, isPlayer, showReminders]);
var usedKeyCount:Int = SONG.keyCount;
Expand Down Expand Up @@ -2532,7 +2530,6 @@ class PlayState extends MusicBeatState {
crochet: Conductor.crochet,
stepCrochet: Conductor.stepCrochet,
songPosition: Conductor.songPosition,
lastSongPos: Conductor.lastSongPos,
offset: Conductor.offset,
safeFrames: Conductor.safeFrames,
safeZoneOffset: Conductor.safeZoneOffset,
Expand Down
6 changes: 3 additions & 3 deletions source/toolbox/ToolboxPlaceholder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import lime.utils.Assets;
import toolbox.StageMakingState;
import toolbox.util.NewModState;

class ToolboxPlaceholder extends states.MusicBeatState {
class ToolboxPlaceholder extends MusicBeatState {
var curSelected:Int = 0;
var ui_Skin:Null<String>;

Expand Down Expand Up @@ -110,8 +110,8 @@ class ToolboxPlaceholder extends states.MusicBeatState {
super.update(elapsed);

if (!inMenu) {
if (-1 * Math.floor(FlxG.mouse.wheel) != 0) {
curSelected -= 1 * Math.floor(FlxG.mouse.wheel);
if (-Math.floor(FlxG.mouse.wheel) != 0) {
curSelected -= Math.floor(FlxG.mouse.wheel);
FlxG.sound.play(Paths.sound('scrollMenu'), 0.4);
}

Expand Down

0 comments on commit 8467ec3

Please sign in to comment.