Skip to content

Commit

Permalink
Update raylib to use .ordinal
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Dec 27, 2024
1 parent 0f480a9 commit 971513f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
32 changes: 16 additions & 16 deletions libraries/raylib.c3l/raylib.c3i
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ enum MouseCursor : int
CURSOR_NOT_ALLOWED // The operation-not-allowed shape
}

$assert((int)MouseCursor.CURSOR_DEFAULT == 0);
$assert(MouseCursor.CURSOR_DEFAULT.ordinal == 0);

// Gamepad buttons
enum GamepadButton : int
Expand All @@ -441,7 +441,7 @@ enum GamepadButton : int
RIGHT_THUMB // Gamepad joystick pressed button right
}

$assert((int)GamepadButton.UNKNOWN == 0);
$assert(GamepadButton.UNKNOWN.ordinal == 0);

enum GamepadAxis : int
{
Expand All @@ -453,7 +453,7 @@ enum GamepadAxis : int
RIGHT_TRIGGER // Gamepad back trigger right, pressure level: [1..-1]
}

$assert((int)GamepadAxis.LEFT_X == 0);
$assert(GamepadAxis.LEFT_X.ordinal == 0);

// Material map index
enum MaterialMapIndex : int
Expand All @@ -471,7 +471,7 @@ enum MaterialMapIndex : int
BRDF // Brdf material
}

$assert((int)MaterialMapIndex.ALBEDO == 0);
$assert(MaterialMapIndex.ALBEDO.ordinal == 0);

// #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO
// #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS
Expand Down Expand Up @@ -507,7 +507,7 @@ enum ShaderLocationIndex : int
MAP_BRDF // Shader location: sampler2d texture: brdf
}

$assert((int)ShaderLocationIndex.VERTEX_POSITION == 0);
$assert(ShaderLocationIndex.VERTEX_POSITION.ordinal == 0);

//#define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO
//#define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS
Expand All @@ -526,7 +526,7 @@ enum ShaderUniformDataType
SAMPLER2D // Shader uniform type: sampler2d
}

$assert((int)ShaderUniformDataType.FLOAT == 0);
$assert(ShaderUniformDataType.FLOAT.ordinal == 0);

// Shader attribute data types
enum ShaderAttributeDataType
Expand All @@ -537,7 +537,7 @@ enum ShaderAttributeDataType
VEC4 // Shader attribute type: vec4 (4 float)
}

$assert((int)ShaderAttributeDataType.FLOAT == 0);
$assert(ShaderAttributeDataType.FLOAT.ordinal == 0);

// Pixel formats
// NOTE: Support depends on OpenGL version and platform
Expand Down Expand Up @@ -567,7 +567,7 @@ enum PixelFormat : int
COMPRESSED_ASTC_8X8_RGBA // 2 bpp
}

$assert((int)PixelFormat.UNCOMPRESSED_GRAYSCALE == 1);
$assert(PixelFormat.UNCOMPRESSED_GRAYSCALE.ordinal == 1);

// Texture parameters: filter mode
// NOTE 1: Filtering considers mipmaps if available in the texture
Expand All @@ -582,7 +582,7 @@ enum TextureFilter : int
ANISOTROPIC_16X, // Anisotropic filtering 16x
}

$assert((int)TextureFilter.POINT == 0);
$assert(TextureFilter.POINT.ordinal == 0);

// Texture parameters: wrap mode
enum TextureWrap
Expand All @@ -593,7 +593,7 @@ enum TextureWrap
MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
}

$assert((int)TextureWrap.REPEAT == 0);
$assert(TextureWrap.REPEAT.ordinal == 0);

// Cubemap layouts
enum CubemapLayout
Expand All @@ -606,7 +606,7 @@ enum CubemapLayout
PANORAMA // Layout is defined by a panorama image (equirectangular map)
}

$assert((int)CubemapLayout.AUTO_DETECT == 0);
$assert(CubemapLayout.AUTO_DETECT.ordinal == 0);

// Font type, defines generation method
enum FontType
Expand All @@ -616,7 +616,7 @@ enum FontType
SDF // SDF font generation, requires external shader
}

$assert((int)FontType.DEFAULT == 0);
$assert(FontType.DEFAULT.ordinal == 0);

// Color blending modes (pre-defined)
enum BlendMode : int
Expand All @@ -631,7 +631,7 @@ enum BlendMode : int
CUSTOM_SEPARATE // Blend textures using custom rgb/alpha separate src/dst factors (use set_blend_factors_separate())
}

$assert((int)BlendMode.ALPHA == 0);
$assert(BlendMode.ALPHA.ordinal == 0);


// Camera system modes
Expand All @@ -644,7 +644,7 @@ enum CameraMode
THIRD_PERSON // Third person camera
}

$assert((int)CameraMode.CUSTOM == 0);
$assert(CameraMode.CUSTOM.ordinal == 0);

// Camera projection
enum CameraProjection
Expand All @@ -653,7 +653,7 @@ enum CameraProjection
ORTHOGRAPHIC // Orthographic projection
}

$assert((int)CameraProjection.PERSPECTIVE == 0);
$assert(CameraProjection.PERSPECTIVE.ordinal == 0);

// N-patch layout
enum NPatchLayout
Expand All @@ -663,7 +663,7 @@ enum NPatchLayout
THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
}

$assert((int)NPatchLayout.NINE_PATCH == 0);
$assert(NPatchLayout.NINE_PATCH.ordinal == 0);

