Update structs

This commit is contained in:
Not-Nik 2023-07-21 21:03:21 +02:00
parent 5050957b56
commit a022f39ceb
No known key found for this signature in database
GPG Key ID: 08BB71E672DB3BFD
2 changed files with 14 additions and 24 deletions

View File

@ -156,7 +156,7 @@ pub const Rectangle = extern struct {
}; };
pub const Image = extern struct { pub const Image = extern struct {
data: ?*anyopaque, data: [*c]anyopaque,
width: c_int, width: c_int,
height: c_int, height: c_int,
mipmaps: c_int, mipmaps: c_int,
@ -435,7 +435,7 @@ pub const Texture = extern struct {
width: c_int, width: c_int,
height: c_int, height: c_int,
mipmaps: c_int, mipmaps: c_int,
format: c_int, format: PixelFormat,
pub fn init(fileName: [:0]const u8) Texture { pub fn init(fileName: [:0]const u8) Texture {
return rl.loadTexture(fileName); return rl.loadTexture(fileName);
@ -703,12 +703,7 @@ pub const Model = extern struct {
} }
}; };
pub const ModelAnimation = extern struct { pub const ModelAnimation = extern struct { boneCount: c_int, frameCount: c_int, bones: [*c]BoneInfo, framePoses: [*c][*c]Transform, name: [32]u8 };
boneCount: c_int,
frameCount: c_int,
bones: [*c]BoneInfo,
framePoses: [*c][*c]Transform,
};
pub const Ray = extern struct { pub const Ray = extern struct {
position: Vector3, position: Vector3,
@ -732,15 +727,15 @@ pub const Wave = extern struct {
sampleRate: c_uint, sampleRate: c_uint,
sampleSize: c_uint, sampleSize: c_uint,
channels: c_uint, channels: c_uint,
data: ?*anyopaque, data: [*c]anyopaque,
}; };
pub const rAudioBuffer = opaque {}; pub const rAudioBuffer = opaque {};
pub const rAudioProcessor = opaque {}; pub const rAudioProcessor = opaque {};
pub const AudioStream = extern struct { pub const AudioStream = extern struct {
buffer: ?*rAudioBuffer, buffer: *rAudioBuffer,
processor: ?*rAudioProcessor, processor: *rAudioProcessor,
sampleRate: c_uint, sampleRate: c_uint,
sampleSize: c_uint, sampleSize: c_uint,
channels: c_uint, channels: c_uint,
@ -756,7 +751,7 @@ pub const Music = extern struct {
frameCount: c_uint, frameCount: c_uint,
looping: bool, looping: bool,
ctxType: c_int, ctxType: c_int,
ctxData: ?*anyopaque, ctxData: [*c]anyopaque,
}; };
pub const VrDeviceInfo = extern struct { pub const VrDeviceInfo = extern struct {

View File

@ -156,7 +156,7 @@ pub const Rectangle = extern struct {
}; };
pub const Image = extern struct { pub const Image = extern struct {
data: ?*anyopaque, data: [*c]anyopaque,
width: c_int, width: c_int,
height: c_int, height: c_int,
mipmaps: c_int, mipmaps: c_int,
@ -435,7 +435,7 @@ pub const Texture = extern struct {
width: c_int, width: c_int,
height: c_int, height: c_int,
mipmaps: c_int, mipmaps: c_int,
format: c_int, format: PixelFormat,
pub fn init(fileName: [:0]const u8) Texture { pub fn init(fileName: [:0]const u8) Texture {
return rl.loadTexture(fileName); return rl.loadTexture(fileName);
@ -703,12 +703,7 @@ pub const Model = extern struct {
} }
}; };
pub const ModelAnimation = extern struct { pub const ModelAnimation = extern struct { boneCount: c_int, frameCount: c_int, bones: [*c]BoneInfo, framePoses: [*c][*c]Transform, name: [32]u8 };
boneCount: c_int,
frameCount: c_int,
bones: [*c]BoneInfo,
framePoses: [*c][*c]Transform,
};
pub const Ray = extern struct { pub const Ray = extern struct {
position: Vector3, position: Vector3,
@ -732,15 +727,15 @@ pub const Wave = extern struct {
sampleRate: c_uint, sampleRate: c_uint,
sampleSize: c_uint, sampleSize: c_uint,
channels: c_uint, channels: c_uint,
data: ?*anyopaque, data: [*c]anyopaque,
}; };
pub const rAudioBuffer = opaque {}; pub const rAudioBuffer = opaque {};
pub const rAudioProcessor = opaque {}; pub const rAudioProcessor = opaque {};
pub const AudioStream = extern struct { pub const AudioStream = extern struct {
buffer: ?*rAudioBuffer, buffer: *rAudioBuffer,
processor: ?*rAudioProcessor, processor: *rAudioProcessor,
sampleRate: c_uint, sampleRate: c_uint,
sampleSize: c_uint, sampleSize: c_uint,
channels: c_uint, channels: c_uint,
@ -756,7 +751,7 @@ pub const Music = extern struct {
frameCount: c_uint, frameCount: c_uint,
looping: bool, looping: bool,
ctxType: c_int, ctxType: c_int,
ctxData: ?*anyopaque, ctxData: [*c]anyopaque,
}; };
pub const VrDeviceInfo = extern struct { pub const VrDeviceInfo = extern struct {