From 4f808f7da18accbd15ae38207c9a3db9871e5e43 Mon Sep 17 00:00:00 2001 From: G3bE Date: Sat, 15 Feb 2020 20:54:31 +1000 Subject: [PATCH] Recreated ABI comatiblity --- examples/core/BasicWindow.zig | 2 +- lib/raylib-zig.zig | 433 +++++++++++++++++----------------- 2 files changed, 218 insertions(+), 217 deletions(-) diff --git a/examples/core/BasicWindow.zig b/examples/core/BasicWindow.zig index fd46be9..6e13767 100644 --- a/examples/core/BasicWindow.zig +++ b/examples/core/BasicWindow.zig @@ -14,7 +14,7 @@ pub fn main() anyerror!void const screenWidth = 800; const screenHeight = 450; - InitWindow(screenWidth, screenHeight, c"Rayzig test"); + InitWindow(screenWidth, screenHeight, c"raylib-zig [core] example - basic window"); SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- diff --git a/lib/raylib-zig.zig b/lib/raylib-zig.zig index 06c58b1..81560d2 100644 --- a/lib/raylib-zig.zig +++ b/lib/raylib-zig.zig @@ -87,24 +87,25 @@ pub const Rectangle = extern struct { pub const Image = extern struct { data: ?*c_void, - width: i32, - height: i32, - mipmaps: i32, - format: i32, + width: c_int, + height: c_int, + mipmaps: c_int, + format: c_int, }; -pub const Texture2D = extern struct { - id: ui32, - width: i32, - height: i32, - mipmaps: i32, - format: i32, +pub const struct_Texture2D = extern struct { + id: c_uint, + width: c_int, + height: c_int, + mipmaps: c_int, + format: c_int, }; + pub const Texture = Texture2D; pub const TextureCubemap = Texture2D; pub const RenderTexture2D = extern struct { - id: ui32, + id: c_uint, texture: Texture2D, depth: Texture2D, depthTexture: bool, @@ -113,26 +114,26 @@ pub const RenderTexture = RenderTexture2D; pub const NPatchInfo = extern struct { sourceRec: Rectangle, - left: i32, - top: i32, - right: i32, - bottom: i32, - type: i32, + left: c_int, + top: c_int, + right: c_int, + bottom: c_int, + type: c_int, }; pub const CharInfo = extern struct { - value: i32, + value: c_int, rec: Rectangle, - offsetX: i32, - offsetY: i32, - advanceX: i32, + offsetX: c_int, + offsetY: c_int, + advanceX: c_int, data: [*c]u8, }; pub const Font = extern struct { texture: Texture2D, - baseSize: i32, - charsCount: i32, + baseSize: c_int, + charsCount: c_int, chars: [*c]CharInfo, }; @@ -141,7 +142,7 @@ pub const Camera3D = extern struct { target: Vector3, up: Vector3, fovy: f32, - type: i32, + type: c_int, }; pub const Camera = Camera3D; @@ -153,8 +154,8 @@ pub const Camera2D = extern struct { }; pub const Mesh = extern struct { - vertexCount: i32, - triangleCount: i32, + vertexCount: c_int, + triangleCount: c_int, vertices: [*c]f32, texcoords: [*c]f32, texcoords2: [*c]f32, @@ -164,15 +165,15 @@ pub const Mesh = extern struct { indices: [*c]c_ushort, animVertices: [*c]f32, animNormals: [*c]f32, - boneIds: [*c]i32, + boneIds: [*c]c_int, boneWeights: [*c]f32, - vaoId: ui32, - vboId: [7]ui32, + vaoId: uc_int, + vboId: [7]uc_int, }; pub const Shader = extern struct { - id: ui32, - locs: [32]i32, + id: uc_int, + locs: [32]c_int, }; pub const MaterialMap = extern struct { @@ -195,25 +196,25 @@ pub const Transform = extern struct { pub const BoneInfo = extern struct { name: [32]u8, - parent: i32, + parent: c_int, }; pub const Model = extern struct { transform: Matrix, - meshCount: i32, + meshCount: c_int, meshes: [*c]Mesh, - materialCount: i32, + materialCount: c_int, materials: [*c]Material, - meshMaterial: [*c]i32, - boneCount: i32, + meshMaterial: [*c]c_int, + boneCount: c_int, bones: [*c]BoneInfo, bindPose: [*c]Transform, }; pub const ModelAnimation = extern struct { - boneCount: i32, + boneCount: c_int, bones: [*c]BoneInfo, - frameCount: i32, + frameCount: c_int, framePoses: [*c]([*c]Transform), }; @@ -235,36 +236,36 @@ pub const BoundingBox = extern struct { }; pub const Wave = extern struct { - sampleCount: ui32, - sampleRate: ui32, - sampleSize: ui32, - channels: ui32, + sampleCount: uc_int, + sampleRate: uc_int, + sampleSize: uc_int, + channels: uc_int, data: ?*c_void, }; pub const Sound = extern struct { audioBuffer: ?*c_void, - source: ui32, - buffer: ui32, - format: i32, + source: uc_int, + buffer: uc_int, + format: c_int, }; pub const MusicData = @OpaqueType(); pub const Music = ?*MusicData; pub const AudioStream = extern struct { - sampleRate: ui32, - sampleSize: ui32, - channels: ui32, + sampleRate: uc_int, + sampleSize: uc_int, + channels: uc_int, audioBuffer: ?*c_void, - format: i32, - source: ui32, - buffers: [2]ui32, + format: c_int, + source: uc_int, + buffers: [2]uc_int, }; pub const VrDeviceInfo = extern struct { - hResolution: i32, - vResolution: i32, + hResolution: c_int, + vResolution: c_int, hScreenSize: f32, vScreenSize: f32, vScreenCenter: f32, @@ -603,7 +604,7 @@ pub const NPatchType = extern enum { NPT_3PATCH_HORIZONTAL = 2, }; -pub extern fn InitWindow(width: i32, height: i32, title: [*c]const u8) void; +pub extern fn InitWindow(width: c_int, height: c_int, title: [*c]const u8) void; pub extern fn WindowShouldClose() bool; pub extern fn CloseWindow() void; pub extern fn IsWindowReady() bool; @@ -615,19 +616,19 @@ pub extern fn UnhideWindow() void; pub extern fn HideWindow() void; pub extern fn SetWindowIcon(image: Image) void; pub extern fn SetWindowTitle(title: [*c]const u8) void; -pub extern fn SetWindowPosition(x: i32, y: i32) void; -pub extern fn SetWindowMonitor(monitor: i32) void; -pub extern fn SetWindowMinSize(width: i32, height: i32) void; -pub extern fn SetWindowSize(width: i32, height: i32) void; +pub extern fn SetWindowPosition(x: c_int, y: c_int) void; +pub extern fn SetWindowMonitor(monitor: c_int) void; +pub extern fn SetWindowMinSize(width: c_int, height: c_int) void; +pub extern fn SetWindowSize(width: c_int, height: c_int) void; pub extern fn GetWindowHandle() ?*c_void; -pub extern fn GetScreenWidth() i32; -pub extern fn GetScreenHeight() i32; -pub extern fn GetMonitorCount() i32; -pub extern fn GetMonitorWidth(monitor: i32) i32; -pub extern fn GetMonitorHeight(monitor: i32) i32; -pub extern fn GetMonitorPhysicalWidth(monitor: i32) i32; -pub extern fn GetMonitorPhysicalHeight(monitor: i32) i32; -pub extern fn GetMonitorName(monitor: i32) [*c]const u8; +pub extern fn GetScreenWidth() c_int; +pub extern fn GetScreenHeight() c_int; +pub extern fn GetMonitorCount() c_int; +pub extern fn GetMonitorWidth(monitor: c_int) c_int; +pub extern fn GetMonitorHeight(monitor: c_int) c_int; +pub extern fn GetMonitorPhysicalWidth(monitor: c_int) c_int; +pub extern fn GetMonitorPhysicalHeight(monitor: c_int) c_int; +pub extern fn GetMonitorName(monitor: c_int) [*c]const u8; pub extern fn GetClipboardText() [*c]const u8; pub extern fn SetClipboardText(text: [*c]const u8) void; pub extern fn ShowCursor() void; @@ -647,23 +648,23 @@ pub extern fn EndTextureMode() void; pub extern fn GetMouseRay(mousePosition: Vector2, camera: Camera) Ray; pub extern fn GetWorldToScreen(position: Vector3, camera: Camera) Vector2; pub extern fn GetCameraMatrix(camera: Camera) Matrix; -pub extern fn SetTargetFPS(fps: i32) void; -pub extern fn GetFPS() i32; +pub extern fn SetTargetFPS(fps: c_int) void; +pub extern fn GetFPS() c_int; pub extern fn GetFrameTime() f32; pub extern fn GetTime() f64; -pub extern fn ColorToInt(color: Color) i32; +pub extern fn ColorToInt(color: Color) c_int; pub extern fn ColorNormalize(color: Color) Vector4; pub extern fn ColorToHSV(color: Color) Vector3; pub extern fn ColorFromHSV(hsv: Vector3) Color; -pub extern fn GetColor(hexValue: i32) Color; +pub extern fn GetColor(hexValue: c_int) Color; pub extern fn Fade(color: Color, alpha: f32) Color; pub extern fn SetConfigFlags(flags: u8) void; -pub extern fn SetTraceLogLevel(logType: i32) void; -pub extern fn SetTraceLogExit(logType: i32) void; +pub extern fn SetTraceLogLevel(logType: c_int) void; +pub extern fn SetTraceLogExit(logType: c_int) void; pub extern fn SetTraceLogCallback(callback: TraceLogCallback) void; -pub extern fn TraceLog(logType: i32, text: [*c]const u8, ...) void; +pub extern fn TraceLog(logType: c_int, text: [*c]const u8, ...) void; pub extern fn TakeScreenshot(fileName: [*c]const u8) void; -pub extern fn GetRandomValue(min: i32, max: i32) i32; +pub extern fn GetRandomValue(min: c_int, max: c_int) c_int; pub extern fn FileExists(fileName: [*c]const u8) bool; pub extern fn IsFileExtension(fileName: [*c]const u8, ext: [*c]const u8) bool; pub extern fn GetExtension(fileName: [*c]const u8) [*c]const u8; @@ -671,91 +672,91 @@ pub extern fn GetFileName(filePath: [*c]const u8) [*c]const u8; pub extern fn GetFileNameWithoutExt(filePath: [*c]const u8) [*c]const u8; pub extern fn GetDirectoryPath(fileName: [*c]const u8) [*c]const u8; pub extern fn GetWorkingDirectory() [*c]const u8; -pub extern fn GetDirectoryFiles(dirPath: [*c]const u8, count: [*c]i32) [*c]([*c]u8); +pub extern fn GetDirectoryFiles(dirPath: [*c]const u8, count: [*c]c_int) [*c]([*c]u8); pub extern fn ClearDirectoryFiles() void; pub extern fn ChangeDirectory(dir: [*c]const u8) bool; pub extern fn IsFileDropped() bool; -pub extern fn GetDroppedFiles(count: [*c]i32) [*c]([*c]u8); +pub extern fn GetDroppedFiles(count: [*c]c_int) [*c]([*c]u8); pub extern fn ClearDroppedFiles() void; pub extern fn GetFileModTime(fileName: [*c]const u8) c_long; -pub extern fn StorageSaveValue(position: i32, value: i32) void; -pub extern fn StorageLoadValue(position: i32) i32; +pub extern fn StorageSaveValue(position: c_int, value: c_int) void; +pub extern fn StorageLoadValue(position: c_int) c_int; pub extern fn OpenURL(url: [*c]const u8) void; -pub extern fn IsKeyPressed(key: i32) bool; -pub extern fn IsKeyDown(key: i32) bool; -pub extern fn IsKeyReleased(key: i32) bool; -pub extern fn IsKeyUp(key: i32) bool; -pub extern fn GetKeyPressed() i32; -pub extern fn SetExitKey(key: i32) void; -pub extern fn IsGamepadAvailable(gamepad: i32) bool; -pub extern fn IsGamepadName(gamepad: i32, name: [*c]const u8) bool; -pub extern fn GetGamepadName(gamepad: i32) [*c]const u8; -pub extern fn IsGamepadButtonPressed(gamepad: i32, button: i32) bool; -pub extern fn IsGamepadButtonDown(gamepad: i32, button: i32) bool; -pub extern fn IsGamepadButtonReleased(gamepad: i32, button: i32) bool; -pub extern fn IsGamepadButtonUp(gamepad: i32, button: i32) bool; -pub extern fn GetGamepadButtonPressed() i32; -pub extern fn GetGamepadAxisCount(gamepad: i32) i32; -pub extern fn GetGamepadAxisMovement(gamepad: i32, axis: i32) f32; -pub extern fn IsMouseButtonPressed(button: i32) bool; -pub extern fn IsMouseButtonDown(button: i32) bool; -pub extern fn IsMouseButtonReleased(button: i32) bool; -pub extern fn IsMouseButtonUp(button: i32) bool; -pub extern fn GetMouseX() i32; -pub extern fn GetMouseY() i32; +pub extern fn IsKeyPressed(key: c_int) bool; +pub extern fn IsKeyDown(key: c_int) bool; +pub extern fn IsKeyReleased(key: c_int) bool; +pub extern fn IsKeyUp(key: c_int) bool; +pub extern fn GetKeyPressed() c_int; +pub extern fn SetExitKey(key: c_int) void; +pub extern fn IsGamepadAvailable(gamepad: c_int) bool; +pub extern fn IsGamepadName(gamepad: c_int, name: [*c]const u8) bool; +pub extern fn GetGamepadName(gamepad: c_int) [*c]const u8; +pub extern fn IsGamepadButtonPressed(gamepad: c_int, button: c_int) bool; +pub extern fn IsGamepadButtonDown(gamepad: c_int, button: c_int) bool; +pub extern fn IsGamepadButtonReleased(gamepad: c_int, button: c_int) bool; +pub extern fn IsGamepadButtonUp(gamepad: c_int, button: c_int) bool; +pub extern fn GetGamepadButtonPressed() c_int; +pub extern fn GetGamepadAxisCount(gamepad: c_int) c_int; +pub extern fn GetGamepadAxisMovement(gamepad: c_int, axis: c_int) f32; +pub extern fn IsMouseButtonPressed(button: c_int) bool; +pub extern fn IsMouseButtonDown(button: c_int) bool; +pub extern fn IsMouseButtonReleased(button: c_int) bool; +pub extern fn IsMouseButtonUp(button: c_int) bool; +pub extern fn GetMouseX() c_int; +pub extern fn GetMouseY() c_int; pub extern fn GetMousePosition() Vector2; -pub extern fn SetMousePosition(x: i32, y: i32) void; -pub extern fn SetMouseOffset(offsetX: i32, offsetY: i32) void; +pub extern fn SetMousePosition(x: c_int, y: c_int) void; +pub extern fn SetMouseOffset(offsetX: c_int, offsetY: c_int) void; pub extern fn SetMouseScale(scaleX: f32, scaleY: f32) void; -pub extern fn GetMouseWheelMove() i32; -pub extern fn GetTouchX() i32; -pub extern fn GetTouchY() i32; -pub extern fn GetTouchPosition(index: i32) Vector2; -pub extern fn SetGesturesEnabled(gestureFlags: ui32) void; -pub extern fn IsGestureDetected(gesture: i32) bool; -pub extern fn GetGestureDetected() i32; -pub extern fn GetTouchPointsCount() i32; +pub extern fn GetMouseWheelMove() c_int; +pub extern fn GetTouchX() c_int; +pub extern fn GetTouchY() c_int; +pub extern fn GetTouchPosition(index: c_int) Vector2; +pub extern fn SetGesturesEnabled(gestureFlags: c_uint) void; +pub extern fn IsGestureDetected(gesture: c_int) bool; +pub extern fn GetGestureDetected() c_int; +pub extern fn GetTouchPointsCount() c_int; pub extern fn GetGestureHoldDuration() f32; pub extern fn GetGestureDragVector() Vector2; pub extern fn GetGestureDragAngle() f32; pub extern fn GetGesturePinchVector() Vector2; pub extern fn GetGesturePinchAngle() f32; -pub extern fn SetCameraMode(camera: Camera, mode: i32) void; +pub extern fn SetCameraMode(camera: Camera, mode: c_int) void; pub extern fn UpdateCamera(camera: [*c]Camera) void; -pub extern fn SetCameraPanControl(panKey: i32) void; -pub extern fn SetCameraAltControl(altKey: i32) void; -pub extern fn SetCameraSmoothZoomControl(szKey: i32) void; -pub extern fn SetCameraMoveControls(frontKey: i32, backKey: i32, rightKey: i32, leftKey: i32, upKey: i32, downKey: i32) void; -pub extern fn DrawPixel(posX: i32, posY: i32, color: Color) void; +pub extern fn SetCameraPanControl(panKey: c_int) void; +pub extern fn SetCameraAltControl(altKey: c_int) void; +pub extern fn SetCameraSmoothZoomControl(szKey: c_int) void; +pub extern fn SetCameraMoveControls(frontKey: c_int, backKey: c_int, rightKey: c_int, leftKey: c_int, upKey: c_int, downKey: c_int) void; +pub extern fn DrawPixel(posX: c_int, posY: c_int, color: Color) void; pub extern fn DrawPixelV(position: Vector2, color: Color) void; -pub extern fn DrawLine(startPosX: i32, startPosY: i32, endPosX: i32, endPosY: i32, color: Color) void; +pub extern fn DrawLine(startPosX: c_int, startPosY: c_int, endPosX: c_int, endPosY: c_int, color: Color) void; pub extern fn DrawLineV(startPos: Vector2, endPos: Vector2, color: Color) void; pub extern fn DrawLineEx(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) void; pub extern fn DrawLineBezier(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) void; -pub extern fn DrawLineStrip(points: [*c]Vector2, numPoints: i32, color: Color) void; -pub extern fn DrawCircle(centerX: i32, centerY: i32, radius: f32, color: Color) void; -pub extern fn DrawCircleSector(center: Vector2, radius: f32, startAngle: i32, endAngle: i32, segments: i32, color: Color) void; -pub extern fn DrawCircleSectorLines(center: Vector2, radius: f32, startAngle: i32, endAngle: i32, segments: i32, color: Color) void; -pub extern fn DrawCircleGradient(centerX: i32, centerY: i32, radius: f32, color1: Color, color2: Color) void; +pub extern fn DrawLineStrip(points: [*c]Vector2, numPoints: c_int, color: Color) void; +pub extern fn DrawCircle(centerX: c_int, centerY: c_int, radius: f32, color: Color) void; +pub extern fn DrawCircleSector(center: Vector2, radius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void; +pub extern fn DrawCircleSectorLines(center: Vector2, radius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void; +pub extern fn DrawCircleGradient(centerX: c_int, centerY: c_int, radius: f32, color1: Color, color2: Color) void; pub extern fn DrawCircleV(center: Vector2, radius: f32, color: Color) void; -pub extern fn DrawCircleLines(centerX: i32, centerY: i32, radius: f32, color: Color) void; -pub extern fn DrawRing(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: i32, endAngle: i32, segments: i32, color: Color) void; -pub extern fn DrawRingLines(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: i32, endAngle: i32, segments: i32, color: Color) void; -pub extern fn DrawRectangle(posX: i32, posY: i32, width: i32, height: i32, color: Color) void; +pub extern fn DrawCircleLines(centerX: c_int, centerY: c_int, radius: f32, color: Color) void; +pub extern fn DrawRing(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void; +pub extern fn DrawRingLines(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void; +pub extern fn DrawRectangle(posX: c_int, posY: c_int, width: c_int, height: c_int, color: Color) void; pub extern fn DrawRectangleV(position: Vector2, size: Vector2, color: Color) void; pub extern fn DrawRectangleRec(rec: Rectangle, color: Color) void; pub extern fn DrawRectanglePro(rec: Rectangle, origin: Vector2, rotation: f32, color: Color) void; -pub extern fn DrawRectangleGradientV(posX: i32, posY: i32, width: i32, height: i32, color1: Color, color2: Color) void; -pub extern fn DrawRectangleGradientH(posX: i32, posY: i32, width: i32, height: i32, color1: Color, color2: Color) void; +pub extern fn DrawRectangleGradientV(posX: c_int, posY: c_int, width: c_int, height: c_int, color1: Color, color2: Color) void; +pub extern fn DrawRectangleGradientH(posX: c_int, posY: c_int, width: c_int, height: c_int, color1: Color, color2: Color) void; pub extern fn DrawRectangleGradientEx(rec: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color) void; -pub extern fn DrawRectangleLines(posX: i32, posY: i32, width: i32, height: i32, color: Color) void; -pub extern fn DrawRectangleLinesEx(rec: Rectangle, lineThick: i32, color: Color) void; -pub extern fn DrawRectangleRounded(rec: Rectangle, roundness: f32, segments: i32, color: Color) void; -pub extern fn DrawRectangleRoundedLines(rec: Rectangle, roundness: f32, segments: i32, lineThick: i32, color: Color) void; +pub extern fn DrawRectangleLines(posX: c_int, posY: c_int, width: c_int, height: c_int, color: Color) void; +pub extern fn DrawRectangleLinesEx(rec: Rectangle, lineThick: c_int, color: Color) void; +pub extern fn DrawRectangleRounded(rec: Rectangle, roundness: f32, segments: c_int, color: Color) void; +pub extern fn DrawRectangleRoundedLines(rec: Rectangle, roundness: f32, segments: c_int, lineThick: c_int, color: Color) void; pub extern fn DrawTriangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) void; pub extern fn DrawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) void; -pub extern fn DrawTriangleFan(points: [*c]Vector2, numPoints: i32, color: Color) void; -pub extern fn DrawPoly(center: Vector2, sides: i32, radius: f32, rotation: f32, color: Color) void; +pub extern fn DrawTriangleFan(points: [*c]Vector2, numPoints: c_int, color: Color) void; +pub extern fn DrawPoly(center: Vector2, sides: c_int, radius: f32, rotation: f32, color: Color) void; pub extern fn SetShapesTexture(texture: Texture2D, source: Rectangle) void; pub extern fn CheckCollisionRecs(rec1: Rectangle, rec2: Rectangle) bool; pub extern fn CheckCollisionCircles(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32) bool; @@ -765,44 +766,44 @@ pub extern fn CheckCollisionPointRec(point: Vector2, rec: Rectangle) bool; pub extern fn CheckCollisionPointCircle(point: Vector2, center: Vector2, radius: f32) bool; pub extern fn CheckCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) bool; pub extern fn LoadImage(fileName: [*c]const u8) Image; -pub extern fn LoadImageEx(pixels: [*c]Color, width: i32, height: i32) Image; -pub extern fn LoadImagePro(data: ?*c_void, width: i32, height: i32, format: i32) Image; -pub extern fn LoadImageRaw(fileName: [*c]const u8, width: i32, height: i32, format: i32, headerSize: i32) Image; +pub extern fn LoadImageEx(pixels: [*c]Color, width: c_int, height: c_int) Image; +pub extern fn LoadImagePro(data: ?*c_void, width: c_int, height: c_int, format: c_int) Image; +pub extern fn LoadImageRaw(fileName: [*c]const u8, width: c_int, height: c_int, format: c_int, headerSize: c_int) Image; pub extern fn ExportImage(image: Image, fileName: [*c]const u8) void; pub extern fn ExportImageAsCode(image: Image, fileName: [*c]const u8) void; pub extern fn LoadTexture(fileName: [*c]const u8) Texture2D; pub extern fn LoadTextureFromImage(image: Image) Texture2D; -pub extern fn LoadTextureCubemap(image: Image, layoutType: i32) TextureCubemap; -pub extern fn LoadRenderTexture(width: i32, height: i32) RenderTexture2D; +pub extern fn LoadTextureCubemap(image: Image, layoutType: c_int) TextureCubemap; +pub extern fn LoadRenderTexture(width: c_int, height: c_int) RenderTexture2D; pub extern fn UnloadImage(image: Image) void; pub extern fn UnloadTexture(texture: Texture2D) void; pub extern fn UnloadRenderTexture(target: RenderTexture2D) void; pub extern fn GetImageData(image: Image) [*c]Color; pub extern fn GetImageDataNormalized(image: Image) [*c]Vector4; -pub extern fn GetPixelDataSize(width: i32, height: i32, format: i32) i32; +pub extern fn GetPixelDataSize(width: c_int, height: c_int, format: c_int) c_int; pub extern fn GetTextureData(texture: Texture2D) Image; pub extern fn GetScreenData() Image; -pub extern fn UpdateTexture(texture: Texture2D, pixels: ?*c_void) void; +pub extern fn UpdateTexture(texture: Texture2D, pixels: ?*const c_void) void; pub extern fn ImageCopy(image: Image) Image; pub extern fn ImageToPOT(image: [*c]Image, fillColor: Color) void; -pub extern fn ImageFormat(image: [*c]Image, newFormat: i32) void; +pub extern fn ImageFormat(image: [*c]Image, newFormat: c_int) void; pub extern fn ImageAlphaMask(image: [*c]Image, alphaMask: Image) void; pub extern fn ImageAlphaClear(image: [*c]Image, color: Color, threshold: f32) void; pub extern fn ImageAlphaCrop(image: [*c]Image, threshold: f32) void; pub extern fn ImageAlphaPremultiply(image: [*c]Image) void; pub extern fn ImageCrop(image: [*c]Image, crop: Rectangle) void; -pub extern fn ImageResize(image: [*c]Image, newWidth: i32, newHeight: i32) void; -pub extern fn ImageResizeNN(image: [*c]Image, newWidth: i32, newHeight: i32) void; -pub extern fn ImageResizeCanvas(image: [*c]Image, newWidth: i32, newHeight: i32, offsetX: i32, offsetY: i32, color: Color) void; +pub extern fn ImageResize(image: [*c]Image, newWidth: c_int, newHeight: c_int) void; +pub extern fn ImageResizeNN(image: [*c]Image, newWidth: c_int, newHeight: c_int) void; +pub extern fn ImageResizeCanvas(image: [*c]Image, newWidth: c_int, newHeight: c_int, offsetX: c_int, offsetY: c_int, color: Color) void; pub extern fn ImageMipmaps(image: [*c]Image) void; -pub extern fn ImageDither(image: [*c]Image, rBpp: i32, gBpp: i32, bBpp: i32, aBpp: i32) void; -pub extern fn ImageExtractPalette(image: Image, maxPaletteSize: i32, extractCount: [*c]i32) [*c]Color; -pub extern fn ImageText(text: [*c]const u8, fontSize: i32, color: Color) Image; +pub extern fn ImageDither(image: [*c]Image, rBpp: c_int, gBpp: c_int, bBpp: c_int, aBpp: c_int) void; +pub extern fn ImageExtractPalette(image: Image, maxPaletteSize: c_int, extractCount: [*c]c_int) [*c]Color; +pub extern fn ImageText(text: [*c]const u8, fontSize: c_int, color: Color) Image; pub extern fn ImageTextEx(font: Font, text: [*c]const u8, fontSize: f32, spacing: f32, tint: Color) Image; pub extern fn ImageDraw(dst: [*c]Image, src: Image, srcRec: Rectangle, dstRec: Rectangle) void; pub extern fn ImageDrawRectangle(dst: [*c]Image, rec: Rectangle, color: Color) void; -pub extern fn ImageDrawRectangleLines(dst: [*c]Image, rec: Rectangle, thick: i32, color: Color) void; -pub extern fn ImageDrawText(dst: [*c]Image, position: Vector2, text: [*c]const u8, fontSize: i32, color: Color) void; +pub extern fn ImageDrawRectangleLines(dst: [*c]Image, rec: Rectangle, thick: c_int, color: Color) void; +pub extern fn ImageDrawText(dst: [*c]Image, position: Vector2, text: [*c]const u8, fontSize: c_int, color: Color) void; pub extern fn ImageDrawTextEx(dst: [*c]Image, position: Vector2, font: Font, text: [*c]const u8, fontSize: f32, spacing: f32, color: Color) void; pub extern fn ImageFlipVertical(image: [*c]Image) void; pub extern fn ImageFlipHorizontal(image: [*c]Image) void; @@ -812,20 +813,20 @@ pub extern fn ImageColorTint(image: [*c]Image, color: Color) void; pub extern fn ImageColorInvert(image: [*c]Image) void; pub extern fn ImageColorGrayscale(image: [*c]Image) void; pub extern fn ImageColorContrast(image: [*c]Image, contrast: f32) void; -pub extern fn ImageColorBrightness(image: [*c]Image, brightness: i32) void; +pub extern fn ImageColorBrightness(image: [*c]Image, brightness: c_int) void; pub extern fn ImageColorReplace(image: [*c]Image, color: Color, replace: Color) void; -pub extern fn GenImageColor(width: i32, height: i32, color: Color) Image; -pub extern fn GenImageGradientV(width: i32, height: i32, top: Color, bottom: Color) Image; -pub extern fn GenImageGradientH(width: i32, height: i32, left: Color, right: Color) Image; -pub extern fn GenImageGradientRadial(width: i32, height: i32, density: f32, inner: Color, outer: Color) Image; -pub extern fn GenImageChecked(width: i32, height: i32, checksX: i32, checksY: i32, col1: Color, col2: Color) Image; -pub extern fn GenImageWhiteNoise(width: i32, height: i32, factor: f32) Image; -pub extern fn GenImagePerlinNoise(width: i32, height: i32, offsetX: i32, offsetY: i32, scale: f32) Image; -pub extern fn GenImageCellular(width: i32, height: i32, tileSize: i32) Image; +pub extern fn GenImageColor(width: c_int, height: c_int, color: Color) Image; +pub extern fn GenImageGradientV(width: c_int, height: c_int, top: Color, bottom: Color) Image; +pub extern fn GenImageGradientH(width: c_int, height: c_int, left: Color, right: Color) Image; +pub extern fn GenImageGradientRadial(width: c_int, height: c_int, density: f32, inner: Color, outer: Color) Image; +pub extern fn GenImageChecked(width: c_int, height: c_int, checksX: c_int, checksY: c_int, col1: Color, col2: Color) Image; +pub extern fn GenImageWhiteNoise(width: c_int, height: c_int, factor: f32) Image; +pub extern fn GenImagePerlinNoise(width: c_int, height: c_int, offsetX: c_int, offsetY: c_int, scale: f32) Image; +pub extern fn GenImageCellular(width: c_int, height: c_int, tileSize: c_int) Image; pub extern fn GenTextureMipmaps(texture: [*c]Texture2D) void; -pub extern fn SetTextureFilter(texture: Texture2D, filterMode: i32) void; -pub extern fn SetTextureWrap(texture: Texture2D, wrapMode: i32) void; -pub extern fn DrawTexture(texture: Texture2D, posX: i32, posY: i32, tint: Color) void; +pub extern fn SetTextureFilter(texture: Texture2D, filterMode: c_int) void; +pub extern fn SetTextureWrap(texture: Texture2D, wrapMode: c_int) void; +pub extern fn DrawTexture(texture: Texture2D, posX: c_int, posY: c_int, tint: Color) void; pub extern fn DrawTextureV(texture: Texture2D, position: Vector2, tint: Color) void; pub extern fn DrawTextureEx(texture: Texture2D, position: Vector2, rotation: f32, scale: f32, tint: Color) void; pub extern fn DrawTextureRec(texture: Texture2D, sourceRec: Rectangle, position: Vector2, tint: Color) void; @@ -834,35 +835,35 @@ pub extern fn DrawTexturePro(texture: Texture2D, sourceRec: Rectangle, destRec: pub extern fn DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, destRec: Rectangle, origin: Vector2, rotation: f32, tint: Color) void; pub extern fn GetFontDefault() Font; pub extern fn LoadFont(fileName: [*c]const u8) Font; -pub extern fn LoadFontEx(fileName: [*c]const u8, fontSize: i32, fontChars: [*c]i32, charsCount: i32) Font; -pub extern fn LoadFontFromImage(image: Image, key: Color, firstChar: i32) Font; -pub extern fn LoadFontData(fileName: [*c]const u8, fontSize: i32, fontChars: [*c]i32, charsCount: i32, type_0: i32) [*c]CharInfo; -pub extern fn GenImageFontAtlas(chars: [*c]CharInfo, charsCount: i32, fontSize: i32, padding: i32, packMethod: i32) Image; +pub extern fn LoadFontEx(fileName: [*c]const u8, fontSize: c_int, fontChars: [*c]c_int, charsCount: c_int) Font; +pub extern fn LoadFontFromImage(image: Image, key: Color, firstChar: c_int) Font; +pub extern fn LoadFontData(fileName: [*c]const u8, fontSize: c_int, fontChars: [*c]c_int, charsCount: c_int, type_0: c_int) [*c]CharInfo; +pub extern fn GenImageFontAtlas(chars: [*c]CharInfo, charsCount: c_int, fontSize: c_int, padding: c_int, packMethod: c_int) Image; pub extern fn UnloadFont(font: Font) void; -pub extern fn DrawFPS(posX: i32, posY: i32) void; -pub extern fn DrawText(text: [*c]const u8, posX: i32, posY: i32, fontSize: i32, color: Color) void; +pub extern fn DrawFPS(posX: c_int, posY: c_int) void; +pub extern fn DrawText(text: [*c]const u8, posX: c_int, posY: c_int, fontSize: c_int, color: Color) void; pub extern fn DrawTextEx(font: Font, text: [*c]const u8, position: Vector2, fontSize: f32, spacing: f32, tint: Color) void; pub extern fn DrawTextRec(font: Font, text: [*c]const u8, rec: Rectangle, fontSize: f32, spacing: f32, wordWrap: bool, tint: Color) void; -pub extern fn DrawTextRecEx(font: Font, text: [*c]const u8, rec: Rectangle, fontSize: f32, spacing: f32, wordWrap: bool, tint: Color, selectStart: i32, selectLength: i32, selectText: Color, selectBack: Color) void; -pub extern fn MeasureText(text: [*c]const u8, fontSize: i32) i32; +pub extern fn DrawTextRecEx(font: Font, text: [*c]const u8, rec: Rectangle, fontSize: f32, spacing: f32, wordWrap: bool, tint: Color, selectStart: c_int, selectLength: c_int, selectText: Color, selectBack: Color) void; +pub extern fn MeasureText(text: [*c]const u8, fontSize: c_int) c_int; pub extern fn MeasureTextEx(font: Font, text: [*c]const u8, fontSize: f32, spacing: f32) Vector2; -pub extern fn GetGlyphIndex(font: Font, character: i32) i32; -pub extern fn GetNextCodepoint(text: [*c]const u8, count: [*c]i32) i32; +pub extern fn GetGlyphIndex(font: Font, character: c_int) c_int; +pub extern fn GetNextCodepoint(text: [*c]const u8, count: [*c]c_int) c_int; pub extern fn TextIsEqual(text1: [*c]const u8, text2: [*c]const u8) bool; -pub extern fn TextLength(text: [*c]const u8) ui32; -pub extern fn TextCountCodepoints(text: [*c]const u8) ui32; +pub extern fn TextLength(text: [*c]const u8) c_uint; +pub extern fn TextCountCodepoints(text: [*c]const u8) c_uint; pub extern fn TextFormat(text: [*c]const u8, ...) [*c]const u8; -pub extern fn TextSubtext(text: [*c]const u8, position: i32, length: i32) [*c]const u8; +pub extern fn TextSubtext(text: [*c]const u8, position: c_int, length: c_int) [*c]const u8; pub extern fn TextReplace(text: [*c]u8, replace: [*c]const u8, by: [*c]const u8) [*c]const u8; -pub extern fn TextInsert(text: [*c]const u8, insert: [*c]const u8, position: i32) [*c]const u8; -pub extern fn TextJoin(textList: [*c]([*c]const u8), count: i32, delimiter: [*c]const u8) [*c]const u8; -pub extern fn TextSplit(text: [*c]const u8, delimiter: u8, count: [*c]i32) [*c]([*c]const u8); -pub extern fn TextAppend(text: [*c]u8, append: [*c]const u8, position: [*c]i32) void; -pub extern fn TextFindIndex(text: [*c]const u8, find: [*c]const u8) i32; +pub extern fn TextInsert(text: [*c]const u8, insert: [*c]const u8, position: c_int) [*c]const u8; +pub extern fn TextJoin(textList: [*c]([*c]const u8), count: c_int, delimiter: [*c]const u8) [*c]const u8; +pub extern fn TextSplit(text: [*c]const u8, delimiter: u8, count: [*c]c_int) [*c]([*c]const u8); +pub extern fn TextAppend(text: [*c]u8, append: [*c]const u8, position: [*c]c_int) void; +pub extern fn TextFindIndex(text: [*c]const u8, find: [*c]const u8) c_int; pub extern fn TextToUpper(text: [*c]const u8) [*c]const u8; pub extern fn TextToLower(text: [*c]const u8) [*c]const u8; pub extern fn TextToPascal(text: [*c]const u8) [*c]const u8; -pub extern fn TextToInteger(text: [*c]const u8) i32; +pub extern fn TextToInteger(text: [*c]const u8) c_int; pub extern fn DrawLine3D(startPos: Vector3, endPos: Vector3, color: Color) void; pub extern fn DrawCircle3D(center: Vector3, radius: f32, rotationAxis: Vector3, rotationAngle: f32, color: Color) void; pub extern fn DrawCube(position: Vector3, width: f32, height: f32, length: f32, color: Color) void; @@ -871,37 +872,37 @@ pub extern fn DrawCubeWires(position: Vector3, width: f32, height: f32, length: pub extern fn DrawCubeWiresV(position: Vector3, size: Vector3, color: Color) void; pub extern fn DrawCubeTexture(texture: Texture2D, position: Vector3, width: f32, height: f32, length: f32, color: Color) void; pub extern fn DrawSphere(centerPos: Vector3, radius: f32, color: Color) void; -pub extern fn DrawSphereEx(centerPos: Vector3, radius: f32, rings: i32, slices: i32, color: Color) void; -pub extern fn DrawSphereWires(centerPos: Vector3, radius: f32, rings: i32, slices: i32, color: Color) void; -pub extern fn DrawCylinder(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: i32, color: Color) void; -pub extern fn DrawCylinderWires(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: i32, color: Color) void; +pub extern fn DrawSphereEx(centerPos: Vector3, radius: f32, rings: c_int, slices: c_int, color: Color) void; +pub extern fn DrawSphereWires(centerPos: Vector3, radius: f32, rings: c_int, slices: c_int, color: Color) void; +pub extern fn DrawCylinder(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: c_int, color: Color) void; +pub extern fn DrawCylinderWires(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: c_int, color: Color) void; pub extern fn DrawPlane(centerPos: Vector3, size: Vector2, color: Color) void; pub extern fn DrawRay(ray: Ray, color: Color) void; -pub extern fn DrawGrid(slices: i32, spacing: f32) void; +pub extern fn DrawGrid(slices: c_int, spacing: f32) void; pub extern fn DrawGizmo(position: Vector3) void; pub extern fn LoadModel(fileName: [*c]const u8) Model; pub extern fn LoadModelFromMesh(mesh: Mesh) Model; pub extern fn UnloadModel(model: Model) void; -pub extern fn LoadMeshes(fileName: [*c]const u8, meshCount: [*c]i32) [*c]Mesh; +pub extern fn LoadMeshes(fileName: [*c]const u8, meshCount: [*c]c_int) [*c]Mesh; pub extern fn ExportMesh(mesh: Mesh, fileName: [*c]const u8) void; pub extern fn UnloadMesh(mesh: [*c]Mesh) void; -pub extern fn LoadMaterials(fileName: [*c]const u8, materialCount: [*c]i32) [*c]Material; +pub extern fn LoadMaterials(fileName: [*c]const u8, materialCount: [*c]c_int) [*c]Material; pub extern fn LoadMaterialDefault() Material; pub extern fn UnloadMaterial(material: Material) void; -pub extern fn SetMaterialTexture(material: [*c]Material, mapType: i32, texture: Texture2D) void; -pub extern fn SetModelMeshMaterial(model: [*c]Model, meshId: i32, materialId: i32) void; -pub extern fn LoadModelAnimations(fileName: [*c]const u8, animsCount: [*c]i32) [*c]ModelAnimation; -pub extern fn UpdateModelAnimation(model: Model, anim: ModelAnimation, frame: i32) void; +pub extern fn SetMaterialTexture(material: [*c]Material, mapType: c_int, texture: Texture2D) void; +pub extern fn SetModelMeshMaterial(model: [*c]Model, meshId: c_int, materialId: c_int) void; +pub extern fn LoadModelAnimations(fileName: [*c]const u8, animsCount: [*c]c_int) [*c]ModelAnimation; +pub extern fn UpdateModelAnimation(model: Model, anim: ModelAnimation, frame: c_int) void; pub extern fn UnloadModelAnimation(anim: ModelAnimation) void; pub extern fn IsModelAnimationValid(model: Model, anim: ModelAnimation) bool; -pub extern fn GenMeshPoly(sides: i32, radius: f32) Mesh; -pub extern fn GenMeshPlane(width: f32, length: f32, resX: i32, resZ: i32) Mesh; +pub extern fn GenMeshPoly(sides: c_int, radius: f32) Mesh; +pub extern fn GenMeshPlane(width: f32, length: f32, resX: c_int, resZ: c_int) Mesh; pub extern fn GenMeshCube(width: f32, height: f32, length: f32) Mesh; -pub extern fn GenMeshSphere(radius: f32, rings: i32, slices: i32) Mesh; -pub extern fn GenMeshHemiSphere(radius: f32, rings: i32, slices: i32) Mesh; -pub extern fn GenMeshCylinder(radius: f32, height: f32, slices: i32) Mesh; -pub extern fn GenMeshTorus(radius: f32, size: f32, radSeg: i32, sides: i32) Mesh; -pub extern fn GenMeshKnot(radius: f32, size: f32, radSeg: i32, sides: i32) Mesh; +pub extern fn GenMeshSphere(radius: f32, rings: c_int, slices: c_int) Mesh; +pub extern fn GenMeshHemiSphere(radius: f32, rings: c_int, slices: c_int) Mesh; +pub extern fn GenMeshCylinder(radius: f32, height: f32, slices: c_int) Mesh; +pub extern fn GenMeshTorus(radius: f32, size: f32, radSeg: c_int, sides: c_int) Mesh; +pub extern fn GenMeshKnot(radius: f32, size: f32, radSeg: c_int, sides: c_int) Mesh; pub extern fn GenMeshHeightmap(heightmap: Image, size: Vector3) Mesh; pub extern fn GenMeshCubicmap(cubicmap: Image, cubeSize: Vector3) Mesh; pub extern fn MeshBoundingBox(mesh: Mesh) BoundingBox; @@ -929,23 +930,23 @@ pub extern fn LoadShaderCode(vsCode: [*c]u8, fsCode: [*c]u8) Shader; pub extern fn UnloadShader(shader: Shader) void; pub extern fn GetShaderDefault() Shader; pub extern fn GetTextureDefault() Texture2D; -pub extern fn GetShaderLocation(shader: Shader, uniformName: [*c]const u8) i32; -pub extern fn SetShaderValue(shader: Shader, uniformLoc: i32, value: ?*c_void, uniformType: i32) void; -pub extern fn SetShaderValueV(shader: Shader, uniformLoc: i32, value: ?*c_void, uniformType: i32, count: i32) void; -pub extern fn SetShaderValueMatrix(shader: Shader, uniformLoc: i32, mat: Matrix) void; -pub extern fn SetShaderValueTexture(shader: Shader, uniformLoc: i32, texture: Texture2D) void; +pub extern fn GetShaderLocation(shader: Shader, uniformName: [*c]const u8) c_int; +pub extern fn SetShaderValue(shader: Shader, uniformLoc: c_int, value: ?*const c_void, uniformType: c_int) void; +pub extern fn SetShaderValueV(shader: Shader, uniformLoc: c_int, value: ?*const c_void, uniformType: c_int, count: c_int) void; +pub extern fn SetShaderValueMatrix(shader: Shader, uniformLoc: c_int, mat: Matrix) void; +pub extern fn SetShaderValueTexture(shader: Shader, uniformLoc: c_int, texture: Texture2D) void; pub extern fn SetMatrixProjection(proj: Matrix) void; pub extern fn SetMatrixModelview(view: Matrix) void; pub extern fn GetMatrixModelview() Matrix; -pub extern fn GenTextureCubemap(shader: Shader, skyHDR: Texture2D, size: i32) Texture2D; -pub extern fn GenTextureIrradiance(shader: Shader, cubemap: Texture2D, size: i32) Texture2D; -pub extern fn GenTexturePrefilter(shader: Shader, cubemap: Texture2D, size: i32) Texture2D; -pub extern fn GenTextureBRDF(shader: Shader, size: i32) Texture2D; +pub extern fn GenTextureCubemap(shader: Shader, skyHDR: Texture2D, size: c_int) Texture2D; +pub extern fn GenTextureIrradiance(shader: Shader, cubemap: Texture2D, size: c_int) Texture2D; +pub extern fn GenTexturePrefilter(shader: Shader, cubemap: Texture2D, size: c_int) Texture2D; +pub extern fn GenTextureBRDF(shader: Shader, size: c_int) Texture2D; pub extern fn BeginShaderMode(shader: Shader) void; pub extern fn EndShaderMode() void; -pub extern fn BeginBlendMode(mode: i32) void; +pub extern fn BeginBlendMode(mode: c_int) void; pub extern fn EndBlendMode() void; -pub extern fn BeginScissorMode(x: i32, y: i32, width: i32, height: i32) void; +pub extern fn BeginScissorMode(x: c_int, y: c_int, width: c_int, height: c_int) void; pub extern fn EndScissorMode() void; pub extern fn InitVrSimulator() void; pub extern fn CloseVrSimulator() void; @@ -960,10 +961,10 @@ pub extern fn CloseAudioDevice() void; pub extern fn IsAudioDeviceReady() bool; pub extern fn SetMasterVolume(volume: f32) void; pub extern fn LoadWave(fileName: [*c]const u8) Wave; -pub extern fn LoadWaveEx(data: ?*c_void, sampleCount: i32, sampleRate: i32, sampleSize: i32, channels: i32) Wave; +pub extern fn LoadWaveEx(data: ?*c_void, sampleCount: c_int, sampleRate: c_int, sampleSize: c_int, channels: c_int) Wave; pub extern fn LoadSound(fileName: [*c]const u8) Sound; pub extern fn LoadSoundFromWave(wave: Wave) Sound; -pub extern fn UpdateSound(sound: Sound, data: ?*c_void, samplesCount: i32) void; +pub extern fn UpdateSound(sound: Sound, data: ?*const c_void, samplesCount: c_int) void; pub extern fn UnloadWave(wave: Wave) void; pub extern fn UnloadSound(sound: Sound) void; pub extern fn ExportWave(wave: Wave, fileName: [*c]const u8) void; @@ -975,9 +976,9 @@ pub extern fn StopSound(sound: Sound) void; pub extern fn IsSoundPlaying(sound: Sound) bool; pub extern fn SetSoundVolume(sound: Sound, volume: f32) void; pub extern fn SetSoundPitch(sound: Sound, pitch: f32) void; -pub extern fn WaveFormat(wave: [*c]Wave, sampleRate: i32, sampleSize: i32, channels: i32) void; +pub extern fn WaveFormat(wave: [*c]Wave, sampleRate: c_int, sampleSize: c_int, channels: c_int) void; pub extern fn WaveCopy(wave: Wave) Wave; -pub extern fn WaveCrop(wave: [*c]Wave, initSample: i32, finalSample: i32) void; +pub extern fn WaveCrop(wave: [*c]Wave, initSample: c_int, finalSample: c_int) void; pub extern fn GetWaveData(wave: Wave) [*c]f32; pub extern fn LoadMusicStream(fileName: [*c]const u8) Music; pub extern fn UnloadMusicStream(music: Music) void; @@ -989,11 +990,11 @@ pub extern fn ResumeMusicStream(music: Music) void; pub extern fn IsMusicPlaying(music: Music) bool; pub extern fn SetMusicVolume(music: Music, volume: f32) void; pub extern fn SetMusicPitch(music: Music, pitch: f32) void; -pub extern fn SetMusicLoopCount(music: Music, count: i32) void; +pub extern fn SetMusicLoopCount(music: Music, count: c_int) void; pub extern fn GetMusicTimeLength(music: Music) f32; pub extern fn GetMusicTimePlayed(music: Music) f32; -pub extern fn InitAudioStream(sampleRate: ui32, sampleSize: ui32, channels: ui32) AudioStream; -pub extern fn UpdateAudioStream(stream: AudioStream, data: ?*c_void, samplesCount: i32) void; +pub extern fn InitAudioStream(sampleRate: c_uint, sampleSize: c_uint, channels: c_uint) AudioStream; +pub extern fn UpdateAudioStream(stream: AudioStream, data: ?*const c_void, samplesCount: c_int) void; pub extern fn CloseAudioStream(stream: AudioStream) void; pub extern fn IsAudioBufferProcessed(stream: AudioStream) bool; pub extern fn PlayAudioStream(stream: AudioStream) void;