Restructure some configuration things

This commit is contained in:
msk
2023-09-17 23:51:50 -07:00
parent 5f2a13a7a6
commit 879a2aa2f4
7 changed files with 34 additions and 54 deletions
-18
View File
@@ -10,8 +10,6 @@ using System;
using Godot;
using WacK.Configuration;
namespace WacK
{
public static class Util
@@ -110,22 +108,6 @@ namespace WacK
return 60f / tempo * beatsPerMeasure * ((float)measure + (float)beat / 1920f);
}
public static float NotePosition(int measure, int beat, float tempo, int beatsPerMeasure)
{
if (tempo == 0) return 0; // avoid divide by 0
return TimeToPosition(60f / tempo * beatsPerMeasure * ((float)measure + (float)beat / 1920f));
}
public static float TimeToPosition(float time)
{
return time * PlaySettings.playSpeedMultiplier * Constants.SCROLL_MULT;
}
public static float PositionToTime(float pos)
{
return pos / PlaySettings.playSpeedMultiplier / Constants.SCROLL_MULT;
}
public static string DifficultyValueToString(float diffPoint)
{
return Mathf.FloorToInt(diffPoint).ToString() + (diffPoint > Mathf.Floor(diffPoint) ? "+" : "");