Use more enums instead of ints

This commit is contained in:
Not-Nik 2024-05-31 19:52:06 +02:00
parent 0378699fcd
commit 98ced86523
Failed to generate hash of commit
4 changed files with 75 additions and 54 deletions

View file

@ -67,7 +67,7 @@ pub extern "c" fn BeginTextureMode(target: rl.RenderTexture2D) void;
pub extern "c" fn EndTextureMode() void;
pub extern "c" fn BeginShaderMode(shader: rl.Shader) void;
pub extern "c" fn EndShaderMode() void;
pub extern "c" fn BeginBlendMode(mode: c_int) void;
pub extern "c" fn BeginBlendMode(mode: rl.BlendMode) void;
pub extern "c" fn EndBlendMode() void;
pub extern "c" fn BeginScissorMode(x: c_int, y: c_int, width: c_int, height: c_int) void;
pub extern "c" fn EndScissorMode() void;
@ -193,7 +193,7 @@ pub extern "c" fn GetTouchY() c_int;
pub extern "c" fn GetTouchPosition(index: c_int) rl.Vector2;
pub extern "c" fn GetTouchPointId(index: c_int) c_int;
pub extern "c" fn GetTouchPointCount() c_int;
pub extern "c" fn SetGesturesEnabled(flags: c_uint) void;
pub extern "c" fn SetGesturesEnabled(flags: rl.Gesture) void;
pub extern "c" fn IsGestureDetected(gesture: rl.Gesture) bool;
pub extern "c" fn GetGestureDetected() rl.Gesture;
pub extern "c" fn GetGestureHoldDuration() f32;
@ -269,7 +269,7 @@ pub extern "c" fn CheckCollisionLines(startPos1: rl.Vector2, endPos1: rl.Vector2
pub extern "c" fn CheckCollisionPointLine(point: rl.Vector2, p1: rl.Vector2, p2: rl.Vector2, threshold: c_int) bool;
pub extern "c" fn GetCollisionRec(rec1: rl.Rectangle, rec2: rl.Rectangle) rl.Rectangle;
pub extern "c" fn LoadImage(fileName: [*c]const u8) rl.Image;
pub extern "c" fn LoadImageRaw(fileName: [*c]const u8, width: c_int, height: c_int, format: c_int, headerSize: c_int) rl.Image;
pub extern "c" fn LoadImageRaw(fileName: [*c]const u8, width: c_int, height: c_int, format: rl.PixelFormat, headerSize: c_int) rl.Image;
pub extern "c" fn LoadImageSvg(fileNameOrString: [*c]const u8, width: c_int, height: c_int) rl.Image;
pub extern "c" fn LoadImageAnim(fileName: [*c]const u8, frames: [*c]c_int) rl.Image;
pub extern "c" fn LoadImageAnimFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int, frames: [*c]c_int) rl.Image;
@ -294,7 +294,7 @@ pub extern "c" fn ImageCopy(image: rl.Image) rl.Image;
pub extern "c" fn ImageFromImage(image: rl.Image, rec: rl.Rectangle) rl.Image;
pub extern "c" fn ImageText(text: [*c]const u8, fontSize: c_int, color: rl.Color) rl.Image;
pub extern "c" fn ImageTextEx(font: rl.Font, text: [*c]const u8, fontSize: f32, spacing: f32, tint: rl.Color) rl.Image;
pub extern "c" fn ImageFormat(image: [*c]rl.Image, newFormat: c_int) void;
pub extern "c" fn ImageFormat(image: [*c]rl.Image, newFormat: rl.PixelFormat) void;
pub extern "c" fn ImageToPOT(image: [*c]rl.Image, fill: rl.Color) void;
pub extern "c" fn ImageCrop(image: [*c]rl.Image, crop: rl.Rectangle) void;
pub extern "c" fn ImageAlphaCrop(image: [*c]rl.Image, threshold: f32) void;
@ -343,7 +343,7 @@ pub extern "c" fn ImageDrawText(dst: [*c]rl.Image, text: [*c]const u8, posX: c_i
pub extern "c" fn ImageDrawTextEx(dst: [*c]rl.Image, font: rl.Font, text: [*c]const u8, position: rl.Vector2, fontSize: f32, spacing: f32, tint: rl.Color) void;
pub extern "c" fn LoadTexture(fileName: [*c]const u8) rl.Texture2D;
pub extern "c" fn LoadTextureFromImage(image: rl.Image) rl.Texture2D;
pub extern "c" fn LoadTextureCubemap(image: rl.Image, layout: c_int) rl.TextureCubemap;
pub extern "c" fn LoadTextureCubemap(image: rl.Image, layout: rl.CubemapLayout) rl.TextureCubemap;
pub extern "c" fn LoadRenderTexture(width: c_int, height: c_int) rl.RenderTexture2D;
pub extern "c" fn IsTextureReady(texture: rl.Texture2D) bool;
pub extern "c" fn UnloadTexture(texture: rl.Texture2D) void;
@ -352,7 +352,7 @@ pub extern "c" fn UnloadRenderTexture(target: rl.RenderTexture2D) void;
pub extern "c" fn UpdateTexture(texture: rl.Texture2D, pixels: *const anyopaque) void;
pub extern "c" fn UpdateTextureRec(texture: rl.Texture2D, rec: rl.Rectangle, pixels: *const anyopaque) void;
pub extern "c" fn GenTextureMipmaps(texture: [*c]rl.Texture2D) void;
pub extern "c" fn SetTextureFilter(texture: rl.Texture2D, filter: c_int) void;
pub extern "c" fn SetTextureFilter(texture: rl.Texture2D, filter: rl.TextureFilter) void;
pub extern "c" fn SetTextureWrap(texture: rl.Texture2D, wrap: c_int) void;
pub extern "c" fn DrawTexture(texture: rl.Texture2D, posX: c_int, posY: c_int, tint: rl.Color) void;
pub extern "c" fn DrawTextureV(texture: rl.Texture2D, position: rl.Vector2, tint: rl.Color) void;
@ -373,16 +373,16 @@ pub extern "c" fn ColorContrast(color: rl.Color, contrast: f32) rl.Color;
pub extern "c" fn ColorAlpha(color: rl.Color, alpha: f32) rl.Color;
pub extern "c" fn ColorAlphaBlend(dst: rl.Color, src: rl.Color, tint: rl.Color) rl.Color;
pub extern "c" fn GetColor(hexValue: c_uint) rl.Color;
pub extern "c" fn GetPixelColor(srcPtr: *anyopaque, format: c_int) rl.Color;
pub extern "c" fn SetPixelColor(dstPtr: *anyopaque, color: rl.Color, format: c_int) void;
pub extern "c" fn GetPixelDataSize(width: c_int, height: c_int, format: c_int) c_int;
pub extern "c" fn GetPixelColor(srcPtr: *anyopaque, format: rl.PixelFormat) rl.Color;
pub extern "c" fn SetPixelColor(dstPtr: *anyopaque, color: rl.Color, format: rl.PixelFormat) void;
pub extern "c" fn GetPixelDataSize(width: c_int, height: c_int, format: rl.PixelFormat) c_int;
pub extern "c" fn GetFontDefault() rl.Font;
pub extern "c" fn LoadFont(fileName: [*c]const u8) rl.Font;
pub extern "c" fn LoadFontEx(fileName: [*c]const u8, fontSize: c_int, codepoints: [*c]c_int, codepointCount: c_int) rl.Font;
pub extern "c" fn LoadFontFromImage(image: rl.Image, key: rl.Color, firstChar: c_int) rl.Font;
pub extern "c" fn LoadFontFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, codepoints: [*c]c_int, codepointCount: c_int) rl.Font;
pub extern "c" fn IsFontReady(font: rl.Font) bool;
pub extern "c" fn LoadFontData(fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, codepoints: [*c]c_int, codepointCount: c_int, ty: c_int) [*c]rl.GlyphInfo;
pub extern "c" fn LoadFontData(fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, codepoints: [*c]c_int, codepointCount: c_int, ty: rl.FontType) [*c]rl.GlyphInfo;
pub extern "c" fn GenImageFontAtlas(glyphs: [*c]const rl.GlyphInfo, glyphRecs: [*c][*c]rl.Rectangle, glyphCount: c_int, fontSize: c_int, padding: c_int, packMethod: c_int) rl.Image;
pub extern "c" fn UnloadFontData(glyphs: [*c]rl.GlyphInfo, glyphCount: c_int) void;
pub extern "c" fn UnloadFont(font: rl.Font) void;
@ -482,7 +482,7 @@ pub extern "c" fn LoadMaterials(fileName: [*c]const u8, materialCount: [*c]c_int
pub extern "c" fn LoadMaterialDefault() rl.Material;
pub extern "c" fn IsMaterialReady(material: rl.Material) bool;
pub extern "c" fn UnloadMaterial(material: rl.Material) void;
pub extern "c" fn SetMaterialTexture(material: [*c]rl.Material, mapType: c_int, texture: rl.Texture2D) void;
pub extern "c" fn SetMaterialTexture(material: [*c]rl.Material, mapType: rl.MaterialMapIndex, texture: rl.Texture2D) void;
pub extern "c" fn SetModelMeshMaterial(model: [*c]rl.Model, meshId: c_int, materialId: c_int) void;
pub extern "c" fn LoadModelAnimations(fileName: [*c]const u8, animCount: [*c]c_int) [*c]rl.ModelAnimation;
pub extern "c" fn UpdateModelAnimation(model: rl.Model, anim: rl.ModelAnimation, frame: c_int) void;