// Callbacks to hook some internal functions
// WARNING: These callbacks are intended for advance users
Expand Down
32 changes: 16 additions & 16 deletions libraries/raylib5.c3l/raylib.c3i
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ enum MouseCursor : int
NOT_ALLOWED // The operation-not-allowed shape
}

$assert((int)MouseCursor.DEFAULT == 0);
$assert(MouseCursor.DEFAULT.ordinal == 0);

// Gamepad buttons
enum GamepadButton : int
Expand All @@ -452,7 +452,7 @@ enum GamepadButton : int
RIGHT_THUMB // Gamepad joystick pressed button right
}

$assert((int)GamepadButton.UNKNOWN == 0);
$assert(GamepadButton.UNKNOWN.ordinal == 0);

enum GamepadAxis : int
{
Expand All @@ -464,7 +464,7 @@ enum GamepadAxis : int
RIGHT_TRIGGER // Gamepad back trigger right, pressure level: [1..-1]
}

$assert((int)GamepadAxis.LEFT_X == 0);
$assert(GamepadAxis.LEFT_X.ordinal == 0);

// Material map index
enum MaterialMapIndex : int
Expand All @@ -482,7 +482,7 @@ enum MaterialMapIndex : int
BRDF // Brdf material
}

$assert((int)MaterialMapIndex.ALBEDO == 0);
$assert(MaterialMapIndex.ALBEDO.ordinal == 0);

// #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO
// #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS
Expand Down Expand Up @@ -518,7 +518,7 @@ enum ShaderLocationIndex : int
MAP_BRDF // Shader location: sampler2d texture: brdf
}

$assert((int)ShaderLocationIndex.VERTEX_POSITION == 0);
$assert(ShaderLocationIndex.VERTEX_POSITION.ordinal == 0);

//#define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO
//#define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS
Expand All @@ -537,7 +537,7 @@ enum ShaderUniformDataType
SAMPLER2D // Shader uniform type: sampler2d
}

$assert((int)ShaderUniformDataType.FLOAT == 0);
$assert(ShaderUniformDataType.FLOAT.ordinal == 0);

// Shader attribute data types
enum ShaderAttributeDataType
Expand All @@ -548,7 +548,7 @@ enum ShaderAttributeDataType
VEC4 // Shader attribute type: vec4 (4 float)
}

$assert((int)ShaderAttributeDataType.FLOAT == 0);
$assert(ShaderAttributeDataType.FLOAT.ordinal == 0);

// Pixel formats
// NOTE: Support depends on OpenGL version and platform
Expand Down Expand Up @@ -578,7 +578,7 @@ enum PixelFormat : int
COMPRESSED_ASTC_8X8_RGBA // 2 bpp
}

$assert((int)PixelFormat.UNCOMPRESSED_GRAYSCALE == 1);
$assert(PixelFormat.UNCOMPRESSED_GRAYSCALE.ordinal == 1);

// Texture parameters: filter mode
// NOTE 1: Filtering considers mipmaps if available in the texture
Expand All @@ -593,7 +593,7 @@ enum TextureFilter : int
ANISOTROPIC_16X, // Anisotropic filtering 16x
}

$assert((int)TextureFilter.POINT == 0);
$assert(TextureFilter.POINT.ordinal == 0);

// Texture parameters: wrap mode
enum TextureWrap
Expand All @@ -604,7 +604,7 @@ enum TextureWrap
MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
}

$assert((int)TextureWrap.REPEAT == 0);
$assert(TextureWrap.REPEAT.ordinal == 0);

// Cubemap layouts
enum CubemapLayout
Expand All @@ -617,7 +617,7 @@ enum CubemapLayout
PANORAMA // Layout is defined by a panorama image (equirectangular map)
}

$assert((int)CubemapLayout.AUTO_DETECT == 0);
$assert(CubemapLayout.AUTO_DETECT.ordinal == 0);

// Font type, defines generation method
enum FontType
Expand All @@ -627,7 +627,7 @@ enum FontType
SDF // SDF font generation, requires external shader
}

$assert((int)FontType.DEFAULT == 0);
$assert(FontType.DEFAULT.ordinal == 0);

// Color blending modes (pre-defined)
enum BlendMode : int
Expand All @@ -641,7 +641,7 @@ enum BlendMode : int
CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendMode())
}

$assert((int)BlendMode.ALPHA == 0);
$assert(BlendMode.ALPHA.ordinal == 0);


// Camera system modes
Expand All @@ -654,7 +654,7 @@ enum CameraMode
THIRD_PERSON // Third person camera
}

$assert((int)CameraMode.CUSTOM == 0);
$assert(CameraMode.CUSTOM.ordinal == 0);

// Camera projection
enum CameraProjection
Expand All @@ -663,7 +663,7 @@ enum CameraProjection
ORTHOGRAPHIC // Orthographic projection
}

$assert((int)CameraProjection.PERSPECTIVE == 0);
$assert(CameraProjection.PERSPECTIVE.ordinal == 0);

// N-patch layout
enum NPatchLayout
Expand All @@ -673,7 +673,7 @@ enum NPatchLayout
THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
}

$assert((int)NPatchLayout.NINE_PATCH == 0);
$assert(NPatchLayout.NINE_PATCH.ordinal == 0);

// Callbacks to hook some internal functions
// WARNING: This callbacks are intended for advance users
Expand Down
Loading

0 comments on commit 971513f

Please sign in to comment.