File Scoped Namespace Declarations (#716)
* refactor: file-scoped namespace OpenTaiko * refactor: file-scoped namespace FDK * refactor: dotnet format
This commit is contained in:
parent
e87212ea60
commit
fcf4f80b34
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class CActivity {
|
||||
namespace FDK;
|
||||
|
||||
public class CActivity {
|
||||
// Properties
|
||||
|
||||
public bool IsActivated { get; private set; }
|
||||
@ -147,5 +148,4 @@
|
||||
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class CConversion {
|
||||
namespace FDK;
|
||||
|
||||
public class CConversion {
|
||||
// Properties
|
||||
|
||||
public static readonly string HexChars = "0123456789ABCDEFabcdef";
|
||||
@ -233,5 +234,4 @@
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// 一定間隔で単純増加する整数(カウント値)を扱う。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ○使い方
|
||||
/// 1.CCounterの変数をつくる。
|
||||
/// 2.CCounterを生成
|
||||
/// ctCounter = new CCounter( 0, 3, 10, CDTXMania.Timer );
|
||||
/// 3.進行メソッドを使用する。
|
||||
/// 4.ウマー。
|
||||
///
|
||||
/// double値を使う場合、t進行db、t進行LoopDbを使うこと。
|
||||
/// また、double版では間隔の値はミリ秒単位ではなく、通常の秒単位になります。
|
||||
/// </remarks>
|
||||
public class CCounter {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// 一定間隔で単純増加する整数(カウント値)を扱う。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ○使い方
|
||||
/// 1.CCounterの変数をつくる。
|
||||
/// 2.CCounterを生成
|
||||
/// ctCounter = new CCounter( 0, 3, 10, CDTXMania.Timer );
|
||||
/// 3.進行メソッドを使用する。
|
||||
/// 4.ウマー。
|
||||
///
|
||||
/// double値を使う場合、t進行db、t進行LoopDbを使うこと。
|
||||
/// また、double版では間隔の値はミリ秒単位ではなく、通常の秒単位になります。
|
||||
/// </remarks>
|
||||
public class CCounter {
|
||||
public bool IsStarted {
|
||||
get;
|
||||
set;
|
||||
@ -267,5 +268,4 @@
|
||||
private double Interval;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class CFPS {
|
||||
namespace FDK;
|
||||
|
||||
public class CFPS {
|
||||
// Properties
|
||||
|
||||
public int NowFPS {
|
||||
@ -57,5 +58,4 @@
|
||||
private int CoreFPS;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
using System.Text;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// 汎用的な .iniファイルを扱う。
|
||||
/// </summary>
|
||||
namespace FDK;
|
||||
|
||||
public class CIniFile {
|
||||
/// <summary>
|
||||
/// 汎用的な .iniファイルを扱う。
|
||||
/// </summary>
|
||||
public class CIniFile {
|
||||
// Properties
|
||||
|
||||
public string FileName {
|
||||
@ -108,5 +108,4 @@ namespace FDK {
|
||||
sw.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// <para>一定の間隔で処理を行うテンプレートパターンの定義。</para>
|
||||
/// <para>たとえば、t進行() で 5ms ごとに行う処理を前回のt進行()の呼び出しから 15ms 後に呼び出した場合は、処理が 3回 実行される。</para>
|
||||
/// </summary>
|
||||
public class CIntervalProcessing : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// <para>一定の間隔で処理を行うテンプレートパターンの定義。</para>
|
||||
/// <para>たとえば、t進行() で 5ms ごとに行う処理を前回のt進行()の呼び出しから 15ms 後に呼び出した場合は、処理が 3回 実行される。</para>
|
||||
/// </summary>
|
||||
public class CIntervalProcessing : IDisposable {
|
||||
public delegate void dgProc();
|
||||
public void Tick(long interval, dgProc proc) {
|
||||
// タイマ更新
|
||||
@ -48,5 +49,4 @@
|
||||
protected long PrevTime = CTimer.UnusedNum;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTaiko {
|
||||
public class CJudgeTextEncoding {
|
||||
namespace OpenTaiko;
|
||||
|
||||
public class CJudgeTextEncoding {
|
||||
/// <summary>
|
||||
/// Hnc8様のReadJEncを使用して文字コードの判別をする。
|
||||
/// </summary>
|
||||
@ -65,5 +66,4 @@ namespace OpenTaiko {
|
||||
return ("\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class CTimer : CTimerBase {
|
||||
namespace FDK;
|
||||
|
||||
public class CTimer : CTimerBase {
|
||||
public enum TimerType {
|
||||
Unknown = -1,
|
||||
PerformanceCounter = 0,
|
||||
@ -152,5 +153,4 @@
|
||||
*/
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// <para>タイマの抽象クラス。</para>
|
||||
/// <para>このクラスを継承し、override したクラスを作成することで、任意のクロックを持つタイマを作成できる。</para>
|
||||
/// </summary>
|
||||
public abstract class CTimerBase : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// <para>タイマの抽象クラス。</para>
|
||||
/// <para>このクラスを継承し、override したクラスを作成することで、任意のクロックを持つタイマを作成できる。</para>
|
||||
/// </summary>
|
||||
public abstract class CTimerBase : IDisposable {
|
||||
public const long UnusedNum = -1;
|
||||
|
||||
// この2つを override する。
|
||||
@ -140,5 +141,4 @@
|
||||
protected int StopCount = 0;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace FDK {
|
||||
public class CTraceLogListener : TraceListener {
|
||||
namespace FDK;
|
||||
|
||||
public class CTraceLogListener : TraceListener {
|
||||
public CTraceLogListener(StreamWriter stream) {
|
||||
this.LogStreamWriter = stream;
|
||||
}
|
||||
@ -105,5 +106,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace FDK {
|
||||
public class CUtility {
|
||||
namespace FDK;
|
||||
|
||||
public class CUtility {
|
||||
|
||||
public static void RunCompleteGC() {
|
||||
GC.Collect(); // アクセス不可能なオブジェクトを除去し、ファイナライぜーション実施。
|
||||
@ -105,5 +106,4 @@ namespace FDK {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class Color4 {
|
||||
namespace FDK;
|
||||
|
||||
public class Color4 {
|
||||
public float Red;
|
||||
public float Green;
|
||||
public float Blue;
|
||||
@ -18,5 +19,4 @@
|
||||
Green = ((rgba >> 8) & 255) / 255.0f;
|
||||
Red = (rgba & 255) / 255.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace FDK.ExtensionMethods {
|
||||
public static class DoubleExtensions {
|
||||
namespace FDK.ExtensionMethods;
|
||||
|
||||
public static class DoubleExtensions {
|
||||
public static double Clamp(this double value, double min, double max) {
|
||||
return Math.Min(Math.Max(value, min), max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace FDK.ExtensionMethods {
|
||||
public static class Int32Extensions {
|
||||
namespace FDK.ExtensionMethods;
|
||||
|
||||
public static class Int32Extensions {
|
||||
public static int Clamp(this int value, int min, int max) {
|
||||
return Math.Min(Math.Max(value, min), max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,12 @@ using Silk.NET.OpenGLES.Extensions.ImGui;
|
||||
using Silk.NET.Windowing;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace SampleFramework {
|
||||
/// <summary>
|
||||
/// Presents an easy to use wrapper for making games and samples.
|
||||
/// </summary>
|
||||
public abstract class Game : IDisposable {
|
||||
namespace SampleFramework;
|
||||
|
||||
/// <summary>
|
||||
/// Presents an easy to use wrapper for making games and samples.
|
||||
/// </summary>
|
||||
public abstract class Game : IDisposable {
|
||||
public static GL Gl { 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
ImGuiIO.Fonts.Clear();
|
||||
ImGuiIO.Fonts.AddFontDefault();
|
||||
}
|
||||
@ -483,5 +483,4 @@ namespace SampleFramework {
|
||||
public void Window_Move(Vector2D<int> size) { }
|
||||
|
||||
public void Window_FramebufferResize(Vector2D<int> size) { }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace SampleFramework {
|
||||
public static class GameWindowSize {
|
||||
namespace SampleFramework;
|
||||
|
||||
public static class GameWindowSize {
|
||||
public static int Width = 1280;
|
||||
public static int Height = 720;
|
||||
}
|
||||
}
|
||||
|
@ -30,32 +30,33 @@ using System.Runtime.InteropServices;
|
||||
|
||||
#pragma warning disable 1591 // Missing XML comments
|
||||
|
||||
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;
|
||||
namespace OpenTK.Graphics.Egl;
|
||||
|
||||
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,
|
||||
GL = Egl.OPENGL_API,
|
||||
VG = Egl.OPENVG_API
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum RenderableFlags {
|
||||
[Flags]
|
||||
public enum RenderableFlags {
|
||||
ES = Egl.OPENGL_ES_BIT,
|
||||
ES2 = Egl.OPENGL_ES2_BIT,
|
||||
ES3 = Egl.OPENGL_ES3_BIT,
|
||||
GL = Egl.OPENGL_BIT,
|
||||
VG = Egl.OPENVG_BIT,
|
||||
}
|
||||
}
|
||||
|
||||
public enum ErrorCode {
|
||||
public enum ErrorCode {
|
||||
SUCCESS = 12288,
|
||||
NOT_INITIALIZED = 12289,
|
||||
BAD_ACCESS = 12290,
|
||||
@ -71,9 +72,9 @@ namespace OpenTK.Graphics.Egl {
|
||||
BAD_PARAMETER = 12300,
|
||||
BAD_SURFACE = 12301,
|
||||
CONTEXT_LOST = 12302,
|
||||
}
|
||||
}
|
||||
|
||||
public enum SurfaceType {
|
||||
public enum SurfaceType {
|
||||
PBUFFER_BIT = 0x0001,
|
||||
PIXMAP_BIT = 0x0002,
|
||||
WINDOW_BIT = 0x0004,
|
||||
@ -81,15 +82,15 @@ namespace OpenTK.Graphics.Egl {
|
||||
VG_ALPHA_FORMAT_PRE_BIT = 0x0040,
|
||||
MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200,
|
||||
SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400,
|
||||
}
|
||||
}
|
||||
|
||||
public class EglException : Exception {
|
||||
public class EglException : Exception {
|
||||
public EglException() : base() { }
|
||||
|
||||
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_MINOR_VERSION = 0x30FB;
|
||||
|
||||
@ -401,5 +402,4 @@ namespace OpenTK.Graphics.Egl {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Silk.NET.Input;
|
||||
|
||||
namespace FDK {
|
||||
public class CInputGamepad : IInputDevice, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputGamepad : IInputDevice, IDisposable {
|
||||
// Constructor
|
||||
|
||||
private IGamepad Gamepad { get; set; }
|
||||
@ -142,5 +143,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Silk.NET.Input;
|
||||
|
||||
namespace FDK {
|
||||
public class CInputJoystick : IInputDevice, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputJoystick : IInputDevice, IDisposable {
|
||||
// Constructor
|
||||
|
||||
public IJoystick Joystick { get; private set; }
|
||||
@ -150,5 +151,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Silk.NET.Input;
|
||||
|
||||
namespace FDK {
|
||||
public class CInputKeyboard : IInputDevice, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputKeyboard : IInputDevice, IDisposable {
|
||||
// Constructor
|
||||
|
||||
public CInputKeyboard(IReadOnlyList<IKeyboard> keyboards) {
|
||||
@ -140,5 +141,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public class CInputMIDI : IInputDevice, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputMIDI : IInputDevice, IDisposable {
|
||||
// Properties
|
||||
|
||||
public IntPtr MidiInPtr;
|
||||
@ -105,5 +106,4 @@
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using Silk.NET.Input;
|
||||
using Silk.NET.Windowing;
|
||||
|
||||
namespace FDK {
|
||||
public class CInputManager : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputManager : IDisposable {
|
||||
// 定数
|
||||
|
||||
public static int DefaultVolume = 110;
|
||||
@ -196,5 +197,4 @@ namespace FDK {
|
||||
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using System.Numerics;
|
||||
using Silk.NET.Input;
|
||||
|
||||
namespace FDK {
|
||||
public class CInputMouse : IInputDevice, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CInputMouse : IInputDevice, IDisposable {
|
||||
// 定数
|
||||
|
||||
public const int MouseButtonCount = 8;
|
||||
@ -135,5 +136,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
using SlimDXKey = SlimDXKeys.Key;
|
||||
|
||||
namespace FDK {
|
||||
public static class DeviceConstantConverter {
|
||||
namespace FDK;
|
||||
|
||||
public static class DeviceConstantConverter {
|
||||
// メソッド
|
||||
|
||||
public static Key DIKtoKey(Silk.NET.Input.Key key) {
|
||||
@ -169,5 +170,4 @@ namespace FDK {
|
||||
{ Silk.NET.Input.Key.Unknown, SlimDXKey.MediaSelect },
|
||||
*/
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
public interface IInputDevice : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public interface IInputDevice : IDisposable {
|
||||
// Properties
|
||||
|
||||
InputDeviceType CurrentType {
|
||||
@ -30,5 +31,4 @@
|
||||
bool KeyReleased(List<int> nKey) { return nKey.Any(key => KeyReleased(key)); }
|
||||
bool KeyReleasing(int nKey);
|
||||
bool KeyReleasing(List<int> nKey) { return nKey.Any(key => KeyReleasing(key)); }
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
namespace FDK {
|
||||
// 定数
|
||||
namespace FDK;
|
||||
// 定数
|
||||
|
||||
public enum InputDeviceType {
|
||||
public enum InputDeviceType {
|
||||
Keyboard,
|
||||
Mouse,
|
||||
Joystick,
|
||||
Gamepad,
|
||||
MidiIn,
|
||||
Unknown
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,13 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FDK {
|
||||
// 構造体
|
||||
namespace FDK;
|
||||
// 構造体
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct STInputEvent {
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct STInputEvent {
|
||||
public int nKey { get; set; }
|
||||
public bool Pressed { get; set; }
|
||||
public bool Released { get; set; }
|
||||
public long nTimeStamp { get; set; }
|
||||
public int nVelocity { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace SlimDXKeys {
|
||||
public enum Key {
|
||||
namespace SlimDXKeys;
|
||||
|
||||
public enum Key {
|
||||
D0 = 0,
|
||||
D1 = 1,
|
||||
D2 = 2,
|
||||
@ -145,8 +146,8 @@
|
||||
WebStop = 142,
|
||||
Yen = 143,
|
||||
Unknown = 144
|
||||
}
|
||||
public enum MouseObject {
|
||||
}
|
||||
public enum MouseObject {
|
||||
Button1 = 0,
|
||||
Button2 = 1,
|
||||
Button3 = 2,
|
||||
@ -158,5 +159,4 @@
|
||||
XAxis = 8,
|
||||
YAxis = 9,
|
||||
ZAxis = 10
|
||||
}
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ using ManagedBass.Fx;
|
||||
using ManagedBass.Mix;
|
||||
|
||||
|
||||
namespace FDK {
|
||||
// CSound は、サウンドデバイスが変更されたときも、インスタンスを再作成することなく、新しいデバイスで作り直せる必要がある。
|
||||
// そのため、デバイスごとに別のクラスに分割するのではなく、1つのクラスに集約するものとする。
|
||||
namespace FDK;
|
||||
// CSound は、サウンドデバイスが変更されたときも、インスタンスを再作成することなく、新しいデバイスで作り直せる必要がある。
|
||||
// そのため、デバイスごとに別のクラスに分割するのではなく、1つのクラスに集約するものとする。
|
||||
|
||||
public class CSound : IDisposable {
|
||||
public class CSound : IDisposable {
|
||||
public const int MinimumSongVol = 0;
|
||||
public const int MaximumSongVol = 200; // support an approximate doubling in volume.
|
||||
public const int DefaultSongVol = 100;
|
||||
@ -738,5 +738,4 @@ namespace FDK {
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,13 @@ using ManagedBass;
|
||||
using ManagedBass.Asio;
|
||||
using ManagedBass.Mix;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// 全ASIOデバイスを列挙する静的クラス。
|
||||
/// BASS_Init()やBASS_ASIO_Init()の状態とは無関係に使用可能。
|
||||
/// </summary>
|
||||
public static class CEnumerateAllAsioDevices {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// 全ASIOデバイスを列挙する静的クラス。
|
||||
/// BASS_Init()やBASS_ASIO_Init()の状態とは無関係に使用可能。
|
||||
/// </summary>
|
||||
public static class CEnumerateAllAsioDevices {
|
||||
public static string[] GetAllASIODevices() {
|
||||
try {
|
||||
string[] bassAsioDevName = new string[BassAsio.DeviceCount];
|
||||
@ -23,9 +24,9 @@ namespace FDK {
|
||||
|
||||
return new string[] { "None" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class CSoundDeviceASIO : ISoundDevice {
|
||||
internal class CSoundDeviceASIO : ISoundDevice {
|
||||
// Properties
|
||||
|
||||
public ESoundDeviceType SoundDeviceType {
|
||||
@ -377,5 +378,4 @@ namespace FDK {
|
||||
private long nミキサーの1秒あたりのバイト数 = 0;
|
||||
private long n累積転送バイト数 = 0;
|
||||
private bool bIsBASSFree = true;
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using ManagedBass;
|
||||
using ManagedBass.Mix;
|
||||
|
||||
namespace FDK {
|
||||
public class CSoundDeviceBASS : ISoundDevice {
|
||||
namespace FDK;
|
||||
|
||||
public class CSoundDeviceBASS : ISoundDevice {
|
||||
// Properties
|
||||
|
||||
public ESoundDeviceType SoundDeviceType {
|
||||
@ -221,5 +222,4 @@ namespace FDK {
|
||||
private bool IsBASSSoundFree = true;
|
||||
|
||||
//WASAPIとASIOはLinuxでは使えないので、ここだけで良し
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,9 @@ using ManagedBass;
|
||||
using ManagedBass.Mix;
|
||||
using ManagedBass.Wasapi;
|
||||
|
||||
namespace FDK {
|
||||
internal class CSoundDeviceWASAPI : ISoundDevice {
|
||||
namespace FDK;
|
||||
|
||||
internal class CSoundDeviceWASAPI : ISoundDevice {
|
||||
// Properties
|
||||
|
||||
public ESoundDeviceType SoundDeviceType {
|
||||
@ -424,5 +425,4 @@ namespace FDK {
|
||||
private long n累積転送バイト数 = 0;
|
||||
private bool b最初の実出力遅延算出 = true;
|
||||
private bool bIsBASSFree = true;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace FDK {
|
||||
public class CSoundTimer : CTimerBase {
|
||||
namespace FDK;
|
||||
|
||||
public class CSoundTimer : CTimerBase {
|
||||
public override long SystemTimeMs {
|
||||
get {
|
||||
if (this.Device.SoundDeviceType == ESoundDeviceType.Bass ||
|
||||
@ -99,5 +100,4 @@ namespace FDK {
|
||||
Timer timer = null;
|
||||
|
||||
private CTimer ct = null; // TESTCODE
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
namespace FDK {
|
||||
public enum ESoundDeviceType {
|
||||
namespace FDK;
|
||||
|
||||
public enum ESoundDeviceType {
|
||||
Bass,
|
||||
ExclusiveWASAPI,
|
||||
SharedWASAPI,
|
||||
ASIO,
|
||||
Unknown,
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
namespace FDK {
|
||||
public enum ESoundGroup {
|
||||
namespace FDK;
|
||||
|
||||
public enum ESoundGroup {
|
||||
SoundEffect = 1,
|
||||
Voice = 2,
|
||||
SongPreview = 3,
|
||||
SongPlayback = 4,
|
||||
Unknown = 0
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using ManagedBass;
|
||||
using ManagedBass.Mix;
|
||||
|
||||
namespace FDK.BassMixExtension {
|
||||
public static class BassMixExtensions {
|
||||
namespace FDK.BassMixExtension;
|
||||
|
||||
public static class BassMixExtensions {
|
||||
public static bool ChannelPlay(int hHandle) {
|
||||
return BassMix.ChannelRemoveFlag(hHandle, BassFlags.MixerChanPause);
|
||||
}
|
||||
@ -14,5 +15,4 @@ namespace FDK.BassMixExtension {
|
||||
public static bool ChannelIsPlaying(int hHandle) {
|
||||
return !BassMix.ChannelHasFlag(hHandle, BassFlags.MixerChanPause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace FDK {
|
||||
internal interface ISoundDevice : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
internal interface ISoundDevice : IDisposable {
|
||||
ESoundDeviceType SoundDeviceType { get; }
|
||||
int nMasterVolume { get; set; }
|
||||
long OutputDelay { get; }
|
||||
@ -10,5 +11,4 @@
|
||||
|
||||
CSound tCreateSound(string strファイル名, ESoundGroup soundGroup);
|
||||
void tCreateSound(string strファイル名, CSound sound);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// The LoudnessMetadata structure is used to carry, and assist with
|
||||
/// calculations related to, integrated loudness and true peak
|
||||
/// loudness.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct LoudnessMetadata {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// The LoudnessMetadata structure is used to carry, and assist with
|
||||
/// calculations related to, integrated loudness and true peak
|
||||
/// loudness.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct LoudnessMetadata {
|
||||
public readonly Lufs Integrated;
|
||||
public readonly Lufs? TruePeak;
|
||||
|
||||
@ -13,5 +14,4 @@
|
||||
Integrated = integrated;
|
||||
TruePeak = truePeak;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,25 +2,26 @@
|
||||
using System.Diagnostics;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// The LoudnessMetadataScanner plays two roles:
|
||||
/// 1. Scanning of song audio files using BS1770GAIN (http://bs1770gain.sourceforge.net/)
|
||||
/// to determine their perceived loudness. Running on a background thread while not
|
||||
/// in song gameplay, songs without existing loudness metadata files (e.g. *.bs1770gain.xml)
|
||||
/// have their perceived loudness determined and saved into an associated metadata file
|
||||
/// without modifying the original audio file. This scanning process begins running
|
||||
/// with scanning jobs ordered based on the order in which songs are enumerated when
|
||||
/// the application starts, but shifts to prioritize songs which are browsed and previewed
|
||||
/// while on the song select screen.
|
||||
/// 2. Loading of loudness metadata from the BS1770GAIN metadata file alongside each audio file.
|
||||
/// This occurs when parsing .tja files, when song preview begins, and when song playback
|
||||
/// begins. When no file is available on disk, a scanning job is passed to the background
|
||||
/// scanning thread for processing. The loaded metadata is then passed into the
|
||||
/// SongGainController for combination with a configured target loudness, resulting in a
|
||||
/// gain value assigned to the sound object just before playback begins.
|
||||
/// </summary>
|
||||
public static class LoudnessMetadataScanner {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// The LoudnessMetadataScanner plays two roles:
|
||||
/// 1. Scanning of song audio files using BS1770GAIN (http://bs1770gain.sourceforge.net/)
|
||||
/// to determine their perceived loudness. Running on a background thread while not
|
||||
/// in song gameplay, songs without existing loudness metadata files (e.g. *.bs1770gain.xml)
|
||||
/// have their perceived loudness determined and saved into an associated metadata file
|
||||
/// without modifying the original audio file. This scanning process begins running
|
||||
/// with scanning jobs ordered based on the order in which songs are enumerated when
|
||||
/// the application starts, but shifts to prioritize songs which are browsed and previewed
|
||||
/// while on the song select screen.
|
||||
/// 2. Loading of loudness metadata from the BS1770GAIN metadata file alongside each audio file.
|
||||
/// This occurs when parsing .tja files, when song preview begins, and when song playback
|
||||
/// begins. When no file is available on disk, a scanning job is passed to the background
|
||||
/// scanning thread for processing. The loaded metadata is then passed into the
|
||||
/// SongGainController for combination with a configured target loudness, resulting in a
|
||||
/// gain value assigned to the sound object just before playback begins.
|
||||
/// </summary>
|
||||
public static class LoudnessMetadataScanner {
|
||||
private const string Bs1770GainExeFileName = "bs1770gain.exe";
|
||||
|
||||
private static readonly Stack<string> Jobs = new Stack<string>();
|
||||
@ -292,5 +293,4 @@ namespace FDK {
|
||||
}
|
||||
|
||||
public static event EventHandler<ScanningStateChangedEventArgs> ScanningStateChanged;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// The Lufs structure is used to carry, and assist with calculations related to,
|
||||
/// Loudness Units relative to Full Scale. LUFS are measured in absolute scale
|
||||
/// and whole values represent one decibel.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Lufs {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// The Lufs structure is used to carry, and assist with calculations related to,
|
||||
/// Loudness Units relative to Full Scale. LUFS are measured in absolute scale
|
||||
/// and whole values represent one decibel.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Lufs {
|
||||
private readonly double _value;
|
||||
|
||||
public Lufs(double value) {
|
||||
@ -33,5 +34,4 @@
|
||||
public static Lufs operator +(Lufs left, Lufs right) {
|
||||
return new Lufs(left._value + right._value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// SongGainController provides a central place through which song preview
|
||||
/// 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
|
||||
/// value based on configuration or other information.
|
||||
/// </summary>
|
||||
public sealed class SongGainController {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// SongGainController provides a central place through which song preview
|
||||
/// 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
|
||||
/// value based on configuration or other information.
|
||||
/// </summary>
|
||||
public sealed class SongGainController {
|
||||
public bool ApplyLoudnessMetadata { private get; set; }
|
||||
public Lufs TargetLoudness { private get; set; }
|
||||
public bool ApplySongVol { private get; set; }
|
||||
@ -22,5 +23,4 @@
|
||||
sound.SetGain(ApplySongVol ? songVol : CSound.DefaultSongVol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,35 +2,36 @@
|
||||
using System.Collections.Specialized;
|
||||
using FDK.ExtensionMethods;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// SoundGroupLevelController holds the current sound level value for each
|
||||
/// 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
|
||||
/// 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
|
||||
/// 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
|
||||
/// that they are provided with the current level for their associated
|
||||
/// sound group by subscribing to notifications regarding changes to a
|
||||
/// collection of sound objects provided during construction. This
|
||||
/// 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
|
||||
/// observable collection.
|
||||
/// </summary>
|
||||
public sealed class SoundGroupLevelController {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// SoundGroupLevelController holds the current sound level value for each
|
||||
/// 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
|
||||
/// 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
|
||||
/// 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
|
||||
/// that they are provided with the current level for their associated
|
||||
/// sound group by subscribing to notifications regarding changes to a
|
||||
/// collection of sound objects provided during construction. This
|
||||
/// 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
|
||||
/// observable collection.
|
||||
/// </summary>
|
||||
public sealed class SoundGroupLevelController {
|
||||
private readonly Dictionary<ESoundGroup, int> _levelBySoundGroup = new Dictionary<ESoundGroup, int> {
|
||||
[ESoundGroup.SoundEffect] = CSound.MaximumGroupLevel,
|
||||
[ESoundGroup.Voice] = CSound.MaximumGroupLevel,
|
||||
@ -109,5 +110,4 @@ namespace FDK {
|
||||
}
|
||||
|
||||
public event EventHandler<LevelChangedEventArgs> LevelChanged;
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,10 @@ using ManagedBass;
|
||||
using Silk.NET.Windowing;
|
||||
|
||||
|
||||
namespace FDK {
|
||||
public class SoundManager // : CSound
|
||||
{
|
||||
namespace FDK;
|
||||
|
||||
public class SoundManager // : CSound
|
||||
{
|
||||
private static ISoundDevice SoundDevice {
|
||||
get; set;
|
||||
}
|
||||
@ -377,5 +378,4 @@ namespace FDK {
|
||||
public void RemoveMixer(CSound cs) {
|
||||
cs.tRemoveSoundFromMixer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FDK {
|
||||
public static class BitmapUtil {
|
||||
namespace FDK;
|
||||
|
||||
public static class BitmapUtil {
|
||||
// 定数
|
||||
|
||||
public const uint DIB_PAL_COLORS = 1;
|
||||
@ -62,5 +63,4 @@ namespace FDK {
|
||||
return null;
|
||||
//return new SKBitmap( writer.BaseStream );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using FFmpeg.AutoGen;
|
||||
|
||||
namespace FDK {
|
||||
public class CDecodedFrame : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CDecodedFrame : IDisposable {
|
||||
public CDecodedFrame(Size texsize) {
|
||||
this.Using = false;
|
||||
this.TexSize = texsize;
|
||||
@ -42,5 +43,4 @@ namespace FDK {
|
||||
this.Using = false;
|
||||
Marshal.FreeHGlobal(this.TexPointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,9 @@ using System.Runtime.InteropServices;
|
||||
using FFmpeg.AutoGen;
|
||||
|
||||
|
||||
namespace FDK {
|
||||
public unsafe class CFrameConverter : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public unsafe class CFrameConverter : IDisposable {
|
||||
public CFrameConverter(Size FrameSize, AVPixelFormat pix_fmt) {
|
||||
this.FrameSize = FrameSize;
|
||||
if (pix_fmt != CVPxfmt) {
|
||||
@ -59,5 +60,4 @@ namespace FDK {
|
||||
private const AVPixelFormat CVPxfmt = AVPixelFormat.AV_PIX_FMT_RGBA;
|
||||
private bool IsConvert = false;
|
||||
private Size FrameSize;
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,9 @@ using Point = System.Drawing.Point;
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
using RectangleF = System.Drawing.RectangleF;
|
||||
|
||||
namespace FDK {
|
||||
public class CTexture : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
public class CTexture : IDisposable {
|
||||
/// <summary>
|
||||
/// バッファの集まり
|
||||
/// </summary>
|
||||
@ -943,5 +944,4 @@ namespace FDK {
|
||||
}
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// 縦長_横長の画像を自動で折りたたんでテクスチャ化するCTexture。
|
||||
/// 例えば、768x30 のテクスチャファイルが入力されたら、
|
||||
/// 内部で256x90 など、2のべき乗サイズに収めるよう、内部でテクスチャ画像を自動的に折り返す。
|
||||
/// 必要に応じて、正方形テクスチャにもする。
|
||||
/// また、t2D描画は、その折り返しを加味して実行する。
|
||||
/// </summary>
|
||||
public class CTextureAf : CTexture, IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// 縦長_横長の画像を自動で折りたたんでテクスチャ化するCTexture。
|
||||
/// 例えば、768x30 のテクスチャファイルが入力されたら、
|
||||
/// 内部で256x90 など、2のべき乗サイズに収めるよう、内部でテクスチャ画像を自動的に折り返す。
|
||||
/// 必要に応じて、正方形テクスチャにもする。
|
||||
/// また、t2D描画は、その折り返しを加味して実行する。
|
||||
/// </summary>
|
||||
public class CTextureAf : CTexture, IDisposable {
|
||||
|
||||
/// <summary>
|
||||
/// <para>画像ファイルからテクスチャを生成する。</para>
|
||||
@ -175,5 +176,4 @@ namespace FDK {
|
||||
private int _foldtimes;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// テクスチャの作成に失敗しました。
|
||||
/// </summary>
|
||||
public class CTextureCreateFailedException : Exception {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// テクスチャの作成に失敗しました。
|
||||
/// </summary>
|
||||
public class CTextureCreateFailedException : Exception {
|
||||
public CTextureCreateFailedException() {
|
||||
}
|
||||
public CTextureCreateFailedException(string message)
|
||||
@ -16,5 +17,4 @@ namespace FDK {
|
||||
public CTextureCreateFailedException(string message, Exception innerException)
|
||||
: base(message, innerException) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,14 @@ using System.Diagnostics;
|
||||
using FFmpeg.AutoGen;
|
||||
using Size = System.Drawing.Size;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// ビデオのデコードをするクラス
|
||||
/// ファイル名・nullのCTextureをもらえれば、勝手に、CTextureに映像を格納して返す。
|
||||
/// 演奏とは別のタイマーを使用しているので、ずれる可能性がある。
|
||||
/// </summary>
|
||||
public unsafe class CVideoDecoder : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// ビデオのデコードをするクラス
|
||||
/// ファイル名・nullのCTextureをもらえれば、勝手に、CTextureに映像を格納して返す。
|
||||
/// 演奏とは別のタイマーを使用しているので、ずれる可能性がある。
|
||||
/// </summary>
|
||||
public unsafe class CVideoDecoder : IDisposable {
|
||||
public CVideoDecoder(string filename) {
|
||||
if (!File.Exists(filename))
|
||||
throw new FileNotFoundException(filename + " not found...");
|
||||
@ -281,5 +282,4 @@ namespace FDK {
|
||||
//for convert
|
||||
private CFrameConverter frameconv;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,13 @@ using SkiaSharp;
|
||||
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace FDK {
|
||||
/// <summary>
|
||||
/// 高速描画版のCFontRendererクラス。
|
||||
/// といっても、一度レンダリングした結果をキャッシュして使いまわしているだけ。
|
||||
/// </summary>
|
||||
public class CCachedFontRenderer : CFontRenderer {
|
||||
namespace FDK;
|
||||
|
||||
/// <summary>
|
||||
/// 高速描画版のCFontRendererクラス。
|
||||
/// といっても、一度レンダリングした結果をキャッシュして使いまわしているだけ。
|
||||
/// </summary>
|
||||
public class CCachedFontRenderer : CFontRenderer {
|
||||
#region [ コンストラクタ ]
|
||||
public CCachedFontRenderer(string fontpath, int pt, CFontRenderer.FontStyle style) {
|
||||
Initialize(fontpath, pt, style);
|
||||
@ -236,5 +237,4 @@ namespace FDK {
|
||||
protected bool bDisposed_CCachedFontRenderer;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ using SkiaSharp;
|
||||
using static FDK.CSkiaSharpTextRenderer;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace FDK {
|
||||
namespace FDK;
|
||||
|
||||
public class CFontRenderer : IDisposable {
|
||||
public class CFontRenderer : IDisposable {
|
||||
#region[static系]
|
||||
public static void SetTextCorrectionX_Chara_List_Vertical(string[] list) {
|
||||
if (list != null)
|
||||
@ -258,5 +258,4 @@ namespace FDK {
|
||||
}
|
||||
|
||||
private ITextRenderer textRenderer;
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,9 @@ using System.Text.RegularExpressions;
|
||||
using SkiaSharp;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace FDK {
|
||||
internal class CSkiaSharpTextRenderer : ITextRenderer {
|
||||
namespace FDK;
|
||||
|
||||
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
|
||||
public CSkiaSharpTextRenderer(string fontpath, int pt) {
|
||||
Initialize(fontpath, pt, CFontRenderer.FontStyle.Regular);
|
||||
@ -294,5 +295,4 @@ namespace FDK {
|
||||
}
|
||||
|
||||
private SKPaint paint = null;
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,12 @@ using SkiaSharp;
|
||||
using static FDK.CSkiaSharpTextRenderer;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace FDK {
|
||||
internal interface ITextRenderer : IDisposable {
|
||||
namespace FDK;
|
||||
|
||||
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);
|
||||
|
||||
string Purify(string input);
|
||||
|
||||
List<SStringToken> Tokenize(string input, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko.Animations {
|
||||
class Animator : IAnimatable {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
class Animator : IAnimatable {
|
||||
public Animator(int startValue, int endValue, int tickInterval, bool isLoop) {
|
||||
Type = CounterType.Normal;
|
||||
StartValue = startValue;
|
||||
@ -87,10 +88,9 @@ namespace OpenTaiko.Animations {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum CounterType {
|
||||
enum CounterType {
|
||||
Normal,
|
||||
Double
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs ease-in animation.
|
||||
/// </summary>
|
||||
class EaseIn : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs ease-in animation.
|
||||
/// </summary>
|
||||
class EaseIn : Animator {
|
||||
/// <summary>
|
||||
/// Initialize Ease-in.
|
||||
/// </summary>
|
||||
@ -25,5 +26,4 @@
|
||||
private readonly int EndPoint;
|
||||
private readonly int Sa;
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs ease-in-out animation.
|
||||
/// </summary>
|
||||
class EaseInOut : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs ease-in-out animation.
|
||||
/// </summary>
|
||||
class EaseInOut : Animator {
|
||||
/// <summary>
|
||||
/// Initialize Ease-in-out.
|
||||
/// </summary>
|
||||
@ -30,5 +31,4 @@
|
||||
private readonly int EndPoint;
|
||||
private readonly int Sa;
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs ease-out animation.
|
||||
/// </summary>
|
||||
class EaseOut : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs ease-out animation.
|
||||
/// </summary>
|
||||
class EaseOut : Animator {
|
||||
/// <summary>
|
||||
/// Initialize Ease-out.
|
||||
/// </summary>
|
||||
@ -26,5 +27,4 @@
|
||||
private readonly int EndPoint;
|
||||
private readonly int Sa;
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs fade-in animation.
|
||||
/// </summary>
|
||||
internal class FadeIn : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs fade-in animation.
|
||||
/// </summary>
|
||||
internal class FadeIn : Animator {
|
||||
/// <summary>
|
||||
/// Initialize fade-in.
|
||||
/// </summary>
|
||||
@ -21,5 +22,4 @@
|
||||
}
|
||||
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs fade-out animation.
|
||||
/// </summary>
|
||||
internal class FadeOut : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs fade-out animation.
|
||||
/// </summary>
|
||||
internal class FadeOut : Animator {
|
||||
/// <summary>
|
||||
/// Initialize fade-out.
|
||||
/// </summary>
|
||||
@ -21,5 +22,4 @@
|
||||
}
|
||||
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// Animation interface.
|
||||
/// </summary>
|
||||
interface IAnimatable {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// Animation interface.
|
||||
/// </summary>
|
||||
interface IAnimatable {
|
||||
/// <summary>
|
||||
/// Starts the animation.
|
||||
/// </summary>
|
||||
@ -24,5 +25,4 @@
|
||||
/// </summary>
|
||||
/// <returns>Animation parameters.</returns>
|
||||
object GetAnimation();
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace OpenTaiko.Animations {
|
||||
/// <summary>
|
||||
/// A class that performs linear animation.
|
||||
/// </summary>
|
||||
class Linear : Animator {
|
||||
namespace OpenTaiko.Animations;
|
||||
|
||||
/// <summary>
|
||||
/// A class that performs linear animation.
|
||||
/// </summary>
|
||||
class Linear : Animator {
|
||||
/// <summary>
|
||||
/// Initialize linear movement.
|
||||
/// </summary>
|
||||
@ -25,5 +26,4 @@
|
||||
private readonly int EndPoint;
|
||||
private readonly int Sa;
|
||||
private readonly int TimeMs;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class CMenuCharacter {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CMenuCharacter {
|
||||
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[] ctCharacterStart = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
@ -269,5 +270,4 @@ namespace OpenTaiko {
|
||||
_tex.Opacity = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class CResultCharacter {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CResultCharacter {
|
||||
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[] ctCharacterFailed = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
@ -230,5 +231,4 @@ namespace OpenTaiko {
|
||||
_tex.Opacity = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using Silk.NET.Maths;
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class PuchiChara : CActivity {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class PuchiChara : CActivity {
|
||||
public PuchiChara() {
|
||||
base.IsDeActivated = true;
|
||||
}
|
||||
@ -96,5 +97,4 @@ namespace OpenTaiko {
|
||||
private CCounter SineCounter;
|
||||
private CCounter SineCounterIdle;
|
||||
private bool inGame;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
internal class BestPlayRecords {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class BestPlayRecords {
|
||||
|
||||
public enum EClearStatus {
|
||||
NONE = 0,
|
||||
@ -194,5 +195,4 @@
|
||||
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,9 @@ using System.Text;
|
||||
using FDK;
|
||||
using FDK.ExtensionMethods;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class CConfigIni : INotifyPropertyChanged {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class CConfigIni : INotifyPropertyChanged {
|
||||
private const int MinimumKeyboardSoundLevelIncrement = 1;
|
||||
private const int MaximumKeyboardSoundLevelIncrement = 20;
|
||||
private const int DefaultKeyboardSoundLevelIncrement = 5;
|
||||
@ -3776,5 +3777,4 @@ TrainingJumpToLastMeasure=K051
|
||||
private void OnPropertyChanged(string propertyName) {
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenTaiko {
|
||||
namespace OpenTaiko;
|
||||
|
||||
public enum Difficulty {
|
||||
public enum Difficulty {
|
||||
Easy,
|
||||
Normal,
|
||||
Hard,
|
||||
@ -11,28 +11,28 @@ namespace OpenTaiko {
|
||||
Tower,
|
||||
Dan,
|
||||
Total
|
||||
}
|
||||
}
|
||||
|
||||
public enum EScrollMode {
|
||||
public enum EScrollMode {
|
||||
Normal,
|
||||
BMScroll,
|
||||
HBScroll
|
||||
}
|
||||
}
|
||||
|
||||
public enum EGame {
|
||||
public enum EGame {
|
||||
Off = 0,
|
||||
Survival = 1,
|
||||
SurvivalHard = 2
|
||||
}
|
||||
}
|
||||
|
||||
public enum EDifficultyDisplayType {
|
||||
public enum EDifficultyDisplayType {
|
||||
Off = 0,
|
||||
TextOnNthSong = 1,
|
||||
ImageOnMTaiko = 2,
|
||||
}
|
||||
}
|
||||
|
||||
public enum EPad // 演奏用のenum。ここを修正するときは、次に出てくる EKeyConfigPad と EパッドFlag もセットで修正すること。
|
||||
{
|
||||
public enum EPad // 演奏用のenum。ここを修正するときは、次に出てくる EKeyConfigPad と EパッドFlag もセットで修正すること。
|
||||
{
|
||||
HH = 0,
|
||||
R = 0,
|
||||
SD = 1,
|
||||
@ -88,9 +88,9 @@ namespace OpenTaiko {
|
||||
|
||||
Max, // 門番用として定義
|
||||
Unknown = 99
|
||||
}
|
||||
public enum EKeyConfigPad // #24609 キーコンフィグで使うenum。capture要素あり。
|
||||
{
|
||||
}
|
||||
public enum EKeyConfigPad // #24609 キーコンフィグで使うenum。capture要素あり。
|
||||
{
|
||||
HH = EPad.HH,
|
||||
R = EPad.R,
|
||||
SD = EPad.SD,
|
||||
@ -182,10 +182,10 @@ namespace OpenTaiko {
|
||||
#endregion
|
||||
Max,
|
||||
Unknown = EPad.Unknown
|
||||
}
|
||||
[Flags]
|
||||
public enum EPadFlag // #24063 2011.1.16 yyagi コマンド入力用 パッド入力のフラグ化
|
||||
{
|
||||
}
|
||||
[Flags]
|
||||
public enum EPadFlag // #24063 2011.1.16 yyagi コマンド入力用 パッド入力のフラグ化
|
||||
{
|
||||
None = 0,
|
||||
HH = 1,
|
||||
R = 1,
|
||||
@ -215,54 +215,54 @@ namespace OpenTaiko {
|
||||
LBlue2P = 32,
|
||||
RBlue2P = 64,
|
||||
Unknown = 4096
|
||||
}
|
||||
public enum ERandomMode {
|
||||
}
|
||||
public enum ERandomMode {
|
||||
Off,
|
||||
Random,
|
||||
Mirror,
|
||||
SuperRandom,
|
||||
MirrorRandom
|
||||
}
|
||||
}
|
||||
|
||||
public enum EFunMods {
|
||||
public enum EFunMods {
|
||||
None,
|
||||
Avalanche,
|
||||
Minesweeper,
|
||||
Total,
|
||||
}
|
||||
}
|
||||
|
||||
public enum EGameType {
|
||||
public enum EGameType {
|
||||
Taiko = 0,
|
||||
Konga = 1,
|
||||
}
|
||||
}
|
||||
|
||||
public enum EInstrumentPad // ここを修正するときは、セットで次の EKeyConfigPart も修正すること。
|
||||
{
|
||||
public enum EInstrumentPad // ここを修正するときは、セットで次の EKeyConfigPart も修正すること。
|
||||
{
|
||||
Drums = 0,
|
||||
Guitar = 1,
|
||||
Bass = 2,
|
||||
Taiko = 3,
|
||||
Unknown = 99
|
||||
}
|
||||
public enum EKeyConfigPart // : E楽器パート
|
||||
{
|
||||
}
|
||||
public enum EKeyConfigPart // : E楽器パート
|
||||
{
|
||||
Drums = EInstrumentPad.Drums,
|
||||
Guitar = EInstrumentPad.Guitar,
|
||||
Bass = EInstrumentPad.Bass,
|
||||
Taiko = EInstrumentPad.Taiko,
|
||||
System,
|
||||
Unknown = EInstrumentPad.Unknown
|
||||
}
|
||||
}
|
||||
|
||||
internal enum EInputDevice {
|
||||
internal enum EInputDevice {
|
||||
Keyboard = 0,
|
||||
MIDIInput = 1,
|
||||
Joypad = 2,
|
||||
Mouse = 3,
|
||||
Gamepad = 4,
|
||||
Unknown = -1
|
||||
}
|
||||
public enum ENoteJudge {
|
||||
}
|
||||
public enum ENoteJudge {
|
||||
Perfect = 0,
|
||||
Great = 1,
|
||||
Good = 2,
|
||||
@ -272,72 +272,72 @@ namespace OpenTaiko {
|
||||
Auto = 6,
|
||||
ADLIB = 7,
|
||||
Mine = 8,
|
||||
}
|
||||
internal enum EJudgeTextDisplayPosition {
|
||||
}
|
||||
internal enum EJudgeTextDisplayPosition {
|
||||
OFF,
|
||||
AboveLane,
|
||||
OnJudgeLine,
|
||||
BelowCombo
|
||||
}
|
||||
}
|
||||
|
||||
internal enum EFIFOMode {
|
||||
internal enum EFIFOMode {
|
||||
FadeIn,
|
||||
FadeOut
|
||||
}
|
||||
}
|
||||
|
||||
internal enum EGameplayScreenReturnValue {
|
||||
internal enum EGameplayScreenReturnValue {
|
||||
Continue,
|
||||
PerformanceInterrupted,
|
||||
StageFailed,
|
||||
StageCleared,
|
||||
ReloadAndReplay,
|
||||
Replay
|
||||
}
|
||||
internal enum ESongLoadingScreenReturnValue {
|
||||
}
|
||||
internal enum ESongLoadingScreenReturnValue {
|
||||
Continue = 0,
|
||||
LoadComplete,
|
||||
LoadCanceled
|
||||
}
|
||||
}
|
||||
|
||||
public enum ENoteState {
|
||||
public enum ENoteState {
|
||||
None,
|
||||
Wait,
|
||||
Perfect,
|
||||
Grade,
|
||||
Bad
|
||||
}
|
||||
}
|
||||
|
||||
public enum ERollState {
|
||||
public enum ERollState {
|
||||
None,
|
||||
Roll,
|
||||
RollB,
|
||||
Balloon,
|
||||
Potato
|
||||
}
|
||||
}
|
||||
|
||||
public enum EStealthMode {
|
||||
public enum EStealthMode {
|
||||
Off = 0,
|
||||
Doron = 1,
|
||||
Stealth = 2
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 透明チップの種類
|
||||
/// </summary>
|
||||
public enum EInvisible {
|
||||
/// <summary>
|
||||
/// 透明チップの種類
|
||||
/// </summary>
|
||||
public enum EInvisible {
|
||||
Off, // チップを透明化しない
|
||||
Semi, // Poor/Miss時だけ、一時的に透明解除する
|
||||
Full // チップを常に透明化する
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drum/Guitar/Bass の値を扱う汎用の構造体。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">値の型。</typeparam>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct STDGBVALUE<T> // indexはE楽器パートと一致させること
|
||||
{
|
||||
/// <summary>
|
||||
/// Drum/Guitar/Bass の値を扱う汎用の構造体。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">値の型。</typeparam>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct STDGBVALUE<T> // indexはE楽器パートと一致させること
|
||||
{
|
||||
public T Drums;
|
||||
public T Guitar;
|
||||
public T Bass;
|
||||
@ -379,30 +379,29 @@ namespace OpenTaiko {
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum EReturnValue : int {
|
||||
public enum EReturnValue : int {
|
||||
Continuation,
|
||||
ReturnToTitle,
|
||||
SongChoosen
|
||||
}
|
||||
}
|
||||
|
||||
#region[Ver.K追加]
|
||||
public enum ELaneType {
|
||||
#region[Ver.K追加]
|
||||
public enum ELaneType {
|
||||
TypeA,
|
||||
TypeB,
|
||||
TypeC,
|
||||
TypeD
|
||||
}
|
||||
public enum EMirror {
|
||||
}
|
||||
public enum EMirror {
|
||||
TypeA,
|
||||
TypeB
|
||||
}
|
||||
public enum EClipDispType {
|
||||
}
|
||||
public enum EClipDispType {
|
||||
BackgroundOnly = 1,
|
||||
WindowOnly = 2,
|
||||
Both = 3,
|
||||
Off = 0
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class CCrypto {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class CCrypto {
|
||||
internal static readonly char[] chars =
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray();
|
||||
|
||||
@ -21,5 +22,4 @@ namespace OpenTaiko {
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
class CHitSounds {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CHitSounds {
|
||||
public CHitSounds(string path) {
|
||||
tLoadFile(path);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@ -51,5 +52,4 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
public class CPad {
|
||||
namespace OpenTaiko;
|
||||
|
||||
public class CPad {
|
||||
// Properties
|
||||
|
||||
internal STHIT detectedDevice;
|
||||
@ -209,5 +210,4 @@ namespace OpenTaiko {
|
||||
private CInputManager inputManager;
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
class CSavableT<T> where T : new() {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CSavableT<T> where T : new() {
|
||||
public virtual string _fn {
|
||||
get;
|
||||
protected set;
|
||||
@ -25,5 +26,4 @@
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,10 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
// グローバル定数
|
||||
namespace OpenTaiko;
|
||||
// グローバル定数
|
||||
|
||||
public enum Eシステムサウンド {
|
||||
public enum Eシステムサウンド {
|
||||
BGMオプション画面 = 0,
|
||||
BGMコンフィグ画面,
|
||||
BGM起動画面,
|
||||
@ -34,9 +34,9 @@ namespace OpenTaiko {
|
||||
sound特訓スキップ音,
|
||||
SOUND特訓スクロール,
|
||||
Count // システムサウンド総数の計算用
|
||||
}
|
||||
}
|
||||
|
||||
internal class CSkin : IDisposable {
|
||||
internal class CSkin : IDisposable {
|
||||
// Class
|
||||
|
||||
public class CSystemSound : IDisposable {
|
||||
@ -9310,5 +9310,4 @@ namespace OpenTaiko {
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class CSongDict {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class CSongDict {
|
||||
private static Dictionary<string, CSongListNode> nodes = new Dictionary<string, CSongListNode>();
|
||||
private static HashSet<string> urls = new HashSet<string>();
|
||||
|
||||
@ -265,5 +266,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Drawing;
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class CTextConsole : CActivity {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class CTextConsole : CActivity {
|
||||
public enum EFontType {
|
||||
White,
|
||||
Cyan,
|
||||
@ -91,5 +92,4 @@ namespace OpenTaiko {
|
||||
private CTexture[] fontTextures = new CTexture[2];
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,16 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
/// <summary>
|
||||
/// The ConfigIniToSongGainControllerBinder allows for SONGVOL and/or other
|
||||
/// properties related to the Gain levels applied to song preview and
|
||||
/// playback, to be applied conditionally based on settings flowing from
|
||||
/// ConfigIni. This binder class allows that to take place without either
|
||||
/// ConfigIni or SongGainController having awareness of one another.
|
||||
/// See those classes properties, methods, and events for more details.
|
||||
/// </summary>
|
||||
internal static class ConfigIniToSongGainControllerBinder {
|
||||
namespace OpenTaiko;
|
||||
|
||||
/// <summary>
|
||||
/// The ConfigIniToSongGainControllerBinder allows for SONGVOL and/or other
|
||||
/// properties related to the Gain levels applied to song preview and
|
||||
/// playback, to be applied conditionally based on settings flowing from
|
||||
/// ConfigIni. This binder class allows that to take place without either
|
||||
/// ConfigIni or SongGainController having awareness of one another.
|
||||
/// See those classes properties, methods, and events for more details.
|
||||
/// </summary>
|
||||
internal static class ConfigIniToSongGainControllerBinder {
|
||||
internal static void Bind(CConfigIni configIni, SongGainController songGainController) {
|
||||
songGainController.ApplyLoudnessMetadata = configIni.ApplyLoudnessMetadata;
|
||||
songGainController.TargetLoudness = new Lufs(configIni.TargetLoudness);
|
||||
@ -29,5 +30,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
/// <summary>
|
||||
/// The ConfigIniToSoundGroupLevelControllerBinder allows for updated sound
|
||||
/// group level values, and keyboard sound level adjustment increment
|
||||
/// values, to flow between CConfigIni and the SoundGroupLevelController
|
||||
/// without either of those two classes being aware of one another.
|
||||
/// See those classes properties, methods, and events for more details.
|
||||
/// </summary>
|
||||
internal static class ConfigIniToSoundGroupLevelControllerBinder {
|
||||
namespace OpenTaiko;
|
||||
|
||||
/// <summary>
|
||||
/// The ConfigIniToSoundGroupLevelControllerBinder allows for updated sound
|
||||
/// group level values, and keyboard sound level adjustment increment
|
||||
/// values, to flow between CConfigIni and the SoundGroupLevelController
|
||||
/// without either of those two classes being aware of one another.
|
||||
/// See those classes properties, methods, and events for more details.
|
||||
/// </summary>
|
||||
internal static class ConfigIniToSoundGroupLevelControllerBinder {
|
||||
internal static void Bind(CConfigIni configIni, SoundGroupLevelController soundGroupLevelController) {
|
||||
soundGroupLevelController.SetLevel(ESoundGroup.SoundEffect, configIni.SoundEffectLevel);
|
||||
soundGroupLevelController.SetLevel(ESoundGroup.Voice, configIni.VoiceLevel);
|
||||
@ -55,5 +56,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace OpenTaiko {
|
||||
/// <summary>
|
||||
/// Class for reading and writing configuration files.
|
||||
/// </summary>
|
||||
public static class ConfigManager {
|
||||
namespace OpenTaiko;
|
||||
|
||||
/// <summary>
|
||||
/// Class for reading and writing configuration files.
|
||||
/// </summary>
|
||||
public static class ConfigManager {
|
||||
private static readonly JsonSerializerSettings Settings =
|
||||
new JsonSerializerSettings() {
|
||||
ObjectCreationHandling = ObjectCreationHandling.Auto,
|
||||
@ -44,5 +45,4 @@ namespace OpenTaiko {
|
||||
stream.Write(JsonConvert.SerializeObject(obj, Formatting.None, Settings));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class Easing {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class Easing {
|
||||
public int EaseIn(CCounter counter, float startPoint, float endPoint, CalcType type) {
|
||||
StartPoint = startPoint;
|
||||
EndPoint = endPoint;
|
||||
@ -184,5 +185,4 @@ namespace OpenTaiko {
|
||||
Circular,
|
||||
Linear
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
internal class Favorites {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class Favorites {
|
||||
public void tFavorites() {
|
||||
if (!File.Exists("Favorite.json"))
|
||||
tSaveFile();
|
||||
@ -42,6 +43,4 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,11 +7,12 @@ using FDK;
|
||||
using ImGuiNET;
|
||||
using SampleFramework;
|
||||
|
||||
namespace OpenTaiko {
|
||||
/*
|
||||
namespace OpenTaiko;
|
||||
|
||||
/*
|
||||
FOR DEBUGGING! This class is intended for developers only!
|
||||
*/
|
||||
public static class ImGuiDebugWindow {
|
||||
*/
|
||||
public static class ImGuiDebugWindow {
|
||||
private static bool showImGuiDemoWindow = false;
|
||||
private static Assembly assemblyinfo = Assembly.GetExecutingAssembly();
|
||||
|
||||
@ -549,5 +550,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,24 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
/// <summary>
|
||||
/// KeyboardSoundGroupLevelControlHandler is called by the song selection
|
||||
/// and song play stages when handling keyboard input. By delegating to
|
||||
/// this class they are able to support a centrally-managed and consistent
|
||||
/// set of keyboard shortcuts for dynamically adjusting four sound group
|
||||
/// levels:
|
||||
/// - sound effect level, via Ctrl and either of the Minus or Equals keys
|
||||
/// - 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
|
||||
/// that both the sound object group levels are updated and the application
|
||||
/// configuration is updated. See ConfigIniToSoundGroupLevelControllerBinder
|
||||
/// for more details on the latter.
|
||||
/// </summary>
|
||||
internal static class KeyboardSoundGroupLevelControlHandler {
|
||||
namespace OpenTaiko;
|
||||
|
||||
/// <summary>
|
||||
/// KeyboardSoundGroupLevelControlHandler is called by the song selection
|
||||
/// and song play stages when handling keyboard input. By delegating to
|
||||
/// this class they are able to support a centrally-managed and consistent
|
||||
/// set of keyboard shortcuts for dynamically adjusting four sound group
|
||||
/// levels:
|
||||
/// - sound effect level, via Ctrl and either of the Minus or Equals keys
|
||||
/// - 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
|
||||
/// that both the sound object group levels are updated and the application
|
||||
/// configuration is updated. See ConfigIniToSoundGroupLevelControllerBinder
|
||||
/// for more details on the latter.
|
||||
/// </summary>
|
||||
internal static class KeyboardSoundGroupLevelControlHandler {
|
||||
internal static void Handle(
|
||||
IInputDevice keyboard,
|
||||
SoundGroupLevelController soundGroupLevelController,
|
||||
@ -46,5 +47,4 @@ namespace OpenTaiko {
|
||||
soundGroupLevelController.AdjustLevel(soundGroup, isAdjustmentPositive);
|
||||
システムサウンド?.tPlay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Diagnostics;
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class LogNotification {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class LogNotification {
|
||||
private static Queue<CLogNotification> Notifications = new Queue<CLogNotification>();
|
||||
|
||||
public enum ENotificationType {
|
||||
@ -48,5 +49,4 @@ namespace OpenTaiko {
|
||||
while (Notifications.Count > 0 && Notifications.Peek().LifeTime.IsEnded) Notifications.Dequeue();
|
||||
// Add an optimized method to display the notifications here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
internal class Modal {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class Modal {
|
||||
public Modal(EModalType mt, int ra, params object?[] re) {
|
||||
modalType = mt;
|
||||
rarity = ra;
|
||||
@ -45,5 +46,4 @@
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
internal class ModalQueue {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class ModalQueue {
|
||||
public ModalQueue(Modal.EModalFormat mf) {
|
||||
_modalQueues = new Queue<Modal>[] { new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>(), new Queue<Modal>() };
|
||||
_modalFormat = mf;
|
||||
@ -40,5 +41,4 @@
|
||||
|
||||
private Modal.EModalFormat _modalFormat;
|
||||
private Queue<Modal>[] _modalQueues;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class NamePlateConfig {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class NamePlateConfig {
|
||||
public void tNamePlateConfig() {
|
||||
// Deprecated, only converts to new format
|
||||
tLoadFile();
|
||||
@ -207,5 +208,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,9 @@ using Silk.NET.Maths;
|
||||
using SkiaSharp;
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class OpenTaiko : Game {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class OpenTaiko : Game {
|
||||
// Properties
|
||||
#region [ properties ]
|
||||
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);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,9 @@ using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class Program {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class Program {
|
||||
#region [ 二重起動チェック、DLL存在チェック ]
|
||||
//-----------------------------
|
||||
private static Mutex mutex二重起動防止用;
|
||||
@ -101,8 +102,8 @@ namespace OpenTaiko {
|
||||
using (var mania = new OpenTaiko())
|
||||
mania.Run();
|
||||
|
||||
Trace.WriteLine( "" );
|
||||
Trace.WriteLine( "Thank you for playing!" );
|
||||
Trace.WriteLine("");
|
||||
Trace.WriteLine("Thank you for playing!");
|
||||
}
|
||||
#if !DEBUG
|
||||
catch( Exception e )
|
||||
@ -176,5 +177,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
internal class RecentlyPlayedSongs {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class RecentlyPlayedSongs {
|
||||
public void tRecentlyPlayedSongs() {
|
||||
if (!File.Exists("RecentlyPlayedSongs.json"))
|
||||
tSaveFile();
|
||||
@ -38,6 +39,4 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class SaveFile {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class SaveFile {
|
||||
|
||||
public void tSaveFile(string filename) {
|
||||
path = @$"Saves{Path.DirectorySeparatorChar}" + filename + @".json";
|
||||
@ -340,5 +341,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
using FDK;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace OpenTaiko {
|
||||
namespace OpenTaiko;
|
||||
|
||||
public sealed class TitleTextureKey {
|
||||
public sealed class TitleTextureKey {
|
||||
|
||||
// Static
|
||||
private static readonly Dictionary<TitleTextureKey, CTexture> _titledictionary
|
||||
@ -133,5 +133,4 @@ namespace OpenTaiko {
|
||||
public static bool operator !=(TitleTextureKey left, TitleTextureKey right) {
|
||||
return !Equals(left, right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace OpenTaiko {
|
||||
internal class CGimmickValue {
|
||||
}
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class CGimmickValue {
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
[Serializable]
|
||||
internal class CLocalizationData {
|
||||
namespace OpenTaiko;
|
||||
|
||||
[Serializable]
|
||||
internal class CLocalizationData {
|
||||
[JsonProperty("strings")]
|
||||
private Dictionary<string, string> Strings = new Dictionary<string, string>();
|
||||
|
||||
@ -22,5 +23,4 @@ namespace OpenTaiko {
|
||||
public void SetString(string langcode, string str) {
|
||||
Strings[langcode] = str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace OpenTaiko {
|
||||
class CSongReplay {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CSongReplay {
|
||||
/* Game version used for the replay
|
||||
* 521 = 0.5.2.1
|
||||
* 530 = 0.5.3
|
||||
@ -477,5 +478,4 @@
|
||||
public long OnlineScoreID;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using FDK;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class CVisualLogManager {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class CVisualLogManager {
|
||||
public enum ELogCardType {
|
||||
LogInfo,
|
||||
LogWarning,
|
||||
@ -46,5 +47,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
|
||||
private List<LogCard> cards = new List<LogCard>();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class DBCDN : CSavableT<Dictionary<string, DBCDN.CDNData>> {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class DBCDN : CSavableT<Dictionary<string, DBCDN.CDNData>> {
|
||||
public DBCDN() {
|
||||
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}CDN.json";
|
||||
base.tDBInitSavable();
|
||||
@ -52,5 +53,4 @@ namespace OpenTaiko {
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class DBCharacter {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class DBCharacter {
|
||||
public class CharacterEffect {
|
||||
public CharacterEffect() {
|
||||
Gauge = "Normal";
|
||||
@ -88,5 +89,4 @@ namespace OpenTaiko {
|
||||
public CLocalizationData[] SpeechText;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class DBEncyclopediaMenus : CSavableT<DBEncyclopediaMenus.EncyclopediaMenu> {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class DBEncyclopediaMenus : CSavableT<DBEncyclopediaMenus.EncyclopediaMenu> {
|
||||
public DBEncyclopediaMenus() {
|
||||
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Encyclopedia{Path.DirectorySeparatorChar}Menus.json";
|
||||
base.tDBInitSavable();
|
||||
@ -17,5 +18,4 @@ namespace OpenTaiko {
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
using Newtonsoft.Json;
|
||||
using static OpenTaiko.DBNameplateUnlockables;
|
||||
|
||||
namespace OpenTaiko {
|
||||
internal class DBNameplateUnlockables : CSavableT<Dictionary<Int64, NameplateUnlockable>> {
|
||||
namespace OpenTaiko;
|
||||
|
||||
internal class DBNameplateUnlockables : CSavableT<Dictionary<Int64, NameplateUnlockable>> {
|
||||
public DBNameplateUnlockables() {
|
||||
_fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}NameplateUnlockables.db3";
|
||||
|
||||
@ -86,5 +87,4 @@ namespace OpenTaiko {
|
||||
if (_edited)
|
||||
OpenTaiko.SaveFileInstances[player].tApplyHeyaChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OpenTaiko {
|
||||
class DBPuchichara {
|
||||
namespace OpenTaiko;
|
||||
|
||||
class DBPuchichara {
|
||||
public class PuchicharaEffect {
|
||||
public PuchicharaEffect() {
|
||||
AllPurple = false;
|
||||
@ -80,5 +81,4 @@ namespace OpenTaiko {
|
||||
public object Description;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user