forked from smoogipoo/osu--BPM-Changer
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made all the changes again without cleanup
- Loading branch information
Showing
5 changed files
with
83 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using FsBeatmapProcessor; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace osu_trainer.ODCalculators | ||
{ | ||
internal class ODCalculator | ||
{ | ||
private static readonly ODCalculator standartODCalculator = new ODCalculator(79.5M, 6M); | ||
private static readonly ODCalculator taikoODCalculator = new ODCalculator(49.5M, 3M); | ||
private static readonly ODCalculator catchODCalculator = new ODCalculator(0M, 0M); | ||
private static readonly ODCalculator maniaODCalculator = new ODCalculator(63.5M, 3M); | ||
|
||
private readonly decimal _offset; | ||
private readonly decimal _multiplier; | ||
|
||
public decimal OverallDifficultyToMs(decimal od) | ||
{ | ||
return _offset - od * _multiplier; | ||
} | ||
public decimal MsToOverallDifficulty(decimal ms) | ||
{ | ||
if (_multiplier == 0) | ||
return 0; | ||
return (_offset - ms) / _multiplier; | ||
} | ||
|
||
public static ODCalculator GetCalculatorForGamemode(GameMode mode) | ||
{ | ||
switch (mode) | ||
{ | ||
case GameMode.osu: | ||
return standartODCalculator; | ||
case GameMode.Taiko: | ||
return taikoODCalculator; | ||
case GameMode.CatchtheBeat: | ||
return catchODCalculator; | ||
case GameMode.Mania: | ||
return maniaODCalculator; | ||
default: | ||
throw new ArgumentException(nameof(mode)); | ||
} | ||
} | ||
|
||
private ODCalculator(decimal offset, decimal multiplier) | ||
{ | ||
_offset = offset; | ||
_multiplier = multiplier; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
github repository name: FunOrange/osu-trainer | ||
application name: osu-trainer.exe | ||
current version: 1.6.6 | ||
current version: 1.7.0 | ||
check for updates: true |