merge from release 1 (#460)

* 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

* editor fixes (#459)

* ditch loading dialog

doesn't show up when it's supposed to

* format song offset in editor

* remove VorbisPlugin

* Update Editor.cs
This commit is contained in:
minenice55 2023-06-10 22:30:46 -04:00 committed by GitHub
parent afc665ed61
commit a6559d63bf
46 changed files with 4 additions and 1071 deletions

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 94a532e936b434bbe853ffa15a046c91
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 22e9fa4365f17a149a980b4997eaee40
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,14 +0,0 @@
{
"name": "VorbisPluginImpl",
"rootNamespace": "OggVorbis",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 6369f65a3f137eb448c3456fdbf498ff
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ce6e87ce76d38cf499f4721cfcff2012
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,89 +0,0 @@
using System.Runtime.InteropServices;
namespace OggVorbis
{
internal static class NativeBridge
{
#if UNITY_IOS && !UNITY_EDITOR
private const string PLUGIN_NAME = "__Internal";
#else
private const string PLUGIN_NAME = "VorbisPlugin";
#endif
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "write_all_pcm_data_to_file")]
internal static extern int WriteAllPcmDataToFile(
string filePath,
float[] samples,
int samplesLength,
short channels,
int frequency,
float base_quality,
int samplesToRead);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "write_all_pcm_data_to_memory")]
internal static extern int WriteAllPcmDataToMemory(
out System.IntPtr bytesPtr,
out int bytesLength,
float[] samples,
int samplesLength,
short channels,
int frequency,
float base_quality,
int samplesToRead);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "free_memory_array_for_write_all_pcm_data")]
internal static extern int FreeMemoryArrayForWriteAllPcmData(
System.IntPtr bytesNativeArray);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "read_all_pcm_data_from_file")]
internal static extern int ReadAllPcmDataFromFile(
string filePath,
out System.IntPtr samples,
out int samplesLength,
out short channels,
out int frequency,
int maxSamplesToRead);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "read_all_pcm_data_from_memory")]
internal static extern int ReadAllPcmDataFromMemory(
byte[] memoryArray,
int memoryArrayLength,
out System.IntPtr samples,
out int samplesLength,
out short channels,
out int frequency,
int maxSamplesToRead);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "free_samples_array_native_memory")]
internal static extern int FreeSamplesArrayNativeMemory(
ref System.IntPtr samples);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "open_read_file_stream")]
internal static extern System.IntPtr OpenReadFileStream(
string filePath,
out short channels,
out int frequency);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "read_from_file_stream")]
internal static extern int ReadFromFileStream(
System.IntPtr state,
float[] samplesToFill,
int maxSamplesToRead);
[DllImport(PLUGIN_NAME,
CallingConvention = CallingConvention.Cdecl,
EntryPoint = "close_file_stream")]
internal static extern int CloseFileStream(
System.IntPtr state);
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7a62e42f4d5890e429df61d6f0af2e0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,20 +0,0 @@
namespace OggVorbis
{
public enum NativeErrorCode
{
ERROR_INVALID_FILEPATH_PARAMETER = -1,
ERROR_CANNOT_OPEN_FILE_FOR_WRITE = -2,
ERROR_CANNOT_OPEN_FILE_FOR_READ = -3,
ERROR_INPUT_FILESTREAM_IS_NOT_OGG_STREAM = -4,
ERROR_READING_OGG_STREAM = -5,
ERROR_INVALID_SAMPLES_PARAMETER = -10,
ERROR_INVALID_SAMPLESLENGTH_PARAMETER = -11,
ERROR_INVALID_CHANNELS_PARAMETER = -12,
ERROR_INVALID_FREQUENCY_PARAMETER = -13,
ERROR_INVALID_BASE_QUALITY_PARAMETER = -14,
ERROR_MALLOC_RETURNED_NULL = -15,
ERROR_BYTES_MEMORY_ARRAY_NULL = -16,
ERROR_INVALID_WRITE_CALLBACK_PARAMETER = -17,
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: a0842d9e22713d5498e69792dfc7dd7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
namespace OggVorbis
{
public class NativeErrorException : System.Exception
{
public NativeErrorCode NativeErrorCode { get; }
private NativeErrorException(NativeErrorCode nativeErrorCode)
: base($"Error code: {nativeErrorCode}")
{
NativeErrorCode = nativeErrorCode;
}
public override string ToString()
{
return $"{nameof(NativeErrorException)} {Message}";
}
internal static void ThrowExceptionIfNecessary(int returnValue)
{
if (returnValue == 0)
{
return;
}
throw new NativeErrorException((NativeErrorCode)returnValue);
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 43b9e4fd60d7b1b42babf0b567adc798
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,170 +0,0 @@
using System.Runtime.InteropServices;
namespace OggVorbis
{
public static class VorbisPlugin
{
public static void Save(
string filePath,
UnityEngine.AudioClip audioClip,
float quality = 0.4f,
int samplesToRead = 1024)
{
if (string.IsNullOrWhiteSpace(filePath))
{
throw new System.ArgumentException("The file path is null or white space");
}
if (audioClip == null)
{
throw new System.ArgumentNullException(nameof(audioClip));
}
if (samplesToRead <= 0)
{
throw new System.ArgumentOutOfRangeException(nameof(samplesToRead));
}
short finalChannelsCount = (short)audioClip.channels;
if (finalChannelsCount != 1 && finalChannelsCount != 2)
{
throw new System.ArgumentException($"Only one or two channels are supported, provided channels count: {finalChannelsCount}");
}
if (!filePath.EndsWith(".ogg"))
{
filePath += ".ogg";
}
float[] pcm = new float[audioClip.samples * audioClip.channels];
audioClip.GetData(pcm, 0);
int returnCode = NativeBridge.WriteAllPcmDataToFile(filePath, pcm, pcm.Length, finalChannelsCount, audioClip.frequency, quality, samplesToRead);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
}
public static byte[] GetOggVorbis(
UnityEngine.AudioClip audioClip,
float quality = 0.4f,
int samplesToRead = 1024)
{
if (audioClip == null)
{
throw new System.ArgumentNullException(nameof(audioClip));
}
if (samplesToRead <= 0)
{
throw new System.ArgumentOutOfRangeException(nameof(samplesToRead));
}
short finalChannelsCount = (short)audioClip.channels;
if (finalChannelsCount != 1 && finalChannelsCount != 2)
{
throw new System.ArgumentException($"Only one or two channels are supported, provided channels count: {finalChannelsCount}");
}
int returnCode;
System.IntPtr bytesPtr = System.IntPtr.Zero;
byte[] bytes;
try
{
float[] pcm = new float[audioClip.samples * audioClip.channels];
audioClip.GetData(pcm, 0);
returnCode = NativeBridge.WriteAllPcmDataToMemory(
out bytesPtr,
out int bytesLength,
pcm,
pcm.Length,
finalChannelsCount,
audioClip.frequency,
quality,
samplesToRead);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
bytes = new byte[bytesLength];
Marshal.Copy(bytesPtr, bytes, 0, bytesLength);
}
finally
{
returnCode = NativeBridge.FreeMemoryArrayForWriteAllPcmData(bytesPtr);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
}
return bytes;
}
public static UnityEngine.AudioClip Load(string filePath, int maxSamplesToRead = 1024)
{
if (string.IsNullOrWhiteSpace(filePath))
{
throw new System.ArgumentException("The file path is null or white space");
}
if (maxSamplesToRead <= 0)
{
throw new System.ArgumentOutOfRangeException(nameof(maxSamplesToRead));
}
if (!System.IO.File.Exists(filePath))
{
throw new System.IO.FileNotFoundException();
}
int returnCode;
System.IntPtr pcmPtr = System.IntPtr.Zero;
UnityEngine.AudioClip audioClip;
try
{
returnCode = NativeBridge.ReadAllPcmDataFromFile(
filePath,
out pcmPtr,
out int pcmLength,
out short channels,
out int frequency,
maxSamplesToRead);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
float[] pcm = new float[pcmLength];
Marshal.Copy(pcmPtr, pcm, 0, pcmLength);
audioClip = UnityEngine.AudioClip.Create(System.IO.Path.GetFileName(filePath), pcmLength / channels, channels, frequency, false);
audioClip.SetData(pcm, 0);
}
finally
{
returnCode = NativeBridge.FreeSamplesArrayNativeMemory(ref pcmPtr);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
}
return audioClip;
}
public static UnityEngine.AudioClip ToAudioClip(byte[] bytes, string audioClipName, int maxSamplesToRead = 1024)
{
if (bytes == null)
{
throw new System.ArgumentNullException(nameof(bytes));
}
if (bytes.Length < 10)
{
throw new System.ArgumentException(nameof(bytes));
}
if (string.IsNullOrWhiteSpace(audioClipName))
{
throw new System.ArgumentException("Please provide an audio clip name");
}
if (maxSamplesToRead <= 0)
{
throw new System.ArgumentOutOfRangeException(nameof(maxSamplesToRead));
}
int returnCode;
System.IntPtr pcmPtr = System.IntPtr.Zero;
UnityEngine.AudioClip audioClip = null;
try
{
returnCode = NativeBridge.ReadAllPcmDataFromMemory(
bytes,
bytes.Length,
out pcmPtr,
out int pcmLength,
out short channels,
out int frequency,
maxSamplesToRead);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
float[] pcm = new float[pcmLength];
Marshal.Copy(pcmPtr, pcm, 0, pcmLength);
audioClip = UnityEngine.AudioClip.Create(audioClipName, pcmLength / channels, channels, frequency, false);
audioClip.SetData(pcm, 0);
}
finally
{
returnCode = NativeBridge.FreeSamplesArrayNativeMemory(ref pcmPtr);
NativeErrorException.ThrowExceptionIfNecessary(returnCode);
}
return audioClip;
}
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 02000528ede72eb4e9fa9627185e0ac6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4432b532ac5884e10af081654d1e89f7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: fc30b60a7054ffe4fab9a1213bc78822
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ed6b2cc40bb22a344a651710a3c09021
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: f212bce8ee6b531478c1cbf853aefd27
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: 786d6d20fa5aa734e9663361b25b9a13
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: 6b4324dc320d4954d98e6f02832e1310
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: 984717b87470169429b9186dfacf490b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 933d7b0fdd3ae9fc18cbc60bbf3a746c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,86 +0,0 @@
fileFormatVersion: 2
guid: 93af7550f1e761df48d651960136b85d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 1
Exclude WebGL: 1
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: Linux
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: None
- first:
WebGL: WebGL
second:
enabled: 0
settings: {}
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b17ebb086ab3a40e38b962354571591c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,80 +0,0 @@
fileFormatVersion: 2
guid: 3dd18ede30e7e4dcbaae02cd851ffd1c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 7f766c141793afa4cb9995b7ec9dad90
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 945159874f3e2da4c87b384d5ce9f88a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,82 +0,0 @@
fileFormatVersion: 2
guid: c604fbaeb4366014db10d1915bf4533d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86
DefaultValueInitialized: true
OS: Windows
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: a9188e20df95d204a82ed104bc95e446
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,82 +0,0 @@
fileFormatVersion: 2
guid: 8366486b20439f44ca3c6f11acb29fee
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Windows
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: d0aa47147d98f4642b47b3ed2aec0e99
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: d0f7d099267d14a02bce1e39b785d79c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: 75feb76cf68884b5b92865a558e77af2
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: 27e6a8c0604d24215b304cb34439667b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
fileFormatVersion: 2
guid: f8cfa486d31994f71acc5a37aabb5fad
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:

View file

@ -393,10 +393,8 @@ namespace HeavenStudio.Editor
StandaloneFileBrowser.OpenFilePanelAsync("Open Remix", "", extensions, false, (string[] paths) =>
{
var path = Path.Combine(paths);
if (path == string.Empty) return;
GlobalGameManager.ShowLoadingMessage("Loading", $"Loading remix from {path}");
try
{
string tmpDir = RiqFileHandler.ExtractRiq(path);
@ -417,8 +415,6 @@ namespace HeavenStudio.Editor
remixName = Path.GetFileName(path);
UpdateEditorStatus(false);
CommandManager.instance.Clear();
GlobalGameManager.instance.HideDialog();
});
}

View file

@ -924,7 +924,8 @@ namespace HeavenStudio.Editor.Track
public void UpdateOffsetText()
{
FirstBeatOffset.text = (GameManager.instance.Beatmap.data.offset * 1000f).ToString("G");
// show up to 4 decimal places
FirstBeatOffset.text = (GameManager.instance.Beatmap.data.offset * 1000f).ToString("F0");
}
public void UpdateOffsetFromText()
@ -934,10 +935,7 @@ namespace HeavenStudio.Editor.Track
FirstBeatOffset.text = "0";
// Convert ms to s.
var newOffset = Convert.ToSingle(FirstBeatOffset.text) / 1000f;
// Limit decimal places to 4.
newOffset = (float)System.Math.Round(newOffset, 4);
double newOffset = Convert.ToDouble(FirstBeatOffset.text) / 1000f;
GameManager.instance.Beatmap.data.offset = newOffset;