Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

New freeplay #237

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<define name="CHEATING_ALLOWED"/>
<define name="NO_CHEATING" unless="CHEATING_ALLOWED"/>
<define name="PSYCH_WATERMARKS"/> <!-- DELETE THIS TO REMOVE WATERMARKS/DEV NAMES ON TITLE SCREEN -->
<define name="TITLE_SCREEN_EASTER_EGG" if="officialBuild"/> <!-- DELETE THE if="officialBuild" for enabling this on an unofficial build -->
<define name="TITLE_SCREEN_EASTER_EGG" /> <!-- DELETE THE if="officialBuild" for enabling this on an unofficial build -->
<define name="MP3_ALLOWED"/>
<define name="WAV_ALLOWED"/>
<define name="MKV_ALLOWED" if="VIDEOS_ALLOWED"/>
Expand Down
3 changes: 3 additions & 0 deletions source/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ClientPrefs
//public static var multiplicativeValue:Float = 0;
public static var musicSelected:String = 'freakyMenu';
public static var autoPause:Bool = false;
public static var freeplayRating:Bool = true;
public static var gameplaySettings:Map<String, Dynamic> = [
'scrollspeed' => 1.0,
'scrolltype' => 'multiplicative',
Expand Down Expand Up @@ -126,6 +127,7 @@ class ClientPrefs

public static function saveSettings()
{
FlxG.save.data.freeplayRating = freeplayRating;
FlxG.save.data.noteSkin = noteSkin;
FlxG.save.data.winningIcon = winningIcon;
//FlxG.save.data.multiplicativeValue = multiplicativeValue;
Expand Down Expand Up @@ -190,6 +192,7 @@ class ClientPrefs

public static function loadPrefs()
{
if(FlxG.save.data.freeplayRating != null) freeplayRating = FlxG.save.data.freeplayRating;
if (FlxG.save.data.comboStacking != null)
comboStacking = FlxG.save.data.comboStacking;

Expand Down
12 changes: 12 additions & 0 deletions source/Conductor.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package;

import flixel.math.FlxMath;
import Song.SwagSong;

/**
Expand Down Expand Up @@ -157,6 +158,17 @@ class Conductor
crochet = calculateCrochet(bpm);
stepCrochet = crochet / 4;
}

public static function truncateFloat(number:Float, precision:Int):Float { // some kade engine here
var num = number;
num = (num * Math.pow(10, precision));
num = (Math.round(num) / Math.pow(10, precision));
return num;
}

public static function GCD(a, b) {
return b == 0 ? FlxMath.absInt(a) : GCD(b, a % b);
}
}

class Rating
Expand Down
Loading