1
0
mirror of synced 2024-11-23 23:21:06 +01:00

File Scoped Namespace Declarations (#716)

* refactor: file-scoped namespace OpenTaiko

* refactor: file-scoped namespace FDK

* refactor: dotnet format
This commit is contained in:
Julian Holfeld 2024-10-23 17:37:21 +02:00 committed by GitHub
parent e87212ea60
commit fcf4f80b34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
266 changed files with 83679 additions and 83708 deletions

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class CActivity {
public class CActivity {
// Properties // Properties
public bool IsActivated { get; private set; } public bool IsActivated { get; private set; }
@ -147,5 +148,4 @@
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class CConversion {
public class CConversion {
// Properties // Properties
public static readonly string HexChars = "0123456789ABCDEFabcdef"; public static readonly string HexChars = "0123456789ABCDEFabcdef";
@ -233,5 +234,4 @@
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,19 +1,20 @@
namespace FDK { namespace FDK;
/// <summary>
/// 一定間隔で単純増加する整数(カウント値)を扱う。 /// <summary>
/// </summary> /// 一定間隔で単純増加する整数(カウント値)を扱う。
/// <remarks> /// </summary>
/// ○使い方 /// <remarks>
/// 1.CCounterの変数をつくる。 /// ○使い方
/// 2.CCounterを生成 /// 1.CCounterの変数をつくる。
/// ctCounter = new CCounter( 0, 3, 10, CDTXMania.Timer ); /// 2.CCounterを生成
/// 3.進行メソッドを使用する。 /// ctCounter = new CCounter( 0, 3, 10, CDTXMania.Timer );
/// 4.ウマー。 /// 3.進行メソッドを使用する。
/// /// 4.ウマー。
/// double値を使う場合、t進行db、t進行LoopDbを使うこと。 ///
/// また、double版では間隔の値はミリ秒単位ではなく、通常の秒単位になります。 /// double値を使う場合、t進行db、t進行LoopDbを使うこと。
/// </remarks> /// また、double版では間隔の値はミリ秒単位ではなく、通常の秒単位になります。
public class CCounter { /// </remarks>
public class CCounter {
public bool IsStarted { public bool IsStarted {
get; get;
set; set;
@ -267,5 +268,4 @@
private double Interval; private double Interval;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class CFPS {
public class CFPS {
// Properties // Properties
public int NowFPS { public int NowFPS {
@ -57,5 +58,4 @@
private int CoreFPS; private int CoreFPS;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,11 +1,11 @@
using System.Text; using System.Text;
namespace FDK { namespace FDK;
/// <summary>
/// 汎用的な .iniファイルを扱う。
/// </summary>
public class CIniFile { /// <summary>
/// 汎用的な .iniファイルを扱う。
/// </summary>
public class CIniFile {
// Properties // Properties
public string FileName { public string FileName {
@ -108,5 +108,4 @@ namespace FDK {
sw.Close(); sw.Close();
} }
} }
}
} }

View File

@ -1,9 +1,10 @@
namespace FDK { namespace FDK;
/// <summary>
/// <para>一定の間隔で処理を行うテンプレートパターンの定義。</para> /// <summary>
/// <para>たとえば、t進行() で 5ms ごとに行う処理を前回のt進行()の呼び出しから 15ms 後に呼び出した場合は、処理が 3回 実行される。</para> /// <para>一定の間隔で処理を行うテンプレートパターンの定義。</para>
/// </summary> /// <para>たとえば、t進行() で 5ms ごとに行う処理を前回のt進行()の呼び出しから 15ms 後に呼び出した場合は、処理が 3回 実行される。</para>
public class CIntervalProcessing : IDisposable { /// </summary>
public class CIntervalProcessing : IDisposable {
public delegate void dgProc(); public delegate void dgProc();
public void Tick(long interval, dgProc proc) { public void Tick(long interval, dgProc proc) {
// タイマ更新 // タイマ更新
@ -48,5 +49,4 @@
protected long PrevTime = CTimer.UnusedNum; protected long PrevTime = CTimer.UnusedNum;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,8 +1,9 @@
using System.Diagnostics; using System.Diagnostics;
using System.Text; using System.Text;
namespace OpenTaiko { namespace OpenTaiko;
public class CJudgeTextEncoding {
public class CJudgeTextEncoding {
/// <summary> /// <summary>
/// Hnc8様のReadJEncを使用して文字コードの判別をする。 /// Hnc8様のReadJEncを使用して文字コードの判別をする。
/// </summary> /// </summary>
@ -65,5 +66,4 @@ namespace OpenTaiko {
return ("\n"); return ("\n");
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class CTimer : CTimerBase {
public class CTimer : CTimerBase {
public enum TimerType { public enum TimerType {
Unknown = -1, Unknown = -1,
PerformanceCounter = 0, PerformanceCounter = 0,
@ -152,5 +153,4 @@
*/ */
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,9 +1,10 @@
namespace FDK { namespace FDK;
/// <summary>
/// <para>タイマの抽象クラス。</para> /// <summary>
/// <para>このクラスを継承し、override したクラスを作成することで、任意のクロックを持つタイマを作成できる。</para> /// <para>タイマの抽象クラス。</para>
/// </summary> /// <para>このクラスを継承し、override したクラスを作成することで、任意のクロックを持つタイマを作成できる。</para>
public abstract class CTimerBase : IDisposable { /// </summary>
public abstract class CTimerBase : IDisposable {
public const long UnusedNum = -1; public const long UnusedNum = -1;
// この2つを override する。 // この2つを override する。
@ -140,5 +141,4 @@
protected int StopCount = 0; protected int StopCount = 0;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using System.Diagnostics; using System.Diagnostics;
namespace FDK { namespace FDK;
public class CTraceLogListener : TraceListener {
public class CTraceLogListener : TraceListener {
public CTraceLogListener(StreamWriter stream) { public CTraceLogListener(StreamWriter stream) {
this.LogStreamWriter = stream; this.LogStreamWriter = stream;
} }
@ -105,5 +106,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,8 +1,9 @@
using System.Diagnostics; using System.Diagnostics;
using System.Text; using System.Text;
namespace FDK { namespace FDK;
public class CUtility {
public class CUtility {
public static void RunCompleteGC() { public static void RunCompleteGC() {
GC.Collect(); // アクセス不可能なオブジェクトを除去し、ファイナライぜーション実施。 GC.Collect(); // アクセス不可能なオブジェクトを除去し、ファイナライぜーション実施。
@ -105,5 +106,4 @@ namespace FDK {
return true; return true;
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class Color4 {
public class Color4 {
public float Red; public float Red;
public float Green; public float Green;
public float Blue; public float Blue;
@ -18,5 +19,4 @@
Green = ((rgba >> 8) & 255) / 255.0f; Green = ((rgba >> 8) & 255) / 255.0f;
Red = (rgba & 255) / 255.0f; Red = (rgba & 255) / 255.0f;
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace FDK.ExtensionMethods { namespace FDK.ExtensionMethods;
public static class DoubleExtensions {
public static class DoubleExtensions {
public static double Clamp(this double value, double min, double max) { public static double Clamp(this double value, double min, double max) {
return Math.Min(Math.Max(value, min), max); return Math.Min(Math.Max(value, min), max);
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace FDK.ExtensionMethods { namespace FDK.ExtensionMethods;
public static class Int32Extensions {
public static class Int32Extensions {
public static int Clamp(this int value, int min, int max) { public static int Clamp(this int value, int min, int max) {
return Math.Min(Math.Max(value, min), max); return Math.Min(Math.Max(value, min), max);
} }
}
} }

View File

@ -32,11 +32,12 @@ using Silk.NET.OpenGLES.Extensions.ImGui;
using Silk.NET.Windowing; using Silk.NET.Windowing;
using SkiaSharp; using SkiaSharp;
namespace SampleFramework { namespace SampleFramework;
/// <summary>
/// Presents an easy to use wrapper for making games and samples. /// <summary>
/// </summary> /// Presents an easy to use wrapper for making games and samples.
public abstract class Game : IDisposable { /// </summary>
public abstract class Game : IDisposable {
public static GL Gl { get; private set; } public static GL Gl { get; private set; }
public static Silk.NET.Core.Contexts.IGLContext Context { get; private set; } public static Silk.NET.Core.Contexts.IGLContext Context { get; private set; }
@ -77,8 +78,7 @@ namespace SampleFramework {
ImGuiIO.Fonts.SetTexID((nint)ImGuiFontAtlas.Pointer); ImGuiIO.Fonts.SetTexID((nint)ImGuiFontAtlas.Pointer);
} }
} }
} } catch (Exception ex) {
catch (Exception ex) {
ImGuiIO.Fonts.Clear(); ImGuiIO.Fonts.Clear();
ImGuiIO.Fonts.AddFontDefault(); ImGuiIO.Fonts.AddFontDefault();
} }
@ -483,5 +483,4 @@ namespace SampleFramework {
public void Window_Move(Vector2D<int> size) { } public void Window_Move(Vector2D<int> size) { }
public void Window_FramebufferResize(Vector2D<int> size) { } public void Window_FramebufferResize(Vector2D<int> size) { }
}
} }

View File

@ -1,6 +1,6 @@
namespace SampleFramework { namespace SampleFramework;
public static class GameWindowSize {
public static class GameWindowSize {
public static int Width = 1280; public static int Width = 1280;
public static int Height = 720; public static int Height = 720;
}
} }

View File

@ -30,32 +30,33 @@ using System.Runtime.InteropServices;
#pragma warning disable 1591 // Missing XML comments #pragma warning disable 1591 // Missing XML comments
namespace OpenTK.Graphics.Egl { namespace OpenTK.Graphics.Egl;
using EGLClientBuffer = IntPtr;
using EGLConfig = IntPtr;
using EGLContext = IntPtr;
using EGLDisplay = IntPtr;
using EGLNativeDisplayType = IntPtr;
using EGLNativePixmapType = IntPtr;
using EGLNativeWindowType = IntPtr;
using EGLSurface = IntPtr;
public enum RenderApi { using EGLClientBuffer = IntPtr;
using EGLConfig = IntPtr;
using EGLContext = IntPtr;
using EGLDisplay = IntPtr;
using EGLNativeDisplayType = IntPtr;
using EGLNativePixmapType = IntPtr;
using EGLNativeWindowType = IntPtr;
using EGLSurface = IntPtr;
public enum RenderApi {
ES = Egl.OPENGL_ES_API, ES = Egl.OPENGL_ES_API,
GL = Egl.OPENGL_API, GL = Egl.OPENGL_API,
VG = Egl.OPENVG_API VG = Egl.OPENVG_API
} }
[Flags] [Flags]
public enum RenderableFlags { public enum RenderableFlags {
ES = Egl.OPENGL_ES_BIT, ES = Egl.OPENGL_ES_BIT,
ES2 = Egl.OPENGL_ES2_BIT, ES2 = Egl.OPENGL_ES2_BIT,
ES3 = Egl.OPENGL_ES3_BIT, ES3 = Egl.OPENGL_ES3_BIT,
GL = Egl.OPENGL_BIT, GL = Egl.OPENGL_BIT,
VG = Egl.OPENVG_BIT, VG = Egl.OPENVG_BIT,
} }
public enum ErrorCode { public enum ErrorCode {
SUCCESS = 12288, SUCCESS = 12288,
NOT_INITIALIZED = 12289, NOT_INITIALIZED = 12289,
BAD_ACCESS = 12290, BAD_ACCESS = 12290,
@ -71,9 +72,9 @@ namespace OpenTK.Graphics.Egl {
BAD_PARAMETER = 12300, BAD_PARAMETER = 12300,
BAD_SURFACE = 12301, BAD_SURFACE = 12301,
CONTEXT_LOST = 12302, CONTEXT_LOST = 12302,
} }
public enum SurfaceType { public enum SurfaceType {
PBUFFER_BIT = 0x0001, PBUFFER_BIT = 0x0001,
PIXMAP_BIT = 0x0002, PIXMAP_BIT = 0x0002,
WINDOW_BIT = 0x0004, WINDOW_BIT = 0x0004,
@ -81,15 +82,15 @@ namespace OpenTK.Graphics.Egl {
VG_ALPHA_FORMAT_PRE_BIT = 0x0040, VG_ALPHA_FORMAT_PRE_BIT = 0x0040,
MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200, MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200,
SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400, SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400,
} }
public class EglException : Exception { public class EglException : Exception {
public EglException() : base() { } public EglException() : base() { }
public EglException(string message) : base(message) { } public EglException(string message) : base(message) { }
} }
public static partial class Egl { public static partial class Egl {
public const int CONTEXT_MAJOR_VERSION = 0x3098; public const int CONTEXT_MAJOR_VERSION = 0x3098;
public const int CONTEXT_MINOR_VERSION = 0x30FB; public const int CONTEXT_MINOR_VERSION = 0x30FB;
@ -401,5 +402,4 @@ namespace OpenTK.Graphics.Egl {
return true; return true;
} }
} }
}
} }

View File

@ -1,7 +1,8 @@
using Silk.NET.Input; using Silk.NET.Input;
namespace FDK { namespace FDK;
public class CInputGamepad : IInputDevice, IDisposable {
public class CInputGamepad : IInputDevice, IDisposable {
// Constructor // Constructor
private IGamepad Gamepad { get; set; } private IGamepad Gamepad { get; set; }
@ -142,5 +143,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using Silk.NET.Input; using Silk.NET.Input;
namespace FDK { namespace FDK;
public class CInputJoystick : IInputDevice, IDisposable {
public class CInputJoystick : IInputDevice, IDisposable {
// Constructor // Constructor
public IJoystick Joystick { get; private set; } public IJoystick Joystick { get; private set; }
@ -150,5 +151,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using Silk.NET.Input; using Silk.NET.Input;
namespace FDK { namespace FDK;
public class CInputKeyboard : IInputDevice, IDisposable {
public class CInputKeyboard : IInputDevice, IDisposable {
// Constructor // Constructor
public CInputKeyboard(IReadOnlyList<IKeyboard> keyboards) { public CInputKeyboard(IReadOnlyList<IKeyboard> keyboards) {
@ -140,5 +141,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public class CInputMIDI : IInputDevice, IDisposable {
public class CInputMIDI : IInputDevice, IDisposable {
// Properties // Properties
public IntPtr MidiInPtr; public IntPtr MidiInPtr;
@ -105,5 +106,4 @@
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -2,8 +2,9 @@
using Silk.NET.Input; using Silk.NET.Input;
using Silk.NET.Windowing; using Silk.NET.Windowing;
namespace FDK { namespace FDK;
public class CInputManager : IDisposable {
public class CInputManager : IDisposable {
// 定数 // 定数
public static int DefaultVolume = 110; public static int DefaultVolume = 110;
@ -196,5 +197,4 @@ namespace FDK {
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -2,8 +2,9 @@
using System.Numerics; using System.Numerics;
using Silk.NET.Input; using Silk.NET.Input;
namespace FDK { namespace FDK;
public class CInputMouse : IInputDevice, IDisposable {
public class CInputMouse : IInputDevice, IDisposable {
// 定数 // 定数
public const int MouseButtonCount = 8; public const int MouseButtonCount = 8;
@ -135,5 +136,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -2,8 +2,9 @@
using SlimDXKey = SlimDXKeys.Key; using SlimDXKey = SlimDXKeys.Key;
namespace FDK { namespace FDK;
public static class DeviceConstantConverter {
public static class DeviceConstantConverter {
// メソッド // メソッド
public static Key DIKtoKey(Silk.NET.Input.Key key) { public static Key DIKtoKey(Silk.NET.Input.Key key) {
@ -169,5 +170,4 @@ namespace FDK {
{ Silk.NET.Input.Key.Unknown, SlimDXKey.MediaSelect }, { Silk.NET.Input.Key.Unknown, SlimDXKey.MediaSelect },
*/ */
}; };
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
public interface IInputDevice : IDisposable {
public interface IInputDevice : IDisposable {
// Properties // Properties
InputDeviceType CurrentType { InputDeviceType CurrentType {
@ -30,5 +31,4 @@
bool KeyReleased(List<int> nKey) { return nKey.Any(key => KeyReleased(key)); } bool KeyReleased(List<int> nKey) { return nKey.Any(key => KeyReleased(key)); }
bool KeyReleasing(int nKey); bool KeyReleasing(int nKey);
bool KeyReleasing(List<int> nKey) { return nKey.Any(key => KeyReleasing(key)); } bool KeyReleasing(List<int> nKey) { return nKey.Any(key => KeyReleasing(key)); }
}
} }

View File

@ -1,12 +1,11 @@
namespace FDK { namespace FDK;
// 定数 // 定数
public enum InputDeviceType { public enum InputDeviceType {
Keyboard, Keyboard,
Mouse, Mouse,
Joystick, Joystick,
Gamepad, Gamepad,
MidiIn, MidiIn,
Unknown Unknown
}
} }

View File

@ -1,14 +1,13 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FDK { namespace FDK;
// 構造体 // 構造体
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct STInputEvent { public struct STInputEvent {
public int nKey { get; set; } public int nKey { get; set; }
public bool Pressed { get; set; } public bool Pressed { get; set; }
public bool Released { get; set; } public bool Released { get; set; }
public long nTimeStamp { get; set; } public long nTimeStamp { get; set; }
public int nVelocity { get; set; } public int nVelocity { get; set; }
}
} }

View File

@ -1,5 +1,6 @@
namespace SlimDXKeys { namespace SlimDXKeys;
public enum Key {
public enum Key {
D0 = 0, D0 = 0,
D1 = 1, D1 = 1,
D2 = 2, D2 = 2,
@ -145,8 +146,8 @@
WebStop = 142, WebStop = 142,
Yen = 143, Yen = 143,
Unknown = 144 Unknown = 144
} }
public enum MouseObject { public enum MouseObject {
Button1 = 0, Button1 = 0,
Button2 = 1, Button2 = 1,
Button3 = 2, Button3 = 2,
@ -158,5 +159,4 @@
XAxis = 8, XAxis = 8,
YAxis = 9, YAxis = 9,
ZAxis = 10 ZAxis = 10
}
} }

View File

@ -8,11 +8,11 @@ using ManagedBass.Fx;
using ManagedBass.Mix; using ManagedBass.Mix;
namespace FDK { namespace FDK;
// CSound は、サウンドデバイスが変更されたときも、インスタンスを再作成することなく、新しいデバイスで作り直せる必要がある。 // CSound は、サウンドデバイスが変更されたときも、インスタンスを再作成することなく、新しいデバイスで作り直せる必要がある。
// そのため、デバイスごとに別のクラスに分割するのではなく、1つのクラスに集約するものとする。 // そのため、デバイスごとに別のクラスに分割するのではなく、1つのクラスに集約するものとする。
public class CSound : IDisposable { public class CSound : IDisposable {
public const int MinimumSongVol = 0; public const int MinimumSongVol = 0;
public const int MaximumSongVol = 200; // support an approximate doubling in volume. public const int MaximumSongVol = 200; // support an approximate doubling in volume.
public const int DefaultSongVol = 100; public const int DefaultSongVol = 100;
@ -738,5 +738,4 @@ namespace FDK {
} }
#endregion #endregion
}
} }

View File

@ -3,12 +3,13 @@ using ManagedBass;
using ManagedBass.Asio; using ManagedBass.Asio;
using ManagedBass.Mix; using ManagedBass.Mix;
namespace FDK { namespace FDK;
/// <summary>
/// 全ASIOデバイスを列挙する静的クラス。 /// <summary>
/// BASS_Init()やBASS_ASIO_Init()の状態とは無関係に使用可能。 /// 全ASIOデバイスを列挙する静的クラス。
/// </summary> /// BASS_Init()やBASS_ASIO_Init()の状態とは無関係に使用可能。
public static class CEnumerateAllAsioDevices { /// </summary>
public static class CEnumerateAllAsioDevices {
public static string[] GetAllASIODevices() { public static string[] GetAllASIODevices() {
try { try {
string[] bassAsioDevName = new string[BassAsio.DeviceCount]; string[] bassAsioDevName = new string[BassAsio.DeviceCount];
@ -23,9 +24,9 @@ namespace FDK {
return new string[] { "None" }; return new string[] { "None" };
} }
} }
internal class CSoundDeviceASIO : ISoundDevice { internal class CSoundDeviceASIO : ISoundDevice {
// Properties // Properties
public ESoundDeviceType SoundDeviceType { public ESoundDeviceType SoundDeviceType {
@ -377,5 +378,4 @@ namespace FDK {
private long nミキサーの1秒あたりのバイト数 = 0; private long nミキサーの1秒あたりのバイト数 = 0;
private long n累積転送バイト数 = 0; private long n累積転送バイト数 = 0;
private bool bIsBASSFree = true; private bool bIsBASSFree = true;
}
} }

View File

@ -2,8 +2,9 @@
using ManagedBass; using ManagedBass;
using ManagedBass.Mix; using ManagedBass.Mix;
namespace FDK { namespace FDK;
public class CSoundDeviceBASS : ISoundDevice {
public class CSoundDeviceBASS : ISoundDevice {
// Properties // Properties
public ESoundDeviceType SoundDeviceType { public ESoundDeviceType SoundDeviceType {
@ -221,5 +222,4 @@ namespace FDK {
private bool IsBASSSoundFree = true; private bool IsBASSSoundFree = true;
//WASAPIとASIOはLinuxでは使えないので、ここだけで良し //WASAPIとASIOはLinuxでは使えないので、ここだけで良し
}
} }

View File

@ -3,8 +3,9 @@ using ManagedBass;
using ManagedBass.Mix; using ManagedBass.Mix;
using ManagedBass.Wasapi; using ManagedBass.Wasapi;
namespace FDK { namespace FDK;
internal class CSoundDeviceWASAPI : ISoundDevice {
internal class CSoundDeviceWASAPI : ISoundDevice {
// Properties // Properties
public ESoundDeviceType SoundDeviceType { public ESoundDeviceType SoundDeviceType {
@ -424,5 +425,4 @@ namespace FDK {
private long n累積転送バイト数 = 0; private long n累積転送バイト数 = 0;
private bool b最初の実出力遅延算出 = true; private bool b最初の実出力遅延算出 = true;
private bool bIsBASSFree = true; private bool bIsBASSFree = true;
}
} }

View File

@ -1,7 +1,8 @@
using System.Diagnostics; using System.Diagnostics;
namespace FDK { namespace FDK;
public class CSoundTimer : CTimerBase {
public class CSoundTimer : CTimerBase {
public override long SystemTimeMs { public override long SystemTimeMs {
get { get {
if (this.Device.SoundDeviceType == ESoundDeviceType.Bass || if (this.Device.SoundDeviceType == ESoundDeviceType.Bass ||
@ -99,5 +100,4 @@ namespace FDK {
Timer timer = null; Timer timer = null;
private CTimer ct = null; // TESTCODE private CTimer ct = null; // TESTCODE
}
} }

View File

@ -1,9 +1,9 @@
namespace FDK { namespace FDK;
public enum ESoundDeviceType {
public enum ESoundDeviceType {
Bass, Bass,
ExclusiveWASAPI, ExclusiveWASAPI,
SharedWASAPI, SharedWASAPI,
ASIO, ASIO,
Unknown, Unknown,
}
} }

View File

@ -1,9 +1,9 @@
namespace FDK { namespace FDK;
public enum ESoundGroup {
public enum ESoundGroup {
SoundEffect = 1, SoundEffect = 1,
Voice = 2, Voice = 2,
SongPreview = 3, SongPreview = 3,
SongPlayback = 4, SongPlayback = 4,
Unknown = 0 Unknown = 0
}
} }

View File

@ -1,8 +1,9 @@
using ManagedBass; using ManagedBass;
using ManagedBass.Mix; using ManagedBass.Mix;
namespace FDK.BassMixExtension { namespace FDK.BassMixExtension;
public static class BassMixExtensions {
public static class BassMixExtensions {
public static bool ChannelPlay(int hHandle) { public static bool ChannelPlay(int hHandle) {
return BassMix.ChannelRemoveFlag(hHandle, BassFlags.MixerChanPause); return BassMix.ChannelRemoveFlag(hHandle, BassFlags.MixerChanPause);
} }
@ -14,5 +15,4 @@ namespace FDK.BassMixExtension {
public static bool ChannelIsPlaying(int hHandle) { public static bool ChannelIsPlaying(int hHandle) {
return !BassMix.ChannelHasFlag(hHandle, BassFlags.MixerChanPause); return !BassMix.ChannelHasFlag(hHandle, BassFlags.MixerChanPause);
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace FDK { namespace FDK;
internal interface ISoundDevice : IDisposable {
internal interface ISoundDevice : IDisposable {
ESoundDeviceType SoundDeviceType { get; } ESoundDeviceType SoundDeviceType { get; }
int nMasterVolume { get; set; } int nMasterVolume { get; set; }
long OutputDelay { get; } long OutputDelay { get; }
@ -10,5 +11,4 @@
CSound tCreateSound(string strファイル名, ESoundGroup soundGroup); CSound tCreateSound(string strファイル名, ESoundGroup soundGroup);
void tCreateSound(string strファイル名, CSound sound); void tCreateSound(string strファイル名, CSound sound);
}
} }

View File

@ -1,11 +1,12 @@
namespace FDK { namespace FDK;
/// <summary>
/// The LoudnessMetadata structure is used to carry, and assist with /// <summary>
/// calculations related to, integrated loudness and true peak /// The LoudnessMetadata structure is used to carry, and assist with
/// loudness. /// calculations related to, integrated loudness and true peak
/// </summary> /// loudness.
[Serializable] /// </summary>
public struct LoudnessMetadata { [Serializable]
public struct LoudnessMetadata {
public readonly Lufs Integrated; public readonly Lufs Integrated;
public readonly Lufs? TruePeak; public readonly Lufs? TruePeak;
@ -13,5 +14,4 @@
Integrated = integrated; Integrated = integrated;
TruePeak = truePeak; TruePeak = truePeak;
} }
}
} }

View File

@ -2,25 +2,26 @@
using System.Diagnostics; using System.Diagnostics;
using System.Xml.XPath; using System.Xml.XPath;
namespace FDK { namespace FDK;
/// <summary>
/// The LoudnessMetadataScanner plays two roles: /// <summary>
/// 1. Scanning of song audio files using BS1770GAIN (http://bs1770gain.sourceforge.net/) /// The LoudnessMetadataScanner plays two roles:
/// to determine their perceived loudness. Running on a background thread while not /// 1. Scanning of song audio files using BS1770GAIN (http://bs1770gain.sourceforge.net/)
/// in song gameplay, songs without existing loudness metadata files (e.g. *.bs1770gain.xml) /// to determine their perceived loudness. Running on a background thread while not
/// have their perceived loudness determined and saved into an associated metadata file /// in song gameplay, songs without existing loudness metadata files (e.g. *.bs1770gain.xml)
/// without modifying the original audio file. This scanning process begins running /// have their perceived loudness determined and saved into an associated metadata file
/// with scanning jobs ordered based on the order in which songs are enumerated when /// without modifying the original audio file. This scanning process begins running
/// the application starts, but shifts to prioritize songs which are browsed and previewed /// with scanning jobs ordered based on the order in which songs are enumerated when
/// while on the song select screen. /// the application starts, but shifts to prioritize songs which are browsed and previewed
/// 2. Loading of loudness metadata from the BS1770GAIN metadata file alongside each audio file. /// while on the song select screen.
/// This occurs when parsing .tja files, when song preview begins, and when song playback /// 2. Loading of loudness metadata from the BS1770GAIN metadata file alongside each audio file.
/// begins. When no file is available on disk, a scanning job is passed to the background /// This occurs when parsing .tja files, when song preview begins, and when song playback
/// scanning thread for processing. The loaded metadata is then passed into the /// begins. When no file is available on disk, a scanning job is passed to the background
/// SongGainController for combination with a configured target loudness, resulting in a /// scanning thread for processing. The loaded metadata is then passed into the
/// gain value assigned to the sound object just before playback begins. /// SongGainController for combination with a configured target loudness, resulting in a
/// </summary> /// gain value assigned to the sound object just before playback begins.
public static class LoudnessMetadataScanner { /// </summary>
public static class LoudnessMetadataScanner {
private const string Bs1770GainExeFileName = "bs1770gain.exe"; private const string Bs1770GainExeFileName = "bs1770gain.exe";
private static readonly Stack<string> Jobs = new Stack<string>(); private static readonly Stack<string> Jobs = new Stack<string>();
@ -292,5 +293,4 @@ namespace FDK {
} }
public static event EventHandler<ScanningStateChangedEventArgs> ScanningStateChanged; public static event EventHandler<ScanningStateChangedEventArgs> ScanningStateChanged;
}
} }

View File

@ -1,11 +1,12 @@
namespace FDK { namespace FDK;
/// <summary>
/// The Lufs structure is used to carry, and assist with calculations related to, /// <summary>
/// Loudness Units relative to Full Scale. LUFS are measured in absolute scale /// The Lufs structure is used to carry, and assist with calculations related to,
/// and whole values represent one decibel. /// Loudness Units relative to Full Scale. LUFS are measured in absolute scale
/// </summary> /// and whole values represent one decibel.
[Serializable] /// </summary>
public struct Lufs { [Serializable]
public struct Lufs {
private readonly double _value; private readonly double _value;
public Lufs(double value) { public Lufs(double value) {
@ -33,5 +34,4 @@
public static Lufs operator +(Lufs left, Lufs right) { public static Lufs operator +(Lufs left, Lufs right) {
return new Lufs(left._value + right._value); return new Lufs(left._value + right._value);
} }
}
} }

View File

@ -1,14 +1,15 @@
namespace FDK { namespace FDK;
/// <summary>
/// SongGainController provides a central place through which song preview /// <summary>
/// and song playback attempt to apply BS1770GAIN-based loudness metadata /// SongGainController provides a central place through which song preview
/// or .tja SONGVOL as the Gain of a song sound. /// and song playback attempt to apply BS1770GAIN-based loudness metadata
/// /// or .tja SONGVOL as the Gain of a song sound.
/// By doing so through SongGainController instead of directly against the ///
/// song (preview) CSound object, SongGainController can override the Gain /// By doing so through SongGainController instead of directly against the
/// value based on configuration or other information. /// song (preview) CSound object, SongGainController can override the Gain
/// </summary> /// value based on configuration or other information.
public sealed class SongGainController { /// </summary>
public sealed class SongGainController {
public bool ApplyLoudnessMetadata { private get; set; } public bool ApplyLoudnessMetadata { private get; set; }
public Lufs TargetLoudness { private get; set; } public Lufs TargetLoudness { private get; set; }
public bool ApplySongVol { private get; set; } public bool ApplySongVol { private get; set; }
@ -22,5 +23,4 @@
sound.SetGain(ApplySongVol ? songVol : CSound.DefaultSongVol); sound.SetGain(ApplySongVol ? songVol : CSound.DefaultSongVol);
} }
} }
}
} }

View File

@ -2,35 +2,36 @@
using System.Collections.Specialized; using System.Collections.Specialized;
using FDK.ExtensionMethods; using FDK.ExtensionMethods;
namespace FDK { namespace FDK;
/// <summary>
/// SoundGroupLevelController holds the current sound level value for each /// <summary>
/// of the unique sound groups, along with an increment by which they can /// SoundGroupLevelController holds the current sound level value for each
/// easily be adjusted. /// of the unique sound groups, along with an increment by which they can
/// /// easily be adjusted.
/// Configuration changes to the sound group levels are provided to the ///
/// controller via binding code which allows CConfigIni and /// Configuration changes to the sound group levels are provided to the
/// SoundGroupLevelController to be unaware of one another. /// controller via binding code which allows CConfigIni and
/// See ConfigIniToSoundGroupLevelControllerBinder for more details. /// SoundGroupLevelController to be unaware of one another.
/// /// See ConfigIniToSoundGroupLevelControllerBinder for more details.
/// Dynamic adjustment of sound group levels during song selection and song ///
/// playback are managed via a small dependency taken by the respective /// Dynamic adjustment of sound group levels during song selection and song
/// stage classes. See KeyboardSoundGroupLevelControlHandler and its usages /// playback are managed via a small dependency taken by the respective
/// for more details. /// stage classes. See KeyboardSoundGroupLevelControlHandler and its usages
/// /// for more details.
/// As new sound objects are created, including when reloading sounds due ///
/// to a changer in audio output device, SoundGroupLevelController ensures /// As new sound objects are created, including when reloading sounds due
/// that they are provided with the current level for their associated /// to a changer in audio output device, SoundGroupLevelController ensures
/// sound group by subscribing to notifications regarding changes to a /// that they are provided with the current level for their associated
/// collection of sound objects provided during construction. This /// sound group by subscribing to notifications regarding changes to a
/// observable collection comes from the sound manager, but without either /// collection of sound objects provided during construction. This
/// it or this class being directly aware of one another. /// observable collection comes from the sound manager, but without either
/// /// it or this class being directly aware of one another.
/// As sound group levels are changed, SoundGroupLevelController updates ///
/// all existing sound objects group levels by iterating that same /// As sound group levels are changed, SoundGroupLevelController updates
/// observable collection. /// all existing sound objects group levels by iterating that same
/// </summary> /// observable collection.
public sealed class SoundGroupLevelController { /// </summary>
public sealed class SoundGroupLevelController {
private readonly Dictionary<ESoundGroup, int> _levelBySoundGroup = new Dictionary<ESoundGroup, int> { private readonly Dictionary<ESoundGroup, int> _levelBySoundGroup = new Dictionary<ESoundGroup, int> {
[ESoundGroup.SoundEffect] = CSound.MaximumGroupLevel, [ESoundGroup.SoundEffect] = CSound.MaximumGroupLevel,
[ESoundGroup.Voice] = CSound.MaximumGroupLevel, [ESoundGroup.Voice] = CSound.MaximumGroupLevel,
@ -109,5 +110,4 @@ namespace FDK {
} }
public event EventHandler<LevelChangedEventArgs> LevelChanged; public event EventHandler<LevelChangedEventArgs> LevelChanged;
}
} }

View File

@ -3,9 +3,10 @@ using ManagedBass;
using Silk.NET.Windowing; using Silk.NET.Windowing;
namespace FDK { namespace FDK;
public class SoundManager // : CSound
{ public class SoundManager // : CSound
{
private static ISoundDevice SoundDevice { private static ISoundDevice SoundDevice {
get; set; get; set;
} }
@ -377,5 +378,4 @@ namespace FDK {
public void RemoveMixer(CSound cs) { public void RemoveMixer(CSound cs) {
cs.tRemoveSoundFromMixer(); cs.tRemoveSoundFromMixer();
} }
}
} }

View File

@ -1,8 +1,9 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SkiaSharp; using SkiaSharp;
namespace FDK { namespace FDK;
public static class BitmapUtil {
public static class BitmapUtil {
// 定数 // 定数
public const uint DIB_PAL_COLORS = 1; public const uint DIB_PAL_COLORS = 1;
@ -62,5 +63,4 @@ namespace FDK {
return null; return null;
//return new SKBitmap( writer.BaseStream ); //return new SKBitmap( writer.BaseStream );
} }
}
} }

View File

@ -2,8 +2,9 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FFmpeg.AutoGen; using FFmpeg.AutoGen;
namespace FDK { namespace FDK;
public class CDecodedFrame : IDisposable {
public class CDecodedFrame : IDisposable {
public CDecodedFrame(Size texsize) { public CDecodedFrame(Size texsize) {
this.Using = false; this.Using = false;
this.TexSize = texsize; this.TexSize = texsize;
@ -42,5 +43,4 @@ namespace FDK {
this.Using = false; this.Using = false;
Marshal.FreeHGlobal(this.TexPointer); Marshal.FreeHGlobal(this.TexPointer);
} }
}
} }

View File

@ -3,8 +3,9 @@ using System.Runtime.InteropServices;
using FFmpeg.AutoGen; using FFmpeg.AutoGen;
namespace FDK { namespace FDK;
public unsafe class CFrameConverter : IDisposable {
public unsafe class CFrameConverter : IDisposable {
public CFrameConverter(Size FrameSize, AVPixelFormat pix_fmt) { public CFrameConverter(Size FrameSize, AVPixelFormat pix_fmt) {
this.FrameSize = FrameSize; this.FrameSize = FrameSize;
if (pix_fmt != CVPxfmt) { if (pix_fmt != CVPxfmt) {
@ -59,5 +60,4 @@ namespace FDK {
private const AVPixelFormat CVPxfmt = AVPixelFormat.AV_PIX_FMT_RGBA; private const AVPixelFormat CVPxfmt = AVPixelFormat.AV_PIX_FMT_RGBA;
private bool IsConvert = false; private bool IsConvert = false;
private Size FrameSize; private Size FrameSize;
}
} }

View File

@ -7,8 +7,9 @@ using Point = System.Drawing.Point;
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
using RectangleF = System.Drawing.RectangleF; using RectangleF = System.Drawing.RectangleF;
namespace FDK { namespace FDK;
public class CTexture : IDisposable {
public class CTexture : IDisposable {
/// <summary> /// <summary>
/// バッファの集まり /// バッファの集まり
/// </summary> /// </summary>
@ -943,5 +944,4 @@ namespace FDK {
} }
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,14 +1,15 @@
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
namespace FDK { namespace FDK;
/// <summary>
/// 縦長_横長の画像を自動で折りたたんでテクスチャ化するCTexture。 /// <summary>
/// 例えば、768x30 のテクスチャファイルが入力されたら、 /// 縦長_横長の画像を自動で折りたたんでテクスチャ化するCTexture。
/// 内部で256x90 など、2のべき乗サイズに収めるよう、内部でテクスチャ画像を自動的に折り返す。 /// 例えば、768x30 のテクスチャファイルが入力されたら、
/// 必要に応じて、正方形テクスチャにもする。 /// 内部で256x90 など、2のべき乗サイズに収めるよう、内部でテクスチャ画像を自動的に折り返す。
/// また、t2D描画は、その折り返しを加味して実行する。 /// 必要に応じて、正方形テクスチャにもする。
/// </summary> /// また、t2D描画は、その折り返しを加味して実行する。
public class CTextureAf : CTexture, IDisposable { /// </summary>
public class CTextureAf : CTexture, IDisposable {
/// <summary> /// <summary>
/// <para>画像ファイルからテクスチャを生成する。</para> /// <para>画像ファイルからテクスチャを生成する。</para>
@ -175,5 +176,4 @@ namespace FDK {
private int _foldtimes; private int _foldtimes;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,10 +1,11 @@
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace FDK { namespace FDK;
/// <summary>
/// テクスチャの作成に失敗しました。 /// <summary>
/// </summary> /// テクスチャの作成に失敗しました。
public class CTextureCreateFailedException : Exception { /// </summary>
public class CTextureCreateFailedException : Exception {
public CTextureCreateFailedException() { public CTextureCreateFailedException() {
} }
public CTextureCreateFailedException(string message) public CTextureCreateFailedException(string message)
@ -16,5 +17,4 @@ namespace FDK {
public CTextureCreateFailedException(string message, Exception innerException) public CTextureCreateFailedException(string message, Exception innerException)
: base(message, innerException) { : base(message, innerException) {
} }
}
} }

View File

@ -3,13 +3,14 @@ using System.Diagnostics;
using FFmpeg.AutoGen; using FFmpeg.AutoGen;
using Size = System.Drawing.Size; using Size = System.Drawing.Size;
namespace FDK { namespace FDK;
/// <summary>
/// ビデオのデコードをするクラス /// <summary>
/// ファイル名・nullのCTextureをもらえれば、勝手に、CTextureに映像を格納して返す。 /// ビデオのデコードをするクラス
/// 演奏とは別のタイマーを使用しているので、ずれる可能性がある。 /// ファイル名・nullのCTextureをもらえれば、勝手に、CTextureに映像を格納して返す。
/// </summary> /// 演奏とは別のタイマーを使用しているので、ずれる可能性がある。
public unsafe class CVideoDecoder : IDisposable { /// </summary>
public unsafe class CVideoDecoder : IDisposable {
public CVideoDecoder(string filename) { public CVideoDecoder(string filename) {
if (!File.Exists(filename)) if (!File.Exists(filename))
throw new FileNotFoundException(filename + " not found..."); throw new FileNotFoundException(filename + " not found...");
@ -281,5 +282,4 @@ namespace FDK {
//for convert //for convert
private CFrameConverter frameconv; private CFrameConverter frameconv;
#endregion #endregion
}
} }

View File

@ -3,12 +3,13 @@ using SkiaSharp;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
namespace FDK { namespace FDK;
/// <summary>
/// 高速描画版のCFontRendererクラス。 /// <summary>
/// といっても、一度レンダリングした結果をキャッシュして使いまわしているだけ。 /// 高速描画版のCFontRendererクラス。
/// </summary> /// といっても、一度レンダリングした結果をキャッシュして使いまわしているだけ。
public class CCachedFontRenderer : CFontRenderer { /// </summary>
public class CCachedFontRenderer : CFontRenderer {
#region [ ] #region [ ]
public CCachedFontRenderer(string fontpath, int pt, CFontRenderer.FontStyle style) { public CCachedFontRenderer(string fontpath, int pt, CFontRenderer.FontStyle style) {
Initialize(fontpath, pt, style); Initialize(fontpath, pt, style);
@ -236,5 +237,4 @@ namespace FDK {
protected bool bDisposed_CCachedFontRenderer; protected bool bDisposed_CCachedFontRenderer;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -5,9 +5,9 @@ using SkiaSharp;
using static FDK.CSkiaSharpTextRenderer; using static FDK.CSkiaSharpTextRenderer;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
namespace FDK { namespace FDK;
public class CFontRenderer : IDisposable { public class CFontRenderer : IDisposable {
#region[static系] #region[static系]
public static void SetTextCorrectionX_Chara_List_Vertical(string[] list) { public static void SetTextCorrectionX_Chara_List_Vertical(string[] list) {
if (list != null) if (list != null)
@ -258,5 +258,4 @@ namespace FDK {
} }
private ITextRenderer textRenderer; private ITextRenderer textRenderer;
}
} }

View File

@ -3,8 +3,9 @@ using System.Text.RegularExpressions;
using SkiaSharp; using SkiaSharp;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
namespace FDK { namespace FDK;
internal class CSkiaSharpTextRenderer : ITextRenderer {
internal class CSkiaSharpTextRenderer : ITextRenderer {
//https://monobook.org/wiki/SkiaSharp%E3%81%A7%E6%97%A5%E6%9C%AC%E8%AA%9E%E6%96%87%E5%AD%97%E5%88%97%E3%82%92%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B //https://monobook.org/wiki/SkiaSharp%E3%81%A7%E6%97%A5%E6%9C%AC%E8%AA%9E%E6%96%87%E5%AD%97%E5%88%97%E3%82%92%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B
public CSkiaSharpTextRenderer(string fontpath, int pt) { public CSkiaSharpTextRenderer(string fontpath, int pt) {
Initialize(fontpath, pt, CFontRenderer.FontStyle.Regular); Initialize(fontpath, pt, CFontRenderer.FontStyle.Regular);
@ -294,5 +295,4 @@ namespace FDK {
} }
private SKPaint paint = null; private SKPaint paint = null;
}
} }

View File

@ -2,12 +2,12 @@ using SkiaSharp;
using static FDK.CSkiaSharpTextRenderer; using static FDK.CSkiaSharpTextRenderer;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
namespace FDK { namespace FDK;
internal interface ITextRenderer : IDisposable {
internal interface ITextRenderer : IDisposable {
SKBitmap DrawText(string drawstr, CFontRenderer.DrawMode drawmode, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor, int edge_Ratio, bool keepCenter); SKBitmap DrawText(string drawstr, CFontRenderer.DrawMode drawmode, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor, int edge_Ratio, bool keepCenter);
string Purify(string input); string Purify(string input);
List<SStringToken> Tokenize(string input, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor); List<SStringToken> Tokenize(string input, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor);
}
} }

View File

@ -1,7 +1,8 @@
using FDK; using FDK;
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
class Animator : IAnimatable {
class Animator : IAnimatable {
public Animator(int startValue, int endValue, int tickInterval, bool isLoop) { public Animator(int startValue, int endValue, int tickInterval, bool isLoop) {
Type = CounterType.Normal; Type = CounterType.Normal;
StartValue = startValue; StartValue = startValue;
@ -87,10 +88,9 @@ namespace OpenTaiko.Animations {
get; get;
private set; private set;
} }
} }
enum CounterType { enum CounterType {
Normal, Normal,
Double Double
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs ease-in animation. /// <summary>
/// </summary> /// A class that performs ease-in animation.
class EaseIn : Animator { /// </summary>
class EaseIn : Animator {
/// <summary> /// <summary>
/// Initialize Ease-in. /// Initialize Ease-in.
/// </summary> /// </summary>
@ -25,5 +26,4 @@
private readonly int EndPoint; private readonly int EndPoint;
private readonly int Sa; private readonly int Sa;
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs ease-in-out animation. /// <summary>
/// </summary> /// A class that performs ease-in-out animation.
class EaseInOut : Animator { /// </summary>
class EaseInOut : Animator {
/// <summary> /// <summary>
/// Initialize Ease-in-out. /// Initialize Ease-in-out.
/// </summary> /// </summary>
@ -30,5 +31,4 @@
private readonly int EndPoint; private readonly int EndPoint;
private readonly int Sa; private readonly int Sa;
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs ease-out animation. /// <summary>
/// </summary> /// A class that performs ease-out animation.
class EaseOut : Animator { /// </summary>
class EaseOut : Animator {
/// <summary> /// <summary>
/// Initialize Ease-out. /// Initialize Ease-out.
/// </summary> /// </summary>
@ -26,5 +27,4 @@
private readonly int EndPoint; private readonly int EndPoint;
private readonly int Sa; private readonly int Sa;
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs fade-in animation. /// <summary>
/// </summary> /// A class that performs fade-in animation.
internal class FadeIn : Animator { /// </summary>
internal class FadeIn : Animator {
/// <summary> /// <summary>
/// Initialize fade-in. /// Initialize fade-in.
/// </summary> /// </summary>
@ -21,5 +22,4 @@
} }
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs fade-out animation. /// <summary>
/// </summary> /// A class that performs fade-out animation.
internal class FadeOut : Animator { /// </summary>
internal class FadeOut : Animator {
/// <summary> /// <summary>
/// Initialize fade-out. /// Initialize fade-out.
/// </summary> /// </summary>
@ -21,5 +22,4 @@
} }
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// Animation interface. /// <summary>
/// </summary> /// Animation interface.
interface IAnimatable { /// </summary>
interface IAnimatable {
/// <summary> /// <summary>
/// Starts the animation. /// Starts the animation.
/// </summary> /// </summary>
@ -24,5 +25,4 @@
/// </summary> /// </summary>
/// <returns>Animation parameters.</returns> /// <returns>Animation parameters.</returns>
object GetAnimation(); object GetAnimation();
}
} }

View File

@ -1,8 +1,9 @@
namespace OpenTaiko.Animations { namespace OpenTaiko.Animations;
/// <summary>
/// A class that performs linear animation. /// <summary>
/// </summary> /// A class that performs linear animation.
class Linear : Animator { /// </summary>
class Linear : Animator {
/// <summary> /// <summary>
/// Initialize linear movement. /// Initialize linear movement.
/// </summary> /// </summary>
@ -25,5 +26,4 @@
private readonly int EndPoint; private readonly int EndPoint;
private readonly int Sa; private readonly int Sa;
private readonly int TimeMs; private readonly int TimeMs;
}
} }

View File

@ -1,7 +1,8 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
class CMenuCharacter {
class CMenuCharacter {
private static CCounter[] ctCharacterNormal = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterNormal = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
private static CCounter[] ctCharacterSelect = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterSelect = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
private static CCounter[] ctCharacterStart = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterStart = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
@ -269,5 +270,4 @@ namespace OpenTaiko {
_tex.Opacity = 255; _tex.Opacity = 255;
} }
} }
}
} }

View File

@ -1,7 +1,8 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
class CResultCharacter {
class CResultCharacter {
private static CCounter[] ctCharacterNormal = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterNormal = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
private static CCounter[] ctCharacterClear = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterClear = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
private static CCounter[] ctCharacterFailed = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterFailed = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
@ -230,5 +231,4 @@ namespace OpenTaiko {
_tex.Opacity = 255; _tex.Opacity = 255;
} }
} }
}
} }

View File

@ -2,8 +2,9 @@
using Silk.NET.Maths; using Silk.NET.Maths;
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
namespace OpenTaiko { namespace OpenTaiko;
class PuchiChara : CActivity {
class PuchiChara : CActivity {
public PuchiChara() { public PuchiChara() {
base.IsDeActivated = true; base.IsDeActivated = true;
} }
@ -96,5 +97,4 @@ namespace OpenTaiko {
private CCounter SineCounter; private CCounter SineCounter;
private CCounter SineCounterIdle; private CCounter SineCounterIdle;
private bool inGame; private bool inGame;
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class BestPlayRecords {
internal class BestPlayRecords {
public enum EClearStatus { public enum EClearStatus {
NONE = 0, NONE = 0,
@ -194,5 +195,4 @@
return stats; return stats;
} }
}
} }

View File

@ -5,8 +5,9 @@ using System.Text;
using FDK; using FDK;
using FDK.ExtensionMethods; using FDK.ExtensionMethods;
namespace OpenTaiko { namespace OpenTaiko;
internal class CConfigIni : INotifyPropertyChanged {
internal class CConfigIni : INotifyPropertyChanged {
private const int MinimumKeyboardSoundLevelIncrement = 1; private const int MinimumKeyboardSoundLevelIncrement = 1;
private const int MaximumKeyboardSoundLevelIncrement = 20; private const int MaximumKeyboardSoundLevelIncrement = 20;
private const int DefaultKeyboardSoundLevelIncrement = 5; private const int DefaultKeyboardSoundLevelIncrement = 5;
@ -3776,5 +3777,4 @@ TrainingJumpToLastMeasure=K051
private void OnPropertyChanged(string propertyName) { private void OnPropertyChanged(string propertyName) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }
}
} }

View File

@ -1,8 +1,8 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace OpenTaiko { namespace OpenTaiko;
public enum Difficulty { public enum Difficulty {
Easy, Easy,
Normal, Normal,
Hard, Hard,
@ -11,28 +11,28 @@ namespace OpenTaiko {
Tower, Tower,
Dan, Dan,
Total Total
} }
public enum EScrollMode { public enum EScrollMode {
Normal, Normal,
BMScroll, BMScroll,
HBScroll HBScroll
} }
public enum EGame { public enum EGame {
Off = 0, Off = 0,
Survival = 1, Survival = 1,
SurvivalHard = 2 SurvivalHard = 2
} }
public enum EDifficultyDisplayType { public enum EDifficultyDisplayType {
Off = 0, Off = 0,
TextOnNthSong = 1, TextOnNthSong = 1,
ImageOnMTaiko = 2, ImageOnMTaiko = 2,
} }
public enum EPad // 演奏用のenum。ここを修正するときは、次に出てくる EKeyConfigPad と EパッドFlag もセットで修正すること。 public enum EPad // 演奏用のenum。ここを修正するときは、次に出てくる EKeyConfigPad と EパッドFlag もセットで修正すること。
{ {
HH = 0, HH = 0,
R = 0, R = 0,
SD = 1, SD = 1,
@ -88,9 +88,9 @@ namespace OpenTaiko {
Max, // 門番用として定義 Max, // 門番用として定義
Unknown = 99 Unknown = 99
} }
public enum EKeyConfigPad // #24609 キーコンフィグで使うenum。capture要素あり。 public enum EKeyConfigPad // #24609 キーコンフィグで使うenum。capture要素あり。
{ {
HH = EPad.HH, HH = EPad.HH,
R = EPad.R, R = EPad.R,
SD = EPad.SD, SD = EPad.SD,
@ -182,10 +182,10 @@ namespace OpenTaiko {
#endregion #endregion
Max, Max,
Unknown = EPad.Unknown Unknown = EPad.Unknown
} }
[Flags] [Flags]
public enum EPadFlag // #24063 2011.1.16 yyagi コマンド入力用 パッド入力のフラグ化 public enum EPadFlag // #24063 2011.1.16 yyagi コマンド入力用 パッド入力のフラグ化
{ {
None = 0, None = 0,
HH = 1, HH = 1,
R = 1, R = 1,
@ -215,54 +215,54 @@ namespace OpenTaiko {
LBlue2P = 32, LBlue2P = 32,
RBlue2P = 64, RBlue2P = 64,
Unknown = 4096 Unknown = 4096
} }
public enum ERandomMode { public enum ERandomMode {
Off, Off,
Random, Random,
Mirror, Mirror,
SuperRandom, SuperRandom,
MirrorRandom MirrorRandom
} }
public enum EFunMods { public enum EFunMods {
None, None,
Avalanche, Avalanche,
Minesweeper, Minesweeper,
Total, Total,
} }
public enum EGameType { public enum EGameType {
Taiko = 0, Taiko = 0,
Konga = 1, Konga = 1,
} }
public enum EInstrumentPad // ここを修正するときは、セットで次の EKeyConfigPart も修正すること。 public enum EInstrumentPad // ここを修正するときは、セットで次の EKeyConfigPart も修正すること。
{ {
Drums = 0, Drums = 0,
Guitar = 1, Guitar = 1,
Bass = 2, Bass = 2,
Taiko = 3, Taiko = 3,
Unknown = 99 Unknown = 99
} }
public enum EKeyConfigPart // : E楽器パート public enum EKeyConfigPart // : E楽器パート
{ {
Drums = EInstrumentPad.Drums, Drums = EInstrumentPad.Drums,
Guitar = EInstrumentPad.Guitar, Guitar = EInstrumentPad.Guitar,
Bass = EInstrumentPad.Bass, Bass = EInstrumentPad.Bass,
Taiko = EInstrumentPad.Taiko, Taiko = EInstrumentPad.Taiko,
System, System,
Unknown = EInstrumentPad.Unknown Unknown = EInstrumentPad.Unknown
} }
internal enum EInputDevice { internal enum EInputDevice {
Keyboard = 0, Keyboard = 0,
MIDIInput = 1, MIDIInput = 1,
Joypad = 2, Joypad = 2,
Mouse = 3, Mouse = 3,
Gamepad = 4, Gamepad = 4,
Unknown = -1 Unknown = -1
} }
public enum ENoteJudge { public enum ENoteJudge {
Perfect = 0, Perfect = 0,
Great = 1, Great = 1,
Good = 2, Good = 2,
@ -272,72 +272,72 @@ namespace OpenTaiko {
Auto = 6, Auto = 6,
ADLIB = 7, ADLIB = 7,
Mine = 8, Mine = 8,
} }
internal enum EJudgeTextDisplayPosition { internal enum EJudgeTextDisplayPosition {
OFF, OFF,
AboveLane, AboveLane,
OnJudgeLine, OnJudgeLine,
BelowCombo BelowCombo
} }
internal enum EFIFOMode { internal enum EFIFOMode {
FadeIn, FadeIn,
FadeOut FadeOut
} }
internal enum EGameplayScreenReturnValue { internal enum EGameplayScreenReturnValue {
Continue, Continue,
PerformanceInterrupted, PerformanceInterrupted,
StageFailed, StageFailed,
StageCleared, StageCleared,
ReloadAndReplay, ReloadAndReplay,
Replay Replay
} }
internal enum ESongLoadingScreenReturnValue { internal enum ESongLoadingScreenReturnValue {
Continue = 0, Continue = 0,
LoadComplete, LoadComplete,
LoadCanceled LoadCanceled
} }
public enum ENoteState { public enum ENoteState {
None, None,
Wait, Wait,
Perfect, Perfect,
Grade, Grade,
Bad Bad
} }
public enum ERollState { public enum ERollState {
None, None,
Roll, Roll,
RollB, RollB,
Balloon, Balloon,
Potato Potato
} }
public enum EStealthMode { public enum EStealthMode {
Off = 0, Off = 0,
Doron = 1, Doron = 1,
Stealth = 2 Stealth = 2
} }
/// <summary> /// <summary>
/// 透明チップの種類 /// 透明チップの種類
/// </summary> /// </summary>
public enum EInvisible { public enum EInvisible {
Off, // チップを透明化しない Off, // チップを透明化しない
Semi, // Poor/Miss時だけ、一時的に透明解除する Semi, // Poor/Miss時だけ、一時的に透明解除する
Full // チップを常に透明化する Full // チップを常に透明化する
} }
/// <summary> /// <summary>
/// Drum/Guitar/Bass の値を扱う汎用の構造体。 /// Drum/Guitar/Bass の値を扱う汎用の構造体。
/// </summary> /// </summary>
/// <typeparam name="T">値の型。</typeparam> /// <typeparam name="T">値の型。</typeparam>
[Serializable] [Serializable]
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct STDGBVALUE<T> // indexはE楽器パートと一致させること public struct STDGBVALUE<T> // indexはE楽器パートと一致させること
{ {
public T Drums; public T Drums;
public T Guitar; public T Guitar;
public T Bass; public T Bass;
@ -379,30 +379,29 @@ namespace OpenTaiko {
throw new IndexOutOfRangeException(); throw new IndexOutOfRangeException();
} }
} }
} }
public enum EReturnValue : int { public enum EReturnValue : int {
Continuation, Continuation,
ReturnToTitle, ReturnToTitle,
SongChoosen SongChoosen
} }
#region[Ver.K追加] #region[Ver.K追加]
public enum ELaneType { public enum ELaneType {
TypeA, TypeA,
TypeB, TypeB,
TypeC, TypeC,
TypeD TypeD
} }
public enum EMirror { public enum EMirror {
TypeA, TypeA,
TypeB TypeB
} }
public enum EClipDispType { public enum EClipDispType {
BackgroundOnly = 1, BackgroundOnly = 1,
WindowOnly = 2, WindowOnly = 2,
Both = 3, Both = 3,
Off = 0 Off = 0
}
#endregion
} }
#endregion

View File

@ -1,8 +1,9 @@
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace OpenTaiko { namespace OpenTaiko;
internal class CCrypto {
internal class CCrypto {
internal static readonly char[] chars = internal static readonly char[] chars =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray(); "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray();
@ -21,5 +22,4 @@ namespace OpenTaiko {
return result.ToString(); return result.ToString();
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
class CHitSounds {
class CHitSounds {
public CHitSounds(string path) { public CHitSounds(string path) {
tLoadFile(path); tLoadFile(path);
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
@ -51,5 +52,4 @@
} }
#endregion #endregion
}
} }

View File

@ -1,8 +1,9 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
public class CPad {
public class CPad {
// Properties // Properties
internal STHIT detectedDevice; internal STHIT detectedDevice;
@ -209,5 +210,4 @@ namespace OpenTaiko {
private CInputManager inputManager; private CInputManager inputManager;
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
class CSavableT<T> where T : new() {
class CSavableT<T> where T : new() {
public virtual string _fn { public virtual string _fn {
get; get;
protected set; protected set;
@ -25,5 +26,4 @@
#endregion #endregion
}
} }

View File

@ -3,10 +3,10 @@ using System.Drawing;
using System.Text; using System.Text;
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
// グローバル定数 // グローバル定数
public enum Eシステムサウンド { public enum Eシステムサウンド {
BGMオプション画面 = 0, BGMオプション画面 = 0,
BGMコンフィグ画面, BGMコンフィグ画面,
BGM起動画面, BGM起動画面,
@ -34,9 +34,9 @@ namespace OpenTaiko {
sound特訓スキップ音, sound特訓スキップ音,
SOUND特訓スクロール, SOUND特訓スクロール,
Count // システムサウンド総数の計算用 Count // システムサウンド総数の計算用
} }
internal class CSkin : IDisposable { internal class CSkin : IDisposable {
// Class // Class
public class CSystemSound : IDisposable { public class CSystemSound : IDisposable {
@ -9310,5 +9310,4 @@ namespace OpenTaiko {
#endregion #endregion
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using System.Drawing; using System.Drawing;
namespace OpenTaiko { namespace OpenTaiko;
internal class CSongDict {
internal class CSongDict {
private static Dictionary<string, CSongListNode> nodes = new Dictionary<string, CSongListNode>(); private static Dictionary<string, CSongListNode> nodes = new Dictionary<string, CSongListNode>();
private static HashSet<string> urls = new HashSet<string>(); private static HashSet<string> urls = new HashSet<string>();
@ -265,5 +266,4 @@ namespace OpenTaiko {
} }
#endregion #endregion
}
} }

View File

@ -1,8 +1,9 @@
using System.Drawing; using System.Drawing;
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
internal class CTextConsole : CActivity {
internal class CTextConsole : CActivity {
public enum EFontType { public enum EFontType {
White, White,
Cyan, Cyan,
@ -91,5 +92,4 @@ namespace OpenTaiko {
private CTexture[] fontTextures = new CTexture[2]; private CTexture[] fontTextures = new CTexture[2];
//----------------- //-----------------
#endregion #endregion
}
} }

View File

@ -1,15 +1,16 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
/// <summary>
/// The ConfigIniToSongGainControllerBinder allows for SONGVOL and/or other /// <summary>
/// properties related to the Gain levels applied to song preview and /// The ConfigIniToSongGainControllerBinder allows for SONGVOL and/or other
/// playback, to be applied conditionally based on settings flowing from /// properties related to the Gain levels applied to song preview and
/// ConfigIni. This binder class allows that to take place without either /// playback, to be applied conditionally based on settings flowing from
/// ConfigIni or SongGainController having awareness of one another. /// ConfigIni. This binder class allows that to take place without either
/// See those classes properties, methods, and events for more details. /// ConfigIni or SongGainController having awareness of one another.
/// </summary> /// See those classes properties, methods, and events for more details.
internal static class ConfigIniToSongGainControllerBinder { /// </summary>
internal static class ConfigIniToSongGainControllerBinder {
internal static void Bind(CConfigIni configIni, SongGainController songGainController) { internal static void Bind(CConfigIni configIni, SongGainController songGainController) {
songGainController.ApplyLoudnessMetadata = configIni.ApplyLoudnessMetadata; songGainController.ApplyLoudnessMetadata = configIni.ApplyLoudnessMetadata;
songGainController.TargetLoudness = new Lufs(configIni.TargetLoudness); songGainController.TargetLoudness = new Lufs(configIni.TargetLoudness);
@ -29,5 +30,4 @@ namespace OpenTaiko {
} }
}; };
} }
}
} }

View File

@ -1,14 +1,15 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
/// <summary>
/// The ConfigIniToSoundGroupLevelControllerBinder allows for updated sound /// <summary>
/// group level values, and keyboard sound level adjustment increment /// The ConfigIniToSoundGroupLevelControllerBinder allows for updated sound
/// values, to flow between CConfigIni and the SoundGroupLevelController /// group level values, and keyboard sound level adjustment increment
/// without either of those two classes being aware of one another. /// values, to flow between CConfigIni and the SoundGroupLevelController
/// See those classes properties, methods, and events for more details. /// without either of those two classes being aware of one another.
/// </summary> /// See those classes properties, methods, and events for more details.
internal static class ConfigIniToSoundGroupLevelControllerBinder { /// </summary>
internal static class ConfigIniToSoundGroupLevelControllerBinder {
internal static void Bind(CConfigIni configIni, SoundGroupLevelController soundGroupLevelController) { internal static void Bind(CConfigIni configIni, SoundGroupLevelController soundGroupLevelController) {
soundGroupLevelController.SetLevel(ESoundGroup.SoundEffect, configIni.SoundEffectLevel); soundGroupLevelController.SetLevel(ESoundGroup.SoundEffect, configIni.SoundEffectLevel);
soundGroupLevelController.SetLevel(ESoundGroup.Voice, configIni.VoiceLevel); soundGroupLevelController.SetLevel(ESoundGroup.Voice, configIni.VoiceLevel);
@ -55,5 +56,4 @@ namespace OpenTaiko {
} }
}; };
} }
}
} }

View File

@ -2,11 +2,12 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
namespace OpenTaiko { namespace OpenTaiko;
/// <summary>
/// Class for reading and writing configuration files. /// <summary>
/// </summary> /// Class for reading and writing configuration files.
public static class ConfigManager { /// </summary>
public static class ConfigManager {
private static readonly JsonSerializerSettings Settings = private static readonly JsonSerializerSettings Settings =
new JsonSerializerSettings() { new JsonSerializerSettings() {
ObjectCreationHandling = ObjectCreationHandling.Auto, ObjectCreationHandling = ObjectCreationHandling.Auto,
@ -44,5 +45,4 @@ namespace OpenTaiko {
stream.Write(JsonConvert.SerializeObject(obj, Formatting.None, Settings)); stream.Write(JsonConvert.SerializeObject(obj, Formatting.None, Settings));
} }
} }
}
} }

View File

@ -1,7 +1,8 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
class Easing {
class Easing {
public int EaseIn(CCounter counter, float startPoint, float endPoint, CalcType type) { public int EaseIn(CCounter counter, float startPoint, float endPoint, CalcType type) {
StartPoint = startPoint; StartPoint = startPoint;
EndPoint = endPoint; EndPoint = endPoint;
@ -184,5 +185,4 @@ namespace OpenTaiko {
Circular, Circular,
Linear Linear
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class Favorites {
internal class Favorites {
public void tFavorites() { public void tFavorites() {
if (!File.Exists("Favorite.json")) if (!File.Exists("Favorite.json"))
tSaveFile(); tSaveFile();
@ -42,6 +43,4 @@
} }
#endregion #endregion
}
} }

View File

@ -7,11 +7,12 @@ using FDK;
using ImGuiNET; using ImGuiNET;
using SampleFramework; using SampleFramework;
namespace OpenTaiko { namespace OpenTaiko;
/*
/*
FOR DEBUGGING! This class is intended for developers only! FOR DEBUGGING! This class is intended for developers only!
*/ */
public static class ImGuiDebugWindow { public static class ImGuiDebugWindow {
private static bool showImGuiDemoWindow = false; private static bool showImGuiDemoWindow = false;
private static Assembly assemblyinfo = Assembly.GetExecutingAssembly(); private static Assembly assemblyinfo = Assembly.GetExecutingAssembly();
@ -549,5 +550,4 @@ namespace OpenTaiko {
} }
#endregion #endregion
}
} }

View File

@ -1,23 +1,24 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
/// <summary>
/// KeyboardSoundGroupLevelControlHandler is called by the song selection /// <summary>
/// and song play stages when handling keyboard input. By delegating to /// KeyboardSoundGroupLevelControlHandler is called by the song selection
/// this class they are able to support a centrally-managed and consistent /// and song play stages when handling keyboard input. By delegating to
/// set of keyboard shortcuts for dynamically adjusting four sound group /// this class they are able to support a centrally-managed and consistent
/// levels: /// set of keyboard shortcuts for dynamically adjusting four sound group
/// - sound effect level, via Ctrl and either of the Minus or Equals keys /// levels:
/// - voice level, via Shift and either of the Minus or Equals keys /// - sound effect level, via Ctrl and either of the Minus or Equals keys
/// - song preview and song playback level, via the Minus or Equals key /// - voice level, via Shift and either of the Minus or Equals keys
/// /// - song preview and song playback level, via the Minus or Equals key
/// When the sound group levels are adjusted in this manner, the ///
/// SoundGroupLevelController (and handlers bound to its events) ensure /// When the sound group levels are adjusted in this manner, the
/// that both the sound object group levels are updated and the application /// SoundGroupLevelController (and handlers bound to its events) ensure
/// configuration is updated. See ConfigIniToSoundGroupLevelControllerBinder /// that both the sound object group levels are updated and the application
/// for more details on the latter. /// configuration is updated. See ConfigIniToSoundGroupLevelControllerBinder
/// </summary> /// for more details on the latter.
internal static class KeyboardSoundGroupLevelControlHandler { /// </summary>
internal static class KeyboardSoundGroupLevelControlHandler {
internal static void Handle( internal static void Handle(
IInputDevice keyboard, IInputDevice keyboard,
SoundGroupLevelController soundGroupLevelController, SoundGroupLevelController soundGroupLevelController,
@ -46,5 +47,4 @@ namespace OpenTaiko {
soundGroupLevelController.AdjustLevel(soundGroup, isAdjustmentPositive); soundGroupLevelController.AdjustLevel(soundGroup, isAdjustmentPositive);
?.tPlay(); ?.tPlay();
} }
}
} }

View File

@ -1,8 +1,9 @@
using System.Diagnostics; using System.Diagnostics;
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
internal class LogNotification {
internal class LogNotification {
private static Queue<CLogNotification> Notifications = new Queue<CLogNotification>(); private static Queue<CLogNotification> Notifications = new Queue<CLogNotification>();
public enum ENotificationType { public enum ENotificationType {
@ -48,5 +49,4 @@ namespace OpenTaiko {
while (Notifications.Count > 0 && Notifications.Peek().LifeTime.IsEnded) Notifications.Dequeue(); while (Notifications.Count > 0 && Notifications.Peek().LifeTime.IsEnded) Notifications.Dequeue();
// Add an optimized method to display the notifications here // Add an optimized method to display the notifications here
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class Modal {
internal class Modal {
public Modal(EModalType mt, int ra, params object?[] re) { public Modal(EModalType mt, int ra, params object?[] re) {
modalType = mt; modalType = mt;
rarity = ra; rarity = ra;
@ -45,5 +46,4 @@
#endregion #endregion
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class ModalQueue {
internal class ModalQueue {
public ModalQueue(Modal.EModalFormat mf) { public ModalQueue(Modal.EModalFormat mf) {
_modalQueues = new Queue<Modal>[] { new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>() }; _modalQueues = new Queue<Modal>[] { new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>() };
_modalFormat = mf; _modalFormat = mf;
@ -40,5 +41,4 @@
private Modal.EModalFormat _modalFormat; private Modal.EModalFormat _modalFormat;
private Queue<Modal>[] _modalQueues; private Queue<Modal>[] _modalQueues;
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
class NamePlateConfig {
class NamePlateConfig {
public void tNamePlateConfig() { public void tNamePlateConfig() {
// Deprecated, only converts to new format // Deprecated, only converts to new format
tLoadFile(); tLoadFile();
@ -207,5 +208,4 @@ namespace OpenTaiko {
} }
#endregion #endregion
}
} }

View File

@ -12,8 +12,9 @@ using Silk.NET.Maths;
using SkiaSharp; using SkiaSharp;
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
namespace OpenTaiko { namespace OpenTaiko;
internal class OpenTaiko : Game {
internal class OpenTaiko : Game {
// Properties // Properties
#region [ properties ] #region [ properties ]
public static readonly string VERSION = Assembly.GetExecutingAssembly().GetName().Version.ToString(); public static readonly string VERSION = Assembly.GetExecutingAssembly().GetName().Version.ToString();
@ -2484,5 +2485,4 @@ for (int i = 0; i < 3; i++) {
public static Color4 borderColor = new Color4(1f, 0f, 0f, 0f); public static Color4 borderColor = new Color4(1f, 0f, 0f, 0f);
#endregion #endregion
}
} }

View File

@ -3,8 +3,9 @@ using System.Globalization;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace OpenTaiko { namespace OpenTaiko;
internal class Program {
internal class Program {
#region [ DLL存在チェック ] #region [ DLL存在チェック ]
//----------------------------- //-----------------------------
private static Mutex mutex二重起動防止用; private static Mutex mutex二重起動防止用;
@ -101,8 +102,8 @@ namespace OpenTaiko {
using (var mania = new OpenTaiko()) using (var mania = new OpenTaiko())
mania.Run(); mania.Run();
Trace.WriteLine( "" ); Trace.WriteLine("");
Trace.WriteLine( "Thank you for playing!" ); Trace.WriteLine("Thank you for playing!");
} }
#if !DEBUG #if !DEBUG
catch( Exception e ) catch( Exception e )
@ -176,5 +177,4 @@ namespace OpenTaiko {
} }
} }
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class RecentlyPlayedSongs {
internal class RecentlyPlayedSongs {
public void tRecentlyPlayedSongs() { public void tRecentlyPlayedSongs() {
if (!File.Exists("RecentlyPlayedSongs.json")) if (!File.Exists("RecentlyPlayedSongs.json"))
tSaveFile(); tSaveFile();
@ -38,6 +39,4 @@
} }
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
internal class SaveFile {
internal class SaveFile {
public void tSaveFile(string filename) { public void tSaveFile(string filename) {
path = @$"Saves{Path.DirectorySeparatorChar}" + filename + @".json"; path = @$"Saves{Path.DirectorySeparatorChar}" + filename + @".json";
@ -340,5 +341,4 @@ namespace OpenTaiko {
} }
#endregion #endregion
}
} }

View File

@ -1,9 +1,9 @@
using FDK; using FDK;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
namespace OpenTaiko { namespace OpenTaiko;
public sealed class TitleTextureKey { public sealed class TitleTextureKey {
// Static // Static
private static readonly Dictionary<TitleTextureKey, CTexture> _titledictionary private static readonly Dictionary<TitleTextureKey, CTexture> _titledictionary
@ -133,5 +133,4 @@ namespace OpenTaiko {
public static bool operator !=(TitleTextureKey left, TitleTextureKey right) { public static bool operator !=(TitleTextureKey left, TitleTextureKey right) {
return !Equals(left, right); return !Equals(left, right);
} }
}
} }

View File

@ -1,4 +1,4 @@
namespace OpenTaiko { namespace OpenTaiko;
internal class CGimmickValue {
} internal class CGimmickValue {
} }

View File

@ -1,8 +1,9 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
[Serializable]
internal class CLocalizationData { [Serializable]
internal class CLocalizationData {
[JsonProperty("strings")] [JsonProperty("strings")]
private Dictionary<string, string> Strings = new Dictionary<string, string>(); private Dictionary<string, string> Strings = new Dictionary<string, string>();
@ -22,5 +23,4 @@ namespace OpenTaiko {
public void SetString(string langcode, string str) { public void SetString(string langcode, string str) {
Strings[langcode] = str; Strings[langcode] = str;
} }
}
} }

View File

@ -1,5 +1,6 @@
namespace OpenTaiko { namespace OpenTaiko;
class CSongReplay {
class CSongReplay {
/* Game version used for the replay /* Game version used for the replay
* 521 = 0.5.2.1 * 521 = 0.5.2.1
* 530 = 0.5.3 * 530 = 0.5.3
@ -477,5 +478,4 @@
public long OnlineScoreID; public long OnlineScoreID;
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using FDK; using FDK;
namespace OpenTaiko { namespace OpenTaiko;
class CVisualLogManager {
class CVisualLogManager {
public enum ELogCardType { public enum ELogCardType {
LogInfo, LogInfo,
LogWarning, LogWarning,
@ -46,5 +47,4 @@ namespace OpenTaiko {
} }
private List<LogCard> cards = new List<LogCard>(); private List<LogCard> cards = new List<LogCard>();
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
class DBCDN : CSavableT<Dictionary<string, DBCDN.CDNData>> {
class DBCDN : CSavableT<Dictionary<string, DBCDN.CDNData>> {
public DBCDN() { public DBCDN() {
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}CDN.json"; _fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}CDN.json";
base.tDBInitSavable(); base.tDBInitSavable();
@ -52,5 +53,4 @@ namespace OpenTaiko {
#endregion #endregion
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
class DBCharacter {
class DBCharacter {
public class CharacterEffect { public class CharacterEffect {
public CharacterEffect() { public CharacterEffect() {
Gauge = "Normal"; Gauge = "Normal";
@ -88,5 +89,4 @@ namespace OpenTaiko {
public CLocalizationData[] SpeechText; public CLocalizationData[] SpeechText;
} }
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
class DBEncyclopediaMenus : CSavableT<DBEncyclopediaMenus.EncyclopediaMenu> {
class DBEncyclopediaMenus : CSavableT<DBEncyclopediaMenus.EncyclopediaMenu> {
public DBEncyclopediaMenus() { public DBEncyclopediaMenus() {
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Encyclopedia{Path.DirectorySeparatorChar}Menus.json"; _fn = @$"{OpenTaiko.strEXEのあるフォルダ}Encyclopedia{Path.DirectorySeparatorChar}Menus.json";
base.tDBInitSavable(); base.tDBInitSavable();
@ -17,5 +18,4 @@ namespace OpenTaiko {
} }
#endregion #endregion
}
} }

View File

@ -2,8 +2,9 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using static OpenTaiko.DBNameplateUnlockables; using static OpenTaiko.DBNameplateUnlockables;
namespace OpenTaiko { namespace OpenTaiko;
internal class DBNameplateUnlockables : CSavableT<Dictionary<Int64, NameplateUnlockable>> {
internal class DBNameplateUnlockables : CSavableT<Dictionary<Int64, NameplateUnlockable>> {
public DBNameplateUnlockables() { public DBNameplateUnlockables() {
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}NameplateUnlockables.db3"; _fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}NameplateUnlockables.db3";
@ -86,5 +87,4 @@ namespace OpenTaiko {
if (_edited) if (_edited)
OpenTaiko.SaveFileInstances[player].tApplyHeyaChanges(); OpenTaiko.SaveFileInstances[player].tApplyHeyaChanges();
} }
}
} }

View File

@ -1,7 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace OpenTaiko { namespace OpenTaiko;
class DBPuchichara {
class DBPuchichara {
public class PuchicharaEffect { public class PuchicharaEffect {
public PuchicharaEffect() { public PuchicharaEffect() {
AllPurple = false; AllPurple = false;
@ -80,5 +81,4 @@ namespace OpenTaiko {
public object Description; public object Description;
} }
}
} }

Some files were not shown because too many files have changed in this diff Show More