From 9c7b97a92e6eba31845f314e08b0e2150d312609 Mon Sep 17 00:00:00 2001 From: Jonathan Racaud Date: Fri, 27 Sep 2024 15:44:58 +0900 Subject: [PATCH] Added generation of Beef style functions for functions using enum as first or second parameter --- generator/Program.cs | 92 +++- raylib-beef/src/BlendMode.bf | 18 +- raylib-beef/src/CameraMode.bf | 12 +- raylib-beef/src/CameraProjection.bf | 6 +- raylib-beef/src/ConfigFlags.bf | 34 +- raylib-beef/src/CubemapLayout.bf | 14 +- raylib-beef/src/FontType.bf | 8 +- raylib-beef/src/GamepadAxis.bf | 14 +- raylib-beef/src/GamepadButton.bf | 38 +- raylib-beef/src/Gesture.bf | 24 +- raylib-beef/src/KeyboardKey.bf | 222 ++++---- raylib-beef/src/MaterialMapIndex.bf | 24 +- raylib-beef/src/MouseButton.bf | 16 +- raylib-beef/src/MouseCursor.bf | 24 +- raylib-beef/src/NPatchLayout.bf | 8 +- raylib-beef/src/PixelFormat.bf | 50 +- raylib-beef/src/Raylib.bf | 521 +++++++++--------- raylib-beef/src/Raymath.bf | 6 +- raylib-beef/src/Rlgl.bf | 54 +- raylib-beef/src/ShaderAttributeDataType.bf | 10 +- raylib-beef/src/ShaderLocationIndex.bf | 54 +- raylib-beef/src/ShaderUniformDataType.bf | 20 +- raylib-beef/src/TextureFilter.bf | 14 +- raylib-beef/src/TextureWrap.bf | 10 +- raylib-beef/src/TraceLogLevel.bf | 18 +- raylib-beef/src/rlBlendMode.bf | 18 +- raylib-beef/src/rlCullMode.bf | 6 +- .../src/rlFramebufferAttachTextureType.bf | 18 +- raylib-beef/src/rlFramebufferAttachType.bf | 22 +- raylib-beef/src/rlGlVersion.bf | 14 +- raylib-beef/src/rlPixelFormat.bf | 50 +- raylib-beef/src/rlShaderAttributeDataType.bf | 10 +- raylib-beef/src/rlShaderLocationIndex.bf | 54 +- raylib-beef/src/rlShaderUniformDataType.bf | 20 +- raylib-beef/src/rlTextureFilter.bf | 14 +- raylib-beef/src/rlTraceLogLevel.bf | 18 +- 36 files changed, 866 insertions(+), 689 deletions(-) diff --git a/generator/Program.cs b/generator/Program.cs index 4352cfe..c32f2c2 100644 --- a/generator/Program.cs +++ b/generator/Program.cs @@ -100,6 +100,64 @@ namespace RaylibBeefGenerator functionsWStructs.Add(func); } + // Functions that have only 1 parameter that is also associated with an enum. + // The goal is to generate a helper function that provides an API that would be more idiomatic Beef code + // e.g: + // C style API + // Raylib.IsKeyPressed((int32)KeyboardKey.KEY_SPACE); + // + // Beef style API + // Raylib.IsKeyPressed(.KEY_SPACE); + var oneParamHelperFunctions = new Dictionary + { + {"IsWindowState", ("ConfigFlags", "flag")}, + {"SetWindowState", ("ConfigFlags", "flag")}, + {"ClearWindowState", ("ConfigFlags", "flag")}, + + {"BeginBlendMode", ("BlendMode", "mode")}, + + {"SetConfigFlags", ("ConfigFlags", "flags")}, + + {"SetTraceLogLevel", ("TraceLogLevel", "logLevel")}, + + {"IsKeyPressed", ("KeyboardKey", "key")}, + {"IsKeyPressedRepeat", ("KeyboardKey", "key")}, + {"IsKeyDown", ("KeyboardKey", "key")}, + {"IsKeyReleased", ("KeyboardKey", "key")}, + {"IsKeyUp", ("KeyboardKey", "key")}, + {"SetExitKey", ("KeyboardKey", "key")}, + + {"IsMouseButtonPressed", ("MouseButton", "button")}, + {"IsMouseButtonDown", ("MouseButton", "button")}, + {"IsMouseButtonReleased", ("MouseButton", "button")}, + {"IsMouseButtonUp", ("MouseButton", "button")}, + + {"SetMouseCursor", ("MouseCursor", "cursor")}, + + {"SetGesturesEnabled", ("Gesture", "flags")}, + {"IsGestureDetected", ("Gesture", "gesture")}, + }; + + // Functions that have only 2 parameters and for which the second parameter is also associated with an enum. + // The goal is to generate a helper function that provides an API that would be more idiomatic Beef code + // e.g: + // C style API + // Raylib.IsGamepadButtonPressed(0, (int32)GamepadButton.GAMEPAD_BUTTON_LEFT_TRIGGER_1); + // + // Beef style API + // Raylib.IsGamepadButtonPressed(.GAMEPAD_BUTTON_LEFT_TRIGGER_1); + var secondParamHelperFunctions = new Dictionary + { + {"IsGamepadButtonPressed", ("GamepadButton", "button")}, + {"IsGamepadButtonDown", ("GamepadButton", "button")}, + {"IsGamepadButtonReleased", ("GamepadButton", "button")}, + {"IsGamepadButtonUp", ("GamepadButton", "button")}, + + {"GetGamepadAxisMovement", ("GamepadAxis", "axis")}, + + {"UpdateCamera", ("CameraMode", "mode")} + }; + // Platform agnostic methods (kinda) foreach (var func in functionsWOStructs) { @@ -107,6 +165,33 @@ namespace RaylibBeefGenerator // AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); AppendLine("[CLink]"); AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params, api)});"); + + // Generates Beef idiomatic helper functions to be used with an enum parameter: + // e.g: public static bool IsKeyPressed(KeyboardKey key) => IsKeyPressed((int32)key); + // The Beef function will call the extern C function from Raylib. + if (oneParamHelperFunctions.ContainsKey(func.Name)) + { + var (paramType, paramName) = oneParamHelperFunctions[func.Name]; + AppendLine($"public static {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({paramType} {paramName}) => {func.Name}((int32){paramName});"); + } + + // Generates Beef idiomatic helper functions to be used with an enum parameter: + // e.g: public static bool IsGamepadButtonPressed(int32 gamepad, GamepadButton key) => IsGamepadButtonPressed(gamepad, (int32)button); + // The Beef function will call the extern C function from Raylib. + if (secondParamHelperFunctions.ContainsKey(func.Name)) + { + var (bfParamType, bfParamName) = secondParamHelperFunctions[func.Name]; + + var parameters = Parameters2String(func.Params, api).Split(','); + var paramString = parameters[0] + $", {bfParamType} {bfParamName}"; + var firstParam = parameters[0].Split(' ')[1]; + + if (firstParam.StartsWith('*')) + firstParam = firstParam.Remove(0, 1); + + AppendLine($"public static {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({paramString}) => {func.Name}({firstParam}, (int32){bfParamName});"); + } + AppendLine(""); } @@ -178,9 +263,11 @@ namespace RaylibBeefGenerator for (int i = 0; i < @enum.Values.Count; i++) { AppendLine($"/// {@enum.Values[i].Description}"); - AppendLine($"{@enum.Values[i].Name} = {@enum.Values[i].Value_},"); + AppendLine($"case {@enum.Values[i].Name} = {@enum.Values[i].Value_};"); } + AppendLine(""); + AppendLine($"public static operator int32 ({@enum.Name} self) => (int32)self;"); DecreaseTab(); AppendLine("}"); @@ -281,7 +368,8 @@ namespace RaylibBeefGenerator paramStr += "in "; } - paramStr += $"{t} {param.Name.ConvertName()}"; + paramStr += $"{t}{(t.EndsWith('*') ? "": " ")}{param.Name.ConvertName()}"; + if (p < @params.Count - 1) paramStr += ", "; } diff --git a/raylib-beef/src/BlendMode.bf b/raylib-beef/src/BlendMode.bf index 5e7cf99..81482d3 100644 --- a/raylib-beef/src/BlendMode.bf +++ b/raylib-beef/src/BlendMode.bf @@ -8,19 +8,21 @@ namespace RaylibBeef; public enum BlendMode : c_int { /// Blend textures considering alpha (default) - BLEND_ALPHA = 0, + case BLEND_ALPHA = 0; /// Blend textures adding colors - BLEND_ADDITIVE = 1, + case BLEND_ADDITIVE = 1; /// Blend textures multiplying colors - BLEND_MULTIPLIED = 2, + case BLEND_MULTIPLIED = 2; /// Blend textures adding colors (alternative) - BLEND_ADD_COLORS = 3, + case BLEND_ADD_COLORS = 3; /// Blend textures subtracting colors (alternative) - BLEND_SUBTRACT_COLORS = 4, + case BLEND_SUBTRACT_COLORS = 4; /// Blend premultiplied textures considering alpha - BLEND_ALPHA_PREMULTIPLY = 5, + case BLEND_ALPHA_PREMULTIPLY = 5; /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) - BLEND_CUSTOM = 6, + case BLEND_CUSTOM = 6; /// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) - BLEND_CUSTOM_SEPARATE = 7, + case BLEND_CUSTOM_SEPARATE = 7; + + public static operator int32 (BlendMode self) => (int32)self; } diff --git a/raylib-beef/src/CameraMode.bf b/raylib-beef/src/CameraMode.bf index bab5c72..63eae93 100644 --- a/raylib-beef/src/CameraMode.bf +++ b/raylib-beef/src/CameraMode.bf @@ -8,13 +8,15 @@ namespace RaylibBeef; public enum CameraMode : c_int { /// Custom camera - CAMERA_CUSTOM = 0, + case CAMERA_CUSTOM = 0; /// Free camera - CAMERA_FREE = 1, + case CAMERA_FREE = 1; /// Orbital camera - CAMERA_ORBITAL = 2, + case CAMERA_ORBITAL = 2; /// First person camera - CAMERA_FIRST_PERSON = 3, + case CAMERA_FIRST_PERSON = 3; /// Third person camera - CAMERA_THIRD_PERSON = 4, + case CAMERA_THIRD_PERSON = 4; + + public static operator int32 (CameraMode self) => (int32)self; } diff --git a/raylib-beef/src/CameraProjection.bf b/raylib-beef/src/CameraProjection.bf index 3fe55fa..3518194 100644 --- a/raylib-beef/src/CameraProjection.bf +++ b/raylib-beef/src/CameraProjection.bf @@ -8,7 +8,9 @@ namespace RaylibBeef; public enum CameraProjection : c_int { /// Perspective projection - CAMERA_PERSPECTIVE = 0, + case CAMERA_PERSPECTIVE = 0; /// Orthographic projection - CAMERA_ORTHOGRAPHIC = 1, + case CAMERA_ORTHOGRAPHIC = 1; + + public static operator int32 (CameraProjection self) => (int32)self; } diff --git a/raylib-beef/src/ConfigFlags.bf b/raylib-beef/src/ConfigFlags.bf index 62b4415..25edee7 100644 --- a/raylib-beef/src/ConfigFlags.bf +++ b/raylib-beef/src/ConfigFlags.bf @@ -8,35 +8,37 @@ namespace RaylibBeef; public enum ConfigFlags : c_int { /// Set to try enabling V-Sync on GPU - FLAG_VSYNC_HINT = 64, + case FLAG_VSYNC_HINT = 64; /// Set to run program in fullscreen - FLAG_FULLSCREEN_MODE = 2, + case FLAG_FULLSCREEN_MODE = 2; /// Set to allow resizable window - FLAG_WINDOW_RESIZABLE = 4, + case FLAG_WINDOW_RESIZABLE = 4; /// Set to disable window decoration (frame and buttons) - FLAG_WINDOW_UNDECORATED = 8, + case FLAG_WINDOW_UNDECORATED = 8; /// Set to hide window - FLAG_WINDOW_HIDDEN = 128, + case FLAG_WINDOW_HIDDEN = 128; /// Set to minimize window (iconify) - FLAG_WINDOW_MINIMIZED = 512, + case FLAG_WINDOW_MINIMIZED = 512; /// Set to maximize window (expanded to monitor) - FLAG_WINDOW_MAXIMIZED = 1024, + case FLAG_WINDOW_MAXIMIZED = 1024; /// Set to window non focused - FLAG_WINDOW_UNFOCUSED = 2048, + case FLAG_WINDOW_UNFOCUSED = 2048; /// Set to window always on top - FLAG_WINDOW_TOPMOST = 4096, + case FLAG_WINDOW_TOPMOST = 4096; /// Set to allow windows running while minimized - FLAG_WINDOW_ALWAYS_RUN = 256, + case FLAG_WINDOW_ALWAYS_RUN = 256; /// Set to allow transparent framebuffer - FLAG_WINDOW_TRANSPARENT = 16, + case FLAG_WINDOW_TRANSPARENT = 16; /// Set to support HighDPI - FLAG_WINDOW_HIGHDPI = 8192, + case FLAG_WINDOW_HIGHDPI = 8192; /// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED - FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384, + case FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384; /// Set to run program in borderless windowed mode - FLAG_BORDERLESS_WINDOWED_MODE = 32768, + case FLAG_BORDERLESS_WINDOWED_MODE = 32768; /// Set to try enabling MSAA 4X - FLAG_MSAA_4X_HINT = 32, + case FLAG_MSAA_4X_HINT = 32; /// Set to try enabling interlaced video format (for V3D) - FLAG_INTERLACED_HINT = 65536, + case FLAG_INTERLACED_HINT = 65536; + + public static operator int32 (ConfigFlags self) => (int32)self; } diff --git a/raylib-beef/src/CubemapLayout.bf b/raylib-beef/src/CubemapLayout.bf index db6df88..a45f27e 100644 --- a/raylib-beef/src/CubemapLayout.bf +++ b/raylib-beef/src/CubemapLayout.bf @@ -8,15 +8,17 @@ namespace RaylibBeef; public enum CubemapLayout : c_int { /// Automatically detect layout type - CUBEMAP_LAYOUT_AUTO_DETECT = 0, + case CUBEMAP_LAYOUT_AUTO_DETECT = 0; /// Layout is defined by a vertical line with faces - CUBEMAP_LAYOUT_LINE_VERTICAL = 1, + case CUBEMAP_LAYOUT_LINE_VERTICAL = 1; /// Layout is defined by a horizontal line with faces - CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, + case CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2; /// Layout is defined by a 3x4 cross with cubemap faces - CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, + case CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3; /// Layout is defined by a 4x3 cross with cubemap faces - CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, + case CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4; /// Layout is defined by a panorama image (equirrectangular map) - CUBEMAP_LAYOUT_PANORAMA = 5, + case CUBEMAP_LAYOUT_PANORAMA = 5; + + public static operator int32 (CubemapLayout self) => (int32)self; } diff --git a/raylib-beef/src/FontType.bf b/raylib-beef/src/FontType.bf index 97287f8..61f12cf 100644 --- a/raylib-beef/src/FontType.bf +++ b/raylib-beef/src/FontType.bf @@ -8,9 +8,11 @@ namespace RaylibBeef; public enum FontType : c_int { /// Default font generation, anti-aliased - FONT_DEFAULT = 0, + case FONT_DEFAULT = 0; /// Bitmap font generation, no anti-aliasing - FONT_BITMAP = 1, + case FONT_BITMAP = 1; /// SDF font generation, requires external shader - FONT_SDF = 2, + case FONT_SDF = 2; + + public static operator int32 (FontType self) => (int32)self; } diff --git a/raylib-beef/src/GamepadAxis.bf b/raylib-beef/src/GamepadAxis.bf index f23d1f4..8031be7 100644 --- a/raylib-beef/src/GamepadAxis.bf +++ b/raylib-beef/src/GamepadAxis.bf @@ -8,15 +8,17 @@ namespace RaylibBeef; public enum GamepadAxis : c_int { /// Gamepad left stick X axis - GAMEPAD_AXIS_LEFT_X = 0, + case GAMEPAD_AXIS_LEFT_X = 0; /// Gamepad left stick Y axis - GAMEPAD_AXIS_LEFT_Y = 1, + case GAMEPAD_AXIS_LEFT_Y = 1; /// Gamepad right stick X axis - GAMEPAD_AXIS_RIGHT_X = 2, + case GAMEPAD_AXIS_RIGHT_X = 2; /// Gamepad right stick Y axis - GAMEPAD_AXIS_RIGHT_Y = 3, + case GAMEPAD_AXIS_RIGHT_Y = 3; /// Gamepad back trigger left, pressure level: [1..-1] - GAMEPAD_AXIS_LEFT_TRIGGER = 4, + case GAMEPAD_AXIS_LEFT_TRIGGER = 4; /// Gamepad back trigger right, pressure level: [1..-1] - GAMEPAD_AXIS_RIGHT_TRIGGER = 5, + case GAMEPAD_AXIS_RIGHT_TRIGGER = 5; + + public static operator int32 (GamepadAxis self) => (int32)self; } diff --git a/raylib-beef/src/GamepadButton.bf b/raylib-beef/src/GamepadButton.bf index 5dd1ff2..80aa77d 100644 --- a/raylib-beef/src/GamepadButton.bf +++ b/raylib-beef/src/GamepadButton.bf @@ -8,39 +8,41 @@ namespace RaylibBeef; public enum GamepadButton : c_int { /// Unknown button, just for error checking - GAMEPAD_BUTTON_UNKNOWN = 0, + case GAMEPAD_BUTTON_UNKNOWN = 0; /// Gamepad left DPAD up button - GAMEPAD_BUTTON_LEFT_FACE_UP = 1, + case GAMEPAD_BUTTON_LEFT_FACE_UP = 1; /// Gamepad left DPAD right button - GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, + case GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2; /// Gamepad left DPAD down button - GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, + case GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3; /// Gamepad left DPAD left button - GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, + case GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4; /// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) - GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, + case GAMEPAD_BUTTON_RIGHT_FACE_UP = 5; /// Gamepad right button right (i.e. PS3: Square, Xbox: X) - GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, + case GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6; /// Gamepad right button down (i.e. PS3: Cross, Xbox: A) - GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, + case GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7; /// Gamepad right button left (i.e. PS3: Circle, Xbox: B) - GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, + case GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8; /// Gamepad top/back trigger left (first), it could be a trailing button - GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, + case GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9; /// Gamepad top/back trigger left (second), it could be a trailing button - GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, + case GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10; /// Gamepad top/back trigger right (one), it could be a trailing button - GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, + case GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11; /// Gamepad top/back trigger right (second), it could be a trailing button - GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, + case GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12; /// Gamepad center buttons, left one (i.e. PS3: Select) - GAMEPAD_BUTTON_MIDDLE_LEFT = 13, + case GAMEPAD_BUTTON_MIDDLE_LEFT = 13; /// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) - GAMEPAD_BUTTON_MIDDLE = 14, + case GAMEPAD_BUTTON_MIDDLE = 14; /// Gamepad center buttons, right one (i.e. PS3: Start) - GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, + case GAMEPAD_BUTTON_MIDDLE_RIGHT = 15; /// Gamepad joystick pressed button left - GAMEPAD_BUTTON_LEFT_THUMB = 16, + case GAMEPAD_BUTTON_LEFT_THUMB = 16; /// Gamepad joystick pressed button right - GAMEPAD_BUTTON_RIGHT_THUMB = 17, + case GAMEPAD_BUTTON_RIGHT_THUMB = 17; + + public static operator int32 (GamepadButton self) => (int32)self; } diff --git a/raylib-beef/src/Gesture.bf b/raylib-beef/src/Gesture.bf index f9b5cc6..1dd1753 100644 --- a/raylib-beef/src/Gesture.bf +++ b/raylib-beef/src/Gesture.bf @@ -8,25 +8,27 @@ namespace RaylibBeef; public enum Gesture : c_int { /// No gesture - GESTURE_NONE = 0, + case GESTURE_NONE = 0; /// Tap gesture - GESTURE_TAP = 1, + case GESTURE_TAP = 1; /// Double tap gesture - GESTURE_DOUBLETAP = 2, + case GESTURE_DOUBLETAP = 2; /// Hold gesture - GESTURE_HOLD = 4, + case GESTURE_HOLD = 4; /// Drag gesture - GESTURE_DRAG = 8, + case GESTURE_DRAG = 8; /// Swipe right gesture - GESTURE_SWIPE_RIGHT = 16, + case GESTURE_SWIPE_RIGHT = 16; /// Swipe left gesture - GESTURE_SWIPE_LEFT = 32, + case GESTURE_SWIPE_LEFT = 32; /// Swipe up gesture - GESTURE_SWIPE_UP = 64, + case GESTURE_SWIPE_UP = 64; /// Swipe down gesture - GESTURE_SWIPE_DOWN = 128, + case GESTURE_SWIPE_DOWN = 128; /// Pinch in gesture - GESTURE_PINCH_IN = 256, + case GESTURE_PINCH_IN = 256; /// Pinch out gesture - GESTURE_PINCH_OUT = 512, + case GESTURE_PINCH_OUT = 512; + + public static operator int32 (Gesture self) => (int32)self; } diff --git a/raylib-beef/src/KeyboardKey.bf b/raylib-beef/src/KeyboardKey.bf index 02d7274..4b2fd55 100644 --- a/raylib-beef/src/KeyboardKey.bf +++ b/raylib-beef/src/KeyboardKey.bf @@ -8,223 +8,225 @@ namespace RaylibBeef; public enum KeyboardKey : c_int { /// Key: NULL, used for no key pressed - KEY_NULL = 0, + case KEY_NULL = 0; /// Key: ' - KEY_APOSTROPHE = 39, + case KEY_APOSTROPHE = 39; /// Key: , - KEY_COMMA = 44, + case KEY_COMMA = 44; /// Key: - - KEY_MINUS = 45, + case KEY_MINUS = 45; /// Key: . - KEY_PERIOD = 46, + case KEY_PERIOD = 46; /// Key: / - KEY_SLASH = 47, + case KEY_SLASH = 47; /// Key: 0 - KEY_ZERO = 48, + case KEY_ZERO = 48; /// Key: 1 - KEY_ONE = 49, + case KEY_ONE = 49; /// Key: 2 - KEY_TWO = 50, + case KEY_TWO = 50; /// Key: 3 - KEY_THREE = 51, + case KEY_THREE = 51; /// Key: 4 - KEY_FOUR = 52, + case KEY_FOUR = 52; /// Key: 5 - KEY_FIVE = 53, + case KEY_FIVE = 53; /// Key: 6 - KEY_SIX = 54, + case KEY_SIX = 54; /// Key: 7 - KEY_SEVEN = 55, + case KEY_SEVEN = 55; /// Key: 8 - KEY_EIGHT = 56, + case KEY_EIGHT = 56; /// Key: 9 - KEY_NINE = 57, + case KEY_NINE = 57; /// Key: ; - KEY_SEMICOLON = 59, + case KEY_SEMICOLON = 59; /// Key: = - KEY_EQUAL = 61, + case KEY_EQUAL = 61; /// Key: A | a - KEY_A = 65, + case KEY_A = 65; /// Key: B | b - KEY_B = 66, + case KEY_B = 66; /// Key: C | c - KEY_C = 67, + case KEY_C = 67; /// Key: D | d - KEY_D = 68, + case KEY_D = 68; /// Key: E | e - KEY_E = 69, + case KEY_E = 69; /// Key: F | f - KEY_F = 70, + case KEY_F = 70; /// Key: G | g - KEY_G = 71, + case KEY_G = 71; /// Key: H | h - KEY_H = 72, + case KEY_H = 72; /// Key: I | i - KEY_I = 73, + case KEY_I = 73; /// Key: J | j - KEY_J = 74, + case KEY_J = 74; /// Key: K | k - KEY_K = 75, + case KEY_K = 75; /// Key: L | l - KEY_L = 76, + case KEY_L = 76; /// Key: M | m - KEY_M = 77, + case KEY_M = 77; /// Key: N | n - KEY_N = 78, + case KEY_N = 78; /// Key: O | o - KEY_O = 79, + case KEY_O = 79; /// Key: P | p - KEY_P = 80, + case KEY_P = 80; /// Key: Q | q - KEY_Q = 81, + case KEY_Q = 81; /// Key: R | r - KEY_R = 82, + case KEY_R = 82; /// Key: S | s - KEY_S = 83, + case KEY_S = 83; /// Key: T | t - KEY_T = 84, + case KEY_T = 84; /// Key: U | u - KEY_U = 85, + case KEY_U = 85; /// Key: V | v - KEY_V = 86, + case KEY_V = 86; /// Key: W | w - KEY_W = 87, + case KEY_W = 87; /// Key: X | x - KEY_X = 88, + case KEY_X = 88; /// Key: Y | y - KEY_Y = 89, + case KEY_Y = 89; /// Key: Z | z - KEY_Z = 90, + case KEY_Z = 90; /// Key: [ - KEY_LEFT_BRACKET = 91, + case KEY_LEFT_BRACKET = 91; /// Key: '\' - KEY_BACKSLASH = 92, + case KEY_BACKSLASH = 92; /// Key: ] - KEY_RIGHT_BRACKET = 93, + case KEY_RIGHT_BRACKET = 93; /// Key: ` - KEY_GRAVE = 96, + case KEY_GRAVE = 96; /// Key: Space - KEY_SPACE = 32, + case KEY_SPACE = 32; /// Key: Esc - KEY_ESCAPE = 256, + case KEY_ESCAPE = 256; /// Key: Enter - KEY_ENTER = 257, + case KEY_ENTER = 257; /// Key: Tab - KEY_TAB = 258, + case KEY_TAB = 258; /// Key: Backspace - KEY_BACKSPACE = 259, + case KEY_BACKSPACE = 259; /// Key: Ins - KEY_INSERT = 260, + case KEY_INSERT = 260; /// Key: Del - KEY_DELETE = 261, + case KEY_DELETE = 261; /// Key: Cursor right - KEY_RIGHT = 262, + case KEY_RIGHT = 262; /// Key: Cursor left - KEY_LEFT = 263, + case KEY_LEFT = 263; /// Key: Cursor down - KEY_DOWN = 264, + case KEY_DOWN = 264; /// Key: Cursor up - KEY_UP = 265, + case KEY_UP = 265; /// Key: Page up - KEY_PAGE_UP = 266, + case KEY_PAGE_UP = 266; /// Key: Page down - KEY_PAGE_DOWN = 267, + case KEY_PAGE_DOWN = 267; /// Key: Home - KEY_HOME = 268, + case KEY_HOME = 268; /// Key: End - KEY_END = 269, + case KEY_END = 269; /// Key: Caps lock - KEY_CAPS_LOCK = 280, + case KEY_CAPS_LOCK = 280; /// Key: Scroll down - KEY_SCROLL_LOCK = 281, + case KEY_SCROLL_LOCK = 281; /// Key: Num lock - KEY_NUM_LOCK = 282, + case KEY_NUM_LOCK = 282; /// Key: Print screen - KEY_PRINT_SCREEN = 283, + case KEY_PRINT_SCREEN = 283; /// Key: Pause - KEY_PAUSE = 284, + case KEY_PAUSE = 284; /// Key: F1 - KEY_F1 = 290, + case KEY_F1 = 290; /// Key: F2 - KEY_F2 = 291, + case KEY_F2 = 291; /// Key: F3 - KEY_F3 = 292, + case KEY_F3 = 292; /// Key: F4 - KEY_F4 = 293, + case KEY_F4 = 293; /// Key: F5 - KEY_F5 = 294, + case KEY_F5 = 294; /// Key: F6 - KEY_F6 = 295, + case KEY_F6 = 295; /// Key: F7 - KEY_F7 = 296, + case KEY_F7 = 296; /// Key: F8 - KEY_F8 = 297, + case KEY_F8 = 297; /// Key: F9 - KEY_F9 = 298, + case KEY_F9 = 298; /// Key: F10 - KEY_F10 = 299, + case KEY_F10 = 299; /// Key: F11 - KEY_F11 = 300, + case KEY_F11 = 300; /// Key: F12 - KEY_F12 = 301, + case KEY_F12 = 301; /// Key: Shift left - KEY_LEFT_SHIFT = 340, + case KEY_LEFT_SHIFT = 340; /// Key: Control left - KEY_LEFT_CONTROL = 341, + case KEY_LEFT_CONTROL = 341; /// Key: Alt left - KEY_LEFT_ALT = 342, + case KEY_LEFT_ALT = 342; /// Key: Super left - KEY_LEFT_SUPER = 343, + case KEY_LEFT_SUPER = 343; /// Key: Shift right - KEY_RIGHT_SHIFT = 344, + case KEY_RIGHT_SHIFT = 344; /// Key: Control right - KEY_RIGHT_CONTROL = 345, + case KEY_RIGHT_CONTROL = 345; /// Key: Alt right - KEY_RIGHT_ALT = 346, + case KEY_RIGHT_ALT = 346; /// Key: Super right - KEY_RIGHT_SUPER = 347, + case KEY_RIGHT_SUPER = 347; /// Key: KB menu - KEY_KB_MENU = 348, + case KEY_KB_MENU = 348; /// Key: Keypad 0 - KEY_KP_0 = 320, + case KEY_KP_0 = 320; /// Key: Keypad 1 - KEY_KP_1 = 321, + case KEY_KP_1 = 321; /// Key: Keypad 2 - KEY_KP_2 = 322, + case KEY_KP_2 = 322; /// Key: Keypad 3 - KEY_KP_3 = 323, + case KEY_KP_3 = 323; /// Key: Keypad 4 - KEY_KP_4 = 324, + case KEY_KP_4 = 324; /// Key: Keypad 5 - KEY_KP_5 = 325, + case KEY_KP_5 = 325; /// Key: Keypad 6 - KEY_KP_6 = 326, + case KEY_KP_6 = 326; /// Key: Keypad 7 - KEY_KP_7 = 327, + case KEY_KP_7 = 327; /// Key: Keypad 8 - KEY_KP_8 = 328, + case KEY_KP_8 = 328; /// Key: Keypad 9 - KEY_KP_9 = 329, + case KEY_KP_9 = 329; /// Key: Keypad . - KEY_KP_DECIMAL = 330, + case KEY_KP_DECIMAL = 330; /// Key: Keypad / - KEY_KP_DIVIDE = 331, + case KEY_KP_DIVIDE = 331; /// Key: Keypad * - KEY_KP_MULTIPLY = 332, + case KEY_KP_MULTIPLY = 332; /// Key: Keypad - - KEY_KP_SUBTRACT = 333, + case KEY_KP_SUBTRACT = 333; /// Key: Keypad + - KEY_KP_ADD = 334, + case KEY_KP_ADD = 334; /// Key: Keypad Enter - KEY_KP_ENTER = 335, + case KEY_KP_ENTER = 335; /// Key: Keypad = - KEY_KP_EQUAL = 336, + case KEY_KP_EQUAL = 336; /// Key: Android back button - KEY_BACK = 4, + case KEY_BACK = 4; /// Key: Android menu button - KEY_MENU = 82, + case KEY_MENU = 82; /// Key: Android volume up button - KEY_VOLUME_UP = 24, + case KEY_VOLUME_UP = 24; /// Key: Android volume down button - KEY_VOLUME_DOWN = 25, + case KEY_VOLUME_DOWN = 25; + + public static operator int32 (KeyboardKey self) => (int32)self; } diff --git a/raylib-beef/src/MaterialMapIndex.bf b/raylib-beef/src/MaterialMapIndex.bf index 50b7e03..223ed45 100644 --- a/raylib-beef/src/MaterialMapIndex.bf +++ b/raylib-beef/src/MaterialMapIndex.bf @@ -8,25 +8,27 @@ namespace RaylibBeef; public enum MaterialMapIndex : c_int { /// Albedo material (same as: MATERIAL_MAP_DIFFUSE) - MATERIAL_MAP_ALBEDO = 0, + case MATERIAL_MAP_ALBEDO = 0; /// Metalness material (same as: MATERIAL_MAP_SPECULAR) - MATERIAL_MAP_METALNESS = 1, + case MATERIAL_MAP_METALNESS = 1; /// Normal material - MATERIAL_MAP_NORMAL = 2, + case MATERIAL_MAP_NORMAL = 2; /// Roughness material - MATERIAL_MAP_ROUGHNESS = 3, + case MATERIAL_MAP_ROUGHNESS = 3; /// Ambient occlusion material - MATERIAL_MAP_OCCLUSION = 4, + case MATERIAL_MAP_OCCLUSION = 4; /// Emission material - MATERIAL_MAP_EMISSION = 5, + case MATERIAL_MAP_EMISSION = 5; /// Heightmap material - MATERIAL_MAP_HEIGHT = 6, + case MATERIAL_MAP_HEIGHT = 6; /// Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_CUBEMAP = 7, + case MATERIAL_MAP_CUBEMAP = 7; /// Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_IRRADIANCE = 8, + case MATERIAL_MAP_IRRADIANCE = 8; /// Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_PREFILTER = 9, + case MATERIAL_MAP_PREFILTER = 9; /// Brdf material - MATERIAL_MAP_BRDF = 10, + case MATERIAL_MAP_BRDF = 10; + + public static operator int32 (MaterialMapIndex self) => (int32)self; } diff --git a/raylib-beef/src/MouseButton.bf b/raylib-beef/src/MouseButton.bf index 3874772..dbdac14 100644 --- a/raylib-beef/src/MouseButton.bf +++ b/raylib-beef/src/MouseButton.bf @@ -8,17 +8,19 @@ namespace RaylibBeef; public enum MouseButton : c_int { /// Mouse button left - MOUSE_BUTTON_LEFT = 0, + case MOUSE_BUTTON_LEFT = 0; /// Mouse button right - MOUSE_BUTTON_RIGHT = 1, + case MOUSE_BUTTON_RIGHT = 1; /// Mouse button middle (pressed wheel) - MOUSE_BUTTON_MIDDLE = 2, + case MOUSE_BUTTON_MIDDLE = 2; /// Mouse button side (advanced mouse device) - MOUSE_BUTTON_SIDE = 3, + case MOUSE_BUTTON_SIDE = 3; /// Mouse button extra (advanced mouse device) - MOUSE_BUTTON_EXTRA = 4, + case MOUSE_BUTTON_EXTRA = 4; /// Mouse button forward (advanced mouse device) - MOUSE_BUTTON_FORWARD = 5, + case MOUSE_BUTTON_FORWARD = 5; /// Mouse button back (advanced mouse device) - MOUSE_BUTTON_BACK = 6, + case MOUSE_BUTTON_BACK = 6; + + public static operator int32 (MouseButton self) => (int32)self; } diff --git a/raylib-beef/src/MouseCursor.bf b/raylib-beef/src/MouseCursor.bf index 4cffa3d..0e3b239 100644 --- a/raylib-beef/src/MouseCursor.bf +++ b/raylib-beef/src/MouseCursor.bf @@ -8,25 +8,27 @@ namespace RaylibBeef; public enum MouseCursor : c_int { /// Default pointer shape - MOUSE_CURSOR_DEFAULT = 0, + case MOUSE_CURSOR_DEFAULT = 0; /// Arrow shape - MOUSE_CURSOR_ARROW = 1, + case MOUSE_CURSOR_ARROW = 1; /// Text writing cursor shape - MOUSE_CURSOR_IBEAM = 2, + case MOUSE_CURSOR_IBEAM = 2; /// Cross shape - MOUSE_CURSOR_CROSSHAIR = 3, + case MOUSE_CURSOR_CROSSHAIR = 3; /// Pointing hand cursor - MOUSE_CURSOR_POINTING_HAND = 4, + case MOUSE_CURSOR_POINTING_HAND = 4; /// Horizontal resize/move arrow shape - MOUSE_CURSOR_RESIZE_EW = 5, + case MOUSE_CURSOR_RESIZE_EW = 5; /// Vertical resize/move arrow shape - MOUSE_CURSOR_RESIZE_NS = 6, + case MOUSE_CURSOR_RESIZE_NS = 6; /// Top-left to bottom-right diagonal resize/move arrow shape - MOUSE_CURSOR_RESIZE_NWSE = 7, + case MOUSE_CURSOR_RESIZE_NWSE = 7; /// The top-right to bottom-left diagonal resize/move arrow shape - MOUSE_CURSOR_RESIZE_NESW = 8, + case MOUSE_CURSOR_RESIZE_NESW = 8; /// The omnidirectional resize/move cursor shape - MOUSE_CURSOR_RESIZE_ALL = 9, + case MOUSE_CURSOR_RESIZE_ALL = 9; /// The operation-not-allowed shape - MOUSE_CURSOR_NOT_ALLOWED = 10, + case MOUSE_CURSOR_NOT_ALLOWED = 10; + + public static operator int32 (MouseCursor self) => (int32)self; } diff --git a/raylib-beef/src/NPatchLayout.bf b/raylib-beef/src/NPatchLayout.bf index 19ca656..a01831c 100644 --- a/raylib-beef/src/NPatchLayout.bf +++ b/raylib-beef/src/NPatchLayout.bf @@ -8,9 +8,11 @@ namespace RaylibBeef; public enum NPatchLayout : c_int { /// Npatch layout: 3x3 tiles - NPATCH_NINE_PATCH = 0, + case NPATCH_NINE_PATCH = 0; /// Npatch layout: 1x3 tiles - NPATCH_THREE_PATCH_VERTICAL = 1, + case NPATCH_THREE_PATCH_VERTICAL = 1; /// Npatch layout: 3x1 tiles - NPATCH_THREE_PATCH_HORIZONTAL = 2, + case NPATCH_THREE_PATCH_HORIZONTAL = 2; + + public static operator int32 (NPatchLayout self) => (int32)self; } diff --git a/raylib-beef/src/PixelFormat.bf b/raylib-beef/src/PixelFormat.bf index 2de8828..cdc4624 100644 --- a/raylib-beef/src/PixelFormat.bf +++ b/raylib-beef/src/PixelFormat.bf @@ -8,51 +8,53 @@ namespace RaylibBeef; public enum PixelFormat : c_int { /// 8 bit per pixel (no alpha) - PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, + case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1; /// 8*2 bpp (2 channels) - PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, + case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2; /// 16 bpp - PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, + case PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3; /// 24 bpp - PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, + case PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4; /// 16 bpp (1 bit alpha) - PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, + case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5; /// 16 bpp (4 bit alpha) - PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, + case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6; /// 32 bpp - PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, + case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7; /// 32 bpp (1 channel - float) - PIXELFORMAT_UNCOMPRESSED_R32 = 8, + case PIXELFORMAT_UNCOMPRESSED_R32 = 8; /// 32*3 bpp (3 channels - float) - PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, + case PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9; /// 32*4 bpp (4 channels - float) - PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, + case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10; /// 16 bpp (1 channel - half float) - PIXELFORMAT_UNCOMPRESSED_R16 = 11, + case PIXELFORMAT_UNCOMPRESSED_R16 = 11; /// 16*3 bpp (3 channels - half float) - PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12, + case PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12; /// 16*4 bpp (4 channels - half float) - PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13, + case PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13; /// 4 bpp (no alpha) - PIXELFORMAT_COMPRESSED_DXT1_RGB = 14, + case PIXELFORMAT_COMPRESSED_DXT1_RGB = 14; /// 4 bpp (1 bit alpha) - PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15, + case PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15; /// 8 bpp - PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16, + case PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16; /// 8 bpp - PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17, + case PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17; /// 4 bpp - PIXELFORMAT_COMPRESSED_ETC1_RGB = 18, + case PIXELFORMAT_COMPRESSED_ETC1_RGB = 18; /// 4 bpp - PIXELFORMAT_COMPRESSED_ETC2_RGB = 19, + case PIXELFORMAT_COMPRESSED_ETC2_RGB = 19; /// 8 bpp - PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20, + case PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20; /// 4 bpp - PIXELFORMAT_COMPRESSED_PVRT_RGB = 21, + case PIXELFORMAT_COMPRESSED_PVRT_RGB = 21; /// 4 bpp - PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22, + case PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22; /// 8 bpp - PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23, + case PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23; /// 2 bpp - PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24, + case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24; + + public static operator int32 (PixelFormat self) => (int32)self; } diff --git a/raylib-beef/src/Raylib.bf b/raylib-beef/src/Raylib.bf index 10958ed..3264cef 100644 --- a/raylib-beef/src/Raylib.bf +++ b/raylib-beef/src/Raylib.bf @@ -99,7 +99,7 @@ public static class Raylib /// Initialize window and OpenGL context [CLink] - public static extern void InitWindow(int32 width, int32 height, char8 * title); + public static extern void InitWindow(int32 width, int32 height, char8 *title); /// Close window and unload OpenGL context [CLink] @@ -140,14 +140,17 @@ public static class Raylib /// Check if one specific window flag is enabled [CLink] public static extern bool IsWindowState(int32 flag); + public static bool IsWindowState(ConfigFlags flag) => IsWindowState((int32)flag); /// Set window configuration state using flags (only PLATFORM_DESKTOP) [CLink] public static extern void SetWindowState(int32 flags); + public static void SetWindowState(ConfigFlags flag) => SetWindowState((int32)flag); /// Clear window configuration state flags [CLink] public static extern void ClearWindowState(int32 flags); + public static void ClearWindowState(ConfigFlags flag) => ClearWindowState((int32)flag); /// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) [CLink] @@ -171,11 +174,11 @@ public static class Raylib /// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP) [CLink] - public static extern void SetWindowIcons(Image * images, int32 count); + public static extern void SetWindowIcons(Image *images, int32 count); /// Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB) [CLink] - public static extern void SetWindowTitle(char8 * title); + public static extern void SetWindowTitle(char8 *title); /// Set window position on screen (only PLATFORM_DESKTOP) [CLink] @@ -271,7 +274,7 @@ public static class Raylib /// Set clipboard text content [CLink] - public static extern void SetClipboardText(char8 * text); + public static extern void SetClipboardText(char8 *text); /// Get clipboard text content [CLink] @@ -336,6 +339,7 @@ public static class Raylib /// Begin blending mode (alpha, additive, multiplied, subtract, custom) [CLink] public static extern void BeginBlendMode(int32 mode); + public static void BeginBlendMode(BlendMode mode) => BeginBlendMode((int32)mode); /// End blending mode (reset to default: alpha blending) [CLink] @@ -355,11 +359,11 @@ public static class Raylib /// Load shader from files and bind default locations [CLink] - public static extern Shader LoadShader(char8 * vsFileName, char8 * fsFileName); + public static extern Shader LoadShader(char8 *vsFileName, char8 *fsFileName); /// Load shader from code strings and bind default locations [CLink] - public static extern Shader LoadShaderFromMemory(char8 * vsCode, char8 * fsCode); + public static extern Shader LoadShaderFromMemory(char8 *vsCode, char8 *fsCode); /// Set target FPS (maximum) [CLink] @@ -403,27 +407,29 @@ public static class Raylib /// Unload random values sequence [CLink] - public static extern void UnloadRandomSequence(int32 * sequence); + public static extern void UnloadRandomSequence(int32 *sequence); /// Takes a screenshot of current screen (filename extension defines format) [CLink] - public static extern void TakeScreenshot(char8 * fileName); + public static extern void TakeScreenshot(char8 *fileName); /// Setup init configuration flags (view FLAGS) [CLink] public static extern void SetConfigFlags(int32 flags); + public static void SetConfigFlags(ConfigFlags flags) => SetConfigFlags((int32)flags); /// Open URL with default system browser (if available) [CLink] - public static extern void OpenURL(char8 * url); + public static extern void OpenURL(char8 *url); /// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) [CLink] - public static extern void TraceLog(int32 logLevel, char8 * text); + public static extern void TraceLog(int32 logLevel, char8 *text); /// Set the current threshold (minimum) log level [CLink] public static extern void SetTraceLogLevel(int32 logLevel); + public static void SetTraceLogLevel(TraceLogLevel logLevel) => SetTraceLogLevel((int32)logLevel); /// Internal memory allocator [CLink] @@ -431,11 +437,11 @@ public static class Raylib /// Internal memory reallocator [CLink] - public static extern void * MemRealloc(void * ptr, int32 size); + public static extern void * MemRealloc(void *ptr, int32 size); /// Internal memory free [CLink] - public static extern void MemFree(void * ptr); + public static extern void MemFree(void *ptr); /// Set custom trace log [CLink] @@ -459,67 +465,67 @@ public static class Raylib /// Load file data as byte array (read) [CLink] - public static extern char8 * LoadFileData(char8 * fileName, int32 * dataSize); + public static extern char8 * LoadFileData(char8 *fileName, int32 *dataSize); /// Unload file data allocated by LoadFileData() [CLink] - public static extern void UnloadFileData(char8 * data); + public static extern void UnloadFileData(char8 *data); /// Save data to file from byte array (write), returns true on success [CLink] - public static extern bool SaveFileData(char8 * fileName, void * data, int32 dataSize); + public static extern bool SaveFileData(char8 *fileName, void *data, int32 dataSize); /// Export data to code (.h), returns true on success [CLink] - public static extern bool ExportDataAsCode(char8 * data, int32 dataSize, char8 * fileName); + public static extern bool ExportDataAsCode(char8 *data, int32 dataSize, char8 *fileName); /// Load text data from file (read), returns a '\0' terminated string [CLink] - public static extern char8 * LoadFileText(char8 * fileName); + public static extern char8 * LoadFileText(char8 *fileName); /// Unload file text data allocated by LoadFileText() [CLink] - public static extern void UnloadFileText(char8 * text); + public static extern void UnloadFileText(char8 *text); /// Save text data to file (write), string must be '\0' terminated, returns true on success [CLink] - public static extern bool SaveFileText(char8 * fileName, char8 * text); + public static extern bool SaveFileText(char8 *fileName, char8 *text); /// Check if file exists [CLink] - public static extern bool FileExists(char8 * fileName); + public static extern bool FileExists(char8 *fileName); /// Check if a directory path exists [CLink] - public static extern bool DirectoryExists(char8 * dirPath); + public static extern bool DirectoryExists(char8 *dirPath); /// Check file extension (including point: .png, .wav) [CLink] - public static extern bool IsFileExtension(char8 * fileName, char8 * ext); + public static extern bool IsFileExtension(char8 *fileName, char8 *ext); /// Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) [CLink] - public static extern int32 GetFileLength(char8 * fileName); + public static extern int32 GetFileLength(char8 *fileName); /// Get pointer to extension for a filename string (includes dot: '.png') [CLink] - public static extern char8 * GetFileExtension(char8 * fileName); + public static extern char8 * GetFileExtension(char8 *fileName); /// Get pointer to filename for a path string [CLink] - public static extern char8 * GetFileName(char8 * filePath); + public static extern char8 * GetFileName(char8 *filePath); /// Get filename string without extension (uses static string) [CLink] - public static extern char8 * GetFileNameWithoutExt(char8 * filePath); + public static extern char8 * GetFileNameWithoutExt(char8 *filePath); /// Get full path for a given fileName with path (uses static string) [CLink] - public static extern char8 * GetDirectoryPath(char8 * filePath); + public static extern char8 * GetDirectoryPath(char8 *filePath); /// Get previous directory path for a given path (uses static string) [CLink] - public static extern char8 * GetPrevDirectoryPath(char8 * dirPath); + public static extern char8 * GetPrevDirectoryPath(char8 *dirPath); /// Get current working directory (uses static string) [CLink] @@ -531,19 +537,19 @@ public static class Raylib /// Change working directory, return true on success [CLink] - public static extern bool ChangeDirectory(char8 * dir); + public static extern bool ChangeDirectory(char8 *dir); /// Check if a given path is a file or a directory [CLink] - public static extern bool IsPathFile(char8 * path); + public static extern bool IsPathFile(char8 *path); /// Load directory filepaths [CLink] - public static extern FilePathList LoadDirectoryFiles(char8 * dirPath); + public static extern FilePathList LoadDirectoryFiles(char8 *dirPath); /// Load directory filepaths with extension filtering and recursive directory scan [CLink] - public static extern FilePathList LoadDirectoryFilesEx(char8 * basePath, char8 * filter, bool scanSubdirs); + public static extern FilePathList LoadDirectoryFilesEx(char8 *basePath, char8 *filter, bool scanSubdirs); /// Check if a file has been dropped into window [CLink] @@ -555,35 +561,35 @@ public static class Raylib /// Get file modification time (last write time) [CLink] - public static extern int32 GetFileModTime(char8 * fileName); + public static extern int32 GetFileModTime(char8 *fileName); /// Compress data (DEFLATE algorithm), memory must be MemFree() [CLink] - public static extern char8 * CompressData(char8 * data, int32 dataSize, int32 * compDataSize); + public static extern char8 * CompressData(char8 *data, int32 dataSize, int32 *compDataSize); /// Decompress data (DEFLATE algorithm), memory must be MemFree() [CLink] - public static extern char8 * DecompressData(char8 * compData, int32 compDataSize, int32 * dataSize); + public static extern char8 * DecompressData(char8 *compData, int32 compDataSize, int32 *dataSize); /// Encode data to Base64 string, memory must be MemFree() [CLink] - public static extern char8 * EncodeDataBase64(char8 * data, int32 dataSize, int32 * outputSize); + public static extern char8 * EncodeDataBase64(char8 *data, int32 dataSize, int32 *outputSize); /// Decode Base64 string data, memory must be MemFree() [CLink] - public static extern char8 * DecodeDataBase64(char8 * data, int32 * outputSize); + public static extern char8 * DecodeDataBase64(char8 *data, int32 *outputSize); /// Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS [CLink] - public static extern AutomationEventList LoadAutomationEventList(char8 * fileName); + public static extern AutomationEventList LoadAutomationEventList(char8 *fileName); /// Unload automation events list from file [CLink] - public static extern void UnloadAutomationEventList(AutomationEventList * list); + public static extern void UnloadAutomationEventList(AutomationEventList *list); /// Set automation event list to record to [CLink] - public static extern void SetAutomationEventList(AutomationEventList * list); + public static extern void SetAutomationEventList(AutomationEventList *list); /// Set automation event internal base frame to start recording [CLink] @@ -600,22 +606,27 @@ public static class Raylib /// Check if a key has been pressed once [CLink] public static extern bool IsKeyPressed(int32 key); + public static bool IsKeyPressed(KeyboardKey key) => IsKeyPressed((int32)key); /// Check if a key has been pressed again (Only PLATFORM_DESKTOP) [CLink] public static extern bool IsKeyPressedRepeat(int32 key); + public static bool IsKeyPressedRepeat(KeyboardKey key) => IsKeyPressedRepeat((int32)key); /// Check if a key is being pressed [CLink] public static extern bool IsKeyDown(int32 key); + public static bool IsKeyDown(KeyboardKey key) => IsKeyDown((int32)key); /// Check if a key has been released once [CLink] public static extern bool IsKeyReleased(int32 key); + public static bool IsKeyReleased(KeyboardKey key) => IsKeyReleased((int32)key); /// Check if a key is NOT being pressed [CLink] public static extern bool IsKeyUp(int32 key); + public static bool IsKeyUp(KeyboardKey key) => IsKeyUp((int32)key); /// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty [CLink] @@ -628,6 +639,7 @@ public static class Raylib /// Set a custom key to exit program (default is ESC) [CLink] public static extern void SetExitKey(int32 key); + public static void SetExitKey(KeyboardKey key) => SetExitKey((int32)key); /// Check if a gamepad is available [CLink] @@ -640,18 +652,22 @@ public static class Raylib /// Check if a gamepad button has been pressed once [CLink] public static extern bool IsGamepadButtonPressed(int32 gamepad, int32 button); + public static bool IsGamepadButtonPressed(int32 gamepad, GamepadButton button) => IsGamepadButtonPressed(gamepad, (int32)button); /// Check if a gamepad button is being pressed [CLink] public static extern bool IsGamepadButtonDown(int32 gamepad, int32 button); + public static bool IsGamepadButtonDown(int32 gamepad, GamepadButton button) => IsGamepadButtonDown(gamepad, (int32)button); /// Check if a gamepad button has been released once [CLink] public static extern bool IsGamepadButtonReleased(int32 gamepad, int32 button); + public static bool IsGamepadButtonReleased(int32 gamepad, GamepadButton button) => IsGamepadButtonReleased(gamepad, (int32)button); /// Check if a gamepad button is NOT being pressed [CLink] public static extern bool IsGamepadButtonUp(int32 gamepad, int32 button); + public static bool IsGamepadButtonUp(int32 gamepad, GamepadButton button) => IsGamepadButtonUp(gamepad, (int32)button); /// Get the last gamepad button pressed [CLink] @@ -664,26 +680,31 @@ public static class Raylib /// Get axis movement value for a gamepad axis [CLink] public static extern float GetGamepadAxisMovement(int32 gamepad, int32 axis); + public static float GetGamepadAxisMovement(int32 gamepad, GamepadAxis axis) => GetGamepadAxisMovement(gamepad, (int32)axis); /// Set internal gamepad mappings (SDL_GameControllerDB) [CLink] - public static extern int32 SetGamepadMappings(char8 * mappings); + public static extern int32 SetGamepadMappings(char8 *mappings); /// Check if a mouse button has been pressed once [CLink] public static extern bool IsMouseButtonPressed(int32 button); + public static bool IsMouseButtonPressed(MouseButton button) => IsMouseButtonPressed((int32)button); /// Check if a mouse button is being pressed [CLink] public static extern bool IsMouseButtonDown(int32 button); + public static bool IsMouseButtonDown(MouseButton button) => IsMouseButtonDown((int32)button); /// Check if a mouse button has been released once [CLink] public static extern bool IsMouseButtonReleased(int32 button); + public static bool IsMouseButtonReleased(MouseButton button) => IsMouseButtonReleased((int32)button); /// Check if a mouse button is NOT being pressed [CLink] public static extern bool IsMouseButtonUp(int32 button); + public static bool IsMouseButtonUp(MouseButton button) => IsMouseButtonUp((int32)button); /// Get mouse position X [CLink] @@ -724,6 +745,7 @@ public static class Raylib /// Set mouse cursor [CLink] public static extern void SetMouseCursor(int32 cursor); + public static void SetMouseCursor(MouseCursor cursor) => SetMouseCursor((int32)cursor); /// Get touch position X for touch point 0 (relative to screen size) [CLink] @@ -748,10 +770,12 @@ public static class Raylib /// Enable a set of gestures using flags [CLink] public static extern void SetGesturesEnabled(int32 flags); + public static void SetGesturesEnabled(Gesture flags) => SetGesturesEnabled((int32)flags); /// Check if a gesture have been detected [CLink] public static extern bool IsGestureDetected(int32 gesture); + public static bool IsGestureDetected(Gesture gesture) => IsGestureDetected((int32)gesture); /// Get latest detected gesture [CLink] @@ -779,27 +803,28 @@ public static class Raylib /// Update camera position for selected mode [CLink] - public static extern void UpdateCamera(Camera * camera, int32 mode); + public static extern void UpdateCamera(Camera *camera, int32 mode); + public static void UpdateCamera(Camera *camera, CameraMode mode) => UpdateCamera(camera, (int32)mode); /// Load image from file into CPU memory (RAM) [CLink] - public static extern Image LoadImage(char8 * fileName); + public static extern Image LoadImage(char8 *fileName); /// Load image from RAW file data [CLink] - public static extern Image LoadImageRaw(char8 * fileName, int32 width, int32 height, int32 format, int32 headerSize); + public static extern Image LoadImageRaw(char8 *fileName, int32 width, int32 height, int32 format, int32 headerSize); /// Load image from SVG file data or string with specified size [CLink] - public static extern Image LoadImageSvg(char8 * fileNameOrString, int32 width, int32 height); + public static extern Image LoadImageSvg(char8 *fileNameOrString, int32 width, int32 height); /// Load image sequence from file (frames appended to image.data) [CLink] - public static extern Image LoadImageAnim(char8 * fileName, int32 * frames); + public static extern Image LoadImageAnim(char8 *fileName, int32 *frames); /// Load image from memory buffer, fileType refers to extension: i.e. '.png' [CLink] - public static extern Image LoadImageFromMemory(char8 * fileType, char8 * fileData, int32 dataSize); + public static extern Image LoadImageFromMemory(char8 *fileType, char8 *fileData, int32 dataSize); /// Load image from screen buffer and (screenshot) [CLink] @@ -819,87 +844,87 @@ public static class Raylib /// Generate image: grayscale image from text data [CLink] - public static extern Image GenImageText(int32 width, int32 height, char8 * text); + public static extern Image GenImageText(int32 width, int32 height, char8 *text); /// Convert image data to desired format [CLink] - public static extern void ImageFormat(Image * image, int32 newFormat); + public static extern void ImageFormat(Image *image, int32 newFormat); /// Crop image depending on alpha value [CLink] - public static extern void ImageAlphaCrop(Image * image, float threshold); + public static extern void ImageAlphaCrop(Image *image, float threshold); /// Premultiply alpha channel [CLink] - public static extern void ImageAlphaPremultiply(Image * image); + public static extern void ImageAlphaPremultiply(Image *image); /// Apply Gaussian blur using a box blur approximation [CLink] - public static extern void ImageBlurGaussian(Image * image, int32 blurSize); + public static extern void ImageBlurGaussian(Image *image, int32 blurSize); /// Resize image (Bicubic scaling algorithm) [CLink] - public static extern void ImageResize(Image * image, int32 newWidth, int32 newHeight); + public static extern void ImageResize(Image *image, int32 newWidth, int32 newHeight); /// Resize image (Nearest-Neighbor scaling algorithm) [CLink] - public static extern void ImageResizeNN(Image * image, int32 newWidth, int32 newHeight); + public static extern void ImageResizeNN(Image *image, int32 newWidth, int32 newHeight); /// Compute all mipmap levels for a provided image [CLink] - public static extern void ImageMipmaps(Image * image); + public static extern void ImageMipmaps(Image *image); /// Dither image data to 16bpp or lower (Floyd-Steinberg dithering) [CLink] - public static extern void ImageDither(Image * image, int32 rBpp, int32 gBpp, int32 bBpp, int32 aBpp); + public static extern void ImageDither(Image *image, int32 rBpp, int32 gBpp, int32 bBpp, int32 aBpp); /// Flip image vertically [CLink] - public static extern void ImageFlipVertical(Image * image); + public static extern void ImageFlipVertical(Image *image); /// Flip image horizontally [CLink] - public static extern void ImageFlipHorizontal(Image * image); + public static extern void ImageFlipHorizontal(Image *image); /// Rotate image by input angle in degrees (-359 to 359) [CLink] - public static extern void ImageRotate(Image * image, int32 degrees); + public static extern void ImageRotate(Image *image, int32 degrees); /// Rotate image clockwise 90deg [CLink] - public static extern void ImageRotateCW(Image * image); + public static extern void ImageRotateCW(Image *image); /// Rotate image counter-clockwise 90deg [CLink] - public static extern void ImageRotateCCW(Image * image); + public static extern void ImageRotateCCW(Image *image); /// Modify image color: invert [CLink] - public static extern void ImageColorInvert(Image * image); + public static extern void ImageColorInvert(Image *image); /// Modify image color: grayscale [CLink] - public static extern void ImageColorGrayscale(Image * image); + public static extern void ImageColorGrayscale(Image *image); /// Modify image color: contrast (-100 to 100) [CLink] - public static extern void ImageColorContrast(Image * image, float contrast); + public static extern void ImageColorContrast(Image *image, float contrast); /// Modify image color: brightness (-255 to 255) [CLink] - public static extern void ImageColorBrightness(Image * image, int32 brightness); + public static extern void ImageColorBrightness(Image *image, int32 brightness); /// Unload color data loaded with LoadImageColors() [CLink] - public static extern void UnloadImageColors(Color * colors); + public static extern void UnloadImageColors(Color *colors); /// Unload colors palette loaded with LoadImagePalette() [CLink] - public static extern void UnloadImagePalette(Color * colors); + public static extern void UnloadImagePalette(Color *colors); /// Load texture from file into GPU memory (VRAM) [CLink] - public static extern Texture2D LoadTexture(char8 * fileName); + public static extern Texture2D LoadTexture(char8 *fileName); /// Load texture for rendering (framebuffer) [CLink] @@ -907,7 +932,7 @@ public static class Raylib /// Generate GPU mipmaps for a texture [CLink] - public static extern void GenTextureMipmaps(Texture2D * texture); + public static extern void GenTextureMipmaps(Texture2D *texture); /// Get a Color from HSV values, hue [0..360], saturation/value [0..1] [CLink] @@ -919,7 +944,7 @@ public static class Raylib /// Get Color from a source pixel pointer of certain format [CLink] - public static extern Color GetPixelColor(void * srcPtr, int32 format); + public static extern Color GetPixelColor(void *srcPtr, int32 format); /// Get pixel data size in bytes for certain format [CLink] @@ -931,27 +956,27 @@ public static class Raylib /// Load font from file into GPU memory (VRAM) [CLink] - public static extern Font LoadFont(char8 * fileName); + public static extern Font LoadFont(char8 *fileName); /// Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont [CLink] - public static extern Font LoadFontEx(char8 * fileName, int32 fontSize, int32 * codepoints, int32 codepointCount); + public static extern Font LoadFontEx(char8 *fileName, int32 fontSize, int32 *codepoints, int32 codepointCount); /// Load font from memory buffer, fileType refers to extension: i.e. '.ttf' [CLink] - public static extern Font LoadFontFromMemory(char8 * fileType, char8 * fileData, int32 dataSize, int32 fontSize, int32 * codepoints, int32 codepointCount); + public static extern Font LoadFontFromMemory(char8 *fileType, char8 *fileData, int32 dataSize, int32 fontSize, int32 *codepoints, int32 codepointCount); /// Load font data for further use [CLink] - public static extern GlyphInfo * LoadFontData(char8 * fileData, int32 dataSize, int32 fontSize, int32 * codepoints, int32 codepointCount, int32 type); + public static extern GlyphInfo * LoadFontData(char8 *fileData, int32 dataSize, int32 fontSize, int32 *codepoints, int32 codepointCount, int32 type); /// Generate image font atlas using chars info [CLink] - public static extern Image GenImageFontAtlas(GlyphInfo * glyphs, Rectangle ** glyphRecs, int32 glyphCount, int32 fontSize, int32 padding, int32 packMethod); + public static extern Image GenImageFontAtlas(GlyphInfo *glyphs, Rectangle **glyphRecs, int32 glyphCount, int32 fontSize, int32 padding, int32 packMethod); /// Unload font chars info data (RAM) [CLink] - public static extern void UnloadFontData(GlyphInfo * glyphs, int32 glyphCount); + public static extern void UnloadFontData(GlyphInfo *glyphs, int32 glyphCount); /// Draw current FPS [CLink] @@ -963,103 +988,103 @@ public static class Raylib /// Measure string width for default font [CLink] - public static extern int32 MeasureText(char8 * text, int32 fontSize); + public static extern int32 MeasureText(char8 *text, int32 fontSize); /// Load UTF-8 text encoded from codepoints array [CLink] - public static extern char8 * LoadUTF8(int32 * codepoints, int32 length); + public static extern char8 * LoadUTF8(int32 *codepoints, int32 length); /// Unload UTF-8 text encoded from codepoints array [CLink] - public static extern void UnloadUTF8(char8 * text); + public static extern void UnloadUTF8(char8 *text); /// Load all codepoints from a UTF-8 text string, codepoints count returned by parameter [CLink] - public static extern int32 * LoadCodepoints(char8 * text, int32 * count); + public static extern int32 * LoadCodepoints(char8 *text, int32 *count); /// Unload codepoints data from memory [CLink] - public static extern void UnloadCodepoints(int32 * codepoints); + public static extern void UnloadCodepoints(int32 *codepoints); /// Get total number of codepoints in a UTF-8 encoded string [CLink] - public static extern int32 GetCodepointCount(char8 * text); + public static extern int32 GetCodepointCount(char8 *text); /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure [CLink] - public static extern int32 GetCodepoint(char8 * text, int32 * codepointSize); + public static extern int32 GetCodepoint(char8 *text, int32 *codepointSize); /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure [CLink] - public static extern int32 GetCodepointNext(char8 * text, int32 * codepointSize); + public static extern int32 GetCodepointNext(char8 *text, int32 *codepointSize); /// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure [CLink] - public static extern int32 GetCodepointPrevious(char8 * text, int32 * codepointSize); + public static extern int32 GetCodepointPrevious(char8 *text, int32 *codepointSize); /// Encode one codepoint into UTF-8 byte array (array length returned as parameter) [CLink] - public static extern char8 * CodepointToUTF8(int32 codepoint, int32 * utf8Size); + public static extern char8 * CodepointToUTF8(int32 codepoint, int32 *utf8Size); /// Copy one string to another, returns bytes copied [CLink] - public static extern int32 TextCopy(char8 * dst, char8 * src); + public static extern int32 TextCopy(char8 *dst, char8 *src); /// Check if two text string are equal [CLink] - public static extern bool TextIsEqual(char8 * text1, char8 * text2); + public static extern bool TextIsEqual(char8 *text1, char8 *text2); /// Get text length, checks for '\0' ending [CLink] - public static extern int32 TextLength(char8 * text); + public static extern int32 TextLength(char8 *text); /// Text formatting with variables (sprintf() style) [CLink] - public static extern char8 * TextFormat(char8 * text); + public static extern char8 * TextFormat(char8 *text); /// Get a piece of a text string [CLink] - public static extern char8 * TextSubtext(char8 * text, int32 position, int32 length); + public static extern char8 * TextSubtext(char8 *text, int32 position, int32 length); /// Replace text string (WARNING: memory must be freed!) [CLink] - public static extern char8 * TextReplace(char8 * text, char8 * replace, char8 * by); + public static extern char8 * TextReplace(char8 *text, char8 *replace, char8 *by); /// Insert text in a position (WARNING: memory must be freed!) [CLink] - public static extern char8 * TextInsert(char8 * text, char8 * insert, int32 position); + public static extern char8 * TextInsert(char8 *text, char8 *insert, int32 position); /// Join text strings with delimiter [CLink] - public static extern char8 * TextJoin(char8 ** textList, int32 count, char8 * delimiter); + public static extern char8 * TextJoin(char8 **textList, int32 count, char8 *delimiter); /// Split text into multiple strings [CLink] - public static extern char8 ** TextSplit(char8 * text, char8 delimiter, int32 * count); + public static extern char8 ** TextSplit(char8 *text, char8 delimiter, int32 *count); /// Append text at specific position and move cursor! [CLink] - public static extern void TextAppend(char8 * text, char8 * @append, int32 * position); + public static extern void TextAppend(char8 *text, char8 *@append, int32 *position); /// Find first text occurrence within a string [CLink] - public static extern int32 TextFindIndex(char8 * text, char8 * find); + public static extern int32 TextFindIndex(char8 *text, char8 *find); /// Get upper case version of provided string [CLink] - public static extern char8 * TextToUpper(char8 * text); + public static extern char8 * TextToUpper(char8 *text); /// Get lower case version of provided string [CLink] - public static extern char8 * TextToLower(char8 * text); + public static extern char8 * TextToLower(char8 *text); /// Get Pascal case notation version of provided string [CLink] - public static extern char8 * TextToPascal(char8 * text); + public static extern char8 * TextToPascal(char8 *text); /// Get integer value from text (negative values not supported) [CLink] - public static extern int32 TextToInteger(char8 * text); + public static extern int32 TextToInteger(char8 *text); /// Draw a grid (centered at (0, 0, 0)) [CLink] @@ -1067,15 +1092,15 @@ public static class Raylib /// Load model from files (meshes and materials) [CLink] - public static extern Model LoadModel(char8 * fileName); + public static extern Model LoadModel(char8 *fileName); /// Upload mesh vertex data in GPU and provide VAO/VBO ids [CLink] - public static extern void UploadMesh(Mesh * mesh, bool dynamic); + public static extern void UploadMesh(Mesh *mesh, bool dynamic); /// Compute mesh tangents [CLink] - public static extern void GenMeshTangents(Mesh * mesh); + public static extern void GenMeshTangents(Mesh *mesh); /// Generate polygonal mesh [CLink] @@ -1115,7 +1140,7 @@ public static class Raylib /// Load materials from model file [CLink] - public static extern Material * LoadMaterials(char8 * fileName, int32 * materialCount); + public static extern Material * LoadMaterials(char8 *fileName, int32 *materialCount); /// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) [CLink] @@ -1123,15 +1148,15 @@ public static class Raylib /// Set material for a mesh [CLink] - public static extern void SetModelMeshMaterial(Model * model, int32 meshId, int32 materialId); + public static extern void SetModelMeshMaterial(Model *model, int32 meshId, int32 materialId); /// Load model animations from file [CLink] - public static extern ModelAnimation * LoadModelAnimations(char8 * fileName, int32 * animCount); + public static extern ModelAnimation * LoadModelAnimations(char8 *fileName, int32 *animCount); /// Unload animation array data [CLink] - public static extern void UnloadModelAnimations(ModelAnimation * animations, int32 animCount); + public static extern void UnloadModelAnimations(ModelAnimation *animations, int32 animCount); /// Initialize audio device and context [CLink] @@ -1155,35 +1180,35 @@ public static class Raylib /// Load wave data from file [CLink] - public static extern Wave LoadWave(char8 * fileName); + public static extern Wave LoadWave(char8 *fileName); /// Load wave from memory buffer, fileType refers to extension: i.e. '.wav' [CLink] - public static extern Wave LoadWaveFromMemory(char8 * fileType, char8 * fileData, int32 dataSize); + public static extern Wave LoadWaveFromMemory(char8 *fileType, char8 *fileData, int32 dataSize); /// Load sound from file [CLink] - public static extern Sound LoadSound(char8 * fileName); + public static extern Sound LoadSound(char8 *fileName); /// Crop a wave to defined samples range [CLink] - public static extern void WaveCrop(Wave * wave, int32 initSample, int32 finalSample); + public static extern void WaveCrop(Wave *wave, int32 initSample, int32 finalSample); /// Convert wave data to desired format [CLink] - public static extern void WaveFormat(Wave * wave, int32 sampleRate, int32 sampleSize, int32 channels); + public static extern void WaveFormat(Wave *wave, int32 sampleRate, int32 sampleSize, int32 channels); /// Unload samples data loaded with LoadWaveSamples() [CLink] - public static extern void UnloadWaveSamples(float * samples); + public static extern void UnloadWaveSamples(float *samples); /// Load music stream from file [CLink] - public static extern Music LoadMusicStream(char8 * fileName); + public static extern Music LoadMusicStream(char8 *fileName); /// Load music stream from data [CLink] - public static extern Music LoadMusicStreamFromMemory(char8 * fileType, char8 * data, int32 dataSize); + public static extern Music LoadMusicStreamFromMemory(char8 *fileType, char8 *data, int32 dataSize); /// Load audio stream (to stream raw audio pcm data) [CLink] @@ -1245,19 +1270,19 @@ public static class Raylib /// Get shader uniform location [CLink] - public static extern int32 GetShaderLocation(Shader shader, char8 * uniformName); + public static extern int32 GetShaderLocation(Shader shader, char8 *uniformName); /// Get shader attribute location [CLink] - public static extern int32 GetShaderLocationAttrib(Shader shader, char8 * attribName); + public static extern int32 GetShaderLocationAttrib(Shader shader, char8 *attribName); /// Set shader uniform value [CLink] - public static extern void SetShaderValue(Shader shader, int32 locIndex, void * value, int32 uniformType); + public static extern void SetShaderValue(Shader shader, int32 locIndex, void *value, int32 uniformType); /// Set shader uniform value vector [CLink] - public static extern void SetShaderValueV(Shader shader, int32 locIndex, void * value, int32 uniformType, int32 count); + public static extern void SetShaderValueV(Shader shader, int32 locIndex, void *value, int32 uniformType, int32 count); /// Set shader uniform value (matrix 4x4) [CLink] @@ -1309,7 +1334,7 @@ public static class Raylib /// Export automation events list as text file [CLink] - public static extern bool ExportAutomationEventList(AutomationEventList list, char8 * fileName); + public static extern bool ExportAutomationEventList(AutomationEventList list, char8 *fileName); /// Play a recorded automation event [CLink] @@ -1317,7 +1342,7 @@ public static class Raylib /// Update camera movement/rotation [CLink] - public static extern void UpdateCameraPro(Camera * camera, Vector3 movement, Vector3 rotation, float zoom); + public static extern void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); /// Set texture and rectangle to be used on shapes drawing [CLink] @@ -1345,7 +1370,7 @@ public static class Raylib /// Draw lines sequence (using gl lines) [CLink] - public static extern void DrawLineStrip(Vector2 * points, int32 pointCount, Color color); + public static extern void DrawLineStrip(Vector2 *points, int32 pointCount, Color color); /// Draw line segment cubic-bezier in-out interpolation [CLink] @@ -1449,11 +1474,11 @@ public static class Raylib /// Draw a triangle fan defined by points (first vertex is the center) [CLink] - public static extern void DrawTriangleFan(Vector2 * points, int32 pointCount, Color color); + public static extern void DrawTriangleFan(Vector2 *points, int32 pointCount, Color color); /// Draw a triangle strip defined by points [CLink] - public static extern void DrawTriangleStrip(Vector2 * points, int32 pointCount, Color color); + public static extern void DrawTriangleStrip(Vector2 *points, int32 pointCount, Color color); /// Draw a regular polygon (Vector version) [CLink] @@ -1469,23 +1494,23 @@ public static class Raylib /// Draw spline: Linear, minimum 2 points [CLink] - public static extern void DrawSplineLinear(Vector2 * points, int32 pointCount, float thick, Color color); + public static extern void DrawSplineLinear(Vector2 *points, int32 pointCount, float thick, Color color); /// Draw spline: B-Spline, minimum 4 points [CLink] - public static extern void DrawSplineBasis(Vector2 * points, int32 pointCount, float thick, Color color); + public static extern void DrawSplineBasis(Vector2 *points, int32 pointCount, float thick, Color color); /// Draw spline: Catmull-Rom, minimum 4 points [CLink] - public static extern void DrawSplineCatmullRom(Vector2 * points, int32 pointCount, float thick, Color color); + public static extern void DrawSplineCatmullRom(Vector2 *points, int32 pointCount, float thick, Color color); /// Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] [CLink] - public static extern void DrawSplineBezierQuadratic(Vector2 * points, int32 pointCount, float thick, Color color); + public static extern void DrawSplineBezierQuadratic(Vector2 *points, int32 pointCount, float thick, Color color); /// Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] [CLink] - public static extern void DrawSplineBezierCubic(Vector2 * points, int32 pointCount, float thick, Color color); + public static extern void DrawSplineBezierCubic(Vector2 *points, int32 pointCount, float thick, Color color); /// Draw spline segment: Linear, 2 points [CLink] @@ -1553,11 +1578,11 @@ public static class Raylib /// Check if point is within a polygon described by array of vertices [CLink] - public static extern bool CheckCollisionPointPoly(Vector2 point, Vector2 * points, int32 pointCount); + public static extern bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int32 pointCount); /// Check the collision between two lines defined by two points each, returns collision point by reference [CLink] - public static extern bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 * collisionPoint); + public static extern bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); /// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] [CLink] @@ -1581,15 +1606,15 @@ public static class Raylib /// Export image data to file, returns true on success [CLink] - public static extern bool ExportImage(Image image, char8 * fileName); + public static extern bool ExportImage(Image image, char8 *fileName); /// Export image to memory buffer [CLink] - public static extern char8 * ExportImageToMemory(Image image, char8 * fileType, int32 * fileSize); + public static extern char8 * ExportImageToMemory(Image image, char8 *fileType, int32 *fileSize); /// Export image as code file defining an array of bytes, returns true on success [CLink] - public static extern bool ExportImageAsCode(Image image, char8 * fileName); + public static extern bool ExportImageAsCode(Image image, char8 *fileName); /// Generate image: plain color [CLink] @@ -1621,39 +1646,39 @@ public static class Raylib /// Create an image from text (default font) [CLink] - public static extern Image ImageText(char8 * text, int32 fontSize, Color color); + public static extern Image ImageText(char8 *text, int32 fontSize, Color color); /// Create an image from text (custom sprite font) [CLink] - public static extern Image ImageTextEx(Font font, char8 * text, float fontSize, float spacing, Color tint); + public static extern Image ImageTextEx(Font font, char8 *text, float fontSize, float spacing, Color tint); /// Convert image to POT (power-of-two) [CLink] - public static extern void ImageToPOT(Image * image, Color fill); + public static extern void ImageToPOT(Image *image, Color fill); /// Crop an image to a defined rectangle [CLink] - public static extern void ImageCrop(Image * image, Rectangle crop); + public static extern void ImageCrop(Image *image, Rectangle crop); /// Clear alpha channel to desired color [CLink] - public static extern void ImageAlphaClear(Image * image, Color color, float threshold); + public static extern void ImageAlphaClear(Image *image, Color color, float threshold); /// Apply alpha mask to image [CLink] - public static extern void ImageAlphaMask(Image * image, Image alphaMask); + public static extern void ImageAlphaMask(Image *image, Image alphaMask); /// Resize canvas and fill with color [CLink] - public static extern void ImageResizeCanvas(Image * image, int32 newWidth, int32 newHeight, int32 offsetX, int32 offsetY, Color fill); + public static extern void ImageResizeCanvas(Image *image, int32 newWidth, int32 newHeight, int32 offsetX, int32 offsetY, Color fill); /// Modify image color: tint [CLink] - public static extern void ImageColorTint(Image * image, Color color); + public static extern void ImageColorTint(Image *image, Color color); /// Modify image color: replace color [CLink] - public static extern void ImageColorReplace(Image * image, Color color, Color replace); + public static extern void ImageColorReplace(Image *image, Color color, Color replace); /// Load color data from image as a Color array (RGBA - 32bit) [CLink] @@ -1661,7 +1686,7 @@ public static class Raylib /// Load colors palette from image as a Color array (RGBA - 32bit) [CLink] - public static extern Color * LoadImagePalette(Image image, int32 maxPaletteSize, int32 * colorCount); + public static extern Color * LoadImagePalette(Image image, int32 maxPaletteSize, int32 *colorCount); /// Get image alpha border rectangle [CLink] @@ -1673,67 +1698,67 @@ public static class Raylib /// Clear image background with given color [CLink] - public static extern void ImageClearBackground(Image * dst, Color color); + public static extern void ImageClearBackground(Image *dst, Color color); /// Draw pixel within an image [CLink] - public static extern void ImageDrawPixel(Image * dst, int32 posX, int32 posY, Color color); + public static extern void ImageDrawPixel(Image *dst, int32 posX, int32 posY, Color color); /// Draw pixel within an image (Vector version) [CLink] - public static extern void ImageDrawPixelV(Image * dst, Vector2 position, Color color); + public static extern void ImageDrawPixelV(Image *dst, Vector2 position, Color color); /// Draw line within an image [CLink] - public static extern void ImageDrawLine(Image * dst, int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, Color color); + public static extern void ImageDrawLine(Image *dst, int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, Color color); /// Draw line within an image (Vector version) [CLink] - public static extern void ImageDrawLineV(Image * dst, Vector2 start, Vector2 end, Color color); + public static extern void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); /// Draw a filled circle within an image [CLink] - public static extern void ImageDrawCircle(Image * dst, int32 centerX, int32 centerY, int32 radius, Color color); + public static extern void ImageDrawCircle(Image *dst, int32 centerX, int32 centerY, int32 radius, Color color); /// Draw a filled circle within an image (Vector version) [CLink] - public static extern void ImageDrawCircleV(Image * dst, Vector2 center, int32 radius, Color color); + public static extern void ImageDrawCircleV(Image *dst, Vector2 center, int32 radius, Color color); /// Draw circle outline within an image [CLink] - public static extern void ImageDrawCircleLines(Image * dst, int32 centerX, int32 centerY, int32 radius, Color color); + public static extern void ImageDrawCircleLines(Image *dst, int32 centerX, int32 centerY, int32 radius, Color color); /// Draw circle outline within an image (Vector version) [CLink] - public static extern void ImageDrawCircleLinesV(Image * dst, Vector2 center, int32 radius, Color color); + public static extern void ImageDrawCircleLinesV(Image *dst, Vector2 center, int32 radius, Color color); /// Draw rectangle within an image [CLink] - public static extern void ImageDrawRectangle(Image * dst, int32 posX, int32 posY, int32 width, int32 height, Color color); + public static extern void ImageDrawRectangle(Image *dst, int32 posX, int32 posY, int32 width, int32 height, Color color); /// Draw rectangle within an image (Vector version) [CLink] - public static extern void ImageDrawRectangleV(Image * dst, Vector2 position, Vector2 size, Color color); + public static extern void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); /// Draw rectangle within an image [CLink] - public static extern void ImageDrawRectangleRec(Image * dst, Rectangle rec, Color color); + public static extern void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); /// Draw rectangle lines within an image [CLink] - public static extern void ImageDrawRectangleLines(Image * dst, Rectangle rec, int32 thick, Color color); + public static extern void ImageDrawRectangleLines(Image *dst, Rectangle rec, int32 thick, Color color); /// Draw a source image within a destination image (tint applied to source) [CLink] - public static extern void ImageDraw(Image * dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); + public static extern void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); /// Draw text (using default font) within an image (destination) [CLink] - public static extern void ImageDrawText(Image * dst, char8 * text, int32 posX, int32 posY, int32 fontSize, Color color); + public static extern void ImageDrawText(Image *dst, char8 *text, int32 posX, int32 posY, int32 fontSize, Color color); /// Draw text (custom sprite font) within an image (destination) [CLink] - public static extern void ImageDrawTextEx(Image * dst, Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); + public static extern void ImageDrawTextEx(Image *dst, Font font, char8 *text, Vector2 position, float fontSize, float spacing, Color tint); /// Load texture from image data [CLink] @@ -1761,11 +1786,11 @@ public static class Raylib /// Update GPU texture with new data [CLink] - public static extern void UpdateTexture(Texture2D texture, void * pixels); + public static extern void UpdateTexture(Texture2D texture, void *pixels); /// Update GPU texture rectangle with new data [CLink] - public static extern void UpdateTextureRec(Texture2D texture, Rectangle rec, void * pixels); + public static extern void UpdateTextureRec(Texture2D texture, Rectangle rec, void *pixels); /// Set texture scaling filter mode [CLink] @@ -1841,7 +1866,7 @@ public static class Raylib /// Set color formatted into destination pixel pointer [CLink] - public static extern void SetPixelColor(void * dstPtr, Color color, int32 format); + public static extern void SetPixelColor(void *dstPtr, Color color, int32 format); /// Load font from Image (XNA style) [CLink] @@ -1857,19 +1882,19 @@ public static class Raylib /// Export font as code file, returns true on success [CLink] - public static extern bool ExportFontAsCode(Font font, char8 * fileName); + public static extern bool ExportFontAsCode(Font font, char8 *fileName); /// Draw text (using default font) [CLink] - public static extern void DrawText(char8 * text, int32 posX, int32 posY, int32 fontSize, Color color); + public static extern void DrawText(char8 *text, int32 posX, int32 posY, int32 fontSize, Color color); /// Draw text using font and additional parameters [CLink] - public static extern void DrawTextEx(Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); + public static extern void DrawTextEx(Font font, char8 *text, Vector2 position, float fontSize, float spacing, Color tint); /// Draw text using Font and pro parameters (rotation) [CLink] - public static extern void DrawTextPro(Font font, char8 * text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); + public static extern void DrawTextPro(Font font, char8 *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); /// Draw one character (codepoint) [CLink] @@ -1877,11 +1902,11 @@ public static class Raylib /// Draw multiple character (codepoint) [CLink] - public static extern void DrawTextCodepoints(Font font, int32 * codepoints, int32 codepointCount, Vector2 position, float fontSize, float spacing, Color tint); + public static extern void DrawTextCodepoints(Font font, int32 *codepoints, int32 codepointCount, Vector2 position, float fontSize, float spacing, Color tint); /// Measure string size for Font [CLink] - public static extern Vector2 MeasureTextEx(Font font, char8 * text, float fontSize, float spacing); + public static extern Vector2 MeasureTextEx(Font font, char8 *text, float fontSize, float spacing); /// Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found [CLink] @@ -1913,7 +1938,7 @@ public static class Raylib /// Draw a triangle strip defined by points [CLink] - public static extern void DrawTriangleStrip3D(Vector3 * points, int32 pointCount, Color color); + public static extern void DrawTriangleStrip3D(Vector3 *points, int32 pointCount, Color color); /// Draw cube [CLink] @@ -2025,7 +2050,7 @@ public static class Raylib /// Update mesh vertex data in GPU for a specific buffer index [CLink] - public static extern void UpdateMeshBuffer(Mesh mesh, int32 index, void * data, int32 dataSize, int32 offset); + public static extern void UpdateMeshBuffer(Mesh mesh, int32 index, void *data, int32 dataSize, int32 offset); /// Unload mesh data from CPU and GPU [CLink] @@ -2037,11 +2062,11 @@ public static class Raylib /// Draw multiple mesh instances with material and different transforms [CLink] - public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix * transforms, int32 instances); + public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int32 instances); /// Export mesh data to file, returns true on success [CLink] - public static extern bool ExportMesh(Mesh mesh, char8 * fileName); + public static extern bool ExportMesh(Mesh mesh, char8 *fileName); /// Compute mesh bounding box limits [CLink] @@ -2065,7 +2090,7 @@ public static class Raylib /// Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) [CLink] - public static extern void SetMaterialTexture(Material * material, int32 mapType, Texture2D texture); + public static extern void SetMaterialTexture(Material *material, int32 mapType, Texture2D texture); /// Update model animation pose [CLink] @@ -2129,7 +2154,7 @@ public static class Raylib /// Update sound buffer with new data [CLink] - public static extern void UpdateSound(Sound sound, void * data, int32 sampleCount); + public static extern void UpdateSound(Sound sound, void *data, int32 sampleCount); /// Unload wave data [CLink] @@ -2145,11 +2170,11 @@ public static class Raylib /// Export wave data to file, returns true on success [CLink] - public static extern bool ExportWave(Wave wave, char8 * fileName); + public static extern bool ExportWave(Wave wave, char8 *fileName); /// Export wave sample data to code (.h), returns true on success [CLink] - public static extern bool ExportWaveAsCode(Wave wave, char8 * fileName); + public static extern bool ExportWaveAsCode(Wave wave, char8 *fileName); /// Play a sound [CLink] @@ -2257,7 +2282,7 @@ public static class Raylib /// Update audio stream buffers with data [CLink] - public static extern void UpdateAudioStream(AudioStream stream, void * data, int32 frameCount); + public static extern void UpdateAudioStream(AudioStream stream, void *data, int32 frameCount); /// Check if any audio stream buffers requires refill [CLink] @@ -2351,19 +2376,19 @@ public static class Raylib /// Get shader uniform location [CLink] - public static extern int32 GetShaderLocation(in Shader shader, char8 * uniformName); + public static extern int32 GetShaderLocation(in Shader shader, char8 *uniformName); /// Get shader attribute location [CLink] - public static extern int32 GetShaderLocationAttrib(in Shader shader, char8 * attribName); + public static extern int32 GetShaderLocationAttrib(in Shader shader, char8 *attribName); /// Set shader uniform value [CLink] - public static extern void SetShaderValue(in Shader shader, int32 locIndex, void * value, int32 uniformType); + public static extern void SetShaderValue(in Shader shader, int32 locIndex, void *value, int32 uniformType); /// Set shader uniform value vector [CLink] - public static extern void SetShaderValueV(in Shader shader, int32 locIndex, void * value, int32 uniformType, int32 count); + public static extern void SetShaderValueV(in Shader shader, int32 locIndex, void *value, int32 uniformType, int32 count); /// Set shader uniform value (matrix 4x4) [CLink] @@ -2415,7 +2440,7 @@ public static class Raylib /// Export automation events list as text file [CLink] - public static extern bool ExportAutomationEventList(in AutomationEventList list, char8 * fileName); + public static extern bool ExportAutomationEventList(in AutomationEventList list, char8 *fileName); /// Play a recorded automation event [CLink] @@ -2423,7 +2448,7 @@ public static class Raylib /// Update camera movement/rotation [CLink] - public static extern void UpdateCameraPro(Camera * camera, in Vector3 movement, in Vector3 rotation, float zoom); + public static extern void UpdateCameraPro(Camera *camera, in Vector3 movement, in Vector3 rotation, float zoom); /// Set texture and rectangle to be used on shapes drawing [CLink] @@ -2451,7 +2476,7 @@ public static class Raylib /// Draw lines sequence (using gl lines) [CLink] - public static extern void DrawLineStrip(Vector2 * points, int32 pointCount, in Color color); + public static extern void DrawLineStrip(Vector2 *points, int32 pointCount, in Color color); /// Draw line segment cubic-bezier in-out interpolation [CLink] @@ -2555,11 +2580,11 @@ public static class Raylib /// Draw a triangle fan defined by points (first vertex is the center) [CLink] - public static extern void DrawTriangleFan(Vector2 * points, int32 pointCount, in Color color); + public static extern void DrawTriangleFan(Vector2 *points, int32 pointCount, in Color color); /// Draw a triangle strip defined by points [CLink] - public static extern void DrawTriangleStrip(Vector2 * points, int32 pointCount, in Color color); + public static extern void DrawTriangleStrip(Vector2 *points, int32 pointCount, in Color color); /// Draw a regular polygon (Vector version) [CLink] @@ -2575,23 +2600,23 @@ public static class Raylib /// Draw spline: Linear, minimum 2 points [CLink] - public static extern void DrawSplineLinear(Vector2 * points, int32 pointCount, float thick, in Color color); + public static extern void DrawSplineLinear(Vector2 *points, int32 pointCount, float thick, in Color color); /// Draw spline: B-Spline, minimum 4 points [CLink] - public static extern void DrawSplineBasis(Vector2 * points, int32 pointCount, float thick, in Color color); + public static extern void DrawSplineBasis(Vector2 *points, int32 pointCount, float thick, in Color color); /// Draw spline: Catmull-Rom, minimum 4 points [CLink] - public static extern void DrawSplineCatmullRom(Vector2 * points, int32 pointCount, float thick, in Color color); + public static extern void DrawSplineCatmullRom(Vector2 *points, int32 pointCount, float thick, in Color color); /// Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] [CLink] - public static extern void DrawSplineBezierQuadratic(Vector2 * points, int32 pointCount, float thick, in Color color); + public static extern void DrawSplineBezierQuadratic(Vector2 *points, int32 pointCount, float thick, in Color color); /// Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] [CLink] - public static extern void DrawSplineBezierCubic(Vector2 * points, int32 pointCount, float thick, in Color color); + public static extern void DrawSplineBezierCubic(Vector2 *points, int32 pointCount, float thick, in Color color); /// Draw spline segment: Linear, 2 points [CLink] @@ -2659,11 +2684,11 @@ public static class Raylib /// Check if point is within a polygon described by array of vertices [CLink] - public static extern bool CheckCollisionPointPoly(in Vector2 point, Vector2 * points, int32 pointCount); + public static extern bool CheckCollisionPointPoly(in Vector2 point, Vector2 *points, int32 pointCount); /// Check the collision between two lines defined by two points each, returns collision point by reference [CLink] - public static extern bool CheckCollisionLines(in Vector2 startPos1, in Vector2 endPos1, in Vector2 startPos2, in Vector2 endPos2, Vector2 * collisionPoint); + public static extern bool CheckCollisionLines(in Vector2 startPos1, in Vector2 endPos1, in Vector2 startPos2, in Vector2 endPos2, Vector2 *collisionPoint); /// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] [CLink] @@ -2687,15 +2712,15 @@ public static class Raylib /// Export image data to file, returns true on success [CLink] - public static extern bool ExportImage(in Image image, char8 * fileName); + public static extern bool ExportImage(in Image image, char8 *fileName); /// Export image to memory buffer [CLink] - public static extern char8 * ExportImageToMemory(in Image image, char8 * fileType, int32 * fileSize); + public static extern char8 * ExportImageToMemory(in Image image, char8 *fileType, int32 *fileSize); /// Export image as code file defining an array of bytes, returns true on success [CLink] - public static extern bool ExportImageAsCode(in Image image, char8 * fileName); + public static extern bool ExportImageAsCode(in Image image, char8 *fileName); /// Generate image: plain color [CLink] @@ -2727,39 +2752,39 @@ public static class Raylib /// Create an image from text (default font) [CLink] - public static extern Image ImageText(char8 * text, int32 fontSize, in Color color); + public static extern Image ImageText(char8 *text, int32 fontSize, in Color color); /// Create an image from text (custom sprite font) [CLink] - public static extern Image ImageTextEx(in Font font, char8 * text, float fontSize, float spacing, in Color tint); + public static extern Image ImageTextEx(in Font font, char8 *text, float fontSize, float spacing, in Color tint); /// Convert image to POT (power-of-two) [CLink] - public static extern void ImageToPOT(Image * image, in Color fill); + public static extern void ImageToPOT(Image *image, in Color fill); /// Crop an image to a defined rectangle [CLink] - public static extern void ImageCrop(Image * image, in Rectangle crop); + public static extern void ImageCrop(Image *image, in Rectangle crop); /// Clear alpha channel to desired color [CLink] - public static extern void ImageAlphaClear(Image * image, in Color color, float threshold); + public static extern void ImageAlphaClear(Image *image, in Color color, float threshold); /// Apply alpha mask to image [CLink] - public static extern void ImageAlphaMask(Image * image, in Image alphaMask); + public static extern void ImageAlphaMask(Image *image, in Image alphaMask); /// Resize canvas and fill with color [CLink] - public static extern void ImageResizeCanvas(Image * image, int32 newWidth, int32 newHeight, int32 offsetX, int32 offsetY, in Color fill); + public static extern void ImageResizeCanvas(Image *image, int32 newWidth, int32 newHeight, int32 offsetX, int32 offsetY, in Color fill); /// Modify image color: tint [CLink] - public static extern void ImageColorTint(Image * image, in Color color); + public static extern void ImageColorTint(Image *image, in Color color); /// Modify image color: replace color [CLink] - public static extern void ImageColorReplace(Image * image, in Color color, in Color replace); + public static extern void ImageColorReplace(Image *image, in Color color, in Color replace); /// Load color data from image as a Color array (RGBA - 32bit) [CLink] @@ -2767,7 +2792,7 @@ public static class Raylib /// Load colors palette from image as a Color array (RGBA - 32bit) [CLink] - public static extern Color * LoadImagePalette(in Image image, int32 maxPaletteSize, int32 * colorCount); + public static extern Color * LoadImagePalette(in Image image, int32 maxPaletteSize, int32 *colorCount); /// Get image alpha border rectangle [CLink] @@ -2779,67 +2804,67 @@ public static class Raylib /// Clear image background with given color [CLink] - public static extern void ImageClearBackground(Image * dst, in Color color); + public static extern void ImageClearBackground(Image *dst, in Color color); /// Draw pixel within an image [CLink] - public static extern void ImageDrawPixel(Image * dst, int32 posX, int32 posY, in Color color); + public static extern void ImageDrawPixel(Image *dst, int32 posX, int32 posY, in Color color); /// Draw pixel within an image (Vector version) [CLink] - public static extern void ImageDrawPixelV(Image * dst, in Vector2 position, in Color color); + public static extern void ImageDrawPixelV(Image *dst, in Vector2 position, in Color color); /// Draw line within an image [CLink] - public static extern void ImageDrawLine(Image * dst, int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, in Color color); + public static extern void ImageDrawLine(Image *dst, int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, in Color color); /// Draw line within an image (Vector version) [CLink] - public static extern void ImageDrawLineV(Image * dst, in Vector2 start, in Vector2 end, in Color color); + public static extern void ImageDrawLineV(Image *dst, in Vector2 start, in Vector2 end, in Color color); /// Draw a filled circle within an image [CLink] - public static extern void ImageDrawCircle(Image * dst, int32 centerX, int32 centerY, int32 radius, in Color color); + public static extern void ImageDrawCircle(Image *dst, int32 centerX, int32 centerY, int32 radius, in Color color); /// Draw a filled circle within an image (Vector version) [CLink] - public static extern void ImageDrawCircleV(Image * dst, in Vector2 center, int32 radius, in Color color); + public static extern void ImageDrawCircleV(Image *dst, in Vector2 center, int32 radius, in Color color); /// Draw circle outline within an image [CLink] - public static extern void ImageDrawCircleLines(Image * dst, int32 centerX, int32 centerY, int32 radius, in Color color); + public static extern void ImageDrawCircleLines(Image *dst, int32 centerX, int32 centerY, int32 radius, in Color color); /// Draw circle outline within an image (Vector version) [CLink] - public static extern void ImageDrawCircleLinesV(Image * dst, in Vector2 center, int32 radius, in Color color); + public static extern void ImageDrawCircleLinesV(Image *dst, in Vector2 center, int32 radius, in Color color); /// Draw rectangle within an image [CLink] - public static extern void ImageDrawRectangle(Image * dst, int32 posX, int32 posY, int32 width, int32 height, in Color color); + public static extern void ImageDrawRectangle(Image *dst, int32 posX, int32 posY, int32 width, int32 height, in Color color); /// Draw rectangle within an image (Vector version) [CLink] - public static extern void ImageDrawRectangleV(Image * dst, in Vector2 position, in Vector2 size, in Color color); + public static extern void ImageDrawRectangleV(Image *dst, in Vector2 position, in Vector2 size, in Color color); /// Draw rectangle within an image [CLink] - public static extern void ImageDrawRectangleRec(Image * dst, in Rectangle rec, in Color color); + public static extern void ImageDrawRectangleRec(Image *dst, in Rectangle rec, in Color color); /// Draw rectangle lines within an image [CLink] - public static extern void ImageDrawRectangleLines(Image * dst, in Rectangle rec, int32 thick, in Color color); + public static extern void ImageDrawRectangleLines(Image *dst, in Rectangle rec, int32 thick, in Color color); /// Draw a source image within a destination image (tint applied to source) [CLink] - public static extern void ImageDraw(Image * dst, in Image src, in Rectangle srcRec, in Rectangle dstRec, in Color tint); + public static extern void ImageDraw(Image *dst, in Image src, in Rectangle srcRec, in Rectangle dstRec, in Color tint); /// Draw text (using default font) within an image (destination) [CLink] - public static extern void ImageDrawText(Image * dst, char8 * text, int32 posX, int32 posY, int32 fontSize, in Color color); + public static extern void ImageDrawText(Image *dst, char8 *text, int32 posX, int32 posY, int32 fontSize, in Color color); /// Draw text (custom sprite font) within an image (destination) [CLink] - public static extern void ImageDrawTextEx(Image * dst, in Font font, char8 * text, in Vector2 position, float fontSize, float spacing, in Color tint); + public static extern void ImageDrawTextEx(Image *dst, in Font font, char8 *text, in Vector2 position, float fontSize, float spacing, in Color tint); /// Load texture from image data [CLink] @@ -2867,11 +2892,11 @@ public static class Raylib /// Update GPU texture with new data [CLink] - public static extern void UpdateTexture(in Texture2D texture, void * pixels); + public static extern void UpdateTexture(in Texture2D texture, void *pixels); /// Update GPU texture rectangle with new data [CLink] - public static extern void UpdateTextureRec(in Texture2D texture, in Rectangle rec, void * pixels); + public static extern void UpdateTextureRec(in Texture2D texture, in Rectangle rec, void *pixels); /// Set texture scaling filter mode [CLink] @@ -2947,7 +2972,7 @@ public static class Raylib /// Set color formatted into destination pixel pointer [CLink] - public static extern void SetPixelColor(void * dstPtr, in Color color, int32 format); + public static extern void SetPixelColor(void *dstPtr, in Color color, int32 format); /// Load font from Image (XNA style) [CLink] @@ -2963,19 +2988,19 @@ public static class Raylib /// Export font as code file, returns true on success [CLink] - public static extern bool ExportFontAsCode(in Font font, char8 * fileName); + public static extern bool ExportFontAsCode(in Font font, char8 *fileName); /// Draw text (using default font) [CLink] - public static extern void DrawText(char8 * text, int32 posX, int32 posY, int32 fontSize, in Color color); + public static extern void DrawText(char8 *text, int32 posX, int32 posY, int32 fontSize, in Color color); /// Draw text using font and additional parameters [CLink] - public static extern void DrawTextEx(in Font font, char8 * text, in Vector2 position, float fontSize, float spacing, in Color tint); + public static extern void DrawTextEx(in Font font, char8 *text, in Vector2 position, float fontSize, float spacing, in Color tint); /// Draw text using Font and pro parameters (rotation) [CLink] - public static extern void DrawTextPro(in Font font, char8 * text, in Vector2 position, in Vector2 origin, float rotation, float fontSize, float spacing, in Color tint); + public static extern void DrawTextPro(in Font font, char8 *text, in Vector2 position, in Vector2 origin, float rotation, float fontSize, float spacing, in Color tint); /// Draw one character (codepoint) [CLink] @@ -2983,11 +3008,11 @@ public static class Raylib /// Draw multiple character (codepoint) [CLink] - public static extern void DrawTextCodepoints(in Font font, int32 * codepoints, int32 codepointCount, in Vector2 position, float fontSize, float spacing, in Color tint); + public static extern void DrawTextCodepoints(in Font font, int32 *codepoints, int32 codepointCount, in Vector2 position, float fontSize, float spacing, in Color tint); /// Measure string size for Font [CLink] - public static extern Vector2 MeasureTextEx(in Font font, char8 * text, float fontSize, float spacing); + public static extern Vector2 MeasureTextEx(in Font font, char8 *text, float fontSize, float spacing); /// Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found [CLink] @@ -3019,7 +3044,7 @@ public static class Raylib /// Draw a triangle strip defined by points [CLink] - public static extern void DrawTriangleStrip3D(Vector3 * points, int32 pointCount, in Color color); + public static extern void DrawTriangleStrip3D(Vector3 *points, int32 pointCount, in Color color); /// Draw cube [CLink] @@ -3131,7 +3156,7 @@ public static class Raylib /// Update mesh vertex data in GPU for a specific buffer index [CLink] - public static extern void UpdateMeshBuffer(in Mesh mesh, int32 index, void * data, int32 dataSize, int32 offset); + public static extern void UpdateMeshBuffer(in Mesh mesh, int32 index, void *data, int32 dataSize, int32 offset); /// Unload mesh data from CPU and GPU [CLink] @@ -3143,11 +3168,11 @@ public static class Raylib /// Draw multiple mesh instances with material and different transforms [CLink] - public static extern void DrawMeshInstanced(in Mesh mesh, in Material material, Matrix * transforms, int32 instances); + public static extern void DrawMeshInstanced(in Mesh mesh, in Material material, Matrix *transforms, int32 instances); /// Export mesh data to file, returns true on success [CLink] - public static extern bool ExportMesh(in Mesh mesh, char8 * fileName); + public static extern bool ExportMesh(in Mesh mesh, char8 *fileName); /// Compute mesh bounding box limits [CLink] @@ -3171,7 +3196,7 @@ public static class Raylib /// Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) [CLink] - public static extern void SetMaterialTexture(Material * material, int32 mapType, in Texture2D texture); + public static extern void SetMaterialTexture(Material *material, int32 mapType, in Texture2D texture); /// Update model animation pose [CLink] @@ -3235,7 +3260,7 @@ public static class Raylib /// Update sound buffer with new data [CLink] - public static extern void UpdateSound(in Sound sound, void * data, int32 sampleCount); + public static extern void UpdateSound(in Sound sound, void *data, int32 sampleCount); /// Unload wave data [CLink] @@ -3251,11 +3276,11 @@ public static class Raylib /// Export wave data to file, returns true on success [CLink] - public static extern bool ExportWave(in Wave wave, char8 * fileName); + public static extern bool ExportWave(in Wave wave, char8 *fileName); /// Export wave sample data to code (.h), returns true on success [CLink] - public static extern bool ExportWaveAsCode(in Wave wave, char8 * fileName); + public static extern bool ExportWaveAsCode(in Wave wave, char8 *fileName); /// Play a sound [CLink] @@ -3363,7 +3388,7 @@ public static class Raylib /// Update audio stream buffers with data [CLink] - public static extern void UpdateAudioStream(in AudioStream stream, void * data, int32 frameCount); + public static extern void UpdateAudioStream(in AudioStream stream, void *data, int32 frameCount); /// Check if any audio stream buffers requires refill [CLink] @@ -3416,20 +3441,20 @@ public static class Raylib #endif /// Logging: Redirect trace log messages - public function void TraceLogCallback(int32 logLevel, char8 * text, void* args); + public function void TraceLogCallback(int32 logLevel, char8 *text, void*args); /// FileIO: Load binary data - public function char8 * LoadFileDataCallback(char8 * fileName, int32 * dataSize); + public function char8 * LoadFileDataCallback(char8 *fileName, int32 *dataSize); /// FileIO: Save binary data - public function bool SaveFileDataCallback(char8 * fileName, void * data, int32 dataSize); + public function bool SaveFileDataCallback(char8 *fileName, void *data, int32 dataSize); /// FileIO: Load text data - public function char8 * LoadFileTextCallback(char8 * fileName); + public function char8 * LoadFileTextCallback(char8 *fileName); /// FileIO: Save text data - public function bool SaveFileTextCallback(char8 * fileName, char8 * text); + public function bool SaveFileTextCallback(char8 *fileName, char8 *text); - public function void AudioCallback(void * bufferData, int32 frames); + public function void AudioCallback(void *bufferData, int32 frames); } diff --git a/raylib-beef/src/Raymath.bf b/raylib-beef/src/Raymath.bf index 1fc106c..804321b 100644 --- a/raylib-beef/src/Raymath.bf +++ b/raylib-beef/src/Raymath.bf @@ -63,7 +63,7 @@ public static class Raymath /// [CLink] - public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); + public static extern void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2); /// [CLink] @@ -457,7 +457,7 @@ public static class Raymath /// [CLink] - public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); + public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle); /// [CLink] @@ -819,7 +819,7 @@ public static class Raymath /// [CLink] - public static extern void QuaternionToAxisAngle(in Quaternion q, Vector3 * outAxis, float * outAngle); + public static extern void QuaternionToAxisAngle(in Quaternion q, Vector3 *outAxis, float *outAngle); /// [CLink] diff --git a/raylib-beef/src/Rlgl.bf b/raylib-beef/src/Rlgl.bf index 25b5212..5aafda3 100644 --- a/raylib-beef/src/Rlgl.bf +++ b/raylib-beef/src/Rlgl.bf @@ -252,7 +252,7 @@ public static class Rlgl /// Multiply the current matrix by another matrix [CLink] - public static extern void rlMultMatrixf(float * matf); + public static extern void rlMultMatrixf(float *matf); /// [CLink] @@ -340,7 +340,7 @@ public static class Rlgl /// Enable attribute state pointer [CLink] - public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer); + public static extern void rlEnableStatePointer(int32 vertexAttribType, void *buffer); /// Disable attribute state pointer [CLink] @@ -520,7 +520,7 @@ public static class Rlgl /// Load OpenGL extensions (loader function required) [CLink] - public static extern void rlLoadExtensions(void * loader); + public static extern void rlLoadExtensions(void *loader); /// Get current OpenGL version [CLink] @@ -560,11 +560,11 @@ public static class Rlgl /// Draw render batch data (Update->Draw->Reset) [CLink] - public static extern void rlDrawRenderBatch(rlRenderBatch * batch); + public static extern void rlDrawRenderBatch(rlRenderBatch *batch); /// Set the active render batch for rlgl (NULL for default internal) [CLink] - public static extern void rlSetRenderBatchActive(rlRenderBatch * batch); + public static extern void rlSetRenderBatchActive(rlRenderBatch *batch); /// Update and draw internal render batch [CLink] @@ -584,19 +584,19 @@ public static class Rlgl /// Load a vertex buffer attribute [CLink] - public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic); + public static extern int32 rlLoadVertexBuffer(void *buffer, int32 size, bool dynamic); /// Load a new attributes element buffer [CLink] - public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic); + public static extern int32 rlLoadVertexBufferElement(void *buffer, int32 size, bool dynamic); /// Update GPU buffer with new data [CLink] - public static extern void rlUpdateVertexBuffer(int32 bufferId, void * data, int32 dataSize, int32 offset); + public static extern void rlUpdateVertexBuffer(int32 bufferId, void *data, int32 dataSize, int32 offset); /// Update vertex buffer elements with new data [CLink] - public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset); + public static extern void rlUpdateVertexBufferElements(int32 id, void *data, int32 dataSize, int32 offset); /// [CLink] @@ -608,7 +608,7 @@ public static class Rlgl /// [CLink] - public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void * pointer); + public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void *pointer); /// [CLink] @@ -616,7 +616,7 @@ public static class Rlgl /// Set vertex attribute default value [CLink] - public static extern void rlSetVertexAttributeDefault(int32 locIndex, void * value, int32 attribType, int32 count); + public static extern void rlSetVertexAttributeDefault(int32 locIndex, void *value, int32 attribType, int32 count); /// [CLink] @@ -624,7 +624,7 @@ public static class Rlgl /// [CLink] - public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer); + public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void *buffer); /// [CLink] @@ -632,11 +632,11 @@ public static class Rlgl /// [CLink] - public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void * buffer, int32 instances); + public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void *buffer, int32 instances); /// Load texture in GPU [CLink] - public static extern int32 rlLoadTexture(void * data, int32 width, int32 height, int32 format, int32 mipmapCount); + public static extern int32 rlLoadTexture(void *data, int32 width, int32 height, int32 format, int32 mipmapCount); /// Load depth texture/renderbuffer (to be attached to fbo) [CLink] @@ -644,15 +644,15 @@ public static class Rlgl /// Load texture cubemap [CLink] - public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format); + public static extern int32 rlLoadTextureCubemap(void *data, int32 size, int32 format); /// Update GPU texture with new data [CLink] - public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void * data); + public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void *data); /// Get OpenGL internal formats [CLink] - public static extern void rlGetGlTextureFormats(int32 format, int32 * glInternalFormat, int32 * glFormat, int32 * glType); + public static extern void rlGetGlTextureFormats(int32 format, int32 *glInternalFormat, int32 *glFormat, int32 *glType); /// Get name string for pixel format [CLink] @@ -664,7 +664,7 @@ public static class Rlgl /// Generate mipmap data for selected texture [CLink] - public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 * mipmaps); + public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 *mipmaps); /// Read texture pixel data [CLink] @@ -692,11 +692,11 @@ public static class Rlgl /// Load shader from code strings [CLink] - public static extern int32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode); + public static extern int32 rlLoadShaderCode(char8 *vsCode, char8 *fsCode); /// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) [CLink] - public static extern int32 rlCompileShader(char8 * shaderCode, int32 type); + public static extern int32 rlCompileShader(char8 *shaderCode, int32 type); /// Load custom shader program [CLink] @@ -708,15 +708,15 @@ public static class Rlgl /// Get shader location uniform [CLink] - public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName); + public static extern int32 rlGetLocationUniform(int32 shaderId, char8 *uniformName); /// Get shader location attribute [CLink] - public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName); + public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 *attribName); /// Set shader value uniform [CLink] - public static extern void rlSetUniform(int32 locIndex, void * value, int32 uniformType, int32 count); + public static extern void rlSetUniform(int32 locIndex, void *value, int32 uniformType, int32 count); /// Set shader value sampler [CLink] @@ -724,7 +724,7 @@ public static class Rlgl /// Set shader currently active (id and locations) [CLink] - public static extern void rlSetShader(int32 id, int32 * locs); + public static extern void rlSetShader(int32 id, int32 *locs); /// Load compute shader program [CLink] @@ -736,7 +736,7 @@ public static class Rlgl /// Load shader storage buffer object (SSBO) [CLink] - public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint); + public static extern int32 rlLoadShaderBuffer(int32 size, void *data, int32 usageHint); /// Unload shader storage buffer object (SSBO) [CLink] @@ -744,7 +744,7 @@ public static class Rlgl /// Update SSBO buffer data [CLink] - public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset); + public static extern void rlUpdateShaderBuffer(int32 id, void *data, int32 dataSize, int32 offset); /// Bind SSBO buffer [CLink] @@ -752,7 +752,7 @@ public static class Rlgl /// Read SSBO buffer data (GPU->CPU) [CLink] - public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset); + public static extern void rlReadShaderBuffer(int32 id, void *dest, int32 count, int32 offset); /// Copy SSBO data between buffers [CLink] diff --git a/raylib-beef/src/ShaderAttributeDataType.bf b/raylib-beef/src/ShaderAttributeDataType.bf index 71ee5c9..526b1f5 100644 --- a/raylib-beef/src/ShaderAttributeDataType.bf +++ b/raylib-beef/src/ShaderAttributeDataType.bf @@ -8,11 +8,13 @@ namespace RaylibBeef; public enum ShaderAttributeDataType : c_int { /// Shader attribute type: float - SHADER_ATTRIB_FLOAT = 0, + case SHADER_ATTRIB_FLOAT = 0; /// Shader attribute type: vec2 (2 float) - SHADER_ATTRIB_VEC2 = 1, + case SHADER_ATTRIB_VEC2 = 1; /// Shader attribute type: vec3 (3 float) - SHADER_ATTRIB_VEC3 = 2, + case SHADER_ATTRIB_VEC3 = 2; /// Shader attribute type: vec4 (4 float) - SHADER_ATTRIB_VEC4 = 3, + case SHADER_ATTRIB_VEC4 = 3; + + public static operator int32 (ShaderAttributeDataType self) => (int32)self; } diff --git a/raylib-beef/src/ShaderLocationIndex.bf b/raylib-beef/src/ShaderLocationIndex.bf index c48dff9..45b9d62 100644 --- a/raylib-beef/src/ShaderLocationIndex.bf +++ b/raylib-beef/src/ShaderLocationIndex.bf @@ -8,55 +8,57 @@ namespace RaylibBeef; public enum ShaderLocationIndex : c_int { /// Shader location: vertex attribute: position - SHADER_LOC_VERTEX_POSITION = 0, + case SHADER_LOC_VERTEX_POSITION = 0; /// Shader location: vertex attribute: texcoord01 - SHADER_LOC_VERTEX_TEXCOORD01 = 1, + case SHADER_LOC_VERTEX_TEXCOORD01 = 1; /// Shader location: vertex attribute: texcoord02 - SHADER_LOC_VERTEX_TEXCOORD02 = 2, + case SHADER_LOC_VERTEX_TEXCOORD02 = 2; /// Shader location: vertex attribute: normal - SHADER_LOC_VERTEX_NORMAL = 3, + case SHADER_LOC_VERTEX_NORMAL = 3; /// Shader location: vertex attribute: tangent - SHADER_LOC_VERTEX_TANGENT = 4, + case SHADER_LOC_VERTEX_TANGENT = 4; /// Shader location: vertex attribute: color - SHADER_LOC_VERTEX_COLOR = 5, + case SHADER_LOC_VERTEX_COLOR = 5; /// Shader location: matrix uniform: model-view-projection - SHADER_LOC_MATRIX_MVP = 6, + case SHADER_LOC_MATRIX_MVP = 6; /// Shader location: matrix uniform: view (camera transform) - SHADER_LOC_MATRIX_VIEW = 7, + case SHADER_LOC_MATRIX_VIEW = 7; /// Shader location: matrix uniform: projection - SHADER_LOC_MATRIX_PROJECTION = 8, + case SHADER_LOC_MATRIX_PROJECTION = 8; /// Shader location: matrix uniform: model (transform) - SHADER_LOC_MATRIX_MODEL = 9, + case SHADER_LOC_MATRIX_MODEL = 9; /// Shader location: matrix uniform: normal - SHADER_LOC_MATRIX_NORMAL = 10, + case SHADER_LOC_MATRIX_NORMAL = 10; /// Shader location: vector uniform: view - SHADER_LOC_VECTOR_VIEW = 11, + case SHADER_LOC_VECTOR_VIEW = 11; /// Shader location: vector uniform: diffuse color - SHADER_LOC_COLOR_DIFFUSE = 12, + case SHADER_LOC_COLOR_DIFFUSE = 12; /// Shader location: vector uniform: specular color - SHADER_LOC_COLOR_SPECULAR = 13, + case SHADER_LOC_COLOR_SPECULAR = 13; /// Shader location: vector uniform: ambient color - SHADER_LOC_COLOR_AMBIENT = 14, + case SHADER_LOC_COLOR_AMBIENT = 14; /// Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) - SHADER_LOC_MAP_ALBEDO = 15, + case SHADER_LOC_MAP_ALBEDO = 15; /// Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) - SHADER_LOC_MAP_METALNESS = 16, + case SHADER_LOC_MAP_METALNESS = 16; /// Shader location: sampler2d texture: normal - SHADER_LOC_MAP_NORMAL = 17, + case SHADER_LOC_MAP_NORMAL = 17; /// Shader location: sampler2d texture: roughness - SHADER_LOC_MAP_ROUGHNESS = 18, + case SHADER_LOC_MAP_ROUGHNESS = 18; /// Shader location: sampler2d texture: occlusion - SHADER_LOC_MAP_OCCLUSION = 19, + case SHADER_LOC_MAP_OCCLUSION = 19; /// Shader location: sampler2d texture: emission - SHADER_LOC_MAP_EMISSION = 20, + case SHADER_LOC_MAP_EMISSION = 20; /// Shader location: sampler2d texture: height - SHADER_LOC_MAP_HEIGHT = 21, + case SHADER_LOC_MAP_HEIGHT = 21; /// Shader location: samplerCube texture: cubemap - SHADER_LOC_MAP_CUBEMAP = 22, + case SHADER_LOC_MAP_CUBEMAP = 22; /// Shader location: samplerCube texture: irradiance - SHADER_LOC_MAP_IRRADIANCE = 23, + case SHADER_LOC_MAP_IRRADIANCE = 23; /// Shader location: samplerCube texture: prefilter - SHADER_LOC_MAP_PREFILTER = 24, + case SHADER_LOC_MAP_PREFILTER = 24; /// Shader location: sampler2d texture: brdf - SHADER_LOC_MAP_BRDF = 25, + case SHADER_LOC_MAP_BRDF = 25; + + public static operator int32 (ShaderLocationIndex self) => (int32)self; } diff --git a/raylib-beef/src/ShaderUniformDataType.bf b/raylib-beef/src/ShaderUniformDataType.bf index 0e32a1e..0913829 100644 --- a/raylib-beef/src/ShaderUniformDataType.bf +++ b/raylib-beef/src/ShaderUniformDataType.bf @@ -8,21 +8,23 @@ namespace RaylibBeef; public enum ShaderUniformDataType : c_int { /// Shader uniform type: float - SHADER_UNIFORM_FLOAT = 0, + case SHADER_UNIFORM_FLOAT = 0; /// Shader uniform type: vec2 (2 float) - SHADER_UNIFORM_VEC2 = 1, + case SHADER_UNIFORM_VEC2 = 1; /// Shader uniform type: vec3 (3 float) - SHADER_UNIFORM_VEC3 = 2, + case SHADER_UNIFORM_VEC3 = 2; /// Shader uniform type: vec4 (4 float) - SHADER_UNIFORM_VEC4 = 3, + case SHADER_UNIFORM_VEC4 = 3; /// Shader uniform type: int - SHADER_UNIFORM_INT = 4, + case SHADER_UNIFORM_INT = 4; /// Shader uniform type: ivec2 (2 int) - SHADER_UNIFORM_IVEC2 = 5, + case SHADER_UNIFORM_IVEC2 = 5; /// Shader uniform type: ivec3 (3 int) - SHADER_UNIFORM_IVEC3 = 6, + case SHADER_UNIFORM_IVEC3 = 6; /// Shader uniform type: ivec4 (4 int) - SHADER_UNIFORM_IVEC4 = 7, + case SHADER_UNIFORM_IVEC4 = 7; /// Shader uniform type: sampler2d - SHADER_UNIFORM_SAMPLER2D = 8, + case SHADER_UNIFORM_SAMPLER2D = 8; + + public static operator int32 (ShaderUniformDataType self) => (int32)self; } diff --git a/raylib-beef/src/TextureFilter.bf b/raylib-beef/src/TextureFilter.bf index c8b9d87..f09739e 100644 --- a/raylib-beef/src/TextureFilter.bf +++ b/raylib-beef/src/TextureFilter.bf @@ -8,15 +8,17 @@ namespace RaylibBeef; public enum TextureFilter : c_int { /// No filter, just pixel approximation - TEXTURE_FILTER_POINT = 0, + case TEXTURE_FILTER_POINT = 0; /// Linear filtering - TEXTURE_FILTER_BILINEAR = 1, + case TEXTURE_FILTER_BILINEAR = 1; /// Trilinear filtering (linear with mipmaps) - TEXTURE_FILTER_TRILINEAR = 2, + case TEXTURE_FILTER_TRILINEAR = 2; /// Anisotropic filtering 4x - TEXTURE_FILTER_ANISOTROPIC_4X = 3, + case TEXTURE_FILTER_ANISOTROPIC_4X = 3; /// Anisotropic filtering 8x - TEXTURE_FILTER_ANISOTROPIC_8X = 4, + case TEXTURE_FILTER_ANISOTROPIC_8X = 4; /// Anisotropic filtering 16x - TEXTURE_FILTER_ANISOTROPIC_16X = 5, + case TEXTURE_FILTER_ANISOTROPIC_16X = 5; + + public static operator int32 (TextureFilter self) => (int32)self; } diff --git a/raylib-beef/src/TextureWrap.bf b/raylib-beef/src/TextureWrap.bf index fc9e108..1ace26a 100644 --- a/raylib-beef/src/TextureWrap.bf +++ b/raylib-beef/src/TextureWrap.bf @@ -8,11 +8,13 @@ namespace RaylibBeef; public enum TextureWrap : c_int { /// Repeats texture in tiled mode - TEXTURE_WRAP_REPEAT = 0, + case TEXTURE_WRAP_REPEAT = 0; /// Clamps texture to edge pixel in tiled mode - TEXTURE_WRAP_CLAMP = 1, + case TEXTURE_WRAP_CLAMP = 1; /// Mirrors and repeats the texture in tiled mode - TEXTURE_WRAP_MIRROR_REPEAT = 2, + case TEXTURE_WRAP_MIRROR_REPEAT = 2; /// Mirrors and clamps to border the texture in tiled mode - TEXTURE_WRAP_MIRROR_CLAMP = 3, + case TEXTURE_WRAP_MIRROR_CLAMP = 3; + + public static operator int32 (TextureWrap self) => (int32)self; } diff --git a/raylib-beef/src/TraceLogLevel.bf b/raylib-beef/src/TraceLogLevel.bf index 875176b..b326b2d 100644 --- a/raylib-beef/src/TraceLogLevel.bf +++ b/raylib-beef/src/TraceLogLevel.bf @@ -8,19 +8,21 @@ namespace RaylibBeef; public enum TraceLogLevel : c_int { /// Display all logs - LOG_ALL = 0, + case LOG_ALL = 0; /// Trace logging, intended for internal use only - LOG_TRACE = 1, + case LOG_TRACE = 1; /// Debug logging, used for internal debugging, it should be disabled on release builds - LOG_DEBUG = 2, + case LOG_DEBUG = 2; /// Info logging, used for program execution info - LOG_INFO = 3, + case LOG_INFO = 3; /// Warning logging, used on recoverable failures - LOG_WARNING = 4, + case LOG_WARNING = 4; /// Error logging, used on unrecoverable failures - LOG_ERROR = 5, + case LOG_ERROR = 5; /// Fatal logging, used to abort program: exit(EXIT_FAILURE) - LOG_FATAL = 6, + case LOG_FATAL = 6; /// Disable logging - LOG_NONE = 7, + case LOG_NONE = 7; + + public static operator int32 (TraceLogLevel self) => (int32)self; } diff --git a/raylib-beef/src/rlBlendMode.bf b/raylib-beef/src/rlBlendMode.bf index 5f313eb..8b49ebe 100644 --- a/raylib-beef/src/rlBlendMode.bf +++ b/raylib-beef/src/rlBlendMode.bf @@ -8,19 +8,21 @@ namespace RaylibBeef; public enum rlBlendMode : c_int { /// Blend textures considering alpha (default) - RL_BLEND_ALPHA = 0, + case RL_BLEND_ALPHA = 0; /// Blend textures adding colors - RL_BLEND_ADDITIVE = 1, + case RL_BLEND_ADDITIVE = 1; /// Blend textures multiplying colors - RL_BLEND_MULTIPLIED = 2, + case RL_BLEND_MULTIPLIED = 2; /// Blend textures adding colors (alternative) - RL_BLEND_ADD_COLORS = 3, + case RL_BLEND_ADD_COLORS = 3; /// Blend textures subtracting colors (alternative) - RL_BLEND_SUBTRACT_COLORS = 4, + case RL_BLEND_SUBTRACT_COLORS = 4; /// Blend premultiplied textures considering alpha - RL_BLEND_ALPHA_PREMULTIPLY = 5, + case RL_BLEND_ALPHA_PREMULTIPLY = 5; /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) - RL_BLEND_CUSTOM = 6, + case RL_BLEND_CUSTOM = 6; /// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) - RL_BLEND_CUSTOM_SEPARATE = 7, + case RL_BLEND_CUSTOM_SEPARATE = 7; + + public static operator int32 (rlBlendMode self) => (int32)self; } diff --git a/raylib-beef/src/rlCullMode.bf b/raylib-beef/src/rlCullMode.bf index cb69503..e7a2ffb 100644 --- a/raylib-beef/src/rlCullMode.bf +++ b/raylib-beef/src/rlCullMode.bf @@ -8,7 +8,9 @@ namespace RaylibBeef; public enum rlCullMode : c_int { /// - RL_CULL_FACE_FRONT = 0, + case RL_CULL_FACE_FRONT = 0; /// - RL_CULL_FACE_BACK = 1, + case RL_CULL_FACE_BACK = 1; + + public static operator int32 (rlCullMode self) => (int32)self; } diff --git a/raylib-beef/src/rlFramebufferAttachTextureType.bf b/raylib-beef/src/rlFramebufferAttachTextureType.bf index 0b4f235..23ee3fd 100644 --- a/raylib-beef/src/rlFramebufferAttachTextureType.bf +++ b/raylib-beef/src/rlFramebufferAttachTextureType.bf @@ -8,19 +8,21 @@ namespace RaylibBeef; public enum rlFramebufferAttachTextureType : c_int { /// Framebuffer texture attachment type: cubemap, +X side - RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, + case RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0; /// Framebuffer texture attachment type: cubemap, -X side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, + case RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1; /// Framebuffer texture attachment type: cubemap, +Y side - RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, + case RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2; /// Framebuffer texture attachment type: cubemap, -Y side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, + case RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3; /// Framebuffer texture attachment type: cubemap, +Z side - RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, + case RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4; /// Framebuffer texture attachment type: cubemap, -Z side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, + case RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5; /// Framebuffer texture attachment type: texture2d - RL_ATTACHMENT_TEXTURE2D = 100, + case RL_ATTACHMENT_TEXTURE2D = 100; /// Framebuffer texture attachment type: renderbuffer - RL_ATTACHMENT_RENDERBUFFER = 200, + case RL_ATTACHMENT_RENDERBUFFER = 200; + + public static operator int32 (rlFramebufferAttachTextureType self) => (int32)self; } diff --git a/raylib-beef/src/rlFramebufferAttachType.bf b/raylib-beef/src/rlFramebufferAttachType.bf index f50aea5..4ff1a0e 100644 --- a/raylib-beef/src/rlFramebufferAttachType.bf +++ b/raylib-beef/src/rlFramebufferAttachType.bf @@ -8,23 +8,25 @@ namespace RaylibBeef; public enum rlFramebufferAttachType : c_int { /// Framebuffer attachment type: color 0 - RL_ATTACHMENT_COLOR_CHANNEL0 = 0, + case RL_ATTACHMENT_COLOR_CHANNEL0 = 0; /// Framebuffer attachment type: color 1 - RL_ATTACHMENT_COLOR_CHANNEL1 = 1, + case RL_ATTACHMENT_COLOR_CHANNEL1 = 1; /// Framebuffer attachment type: color 2 - RL_ATTACHMENT_COLOR_CHANNEL2 = 2, + case RL_ATTACHMENT_COLOR_CHANNEL2 = 2; /// Framebuffer attachment type: color 3 - RL_ATTACHMENT_COLOR_CHANNEL3 = 3, + case RL_ATTACHMENT_COLOR_CHANNEL3 = 3; /// Framebuffer attachment type: color 4 - RL_ATTACHMENT_COLOR_CHANNEL4 = 4, + case RL_ATTACHMENT_COLOR_CHANNEL4 = 4; /// Framebuffer attachment type: color 5 - RL_ATTACHMENT_COLOR_CHANNEL5 = 5, + case RL_ATTACHMENT_COLOR_CHANNEL5 = 5; /// Framebuffer attachment type: color 6 - RL_ATTACHMENT_COLOR_CHANNEL6 = 6, + case RL_ATTACHMENT_COLOR_CHANNEL6 = 6; /// Framebuffer attachment type: color 7 - RL_ATTACHMENT_COLOR_CHANNEL7 = 7, + case RL_ATTACHMENT_COLOR_CHANNEL7 = 7; /// Framebuffer attachment type: depth - RL_ATTACHMENT_DEPTH = 100, + case RL_ATTACHMENT_DEPTH = 100; /// Framebuffer attachment type: stencil - RL_ATTACHMENT_STENCIL = 200, + case RL_ATTACHMENT_STENCIL = 200; + + public static operator int32 (rlFramebufferAttachType self) => (int32)self; } diff --git a/raylib-beef/src/rlGlVersion.bf b/raylib-beef/src/rlGlVersion.bf index a0384ec..98ed111 100644 --- a/raylib-beef/src/rlGlVersion.bf +++ b/raylib-beef/src/rlGlVersion.bf @@ -8,15 +8,17 @@ namespace RaylibBeef; public enum rlGlVersion : c_int { /// OpenGL 1.1 - RL_OPENGL_11 = 1, + case RL_OPENGL_11 = 1; /// OpenGL 2.1 (GLSL 120) - RL_OPENGL_21 = 2, + case RL_OPENGL_21 = 2; /// OpenGL 3.3 (GLSL 330) - RL_OPENGL_33 = 3, + case RL_OPENGL_33 = 3; /// OpenGL 4.3 (using GLSL 330) - RL_OPENGL_43 = 4, + case RL_OPENGL_43 = 4; /// OpenGL ES 2.0 (GLSL 100) - RL_OPENGL_ES_20 = 5, + case RL_OPENGL_ES_20 = 5; /// OpenGL ES 3.0 (GLSL 300 es) - RL_OPENGL_ES_30 = 6, + case RL_OPENGL_ES_30 = 6; + + public static operator int32 (rlGlVersion self) => (int32)self; } diff --git a/raylib-beef/src/rlPixelFormat.bf b/raylib-beef/src/rlPixelFormat.bf index 7cec2de..9da9869 100644 --- a/raylib-beef/src/rlPixelFormat.bf +++ b/raylib-beef/src/rlPixelFormat.bf @@ -8,51 +8,53 @@ namespace RaylibBeef; public enum rlPixelFormat : c_int { /// 8 bit per pixel (no alpha) - RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, + case RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1; /// 8*2 bpp (2 channels) - RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, + case RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2; /// 16 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, + case RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3; /// 24 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, + case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4; /// 16 bpp (1 bit alpha) - RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, + case RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5; /// 16 bpp (4 bit alpha) - RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, + case RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6; /// 32 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, + case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7; /// 32 bpp (1 channel - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8, + case RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8; /// 32*3 bpp (3 channels - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, + case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9; /// 32*4 bpp (4 channels - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, + case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10; /// 16 bpp (1 channel - half float) - RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11, + case RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11; /// 16*3 bpp (3 channels - half float) - RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12, + case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12; /// 16*4 bpp (4 channels - half float) - RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13, + case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13; /// 4 bpp (no alpha) - RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14, + case RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14; /// 4 bpp (1 bit alpha) - RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15, + case RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15; /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16, + case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16; /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17, + case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17; /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18, + case RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18; /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19, + case RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19; /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20, + case RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20; /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21, + case RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21; /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22, + case RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22; /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23, + case RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23; /// 2 bpp - RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24, + case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24; + + public static operator int32 (rlPixelFormat self) => (int32)self; } diff --git a/raylib-beef/src/rlShaderAttributeDataType.bf b/raylib-beef/src/rlShaderAttributeDataType.bf index 61896ed..6316ed2 100644 --- a/raylib-beef/src/rlShaderAttributeDataType.bf +++ b/raylib-beef/src/rlShaderAttributeDataType.bf @@ -8,11 +8,13 @@ namespace RaylibBeef; public enum rlShaderAttributeDataType : c_int { /// Shader attribute type: float - RL_SHADER_ATTRIB_FLOAT = 0, + case RL_SHADER_ATTRIB_FLOAT = 0; /// Shader attribute type: vec2 (2 float) - RL_SHADER_ATTRIB_VEC2 = 1, + case RL_SHADER_ATTRIB_VEC2 = 1; /// Shader attribute type: vec3 (3 float) - RL_SHADER_ATTRIB_VEC3 = 2, + case RL_SHADER_ATTRIB_VEC3 = 2; /// Shader attribute type: vec4 (4 float) - RL_SHADER_ATTRIB_VEC4 = 3, + case RL_SHADER_ATTRIB_VEC4 = 3; + + public static operator int32 (rlShaderAttributeDataType self) => (int32)self; } diff --git a/raylib-beef/src/rlShaderLocationIndex.bf b/raylib-beef/src/rlShaderLocationIndex.bf index 4f96ab9..e32788d 100644 --- a/raylib-beef/src/rlShaderLocationIndex.bf +++ b/raylib-beef/src/rlShaderLocationIndex.bf @@ -8,55 +8,57 @@ namespace RaylibBeef; public enum rlShaderLocationIndex : c_int { /// Shader location: vertex attribute: position - RL_SHADER_LOC_VERTEX_POSITION = 0, + case RL_SHADER_LOC_VERTEX_POSITION = 0; /// Shader location: vertex attribute: texcoord01 - RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1, + case RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1; /// Shader location: vertex attribute: texcoord02 - RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2, + case RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2; /// Shader location: vertex attribute: normal - RL_SHADER_LOC_VERTEX_NORMAL = 3, + case RL_SHADER_LOC_VERTEX_NORMAL = 3; /// Shader location: vertex attribute: tangent - RL_SHADER_LOC_VERTEX_TANGENT = 4, + case RL_SHADER_LOC_VERTEX_TANGENT = 4; /// Shader location: vertex attribute: color - RL_SHADER_LOC_VERTEX_COLOR = 5, + case RL_SHADER_LOC_VERTEX_COLOR = 5; /// Shader location: matrix uniform: model-view-projection - RL_SHADER_LOC_MATRIX_MVP = 6, + case RL_SHADER_LOC_MATRIX_MVP = 6; /// Shader location: matrix uniform: view (camera transform) - RL_SHADER_LOC_MATRIX_VIEW = 7, + case RL_SHADER_LOC_MATRIX_VIEW = 7; /// Shader location: matrix uniform: projection - RL_SHADER_LOC_MATRIX_PROJECTION = 8, + case RL_SHADER_LOC_MATRIX_PROJECTION = 8; /// Shader location: matrix uniform: model (transform) - RL_SHADER_LOC_MATRIX_MODEL = 9, + case RL_SHADER_LOC_MATRIX_MODEL = 9; /// Shader location: matrix uniform: normal - RL_SHADER_LOC_MATRIX_NORMAL = 10, + case RL_SHADER_LOC_MATRIX_NORMAL = 10; /// Shader location: vector uniform: view - RL_SHADER_LOC_VECTOR_VIEW = 11, + case RL_SHADER_LOC_VECTOR_VIEW = 11; /// Shader location: vector uniform: diffuse color - RL_SHADER_LOC_COLOR_DIFFUSE = 12, + case RL_SHADER_LOC_COLOR_DIFFUSE = 12; /// Shader location: vector uniform: specular color - RL_SHADER_LOC_COLOR_SPECULAR = 13, + case RL_SHADER_LOC_COLOR_SPECULAR = 13; /// Shader location: vector uniform: ambient color - RL_SHADER_LOC_COLOR_AMBIENT = 14, + case RL_SHADER_LOC_COLOR_AMBIENT = 14; /// Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) - RL_SHADER_LOC_MAP_ALBEDO = 15, + case RL_SHADER_LOC_MAP_ALBEDO = 15; /// Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) - RL_SHADER_LOC_MAP_METALNESS = 16, + case RL_SHADER_LOC_MAP_METALNESS = 16; /// Shader location: sampler2d texture: normal - RL_SHADER_LOC_MAP_NORMAL = 17, + case RL_SHADER_LOC_MAP_NORMAL = 17; /// Shader location: sampler2d texture: roughness - RL_SHADER_LOC_MAP_ROUGHNESS = 18, + case RL_SHADER_LOC_MAP_ROUGHNESS = 18; /// Shader location: sampler2d texture: occlusion - RL_SHADER_LOC_MAP_OCCLUSION = 19, + case RL_SHADER_LOC_MAP_OCCLUSION = 19; /// Shader location: sampler2d texture: emission - RL_SHADER_LOC_MAP_EMISSION = 20, + case RL_SHADER_LOC_MAP_EMISSION = 20; /// Shader location: sampler2d texture: height - RL_SHADER_LOC_MAP_HEIGHT = 21, + case RL_SHADER_LOC_MAP_HEIGHT = 21; /// Shader location: samplerCube texture: cubemap - RL_SHADER_LOC_MAP_CUBEMAP = 22, + case RL_SHADER_LOC_MAP_CUBEMAP = 22; /// Shader location: samplerCube texture: irradiance - RL_SHADER_LOC_MAP_IRRADIANCE = 23, + case RL_SHADER_LOC_MAP_IRRADIANCE = 23; /// Shader location: samplerCube texture: prefilter - RL_SHADER_LOC_MAP_PREFILTER = 24, + case RL_SHADER_LOC_MAP_PREFILTER = 24; /// Shader location: sampler2d texture: brdf - RL_SHADER_LOC_MAP_BRDF = 25, + case RL_SHADER_LOC_MAP_BRDF = 25; + + public static operator int32 (rlShaderLocationIndex self) => (int32)self; } diff --git a/raylib-beef/src/rlShaderUniformDataType.bf b/raylib-beef/src/rlShaderUniformDataType.bf index 2f87980..780ee00 100644 --- a/raylib-beef/src/rlShaderUniformDataType.bf +++ b/raylib-beef/src/rlShaderUniformDataType.bf @@ -8,21 +8,23 @@ namespace RaylibBeef; public enum rlShaderUniformDataType : c_int { /// Shader uniform type: float - RL_SHADER_UNIFORM_FLOAT = 0, + case RL_SHADER_UNIFORM_FLOAT = 0; /// Shader uniform type: vec2 (2 float) - RL_SHADER_UNIFORM_VEC2 = 1, + case RL_SHADER_UNIFORM_VEC2 = 1; /// Shader uniform type: vec3 (3 float) - RL_SHADER_UNIFORM_VEC3 = 2, + case RL_SHADER_UNIFORM_VEC3 = 2; /// Shader uniform type: vec4 (4 float) - RL_SHADER_UNIFORM_VEC4 = 3, + case RL_SHADER_UNIFORM_VEC4 = 3; /// Shader uniform type: int - RL_SHADER_UNIFORM_INT = 4, + case RL_SHADER_UNIFORM_INT = 4; /// Shader uniform type: ivec2 (2 int) - RL_SHADER_UNIFORM_IVEC2 = 5, + case RL_SHADER_UNIFORM_IVEC2 = 5; /// Shader uniform type: ivec3 (3 int) - RL_SHADER_UNIFORM_IVEC3 = 6, + case RL_SHADER_UNIFORM_IVEC3 = 6; /// Shader uniform type: ivec4 (4 int) - RL_SHADER_UNIFORM_IVEC4 = 7, + case RL_SHADER_UNIFORM_IVEC4 = 7; /// Shader uniform type: sampler2d - RL_SHADER_UNIFORM_SAMPLER2D = 8, + case RL_SHADER_UNIFORM_SAMPLER2D = 8; + + public static operator int32 (rlShaderUniformDataType self) => (int32)self; } diff --git a/raylib-beef/src/rlTextureFilter.bf b/raylib-beef/src/rlTextureFilter.bf index f6de2a9..2ca0d92 100644 --- a/raylib-beef/src/rlTextureFilter.bf +++ b/raylib-beef/src/rlTextureFilter.bf @@ -8,15 +8,17 @@ namespace RaylibBeef; public enum rlTextureFilter : c_int { /// No filter, just pixel approximation - RL_TEXTURE_FILTER_POINT = 0, + case RL_TEXTURE_FILTER_POINT = 0; /// Linear filtering - RL_TEXTURE_FILTER_BILINEAR = 1, + case RL_TEXTURE_FILTER_BILINEAR = 1; /// Trilinear filtering (linear with mipmaps) - RL_TEXTURE_FILTER_TRILINEAR = 2, + case RL_TEXTURE_FILTER_TRILINEAR = 2; /// Anisotropic filtering 4x - RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, + case RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3; /// Anisotropic filtering 8x - RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, + case RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4; /// Anisotropic filtering 16x - RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, + case RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5; + + public static operator int32 (rlTextureFilter self) => (int32)self; } diff --git a/raylib-beef/src/rlTraceLogLevel.bf b/raylib-beef/src/rlTraceLogLevel.bf index 7cbb099..414da1b 100644 --- a/raylib-beef/src/rlTraceLogLevel.bf +++ b/raylib-beef/src/rlTraceLogLevel.bf @@ -8,19 +8,21 @@ namespace RaylibBeef; public enum rlTraceLogLevel : c_int { /// Display all logs - RL_LOG_ALL = 0, + case RL_LOG_ALL = 0; /// Trace logging, intended for internal use only - RL_LOG_TRACE = 1, + case RL_LOG_TRACE = 1; /// Debug logging, used for internal debugging, it should be disabled on release builds - RL_LOG_DEBUG = 2, + case RL_LOG_DEBUG = 2; /// Info logging, used for program execution info - RL_LOG_INFO = 3, + case RL_LOG_INFO = 3; /// Warning logging, used on recoverable failures - RL_LOG_WARNING = 4, + case RL_LOG_WARNING = 4; /// Error logging, used on unrecoverable failures - RL_LOG_ERROR = 5, + case RL_LOG_ERROR = 5; /// Fatal logging, used to abort program: exit(EXIT_FAILURE) - RL_LOG_FATAL = 6, + case RL_LOG_FATAL = 6; /// Disable logging - RL_LOG_NONE = 7, + case RL_LOG_NONE = 7; + + public static operator int32 (rlTraceLogLevel self) => (int32)self; }