Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
697c751
start
HomuHomu833 Mar 24, 2026
909b8d2
more clanking
HomuHomu833 Mar 25, 2026
1c7bdcc
clank clank revert comments
HomuHomu833 Mar 25, 2026
315b523
idk trying to polish
HomuHomu833 Mar 25, 2026
342feed
even more clanking
HomuHomu833 Mar 25, 2026
833403d
reverting more clanker crap
HomuHomu833 Mar 25, 2026
5a4111d
idk wat I did
HomuHomu833 Mar 25, 2026
c30bf61
e
HomuHomu833 Mar 25, 2026
c2058a1
clank clank clank clank
HomuHomu833 Mar 26, 2026
f975396
format sc
HomuHomu833 Mar 26, 2026
5eaa48d
null safe mobile controls a bit
HomuHomu833 Mar 26, 2026
10fcac8
clanker crap again
HomuHomu833 Mar 26, 2026
f380db4
e
HomuHomu833 Mar 26, 2026
e44c28a
dih
HomuHomu833 Mar 26, 2026
ac8d336
war
HomuHomu833 Mar 26, 2026
38c0a81
changes from aarim kkra
HomuHomu833 Mar 26, 2026
e1523b5
d
HomuHomu833 Mar 26, 2026
26b920f
Merge branch 'main' into feature/null-safety
HomuHomu833 Mar 27, 2026
9a76add
Merge branch 'main' into feature/null-safety
HomuHomu833 Mar 27, 2026
5796e34
e
HomuHomu833 Mar 27, 2026
5b0a0ba
clanking to fix
HomuHomu833 Mar 27, 2026
ba2d8c4
`@:nullSafety(Off)` the shaders
HomuHomu833 Mar 27, 2026
1b2539d
fix shi
HomuHomu833 Mar 27, 2026
85c9ac6
Merge branch 'main' into feature/null-safety
HomuHomu833 Mar 28, 2026
d2fe8f3
null safe substates
HomuHomu833 Mar 28, 2026
12293db
meh
HomuHomu833 Mar 28, 2026
cd6b63f
redo null safety on here
HomuHomu833 Mar 28, 2026
57372b8
giving some help to my wife
mrchaoss1 Mar 29, 2026
817d1db
Revert "giving some help to my wife"
HomuHomu833 Mar 30, 2026
992169b
little null safe
HomuHomu833 Mar 30, 2026
d5d52a3
I'll find solutions later...
HomuHomu833 Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/engine/backend/BaseStage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ enum Countdown
START;
}

@:nullSafety
class BaseStage extends FlxBasic
{
private var game(get, never):Dynamic;
Expand Down
4 changes: 3 additions & 1 deletion source/engine/backend/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import flixel.input.gamepad.FlxGamepadInputID;
import states.TitleState;

// Add a variable here and it will get automatically saved
@:structInit class SaveVariables
@:structInit
@:nullSafety
class SaveVariables
{
// Mobile and Mobile Controls Releated
public var extraButtons:String = "NONE"; // mobile extra button option
Expand Down
26 changes: 15 additions & 11 deletions source/engine/backend/Conductor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ typedef BPMChangeEvent =
@:optional var stepCrochet:Float;
}

@:nullSafety
class Conductor
{
public static var bpm(default, set):Float = 100;
Expand All @@ -25,13 +26,16 @@ class Conductor

public static var bpmChangeMap:Array<BPMChangeEvent> = [];

public static function getCrotchetAtTime(time:Float)
inline static function getStepCrochet(event:BPMChangeEvent):Float
return event.stepCrochet ?? stepCrochet;

public static function getCrotchetAtTime(time:Float):Float
{
var lastChange = getBPMFromSeconds(time);
return lastChange.stepCrochet * 4;
return getStepCrochet(lastChange) * 4;
}

public static function getBPMFromSeconds(time:Float)
public static function getBPMFromSeconds(time:Float):BPMChangeEvent
{
var lastChange:BPMChangeEvent = {
stepTime: 0,
Expand All @@ -48,7 +52,7 @@ class Conductor
return lastChange;
}

public static function getBPMFromStep(step:Float)
public static function getBPMFromStep(step:Float):BPMChangeEvent
{
var lastChange:BPMChangeEvent = {
stepTime: 0,
Expand All @@ -69,19 +73,19 @@ class Conductor
{
var step = beat * 4;
var lastChange = getBPMFromStep(step);
return lastChange.songTime + (step - lastChange.stepTime) * (lastChange.stepCrochet / 1000);
return lastChange.songTime + (step - lastChange.stepTime) * (getStepCrochet(lastChange) / 1000);
}

public static function getStep(time:Float)
public static function getStep(time:Float):Float
{
var lastChange = getBPMFromSeconds(time);
return lastChange.stepTime + (time - lastChange.songTime) / lastChange.stepCrochet;
return lastChange.stepTime + (time - lastChange.songTime) / getStepCrochet(lastChange);
}

public static function getStepRounded(time:Float)
public static function getStepRounded(time:Float):Float
{
var lastChange = getBPMFromSeconds(time);
return lastChange.stepTime + Math.floor(time - lastChange.songTime) / lastChange.stepCrochet;
return lastChange.stepTime + Math.floor(time - lastChange.songTime) / getStepCrochet(lastChange);
}

public static function getBeat(time:Float)
Expand Down Expand Up @@ -122,12 +126,12 @@ class Conductor
//trace("new BPM map BUDDY " + bpmChangeMap);
}

static function getSectionBeats(song:SwagSong, section:Int)
static function getSectionBeats(song:SwagSong, section:Int):Float
{
var val:Null<Float> = null;
if (song.notes[section] != null)
val = song.notes[section].sectionBeats;
return val != null ? val : 4;
return val ?? 4;
}

inline public static function calculateCrochet(bpm:Float)
Expand Down
Loading