From 802cd49ef4f41f3c1ceda1769fcf342294a005c3 Mon Sep 17 00:00:00 2001 From: "harry.cpp" Date: Tue, 12 Mar 2024 10:16:53 +0100 Subject: [PATCH] backup --- .vscode/launch.json | 11 + .vscode/tasks.json | 12 + MonoGame.Framework/Platform/Native/Interop.cs | 15 + .../MonoGame.Generator.CTypes/EnumWritter.cs | 95 + Tools/MonoGame.Generator.CTypes/Program.cs | 105 +- .../StructWritter.cs | 26 + Tools/MonoGame.Generator.CTypes/Util.cs | 17 + src/monogame/include/csharp_enums.h | 1780 ++++++++--------- 8 files changed, 1090 insertions(+), 971 deletions(-) create mode 100644 MonoGame.Framework/Platform/Native/Interop.cs create mode 100644 Tools/MonoGame.Generator.CTypes/EnumWritter.cs create mode 100644 Tools/MonoGame.Generator.CTypes/StructWritter.cs create mode 100644 Tools/MonoGame.Generator.CTypes/Util.cs diff --git a/.vscode/launch.json b/.vscode/launch.json index d02425400d8..61b653f1b33 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,17 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Generator: CTypes", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "generator-ctypes", + "program": "${workspaceFolder}/Tools/MonoGame.Generator.CTypes/bin/Debug/net8.0/MonoGame.Generator.CTypes", + "args": [], + "cwd": "${workspaceFolder}/Tools/MonoGame.Generator.CTypes/bin/Debug/net8.0", + "console": "internalConsole", + "stopAtEntry": false + }, { "name": "MGCB Editor (Mac)", "type": "coreclr", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ff4ce21d72a..6dc9f816b71 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -12,6 +12,18 @@ "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" + }, + { + "label": "generator-ctypes", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Tools/MonoGame.Generator.CTypes/MonoGame.Generator.CTypes.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" } ] } \ No newline at end of file diff --git a/MonoGame.Framework/Platform/Native/Interop.cs b/MonoGame.Framework/Platform/Native/Interop.cs new file mode 100644 index 00000000000..14f4c0ef5e6 --- /dev/null +++ b/MonoGame.Framework/Platform/Native/Interop.cs @@ -0,0 +1,15 @@ + +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; + +namespace MonoGame.Interop; + +internal readonly struct GamePtr { } + +internal readonly struct GameWindowPtr { } + +internal static unsafe partial class GameWrapper +{ + [LibraryImport("monogame", StringMarshalling = StringMarshalling.Utf8)] + public static partial void MG_GW_SetAllowUserResizing(GamePtr* game, GameWindowPtr* gameWindow, [MarshalAs(UnmanagedType.U1)] bool allowuserresizing); +} diff --git a/Tools/MonoGame.Generator.CTypes/EnumWritter.cs b/Tools/MonoGame.Generator.CTypes/EnumWritter.cs new file mode 100644 index 00000000000..93ec0cd5073 --- /dev/null +++ b/Tools/MonoGame.Generator.CTypes/EnumWritter.cs @@ -0,0 +1,95 @@ +using System.Text; + +namespace MonoGame.Generator.CTypes; + +class EnumWritter +{ + private readonly StringBuilder _outputText; + private readonly Dictionary _duplicateChecker; + + public EnumWritter() + { + _outputText = new StringBuilder($""" + // + // This code is auto generated, don't modify it by hand. + // To regenerate it run: Tools/MonoGame.Generator.CTypes + // + + #pragma once + + #include "csharp_common.h" + + + """); + _duplicateChecker = []; + } + + public static bool IsValid(Type type) + { + return type.IsEnum && !type.IsNested; + } + + public bool Append(Type type) + { + if (!IsValid(type)) + return false; + + if (_duplicateChecker.TryGetValue(type.Name, out string? dupFullName)) + { + if (type.FullName != type.FullName) + { + Console.WriteLine($""" + WARNING: Duplicate enum name for {type.Name}: + - {type.FullName} + - {dupFullName} + + """); + } + + return false; + } + + var enumValues = Enum.GetValues(type); + + // Write all values to output + _outputText.AppendLine($$""" + enum CS{{type.Name}} : {{Util.GetCEnumType(Enum.GetUnderlyingType(type).ToString())}} + { + """); + foreach (var enumValue in enumValues) + { + _outputText.AppendLine($" {enumValue} = {((Enum)enumValue).ToString("d")},"); + } + _outputText.AppendLine(""" + }; + + """); + + _outputText.AppendLine($$""" + class ECS{{type.Name}} + { + public: + static const char* ToString(CS{{type.Name}} enumValue) + { + switch (enumValue) + { + """); + foreach (var enumValue in enumValues) + { + _outputText.AppendLine($" case {enumValue}: return \"{enumValue}\";"); + } + _outputText.AppendLine(""" + } + + return "Unknown Value"; + } + }; + + """); + + _duplicateChecker.Add(type.Name, type.FullName!); + return true; + } + + public void Flush(string dirPath) => File.WriteAllText(Path.Combine(dirPath, "csharp_enums.h"), _outputText.ToString()); +} diff --git a/Tools/MonoGame.Generator.CTypes/Program.cs b/Tools/MonoGame.Generator.CTypes/Program.cs index 66c586a25e7..27c26f17050 100644 --- a/Tools/MonoGame.Generator.CTypes/Program.cs +++ b/Tools/MonoGame.Generator.CTypes/Program.cs @@ -1,104 +1,47 @@ using System.Reflection; -using System.Text; - -static string GetCEnumType(string cstype) -{ - return cstype switch - { - "System.Byte" => "csbyte", - "System.Int16" => "csshort", - "System.UInt16" => "csushort", - "System.Int32" => "csint", - "System.UInt32" => "csuint", - "System.Int64" => "cslong", - "System.UInt64" => "csulong", - _ => "CS" + cstype - }; -}; +using MonoGame.Generator.CTypes; var repoDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../../../"); var monogamePlatformDir = Path.Combine(repoDirectory, "src/monogame/include"); var monogameFrameworkPath = Path.Combine(repoDirectory, "Artifacts/MonoGame.Framework/Native/Debug/MonoGame.Framework.dll"); var assembly = Assembly.LoadFile(monogameFrameworkPath); -var outputText = new StringBuilder(); -var duplicateChecker = new Dictionary(); - -outputText.AppendLine($""" -// -// This code is auto generated, don't modify it by hand. -// To regenerate it run: Tools/MonoGame.Generator.CTypes -// - -#pragma once - -#include "csharp_common.h" +var enumWritter = new EnumWritter(); +var structWrittter = new StructWritter(enumWritter); -"""); - -foreach (var enumType in assembly.GetTypes()) +foreach (var type in assembly.GetTypes()) { - if (!enumType.IsEnum) - continue; - - if (enumType.IsNested) - continue; - - if (!enumType.FullName!.StartsWith("MonoGame") && !enumType.FullName!.StartsWith("Microsoft.Xna.Framework")) - continue; - - if (duplicateChecker.TryGetValue(enumType.Name, out string? dupFullName)) + if (type.FullName!.Contains("MonoGame.Interop")) { - Console.WriteLine($""" - WARNING: Duplicate enum name for {enumType.Name}: - - {enumType.FullName} - - {dupFullName} + // Console.WriteLine(enumType.FullName!); - """); - continue; - } + + //Console.WriteLine(type.Name + ": " + StructWritter.IsValid(type)); - var enumValues = Enum.GetValues(enumType); + if (!type.IsClass) + continue; - // Write all values to output - outputText.AppendLine($$""" - enum CS{{enumType.Name}} : {{GetCEnumType(Enum.GetUnderlyingType(enumType).ToString())}} - { - """); - foreach (var enumValue in enumValues) - { - outputText.AppendLine($" {enumValue} = {((Enum)enumValue).ToString("d")},"); - } - outputText.AppendLine(""" - }; + foreach (var method in type.GetMethods()) + { + if (!method.IsStatic) + continue; - """); + Console.WriteLine(method.Name); - outputText.AppendLine($$""" - class ECS{{enumType.Name}} - { - public: - static const char* ToString(CS{{enumType.Name}} enumValue) - { - switch (enumValue) + foreach (var parm in method.GetParameters()) { - """); - foreach (var enumValue in enumValues) - { - outputText.AppendLine($" case {enumValue}: return \"{enumValue}\";"); - } - outputText.AppendLine(""" + Console.WriteLine(parm.ParameterType.Name + " " + parm.Name); + //Console.WriteLine(parm.ParameterType.Name + ": " + StructWritter.IsValid(parm.ParameterType)); } - - return "Unknown Value"; } - }; - - """); + } - duplicateChecker.Add(enumType.Name, enumType.FullName!); + if (EnumWritter.IsValid(type)) + { + enumWritter.Append(type); + } } if (!Directory.Exists(monogamePlatformDir)) Directory.CreateDirectory(monogamePlatformDir); -File.WriteAllText(Path.Combine(monogamePlatformDir, "csharp_enums.h"), outputText.ToString()); +enumWritter.Flush(Path.Combine(monogamePlatformDir)); diff --git a/Tools/MonoGame.Generator.CTypes/StructWritter.cs b/Tools/MonoGame.Generator.CTypes/StructWritter.cs new file mode 100644 index 00000000000..ea882369165 --- /dev/null +++ b/Tools/MonoGame.Generator.CTypes/StructWritter.cs @@ -0,0 +1,26 @@ +using System.Text; + +namespace MonoGame.Generator.CTypes; + +class StructWritter +{ + private EnumWritter _enumWritter; + + public StructWritter(EnumWritter enumWritter) + { + _enumWritter = enumWritter; + } + + public static bool IsValid(Type type) + { + return type.IsValueType && !type.IsPrimitive && !type.IsNested; + } + + public bool Append(Type type) + { + if (!IsValid(type)) + return false; + + return true; + } +} diff --git a/Tools/MonoGame.Generator.CTypes/Util.cs b/Tools/MonoGame.Generator.CTypes/Util.cs new file mode 100644 index 00000000000..c16662dbf04 --- /dev/null +++ b/Tools/MonoGame.Generator.CTypes/Util.cs @@ -0,0 +1,17 @@ + +namespace MonoGame.Generator.CTypes; + +class Util +{ + public static string GetCEnumType(string cstype) => cstype switch + { + "System.Byte" => "csbyte", + "System.Int16" => "csshort", + "System.UInt16" => "csushort", + "System.Int32" => "csint", + "System.UInt32" => "csuint", + "System.Int64" => "cslong", + "System.UInt64" => "csulong", + _ => "CS" + cstype + }; +} diff --git a/src/monogame/include/csharp_enums.h b/src/monogame/include/csharp_enums.h index 7a61ff35d97..2ed80ded63a 100644 --- a/src/monogame/include/csharp_enums.h +++ b/src/monogame/include/csharp_enums.h @@ -1,38 +1,38 @@ -// -// This code is auto generated, don't modify it by hand. -// To regenerate it run: Tools/MonoGame.Generator.CTypes -// - -#pragma once - -#include "csharp_common.h" +// +// This code is auto generated, don't modify it by hand. +// To regenerate it run: Tools/MonoGame.Generator.CTypes +// -enum CSGraphicsBackend : csint +#pragma once + +#include "csharp_common.h" + +enum CSGraphicsBackend : csint { DirectX = 0, OpenGL = 1, Vulkan = 2, Metal = 3, -}; - -class ECSGraphicsBackend -{ -public: - static const char* ToString(CSGraphicsBackend enumValue) - { - switch (enumValue) +}; + +class ECSGraphicsBackend +{ +public: + static const char* ToString(CSGraphicsBackend enumValue) + { + switch (enumValue) { case DirectX: return "DirectX"; case OpenGL: return "OpenGL"; case Vulkan: return "Vulkan"; case Metal: return "Metal"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMonoGamePlatform : csint +enum CSMonoGamePlatform : csint { Android = 0, iOS = 1, @@ -46,14 +46,14 @@ enum CSMonoGamePlatform : csint PlayStation5 = 9, NintendoSwitch = 10, Stadia = 11, -}; - -class ECSMonoGamePlatform -{ -public: - static const char* ToString(CSMonoGamePlatform enumValue) - { - switch (enumValue) +}; + +class ECSMonoGamePlatform +{ +public: + static const char* ToString(CSMonoGamePlatform enumValue) + { + switch (enumValue) { case Android: return "Android"; case iOS: return "iOS"; @@ -67,107 +67,107 @@ class ECSMonoGamePlatform case PlayStation5: return "PlayStation5"; case NintendoSwitch: return "NintendoSwitch"; case Stadia: return "Stadia"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSContainmentType : csint +enum CSContainmentType : csint { Disjoint = 0, Contains = 1, Intersects = 2, -}; - -class ECSContainmentType -{ -public: - static const char* ToString(CSContainmentType enumValue) - { - switch (enumValue) +}; + +class ECSContainmentType +{ +public: + static const char* ToString(CSContainmentType enumValue) + { + switch (enumValue) { case Disjoint: return "Disjoint"; case Contains: return "Contains"; case Intersects: return "Intersects"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCurveContinuity : csint +enum CSCurveContinuity : csint { Smooth = 0, Step = 1, -}; - -class ECSCurveContinuity -{ -public: - static const char* ToString(CSCurveContinuity enumValue) - { - switch (enumValue) +}; + +class ECSCurveContinuity +{ +public: + static const char* ToString(CSCurveContinuity enumValue) + { + switch (enumValue) { case Smooth: return "Smooth"; case Step: return "Step"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCurveLoopType : csint +enum CSCurveLoopType : csint { Constant = 0, Cycle = 1, CycleOffset = 2, Oscillate = 3, Linear = 4, -}; - -class ECSCurveLoopType -{ -public: - static const char* ToString(CSCurveLoopType enumValue) - { - switch (enumValue) +}; + +class ECSCurveLoopType +{ +public: + static const char* ToString(CSCurveLoopType enumValue) + { + switch (enumValue) { case Constant: return "Constant"; case Cycle: return "Cycle"; case CycleOffset: return "CycleOffset"; case Oscillate: return "Oscillate"; case Linear: return "Linear"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCurveTangent : csint +enum CSCurveTangent : csint { Flat = 0, Linear = 1, Smooth = 2, -}; - -class ECSCurveTangent -{ -public: - static const char* ToString(CSCurveTangent enumValue) - { - switch (enumValue) +}; + +class ECSCurveTangent +{ +public: + static const char* ToString(CSCurveTangent enumValue) + { + switch (enumValue) { case Flat: return "Flat"; case Linear: return "Linear"; case Smooth: return "Smooth"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSDisplayOrientation : csint +enum CSDisplayOrientation : csint { Default = 0, LandscapeLeft = 1, @@ -175,14 +175,14 @@ enum CSDisplayOrientation : csint Portrait = 4, PortraitDown = 8, Unknown = 16, -}; - -class ECSDisplayOrientation -{ -public: - static const char* ToString(CSDisplayOrientation enumValue) - { - switch (enumValue) +}; + +class ECSDisplayOrientation +{ +public: + static const char* ToString(CSDisplayOrientation enumValue) + { + switch (enumValue) { case Default: return "Default"; case LandscapeLeft: return "LandscapeLeft"; @@ -190,149 +190,149 @@ class ECSDisplayOrientation case Portrait: return "Portrait"; case PortraitDown: return "PortraitDown"; case Unknown: return "Unknown"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGameRunBehavior : csint +enum CSGameRunBehavior : csint { Asynchronous = 0, Synchronous = 1, -}; - -class ECSGameRunBehavior -{ -public: - static const char* ToString(CSGameRunBehavior enumValue) - { - switch (enumValue) +}; + +class ECSGameRunBehavior +{ +public: + static const char* ToString(CSGameRunBehavior enumValue) + { + switch (enumValue) { case Asynchronous: return "Asynchronous"; case Synchronous: return "Synchronous"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSPlaneIntersectionType : csint +enum CSPlaneIntersectionType : csint { Front = 0, Back = 1, Intersecting = 2, -}; - -class ECSPlaneIntersectionType -{ -public: - static const char* ToString(CSPlaneIntersectionType enumValue) - { - switch (enumValue) +}; + +class ECSPlaneIntersectionType +{ +public: + static const char* ToString(CSPlaneIntersectionType enumValue) + { + switch (enumValue) { case Front: return "Front"; case Back: return "Back"; case Intersecting: return "Intersecting"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSPlayerIndex : csint +enum CSPlayerIndex : csint { One = 0, Two = 1, Three = 2, Four = 3, -}; - -class ECSPlayerIndex -{ -public: - static const char* ToString(CSPlayerIndex enumValue) - { - switch (enumValue) +}; + +class ECSPlayerIndex +{ +public: + static const char* ToString(CSPlayerIndex enumValue) + { + switch (enumValue) { case One: return "One"; case Two: return "Two"; case Three: return "Three"; case Four: return "Four"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMediaSourceType : csint +enum CSMediaSourceType : csint { LocalDevice = 0, WindowsMediaConnect = 4, -}; - -class ECSMediaSourceType -{ -public: - static const char* ToString(CSMediaSourceType enumValue) - { - switch (enumValue) +}; + +class ECSMediaSourceType +{ +public: + static const char* ToString(CSMediaSourceType enumValue) + { + switch (enumValue) { case LocalDevice: return "LocalDevice"; case WindowsMediaConnect: return "WindowsMediaConnect"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMediaState : csint +enum CSMediaState : csint { Stopped = 0, Playing = 1, Paused = 2, -}; - -class ECSMediaState -{ -public: - static const char* ToString(CSMediaState enumValue) - { - switch (enumValue) +}; + +class ECSMediaState +{ +public: + static const char* ToString(CSMediaState enumValue) + { + switch (enumValue) { case Stopped: return "Stopped"; case Playing: return "Playing"; case Paused: return "Paused"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSVideoSoundtrackType : csint +enum CSVideoSoundtrackType : csint { Music = 0, Dialog = 1, MusicAndDialog = 2, -}; - -class ECSVideoSoundtrackType -{ -public: - static const char* ToString(CSVideoSoundtrackType enumValue) - { - switch (enumValue) +}; + +class ECSVideoSoundtrackType +{ +public: + static const char* ToString(CSVideoSoundtrackType enumValue) + { + switch (enumValue) { case Music: return "Music"; case Dialog: return "Dialog"; case MusicAndDialog: return "MusicAndDialog"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSButtons : csint +enum CSButtons : csint { None = 0, DPadUp = 1, @@ -360,14 +360,14 @@ enum CSButtons : csint LeftThumbstickUp = 268435456, LeftThumbstickDown = 536870912, LeftThumbstickRight = 1073741824, -}; - -class ECSButtons -{ -public: - static const char* ToString(CSButtons enumValue) - { - switch (enumValue) +}; + +class ECSButtons +{ +public: + static const char* ToString(CSButtons enumValue) + { + switch (enumValue) { case None: return "None"; case DPadUp: return "DPadUp"; @@ -395,57 +395,57 @@ class ECSButtons case LeftThumbstickUp: return "LeftThumbstickUp"; case LeftThumbstickDown: return "LeftThumbstickDown"; case LeftThumbstickRight: return "LeftThumbstickRight"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSButtonState : csint +enum CSButtonState : csint { Released = 0, Pressed = 1, -}; - -class ECSButtonState -{ -public: - static const char* ToString(CSButtonState enumValue) - { - switch (enumValue) +}; + +class ECSButtonState +{ +public: + static const char* ToString(CSButtonState enumValue) + { + switch (enumValue) { case Released: return "Released"; case Pressed: return "Pressed"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGamePadDeadZone : csint +enum CSGamePadDeadZone : csint { None = 0, IndependentAxes = 1, Circular = 2, -}; - -class ECSGamePadDeadZone -{ -public: - static const char* ToString(CSGamePadDeadZone enumValue) - { - switch (enumValue) +}; + +class ECSGamePadDeadZone +{ +public: + static const char* ToString(CSGamePadDeadZone enumValue) + { + switch (enumValue) { case None: return "None"; case IndependentAxes: return "IndependentAxes"; case Circular: return "Circular"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGamePadType : csint +enum CSGamePadType : csint { Unknown = 0, GamePad = 1, @@ -457,14 +457,14 @@ enum CSGamePadType : csint AlternateGuitar = 7, DrumKit = 8, BigButtonPad = 768, -}; - -class ECSGamePadType -{ -public: - static const char* ToString(CSGamePadType enumValue) - { - switch (enumValue) +}; + +class ECSGamePadType +{ +public: + static const char* ToString(CSGamePadType enumValue) + { + switch (enumValue) { case Unknown: return "Unknown"; case GamePad: return "GamePad"; @@ -476,13 +476,13 @@ class ECSGamePadType case AlternateGuitar: return "AlternateGuitar"; case DrumKit: return "DrumKit"; case BigButtonPad: return "BigButtonPad"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSKeys : csint +enum CSKeys : csint { None = 0, Back = 8, @@ -644,14 +644,14 @@ enum CSKeys : csint Zoom = 251, Pa1 = 253, OemClear = 254, -}; - -class ECSKeys -{ -public: - static const char* ToString(CSKeys enumValue) - { - switch (enumValue) +}; + +class ECSKeys +{ +public: + static const char* ToString(CSKeys enumValue) + { + switch (enumValue) { case None: return "None"; case Back: return "Back"; @@ -813,34 +813,34 @@ class ECSKeys case Zoom: return "Zoom"; case Pa1: return "Pa1"; case OemClear: return "OemClear"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSKeyState : csint +enum CSKeyState : csint { Up = 0, Down = 1, -}; - -class ECSKeyState -{ -public: - static const char* ToString(CSKeyState enumValue) - { - switch (enumValue) +}; + +class ECSKeyState +{ +public: + static const char* ToString(CSKeyState enumValue) + { + switch (enumValue) { case Up: return "Up"; case Down: return "Down"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGestureType : csint +enum CSGestureType : csint { None = 0, Tap = 1, @@ -853,14 +853,14 @@ enum CSGestureType : csint PinchComplete = 128, DoubleTap = 256, VerticalDrag = 512, -}; - -class ECSGestureType -{ -public: - static const char* ToString(CSGestureType enumValue) - { - switch (enumValue) +}; + +class ECSGestureType +{ +public: + static const char* ToString(CSGestureType enumValue) + { + switch (enumValue) { case None: return "None"; case Tap: return "Tap"; @@ -873,61 +873,61 @@ class ECSGestureType case PinchComplete: return "PinchComplete"; case DoubleTap: return "DoubleTap"; case VerticalDrag: return "VerticalDrag"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSTouchLocationState : csint +enum CSTouchLocationState : csint { Invalid = 0, Moved = 1, Pressed = 2, Released = 3, -}; - -class ECSTouchLocationState -{ -public: - static const char* ToString(CSTouchLocationState enumValue) - { - switch (enumValue) +}; + +class ECSTouchLocationState +{ +public: + static const char* ToString(CSTouchLocationState enumValue) + { + switch (enumValue) { case Invalid: return "Invalid"; case Moved: return "Moved"; case Pressed: return "Pressed"; case Released: return "Released"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSClearOptions : csint +enum CSClearOptions : csint { Target = 1, DepthBuffer = 2, Stencil = 4, -}; - -class ECSClearOptions -{ -public: - static const char* ToString(CSClearOptions enumValue) - { - switch (enumValue) +}; + +class ECSClearOptions +{ +public: + static const char* ToString(CSClearOptions enumValue) + { + switch (enumValue) { case Target: return "Target"; case DepthBuffer: return "DepthBuffer"; case Stencil: return "Stencil"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSColorWriteChannels : csint +enum CSColorWriteChannels : csint { None = 0, Red = 1, @@ -935,14 +935,14 @@ enum CSColorWriteChannels : csint Blue = 4, Alpha = 8, All = 15, -}; - -class ECSColorWriteChannels -{ -public: - static const char* ToString(CSColorWriteChannels enumValue) - { - switch (enumValue) +}; + +class ECSColorWriteChannels +{ +public: + static const char* ToString(CSColorWriteChannels enumValue) + { + switch (enumValue) { case None: return "None"; case Red: return "Red"; @@ -950,13 +950,13 @@ class ECSColorWriteChannels case Blue: return "Blue"; case Alpha: return "Alpha"; case All: return "All"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCubeMapFace : csint +enum CSCubeMapFace : csint { PositiveX = 0, NegativeX = 1, @@ -964,14 +964,14 @@ enum CSCubeMapFace : csint NegativeY = 3, PositiveZ = 4, NegativeZ = 5, -}; - -class ECSCubeMapFace -{ -public: - static const char* ToString(CSCubeMapFace enumValue) - { - switch (enumValue) +}; + +class ECSCubeMapFace +{ +public: + static const char* ToString(CSCubeMapFace enumValue) + { + switch (enumValue) { case PositiveX: return "PositiveX"; case NegativeX: return "NegativeX"; @@ -979,13 +979,13 @@ class ECSCubeMapFace case NegativeY: return "NegativeY"; case PositiveZ: return "PositiveZ"; case NegativeZ: return "NegativeZ"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSEffectDirtyFlags : csint +enum CSEffectDirtyFlags : csint { WorldViewProj = 1, World = 2, @@ -996,14 +996,14 @@ enum CSEffectDirtyFlags : csint AlphaTest = 64, ShaderIndex = 128, All = -1, -}; - -class ECSEffectDirtyFlags -{ -public: - static const char* ToString(CSEffectDirtyFlags enumValue) - { - switch (enumValue) +}; + +class ECSEffectDirtyFlags +{ +public: + static const char* ToString(CSEffectDirtyFlags enumValue) + { + switch (enumValue) { case WorldViewProj: return "WorldViewProj"; case World: return "World"; @@ -1014,40 +1014,40 @@ class ECSEffectDirtyFlags case AlphaTest: return "AlphaTest"; case ShaderIndex: return "ShaderIndex"; case All: return "All"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSEffectParameterClass : csint +enum CSEffectParameterClass : csint { Scalar = 0, Vector = 1, Matrix = 2, Object = 3, Struct = 4, -}; - -class ECSEffectParameterClass -{ -public: - static const char* ToString(CSEffectParameterClass enumValue) - { - switch (enumValue) +}; + +class ECSEffectParameterClass +{ +public: + static const char* ToString(CSEffectParameterClass enumValue) + { + switch (enumValue) { case Scalar: return "Scalar"; case Vector: return "Vector"; case Matrix: return "Matrix"; case Object: return "Object"; case Struct: return "Struct"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSEffectParameterType : csint +enum CSEffectParameterType : csint { Void = 0, Bool = 1, @@ -1059,14 +1059,14 @@ enum CSEffectParameterType : csint Texture2D = 7, Texture3D = 8, TextureCube = 9, -}; - -class ECSEffectParameterType -{ -public: - static const char* ToString(CSEffectParameterType enumValue) - { - switch (enumValue) +}; + +class ECSEffectParameterType +{ +public: + static const char* ToString(CSEffectParameterType enumValue) + { + switch (enumValue) { case Void: return "Void"; case Bool: return "Bool"; @@ -1078,224 +1078,224 @@ class ECSEffectParameterType case Texture2D: return "Texture2D"; case Texture3D: return "Texture3D"; case TextureCube: return "TextureCube"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGraphicsDeviceStatus : csint +enum CSGraphicsDeviceStatus : csint { Normal = 0, Lost = 1, NotReset = 2, -}; - -class ECSGraphicsDeviceStatus -{ -public: - static const char* ToString(CSGraphicsDeviceStatus enumValue) - { - switch (enumValue) +}; + +class ECSGraphicsDeviceStatus +{ +public: + static const char* ToString(CSGraphicsDeviceStatus enumValue) + { + switch (enumValue) { case Normal: return "Normal"; case Lost: return "Lost"; case NotReset: return "NotReset"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSGraphicsProfile : csint +enum CSGraphicsProfile : csint { Reach = 0, HiDef = 1, -}; - -class ECSGraphicsProfile -{ -public: - static const char* ToString(CSGraphicsProfile enumValue) - { - switch (enumValue) +}; + +class ECSGraphicsProfile +{ +public: + static const char* ToString(CSGraphicsProfile enumValue) + { + switch (enumValue) { case Reach: return "Reach"; case HiDef: return "HiDef"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSPresentInterval : csint +enum CSPresentInterval : csint { Default = 0, One = 1, Two = 2, Immediate = 3, -}; - -class ECSPresentInterval -{ -public: - static const char* ToString(CSPresentInterval enumValue) - { - switch (enumValue) +}; + +class ECSPresentInterval +{ +public: + static const char* ToString(CSPresentInterval enumValue) + { + switch (enumValue) { case Default: return "Default"; case One: return "One"; case Two: return "Two"; case Immediate: return "Immediate"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSRenderTargetUsage : csint +enum CSRenderTargetUsage : csint { DiscardContents = 0, PreserveContents = 1, PlatformContents = 2, -}; - -class ECSRenderTargetUsage -{ -public: - static const char* ToString(CSRenderTargetUsage enumValue) - { - switch (enumValue) +}; + +class ECSRenderTargetUsage +{ +public: + static const char* ToString(CSRenderTargetUsage enumValue) + { + switch (enumValue) { case DiscardContents: return "DiscardContents"; case PreserveContents: return "PreserveContents"; case PlatformContents: return "PlatformContents"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSetDataOptions : csint +enum CSSetDataOptions : csint { None = 0, Discard = 1, NoOverwrite = 2, -}; - -class ECSSetDataOptions -{ -public: - static const char* ToString(CSSetDataOptions enumValue) - { - switch (enumValue) +}; + +class ECSSetDataOptions +{ +public: + static const char* ToString(CSSetDataOptions enumValue) + { + switch (enumValue) { case None: return "None"; case Discard: return "Discard"; case NoOverwrite: return "NoOverwrite"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSamplerType : csint +enum CSSamplerType : csint { Sampler2D = 0, SamplerCube = 1, SamplerVolume = 2, Sampler1D = 3, -}; - -class ECSSamplerType -{ -public: - static const char* ToString(CSSamplerType enumValue) - { - switch (enumValue) +}; + +class ECSSamplerType +{ +public: + static const char* ToString(CSSamplerType enumValue) + { + switch (enumValue) { case Sampler2D: return "Sampler2D"; case SamplerCube: return "SamplerCube"; case SamplerVolume: return "SamplerVolume"; case Sampler1D: return "Sampler1D"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSShaderStage : csint +enum CSShaderStage : csint { Vertex = 0, Pixel = 1, -}; - -class ECSShaderStage -{ -public: - static const char* ToString(CSShaderStage enumValue) - { - switch (enumValue) +}; + +class ECSShaderStage +{ +public: + static const char* ToString(CSShaderStage enumValue) + { + switch (enumValue) { case Vertex: return "Vertex"; case Pixel: return "Pixel"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSpriteEffects : csint +enum CSSpriteEffects : csint { None = 0, FlipHorizontally = 1, FlipVertically = 2, -}; - -class ECSSpriteEffects -{ -public: - static const char* ToString(CSSpriteEffects enumValue) - { - switch (enumValue) +}; + +class ECSSpriteEffects +{ +public: + static const char* ToString(CSSpriteEffects enumValue) + { + switch (enumValue) { case None: return "None"; case FlipHorizontally: return "FlipHorizontally"; case FlipVertically: return "FlipVertically"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSpriteSortMode : csint +enum CSSpriteSortMode : csint { Deferred = 0, Immediate = 1, Texture = 2, BackToFront = 3, FrontToBack = 4, -}; - -class ECSSpriteSortMode -{ -public: - static const char* ToString(CSSpriteSortMode enumValue) - { - switch (enumValue) +}; + +class ECSSpriteSortMode +{ +public: + static const char* ToString(CSSpriteSortMode enumValue) + { + switch (enumValue) { case Deferred: return "Deferred"; case Immediate: return "Immediate"; case Texture: return "Texture"; case BackToFront: return "BackToFront"; case FrontToBack: return "FrontToBack"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSBlend : csint +enum CSBlend : csint { One = 0, Zero = 1, @@ -1310,14 +1310,14 @@ enum CSBlend : csint BlendFactor = 10, InverseBlendFactor = 11, SourceAlphaSaturation = 12, -}; - -class ECSBlend -{ -public: - static const char* ToString(CSBlend enumValue) - { - switch (enumValue) +}; + +class ECSBlend +{ +public: + static const char* ToString(CSBlend enumValue) + { + switch (enumValue) { case One: return "One"; case Zero: return "Zero"; @@ -1332,40 +1332,40 @@ class ECSBlend case BlendFactor: return "BlendFactor"; case InverseBlendFactor: return "InverseBlendFactor"; case SourceAlphaSaturation: return "SourceAlphaSaturation"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSBlendFunction : csint +enum CSBlendFunction : csint { Add = 0, Subtract = 1, ReverseSubtract = 2, Min = 3, Max = 4, -}; - -class ECSBlendFunction -{ -public: - static const char* ToString(CSBlendFunction enumValue) - { - switch (enumValue) +}; + +class ECSBlendFunction +{ +public: + static const char* ToString(CSBlendFunction enumValue) + { + switch (enumValue) { case Add: return "Add"; case Subtract: return "Subtract"; case ReverseSubtract: return "ReverseSubtract"; case Min: return "Min"; case Max: return "Max"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCompareFunction : csint +enum CSCompareFunction : csint { Always = 0, Never = 1, @@ -1375,14 +1375,14 @@ enum CSCompareFunction : csint GreaterEqual = 5, Greater = 6, NotEqual = 7, -}; - -class ECSCompareFunction -{ -public: - static const char* ToString(CSCompareFunction enumValue) - { - switch (enumValue) +}; + +class ECSCompareFunction +{ +public: + static const char* ToString(CSCompareFunction enumValue) + { + switch (enumValue) { case Always: return "Always"; case Never: return "Never"; @@ -1392,82 +1392,82 @@ class ECSCompareFunction case GreaterEqual: return "GreaterEqual"; case Greater: return "Greater"; case NotEqual: return "NotEqual"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCullMode : csint +enum CSCullMode : csint { None = 0, CullClockwiseFace = 1, CullCounterClockwiseFace = 2, -}; - -class ECSCullMode -{ -public: - static const char* ToString(CSCullMode enumValue) - { - switch (enumValue) +}; + +class ECSCullMode +{ +public: + static const char* ToString(CSCullMode enumValue) + { + switch (enumValue) { case None: return "None"; case CullClockwiseFace: return "CullClockwiseFace"; case CullCounterClockwiseFace: return "CullCounterClockwiseFace"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSDepthFormat : csint +enum CSDepthFormat : csint { None = 0, Depth16 = 1, Depth24 = 2, Depth24Stencil8 = 3, -}; - -class ECSDepthFormat -{ -public: - static const char* ToString(CSDepthFormat enumValue) - { - switch (enumValue) +}; + +class ECSDepthFormat +{ +public: + static const char* ToString(CSDepthFormat enumValue) + { + switch (enumValue) { case None: return "None"; case Depth16: return "Depth16"; case Depth24: return "Depth24"; case Depth24Stencil8: return "Depth24Stencil8"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSFillMode : csint +enum CSFillMode : csint { Solid = 0, WireFrame = 1, -}; - -class ECSFillMode -{ -public: - static const char* ToString(CSFillMode enumValue) - { - switch (enumValue) +}; + +class ECSFillMode +{ +public: + static const char* ToString(CSFillMode enumValue) + { + switch (enumValue) { case Solid: return "Solid"; case WireFrame: return "WireFrame"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSStencilOperation : csint +enum CSStencilOperation : csint { Keep = 0, Zero = 1, @@ -1477,14 +1477,14 @@ enum CSStencilOperation : csint IncrementSaturation = 5, DecrementSaturation = 6, Invert = 7, -}; - -class ECSStencilOperation -{ -public: - static const char* ToString(CSStencilOperation enumValue) - { - switch (enumValue) +}; + +class ECSStencilOperation +{ +public: + static const char* ToString(CSStencilOperation enumValue) + { + switch (enumValue) { case Keep: return "Keep"; case Zero: return "Zero"; @@ -1494,38 +1494,38 @@ class ECSStencilOperation case IncrementSaturation: return "IncrementSaturation"; case DecrementSaturation: return "DecrementSaturation"; case Invert: return "Invert"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSTextureAddressMode : csint +enum CSTextureAddressMode : csint { Wrap = 0, Clamp = 1, Mirror = 2, Border = 3, -}; - -class ECSTextureAddressMode -{ -public: - static const char* ToString(CSTextureAddressMode enumValue) - { - switch (enumValue) +}; + +class ECSTextureAddressMode +{ +public: + static const char* ToString(CSTextureAddressMode enumValue) + { + switch (enumValue) { case Wrap: return "Wrap"; case Clamp: return "Clamp"; case Mirror: return "Mirror"; case Border: return "Border"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSTextureFilter : csint +enum CSTextureFilter : csint { Linear = 0, Point = 1, @@ -1536,14 +1536,14 @@ enum CSTextureFilter : csint MinLinearMagPointMipPoint = 6, MinPointMagLinearMipLinear = 7, MinPointMagLinearMipPoint = 8, -}; - -class ECSTextureFilter -{ -public: - static const char* ToString(CSTextureFilter enumValue) - { - switch (enumValue) +}; + +class ECSTextureFilter +{ +public: + static const char* ToString(CSTextureFilter enumValue) + { + switch (enumValue) { case Linear: return "Linear"; case Point: return "Point"; @@ -1554,34 +1554,34 @@ class ECSTextureFilter case MinLinearMagPointMipPoint: return "MinLinearMagPointMipPoint"; case MinPointMagLinearMipLinear: return "MinPointMagLinearMipLinear"; case MinPointMagLinearMipPoint: return "MinPointMagLinearMipPoint"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSTextureFilterMode : csint +enum CSTextureFilterMode : csint { Default = 0, Comparison = 1, -}; - -class ECSTextureFilterMode -{ -public: - static const char* ToString(CSTextureFilterMode enumValue) - { - switch (enumValue) +}; + +class ECSTextureFilterMode +{ +public: + static const char* ToString(CSTextureFilterMode enumValue) + { + switch (enumValue) { case Default: return "Default"; case Comparison: return "Comparison"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSurfaceFormat : csint +enum CSSurfaceFormat : csint { Color = 0, Bgr565 = 1, @@ -1625,14 +1625,14 @@ enum CSSurfaceFormat : csint Srgb8A1Etc2 = 93, Rgba8Etc2 = 94, SRgb8A8Etc2 = 95, -}; - -class ECSSurfaceFormat -{ -public: - static const char* ToString(CSSurfaceFormat enumValue) - { - switch (enumValue) +}; + +class ECSSurfaceFormat +{ +public: + static const char* ToString(CSSurfaceFormat enumValue) + { + switch (enumValue) { case Color: return "Color"; case Bgr565: return "Bgr565"; @@ -1676,82 +1676,82 @@ class ECSSurfaceFormat case Srgb8A1Etc2: return "Srgb8A1Etc2"; case Rgba8Etc2: return "Rgba8Etc2"; case SRgb8A8Etc2: return "SRgb8A8Etc2"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSBufferUsage : csint +enum CSBufferUsage : csint { None = 0, WriteOnly = 1, -}; - -class ECSBufferUsage -{ -public: - static const char* ToString(CSBufferUsage enumValue) - { - switch (enumValue) +}; + +class ECSBufferUsage +{ +public: + static const char* ToString(CSBufferUsage enumValue) + { + switch (enumValue) { case None: return "None"; case WriteOnly: return "WriteOnly"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSIndexElementSize : csint +enum CSIndexElementSize : csint { SixteenBits = 0, ThirtyTwoBits = 1, -}; - -class ECSIndexElementSize -{ -public: - static const char* ToString(CSIndexElementSize enumValue) - { - switch (enumValue) +}; + +class ECSIndexElementSize +{ +public: + static const char* ToString(CSIndexElementSize enumValue) + { + switch (enumValue) { case SixteenBits: return "SixteenBits"; case ThirtyTwoBits: return "ThirtyTwoBits"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSPrimitiveType : csint +enum CSPrimitiveType : csint { TriangleList = 0, TriangleStrip = 1, LineList = 2, LineStrip = 3, PointList = 4, -}; - -class ECSPrimitiveType -{ -public: - static const char* ToString(CSPrimitiveType enumValue) - { - switch (enumValue) +}; + +class ECSPrimitiveType +{ +public: + static const char* ToString(CSPrimitiveType enumValue) + { + switch (enumValue) { case TriangleList: return "TriangleList"; case TriangleStrip: return "TriangleStrip"; case LineList: return "LineList"; case LineStrip: return "LineStrip"; case PointList: return "PointList"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSVertexElementFormat : csint +enum CSVertexElementFormat : csint { Single = 0, Vector2 = 1, @@ -1765,14 +1765,14 @@ enum CSVertexElementFormat : csint NormalizedShort4 = 9, HalfVector2 = 10, HalfVector4 = 11, -}; - -class ECSVertexElementFormat -{ -public: - static const char* ToString(CSVertexElementFormat enumValue) - { - switch (enumValue) +}; + +class ECSVertexElementFormat +{ +public: + static const char* ToString(CSVertexElementFormat enumValue) + { + switch (enumValue) { case Single: return "Single"; case Vector2: return "Vector2"; @@ -1786,13 +1786,13 @@ class ECSVertexElementFormat case NormalizedShort4: return "NormalizedShort4"; case HalfVector2: return "HalfVector2"; case HalfVector4: return "HalfVector4"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSVertexElementUsage : csint +enum CSVertexElementUsage : csint { Position = 0, Color = 1, @@ -1807,14 +1807,14 @@ enum CSVertexElementUsage : csint PointSize = 10, Sample = 11, TessellateFactor = 12, -}; - -class ECSVertexElementUsage -{ -public: - static const char* ToString(CSVertexElementUsage enumValue) - { - switch (enumValue) +}; + +class ECSVertexElementUsage +{ +public: + static const char* ToString(CSVertexElementUsage enumValue) + { + switch (enumValue) { case Position: return "Position"; case Color: return "Color"; @@ -1829,226 +1829,226 @@ class ECSVertexElementUsage case PointSize: return "PointSize"; case Sample: return "Sample"; case TessellateFactor: return "TessellateFactor"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSAudioChannels : csint +enum CSAudioChannels : csint { Mono = 1, Stereo = 2, -}; - -class ECSAudioChannels -{ -public: - static const char* ToString(CSAudioChannels enumValue) - { - switch (enumValue) +}; + +class ECSAudioChannels +{ +public: + static const char* ToString(CSAudioChannels enumValue) + { + switch (enumValue) { case Mono: return "Mono"; case Stereo: return "Stereo"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMicrophoneState : csint +enum CSMicrophoneState : csint { Started = 0, Stopped = 1, -}; - -class ECSMicrophoneState -{ -public: - static const char* ToString(CSMicrophoneState enumValue) - { - switch (enumValue) +}; + +class ECSMicrophoneState +{ +public: + static const char* ToString(CSMicrophoneState enumValue) + { + switch (enumValue) { case Started: return "Started"; case Stopped: return "Stopped"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSSoundState : csint +enum CSSoundState : csint { Playing = 0, Paused = 1, Stopped = 2, -}; - -class ECSSoundState -{ -public: - static const char* ToString(CSSoundState enumValue) - { - switch (enumValue) +}; + +class ECSSoundState +{ +public: + static const char* ToString(CSSoundState enumValue) + { + switch (enumValue) { case Playing: return "Playing"; case Paused: return "Paused"; case Stopped: return "Stopped"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSAudioStopOptions : csint +enum CSAudioStopOptions : csint { AsAuthored = 0, Immediate = 1, -}; - -class ECSAudioStopOptions -{ -public: - static const char* ToString(CSAudioStopOptions enumValue) - { - switch (enumValue) +}; + +class ECSAudioStopOptions +{ +public: + static const char* ToString(CSAudioStopOptions enumValue) + { + switch (enumValue) { case AsAuthored: return "AsAuthored"; case Immediate: return "Immediate"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSCrossfadeType : csint +enum CSCrossfadeType : csint { Linear = 0, Logarithmic = 1, EqualPower = 2, -}; - -class ECSCrossfadeType -{ -public: - static const char* ToString(CSCrossfadeType enumValue) - { - switch (enumValue) +}; + +class ECSCrossfadeType +{ +public: + static const char* ToString(CSCrossfadeType enumValue) + { + switch (enumValue) { case Linear: return "Linear"; case Logarithmic: return "Logarithmic"; case EqualPower: return "EqualPower"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSFilterMode : csint +enum CSFilterMode : csint { LowPass = 0, BandPass = 1, HighPass = 2, -}; - -class ECSFilterMode -{ -public: - static const char* ToString(CSFilterMode enumValue) - { - switch (enumValue) +}; + +class ECSFilterMode +{ +public: + static const char* ToString(CSFilterMode enumValue) + { + switch (enumValue) { case LowPass: return "LowPass"; case BandPass: return "BandPass"; case HighPass: return "HighPass"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMaxInstanceBehavior : csint +enum CSMaxInstanceBehavior : csint { FailToPlay = 0, Queue = 1, ReplaceOldest = 2, ReplaceQuietest = 3, ReplaceLowestPriority = 4, -}; - -class ECSMaxInstanceBehavior -{ -public: - static const char* ToString(CSMaxInstanceBehavior enumValue) - { - switch (enumValue) +}; + +class ECSMaxInstanceBehavior +{ +public: + static const char* ToString(CSMaxInstanceBehavior enumValue) + { + switch (enumValue) { case FailToPlay: return "FailToPlay"; case Queue: return "Queue"; case ReplaceOldest: return "ReplaceOldest"; case ReplaceQuietest: return "ReplaceQuietest"; case ReplaceLowestPriority: return "ReplaceLowestPriority"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSMiniFormatTag : csint +enum CSMiniFormatTag : csint { Pcm = 0, Xma = 1, Xma = 1, Adpcm = 2, Wma = 3, -}; - -class ECSMiniFormatTag -{ -public: - static const char* ToString(CSMiniFormatTag enumValue) - { - switch (enumValue) +}; + +class ECSMiniFormatTag +{ +public: + static const char* ToString(CSMiniFormatTag enumValue) + { + switch (enumValue) { case Pcm: return "Pcm"; case Xma: return "Xma"; case Xma: return "Xma"; case Adpcm: return "Adpcm"; case Wma: return "Wma"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSVariationType : csint +enum CSVariationType : csint { Ordered = 0, OrderedFromRandom = 1, Random = 2, RandomNoImmediateRepeats = 3, Shuffle = 4, -}; - -class ECSVariationType -{ -public: - static const char* ToString(CSVariationType enumValue) - { - switch (enumValue) +}; + +class ECSVariationType +{ +public: + static const char* ToString(CSVariationType enumValue) + { + switch (enumValue) { case Ordered: return "Ordered"; case OrderedFromRandom: return "OrderedFromRandom"; case Random: return "Random"; case RandomNoImmediateRepeats: return "RandomNoImmediateRepeats"; case Shuffle: return "Shuffle"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSRpcParameter : csint +enum CSRpcParameter : csint { Volume = 0, Pitch = 1, @@ -2056,14 +2056,14 @@ enum CSRpcParameter : csint FilterFrequency = 3, FilterQFactor = 4, NumParameters = 5, -}; - -class ECSRpcParameter -{ -public: - static const char* ToString(CSRpcParameter enumValue) - { - switch (enumValue) +}; + +class ECSRpcParameter +{ +public: + static const char* ToString(CSRpcParameter enumValue) + { + switch (enumValue) { case Volume: return "Volume"; case Pitch: return "Pitch"; @@ -2071,34 +2071,34 @@ class ECSRpcParameter case FilterFrequency: return "FilterFrequency"; case FilterQFactor: return "FilterQFactor"; case NumParameters: return "NumParameters"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +}; -enum CSRpcPointType : csint +enum CSRpcPointType : csint { Linear = 0, Fast = 1, Slow = 2, SinCos = 3, -}; - -class ECSRpcPointType -{ -public: - static const char* ToString(CSRpcPointType enumValue) - { - switch (enumValue) +}; + +class ECSRpcPointType +{ +public: + static const char* ToString(CSRpcPointType enumValue) + { + switch (enumValue) { case Linear: return "Linear"; case Fast: return "Fast"; case Slow: return "Slow"; case SinCos: return "SinCos"; - } - - return "Unknown Value"; - } -}; + } + + return "Unknown Value"; + } +};