-
Notifications
You must be signed in to change notification settings - Fork 5
/
a_c_wrapper.v
158 lines (139 loc) · 1.88 KB
/
a_c_wrapper.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
module vraylib
#flag linux -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
#include "raylib.h"
pub struct C.Vector2 {
pub mut:
x f32
y f32
}
pub struct C.Vector3 {
pub mut:
x f32
y f32
z f32
}
pub struct C.Vector4 {
pub mut:
x f32
y f32
z f32
w f32
}
type Quaternion C.Vector4
pub struct C.Matrix {
pub mut:
m0 f32
m1 f32
m2 f32
m3 f32
m4 f32
m5 f32
m6 f32
m7 f32
m8 f32
m9 f32
m10 f32
m11 f32
m12 f32
m13 f32
m14 f32
m15 f32
}
pub struct C.Image {
pub mut:
data voidptr
width int
height int
mipmaps int
format int
}
pub struct C.Rectangle {
pub mut:
x f32
y f32
width f32
height f32
}
pub struct C.Texture2D {
pub mut:
id u32
width int
height int
mipmaps int
format int
}
type Texture Texture2D
type TextureCubemap Texture2D
pub struct C.RenderTexture2D {
id u32
texture Texture2D
depth Texture2D
depth_texture bool
}
pub struct C.Color {
pub mut:
r byte
g byte
b byte
a byte
}
[inline] pub fn (c Color) str() string {
return "Color { r: $c.r, g: $c.g, b: $c.b, a: $c.a }"
}
pub struct C.CharInfo {
pub mut:
value int
offset_x int
offset_y int
advance_x int
image Image
}
pub struct C.Font {
pub mut:
base_size int
chars_count int
texture Texture2D
recs &Rectangle
chars &CharInfo
}
pub struct C.Camera2D {
pub mut:
offset Vector2
target Vector2
rotation f32
zoom f32
}
pub struct C.Camera3D {
pub mut:
position Vector3
target Vector3
up Vector3
fovy f32
@type int
}
type Camera C.Camera3D
// Ray type (useful for raycast)
pub struct C.Ray {
position Vector3
direction Vector3
}
pub struct C.RayHitInfo {
hit bool
distance f32
position Vector3
normal Vector3
}
pub struct C.BoundingBox {
min Vector3
max Vector3
}
// N-Patch layout info
pub struct C.NPatchInfo {
source_rec Rectangle
left int
top int
right int
bottom int
@type int
}
type PRectangle &C.Rectangle