Integration of Jukebox Library (#451)

* add Jukebox library

todo:
- saving / loading of new format
- inferrence of unknown data like past versions
- move the temporary float casts to proper use of double
- make sound related functions take double for timing
- inform people that the Jukebox sound player was renamed to SoundByte lol

* make sound, input scheduling, and super curve use double precision

* successfully load charts

* editor works again

v1 riqs can be saved and loaded

* first tempo and volume markers are unmovable

fix loading of charts' easing values

* use gsync / freesync

* update Jukebox refs to SoundByte

* game events use double part 1

Air Rally - Glee Club converted

* don't load song if chart load fails

* finish conversion of all minigames

* remove editor waveform toggle

* timeline now respects added song offset length

clear cache files on app close
prepped notes for dsp sync

* update timeline length when offset changed

* update to latest Jukebox

* make error panel object in global game manager

* improve conductor music scheduling

* added error message box

fix first game events sometimes not playing
This commit is contained in:
minenice55
2023-06-10 15:13:29 -04:00
committed by GitHub
parent b7afd697ce
commit bb2ae74339
176 changed files with 4868 additions and 3013 deletions

View File

@ -40,8 +40,8 @@ namespace HeavenStudio.Games
/// <param name="OnBlank">Method to run whenever there's an Input while this is Scheduled (Shouldn't be used too much)</param>
/// <returns></returns>
public PlayerActionEvent ScheduleInput(
float startBeat,
float timer,
double startBeat,
double timer,
InputType inputType,
PlayerActionEvent.ActionEventCallbackState OnHit,
PlayerActionEvent.ActionEventCallback OnMiss,
@ -74,8 +74,8 @@ namespace HeavenStudio.Games
return evt;
}
public PlayerActionEvent ScheduleAutoplayInput(float startBeat,
float timer,
public PlayerActionEvent ScheduleAutoplayInput(double startBeat,
double timer,
InputType inputType,
PlayerActionEvent.ActionEventCallbackState OnHit,
PlayerActionEvent.ActionEventCallback OnMiss,
@ -86,8 +86,8 @@ namespace HeavenStudio.Games
return evt;
}
public PlayerActionEvent ScheduleUserInput(float startBeat,
float timer,
public PlayerActionEvent ScheduleUserInput(double startBeat,
double timer,
InputType inputType,
PlayerActionEvent.ActionEventCallbackState OnHit,
PlayerActionEvent.ActionEventCallback OnMiss,
@ -124,8 +124,8 @@ namespace HeavenStudio.Games
closest = toCompare;
} else
{
float t1 = closest.startBeat + closest.timer;
float t2 = toCompare.startBeat + toCompare.timer;
double t1 = closest.startBeat + closest.timer;
double t2 = toCompare.startBeat + toCompare.timer;
// Debug.Log("t1=" + t1 + " -- t2=" + t2);
@ -194,12 +194,12 @@ namespace HeavenStudio.Games
public int firstEnable = 0;
public virtual void OnGameSwitch(float beat)
public virtual void OnGameSwitch(double beat)
{
//Below is a template that can be used for handling previous entities.
//section below is if you only want to look at entities that overlap the game switch
/*
List<Beatmap.Entity> prevEntities = GameManager.instance.Beatmap.entities.FindAll(c => c.beat <= beat && c.datamodel.Split(0) == [insert game name]);
List<Beatmap.Entity> prevEntities = GameManager.instance.Beatmap.Entities.FindAll(c => c.beat <= beat && c.datamodel.Split(0) == [insert game name]);
foreach(Beatmap.Entity entity in prevEntities)
{
if(entity.beat + entity.length >= beat)
@ -215,12 +215,12 @@ namespace HeavenStudio.Games
}
public virtual void OnPlay(float beat)
public virtual void OnPlay(double beat)
{
}
public virtual void OnStop(float beat)
public virtual void OnStop(double beat)
{
foreach (var evt in scheduledInputs)
{
@ -246,7 +246,7 @@ namespace HeavenStudio.Games
return sameTime;
}
public static MultiSound PlaySoundSequence(string game, string name, float startBeat, params SoundSequence.SequenceParams[] args)
public static MultiSound PlaySoundSequence(string game, string name, double startBeat, params SoundSequence.SequenceParams[] args)
{
Minigames.Minigame gameInfo = GameManager.instance.GetGameInfo(game);
foreach (SoundSequence.SequenceKeyValue pair in gameInfo.LoadedSoundSequences)