mt-lang 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/Rakefile +1 -1
- data/docs/index.html +13 -3
- data/lib/milk_tea/base.rb +7 -2
- data/std/asset_pack.mt +267 -0
- data/std/async/libuv_runtime.mt +539 -0
- data/std/async/mailbox.mt +191 -0
- data/std/async/runtime.mt +87 -0
- data/std/async.mt +87 -0
- data/std/base64.mt +185 -0
- data/std/behavior_tree.mt +396 -0
- data/std/binary.mt +314 -0
- data/std/binary_heap.mt +157 -0
- data/std/bitset.mt +239 -0
- data/std/box2d.mt +535 -0
- data/std/bytes.mt +46 -0
- data/std/c/box2d.mt +1254 -0
- data/std/c/cgltf.mt +647 -0
- data/std/c/cjson.mt +106 -0
- data/std/c/crypto.mt +11 -0
- data/std/c/crypto_support.h +51 -0
- data/std/c/ctype.mt +19 -0
- data/std/c/ctype_bindgen.h +29 -0
- data/std/c/curl.mt +1223 -0
- data/std/c/enet.mt +473 -0
- data/std/c/errno.mt +41 -0
- data/std/c/errno_bindgen.h +53 -0
- data/std/c/flecs.mt +2945 -0
- data/std/c/fs.linux.mt +43 -0
- data/std/c/fs.windows.mt +43 -0
- data/std/c/fs_support.h +954 -0
- data/std/c/gl.mt +2065 -0
- data/std/c/gl_registry_helpers.h +10748 -0
- data/std/c/glfw.mt +499 -0
- data/std/c/libc.mt +167 -0
- data/std/c/libuv.mt +1491 -0
- data/std/c/math.mt +22 -0
- data/std/c/math_bindgen.h +31 -0
- data/std/c/miniaudio.mt +3420 -0
- data/std/c/pcre2.mt +735 -0
- data/std/c/process.mt +58 -0
- data/std/c/process_support.h +1147 -0
- data/std/c/raygui.mt +1602 -0
- data/std/c/raylib.mt +1245 -0
- data/std/c/raymath.mt +163 -0
- data/std/c/rlgl.mt +434 -0
- data/std/c/rpng.mt +60 -0
- data/std/c/rres.mt +187 -0
- data/std/c/sdl3.mt +4132 -0
- data/std/c/sqlite3.mt +951 -0
- data/std/c/stb_image.mt +52 -0
- data/std/c/stb_image_resize2.mt +128 -0
- data/std/c/stb_image_write.mt +19 -0
- data/std/c/stb_rect_pack.mt +38 -0
- data/std/c/stb_truetype.mt +175 -0
- data/std/c/stb_vorbis.mt +31 -0
- data/std/c/stdio.mt +90 -0
- data/std/c/steamworks.h +5769 -0
- data/std/c/steamworks.mt +4771 -0
- data/std/c/string.mt +16 -0
- data/std/c/string_bindgen.h +36 -0
- data/std/c/sync.mt +33 -0
- data/std/c/sync_support.h +219 -0
- data/std/c/terminal.mt +24 -0
- data/std/c/terminal_support.h +408 -0
- data/std/c/time.mt +26 -0
- data/std/c/tls.mt +24 -0
- data/std/c/tls_support.h +626 -0
- data/std/c/tracy.mt +53 -0
- data/std/c/zlib.mt +20 -0
- data/std/c/zlib_support.h +239 -0
- data/std/c/zstd.mt +231 -0
- data/std/cell.mt +60 -0
- data/std/cgltf.mt +115 -0
- data/std/cjson.mt +90 -0
- data/std/cli.mt +768 -0
- data/std/cookie.mt +198 -0
- data/std/counter.mt +160 -0
- data/std/crypto.mt +74 -0
- data/std/cstring.mt +13 -0
- data/std/ctype.mt +52 -0
- data/std/curl/runtime.mt +261 -0
- data/std/curl.mt +38 -0
- data/std/deque.mt +348 -0
- data/std/encoding.mt +93 -0
- data/std/enet.mt +133 -0
- data/std/env.mt +41 -0
- data/std/errno.mt +47 -0
- data/std/flecs.mt +978 -0
- data/std/fmt.mt +271 -0
- data/std/fs.linux.mt +696 -0
- data/std/fs.windows.mt +711 -0
- data/std/fsm.mt +267 -0
- data/std/gl.mt +2062 -0
- data/std/glfw.mt +471 -0
- data/std/goap.mt +342 -0
- data/std/graph.mt +521 -0
- data/std/gzip.mt +77 -0
- data/std/hash.mt +429 -0
- data/std/http/server.mt +810 -0
- data/std/http.mt +1227 -0
- data/std/intern.mt +53 -0
- data/std/jobs.mt +288 -0
- data/std/json.mt +627 -0
- data/std/libc.mt +34 -0
- data/std/libuv.mt +554 -0
- data/std/linear_algebra.mt +243 -0
- data/std/linked_map.mt +372 -0
- data/std/linked_map_view.mt +49 -0
- data/std/linked_set.mt +117 -0
- data/std/log.mt +69 -0
- data/std/map.mt +418 -0
- data/std/math.mt +24 -0
- data/std/mem/arena.mt +137 -0
- data/std/mem/endian.mt +51 -0
- data/std/mem/heap.mt +298 -0
- data/std/mem/pool.mt +164 -0
- data/std/mem/stack.mt +47 -0
- data/std/mem/tracking.mt +119 -0
- data/std/miniaudio.mt +1299 -0
- data/std/multiset.mt +191 -0
- data/std/net/channel.mt +727 -0
- data/std/net/clock.mt +237 -0
- data/std/net/discovery.mt +277 -0
- data/std/net/lobby.mt +813 -0
- data/std/net/manager.mt +539 -0
- data/std/net/mux.mt +839 -0
- data/std/net/nat.mt +122 -0
- data/std/net/packet.mt +219 -0
- data/std/net/punch.mt +162 -0
- data/std/net/rpc.mt +119 -0
- data/std/net/session.mt +1157 -0
- data/std/net/stun.mt +252 -0
- data/std/net/sync.mt +183 -0
- data/std/net/turn.mt +459 -0
- data/std/net.mt +2944 -0
- data/std/oauth2.mt +408 -0
- data/std/option.mt +51 -0
- data/std/ordered_map.mt +497 -0
- data/std/ordered_set.mt +348 -0
- data/std/path.mt +368 -0
- data/std/pcre2/runtime.mt +35 -0
- data/std/pcre2.mt +78 -0
- data/std/priority_queue.mt +55 -0
- data/std/process.mt +837 -0
- data/std/queue.mt +55 -0
- data/std/random.mt +146 -0
- data/std/raygui.mt +99 -0
- data/std/raylib/debug_console.mt +71 -0
- data/std/raylib/easing.mt +388 -0
- data/std/raylib/packed_assets.mt +255 -0
- data/std/raylib/runtime.mt +30 -0
- data/std/raylib/tracy_gpu.mt +37 -0
- data/std/raylib.mt +1510 -0
- data/std/raymath.mt +153 -0
- data/std/result.mt +89 -0
- data/std/rlgl.mt +268 -0
- data/std/rpng.mt +46 -0
- data/std/rres.mt +36 -0
- data/std/sdl3/runtime.mt +54 -0
- data/std/sdl3.mt +1731 -0
- data/std/serialize.mt +68 -0
- data/std/set.mt +124 -0
- data/std/spatial.mt +176 -0
- data/std/sqlite3.mt +151 -0
- data/std/stack.mt +55 -0
- data/std/stb_image.mt +47 -0
- data/std/stb_image_resize2.mt +41 -0
- data/std/stb_image_write.mt +17 -0
- data/std/stb_rect_pack.mt +15 -0
- data/std/stb_truetype.mt +77 -0
- data/std/stb_vorbis.mt +16 -0
- data/std/stdio.mt +88 -0
- data/std/steamworks.mt +1542 -0
- data/std/str.mt +293 -0
- data/std/string.mt +234 -0
- data/std/sync.mt +194 -0
- data/std/tar.mt +704 -0
- data/std/terminal.mt +1002 -0
- data/std/testing.mt +266 -0
- data/std/thread.mt +120 -0
- data/std/time.mt +105 -0
- data/std/tls.mt +616 -0
- data/std/toml.mt +1310 -0
- data/std/tracy.mt +42 -0
- data/std/uri.mt +118 -0
- data/std/url.mt +372 -0
- data/std/vec.mt +433 -0
- data/std/zstd.mt +94 -0
- metadata +187 -2
data/std/raymath.mt
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# generated by mtc imported-bindings from std.c.raymath using bindings/imported/raymath.binding.json
|
|
2
|
+
|
|
3
|
+
import std.c.raymath as c
|
|
4
|
+
import std.c.raylib as rl
|
|
5
|
+
|
|
6
|
+
public const EPSILON: float = c.EPSILON
|
|
7
|
+
|
|
8
|
+
public foreign function clamp(value: float, min: float, max: float) -> float = c.Clamp
|
|
9
|
+
public foreign function lerp(start: float, end: float, amount: float) -> float = c.Lerp
|
|
10
|
+
public foreign function normalize(value: float, start: float, end: float) -> float = c.Normalize
|
|
11
|
+
public foreign function remap(value: float, input_start: float, input_end: float, output_start: float, output_end: float) -> float = c.Remap
|
|
12
|
+
public foreign function wrap(value: float, min: float, max: float) -> float = c.Wrap
|
|
13
|
+
public foreign function float_equals(x: float, y: float) -> int = c.FloatEquals
|
|
14
|
+
public foreign function vector2_zero() -> rl.Vector2 = c.Vector2Zero
|
|
15
|
+
public foreign function vector2_one() -> rl.Vector2 = c.Vector2One
|
|
16
|
+
public foreign function vector2_add(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Add
|
|
17
|
+
public foreign function vector2_add_value(v: rl.Vector2, add: float) -> rl.Vector2 = c.Vector2AddValue
|
|
18
|
+
public foreign function vector2_subtract(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Subtract
|
|
19
|
+
public foreign function vector2_subtract_value(v: rl.Vector2, sub: float) -> rl.Vector2 = c.Vector2SubtractValue
|
|
20
|
+
public foreign function vector2_length(v: rl.Vector2) -> float = c.Vector2Length
|
|
21
|
+
public foreign function vector2_length_sqr(v: rl.Vector2) -> float = c.Vector2LengthSqr
|
|
22
|
+
public foreign function vector2_dot_product(v1: rl.Vector2, v2: rl.Vector2) -> float = c.Vector2DotProduct
|
|
23
|
+
public foreign function vector2_cross_product(v1: rl.Vector2, v2: rl.Vector2) -> float = c.Vector2CrossProduct
|
|
24
|
+
public foreign function vector2_distance(v1: rl.Vector2, v2: rl.Vector2) -> float = c.Vector2Distance
|
|
25
|
+
public foreign function vector2_distance_sqr(v1: rl.Vector2, v2: rl.Vector2) -> float = c.Vector2DistanceSqr
|
|
26
|
+
public foreign function vector2_angle(v1: rl.Vector2, v2: rl.Vector2) -> float = c.Vector2Angle
|
|
27
|
+
public foreign function vector2_line_angle(start: rl.Vector2, end: rl.Vector2) -> float = c.Vector2LineAngle
|
|
28
|
+
public foreign function vector2_scale(v: rl.Vector2, scale: float) -> rl.Vector2 = c.Vector2Scale
|
|
29
|
+
public foreign function vector2_multiply(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Multiply
|
|
30
|
+
public foreign function vector2_negate(v: rl.Vector2) -> rl.Vector2 = c.Vector2Negate
|
|
31
|
+
public foreign function vector2_divide(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Divide
|
|
32
|
+
public foreign function vector2_normalize(v: rl.Vector2) -> rl.Vector2 = c.Vector2Normalize
|
|
33
|
+
public foreign function vector2_transform(v: rl.Vector2, mat: rl.Matrix) -> rl.Vector2 = c.Vector2Transform
|
|
34
|
+
public foreign function vector2_lerp(v1: rl.Vector2, v2: rl.Vector2, amount: float) -> rl.Vector2 = c.Vector2Lerp
|
|
35
|
+
public foreign function vector2_reflect(v: rl.Vector2, normal: rl.Vector2) -> rl.Vector2 = c.Vector2Reflect
|
|
36
|
+
public foreign function vector2_min(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Min
|
|
37
|
+
public foreign function vector2_max(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2 = c.Vector2Max
|
|
38
|
+
public foreign function vector2_rotate(v: rl.Vector2, angle: float) -> rl.Vector2 = c.Vector2Rotate
|
|
39
|
+
public foreign function vector2_move_towards(v: rl.Vector2, target: rl.Vector2, max_distance: float) -> rl.Vector2 = c.Vector2MoveTowards
|
|
40
|
+
public foreign function vector2_invert(v: rl.Vector2) -> rl.Vector2 = c.Vector2Invert
|
|
41
|
+
public foreign function vector2_clamp(v: rl.Vector2, min: rl.Vector2, max: rl.Vector2) -> rl.Vector2 = c.Vector2Clamp
|
|
42
|
+
public foreign function vector2_clamp_value(v: rl.Vector2, min: float, max: float) -> rl.Vector2 = c.Vector2ClampValue
|
|
43
|
+
public foreign function vector2_equals(p: rl.Vector2, q: rl.Vector2) -> int = c.Vector2Equals
|
|
44
|
+
public foreign function vector2_refract(v: rl.Vector2, n: rl.Vector2, r: float) -> rl.Vector2 = c.Vector2Refract
|
|
45
|
+
public foreign function vector3_zero() -> rl.Vector3 = c.Vector3Zero
|
|
46
|
+
public foreign function vector3_one() -> rl.Vector3 = c.Vector3One
|
|
47
|
+
public foreign function vector3_add(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Add
|
|
48
|
+
public foreign function vector3_add_value(v: rl.Vector3, add: float) -> rl.Vector3 = c.Vector3AddValue
|
|
49
|
+
public foreign function vector3_subtract(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Subtract
|
|
50
|
+
public foreign function vector3_subtract_value(v: rl.Vector3, sub: float) -> rl.Vector3 = c.Vector3SubtractValue
|
|
51
|
+
public foreign function vector3_scale(v: rl.Vector3, scalar: float) -> rl.Vector3 = c.Vector3Scale
|
|
52
|
+
public foreign function vector3_multiply(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Multiply
|
|
53
|
+
public foreign function vector3_cross_product(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3CrossProduct
|
|
54
|
+
public foreign function vector3_perpendicular(v: rl.Vector3) -> rl.Vector3 = c.Vector3Perpendicular
|
|
55
|
+
public foreign function vector3_length(v: rl.Vector3) -> float = c.Vector3Length
|
|
56
|
+
public foreign function vector3_length_sqr(v: rl.Vector3) -> float = c.Vector3LengthSqr
|
|
57
|
+
public foreign function vector3_dot_product(v1: rl.Vector3, v2: rl.Vector3) -> float = c.Vector3DotProduct
|
|
58
|
+
public foreign function vector3_distance(v1: rl.Vector3, v2: rl.Vector3) -> float = c.Vector3Distance
|
|
59
|
+
public foreign function vector3_distance_sqr(v1: rl.Vector3, v2: rl.Vector3) -> float = c.Vector3DistanceSqr
|
|
60
|
+
public foreign function vector3_angle(v1: rl.Vector3, v2: rl.Vector3) -> float = c.Vector3Angle
|
|
61
|
+
public foreign function vector3_negate(v: rl.Vector3) -> rl.Vector3 = c.Vector3Negate
|
|
62
|
+
public foreign function vector3_divide(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Divide
|
|
63
|
+
public foreign function vector3_normalize(v: rl.Vector3) -> rl.Vector3 = c.Vector3Normalize
|
|
64
|
+
public foreign function vector3_project(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Project
|
|
65
|
+
public foreign function vector3_reject(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Reject
|
|
66
|
+
public foreign function vector3_ortho_normalize(inout v1: rl.Vector3, inout v2: rl.Vector3) -> void = c.Vector3OrthoNormalize
|
|
67
|
+
public foreign function vector3_transform(v: rl.Vector3, mat: rl.Matrix) -> rl.Vector3 = c.Vector3Transform
|
|
68
|
+
public foreign function vector3_rotate_by_quaternion(v: rl.Vector3, q: rl.Vector4) -> rl.Vector3 = c.Vector3RotateByQuaternion
|
|
69
|
+
public foreign function vector3_rotate_by_axis_angle(v: rl.Vector3, axis: rl.Vector3, angle: float) -> rl.Vector3 = c.Vector3RotateByAxisAngle
|
|
70
|
+
public foreign function vector3_move_towards(v: rl.Vector3, target: rl.Vector3, max_distance: float) -> rl.Vector3 = c.Vector3MoveTowards
|
|
71
|
+
public foreign function vector3_lerp(v1: rl.Vector3, v2: rl.Vector3, amount: float) -> rl.Vector3 = c.Vector3Lerp
|
|
72
|
+
public foreign function vector3_cubic_hermite(v1: rl.Vector3, tangent1: rl.Vector3, v2: rl.Vector3, tangent2: rl.Vector3, amount: float) -> rl.Vector3 = c.Vector3CubicHermite
|
|
73
|
+
public foreign function vector3_reflect(v: rl.Vector3, normal: rl.Vector3) -> rl.Vector3 = c.Vector3Reflect
|
|
74
|
+
public foreign function vector3_min(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Min
|
|
75
|
+
public foreign function vector3_max(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3 = c.Vector3Max
|
|
76
|
+
public foreign function vector3_barycenter(p: rl.Vector3, a: rl.Vector3, b: rl.Vector3, c: rl.Vector3) -> rl.Vector3 = c.Vector3Barycenter
|
|
77
|
+
public foreign function vector3_unproject(source: rl.Vector3, projection: rl.Matrix, view: rl.Matrix) -> rl.Vector3 = c.Vector3Unproject
|
|
78
|
+
public foreign function vector3_to_float_v(v: rl.Vector3) -> array[float, 3] = c.Vector3ToFloatV(v).v
|
|
79
|
+
public foreign function vector3_invert(v: rl.Vector3) -> rl.Vector3 = c.Vector3Invert
|
|
80
|
+
public foreign function vector3_clamp(v: rl.Vector3, min: rl.Vector3, max: rl.Vector3) -> rl.Vector3 = c.Vector3Clamp
|
|
81
|
+
public foreign function vector3_clamp_value(v: rl.Vector3, min: float, max: float) -> rl.Vector3 = c.Vector3ClampValue
|
|
82
|
+
public foreign function vector3_equals(p: rl.Vector3, q: rl.Vector3) -> int = c.Vector3Equals
|
|
83
|
+
public foreign function vector3_refract(v: rl.Vector3, n: rl.Vector3, r: float) -> rl.Vector3 = c.Vector3Refract
|
|
84
|
+
public foreign function vector4_zero() -> rl.Vector4 = c.Vector4Zero
|
|
85
|
+
public foreign function vector4_one() -> rl.Vector4 = c.Vector4One
|
|
86
|
+
public foreign function vector4_add(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Add
|
|
87
|
+
public foreign function vector4_add_value(v: rl.Vector4, add: float) -> rl.Vector4 = c.Vector4AddValue
|
|
88
|
+
public foreign function vector4_subtract(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Subtract
|
|
89
|
+
public foreign function vector4_subtract_value(v: rl.Vector4, add: float) -> rl.Vector4 = c.Vector4SubtractValue
|
|
90
|
+
public foreign function vector4_length(v: rl.Vector4) -> float = c.Vector4Length
|
|
91
|
+
public foreign function vector4_length_sqr(v: rl.Vector4) -> float = c.Vector4LengthSqr
|
|
92
|
+
public foreign function vector4_dot_product(v1: rl.Vector4, v2: rl.Vector4) -> float = c.Vector4DotProduct
|
|
93
|
+
public foreign function vector4_distance(v1: rl.Vector4, v2: rl.Vector4) -> float = c.Vector4Distance
|
|
94
|
+
public foreign function vector4_distance_sqr(v1: rl.Vector4, v2: rl.Vector4) -> float = c.Vector4DistanceSqr
|
|
95
|
+
public foreign function vector4_scale(v: rl.Vector4, scale: float) -> rl.Vector4 = c.Vector4Scale
|
|
96
|
+
public foreign function vector4_multiply(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Multiply
|
|
97
|
+
public foreign function vector4_negate(v: rl.Vector4) -> rl.Vector4 = c.Vector4Negate
|
|
98
|
+
public foreign function vector4_divide(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Divide
|
|
99
|
+
public foreign function vector4_normalize(v: rl.Vector4) -> rl.Vector4 = c.Vector4Normalize
|
|
100
|
+
public foreign function vector4_min(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Min
|
|
101
|
+
public foreign function vector4_max(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4 = c.Vector4Max
|
|
102
|
+
public foreign function vector4_lerp(v1: rl.Vector4, v2: rl.Vector4, amount: float) -> rl.Vector4 = c.Vector4Lerp
|
|
103
|
+
public foreign function vector4_move_towards(v: rl.Vector4, target: rl.Vector4, max_distance: float) -> rl.Vector4 = c.Vector4MoveTowards
|
|
104
|
+
public foreign function vector4_invert(v: rl.Vector4) -> rl.Vector4 = c.Vector4Invert
|
|
105
|
+
public foreign function vector4_equals(p: rl.Vector4, q: rl.Vector4) -> int = c.Vector4Equals
|
|
106
|
+
public foreign function matrix_determinant(mat: rl.Matrix) -> float = c.MatrixDeterminant
|
|
107
|
+
public foreign function matrix_trace(mat: rl.Matrix) -> float = c.MatrixTrace
|
|
108
|
+
public foreign function matrix_transpose(mat: rl.Matrix) -> rl.Matrix = c.MatrixTranspose
|
|
109
|
+
public foreign function matrix_invert(mat: rl.Matrix) -> rl.Matrix = c.MatrixInvert
|
|
110
|
+
public foreign function matrix_identity() -> rl.Matrix = c.MatrixIdentity
|
|
111
|
+
public foreign function matrix_add(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix = c.MatrixAdd
|
|
112
|
+
public foreign function matrix_subtract(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix = c.MatrixSubtract
|
|
113
|
+
public foreign function matrix_multiply(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix = c.MatrixMultiply
|
|
114
|
+
public foreign function matrix_multiply_value(left: rl.Matrix, value: float) -> rl.Matrix = c.MatrixMultiplyValue
|
|
115
|
+
public foreign function matrix_translate(x: float, y: float, z: float) -> rl.Matrix = c.MatrixTranslate
|
|
116
|
+
public foreign function matrix_rotate(axis: rl.Vector3, angle: float) -> rl.Matrix = c.MatrixRotate
|
|
117
|
+
public foreign function matrix_rotate_x(angle: float) -> rl.Matrix = c.MatrixRotateX
|
|
118
|
+
public foreign function matrix_rotate_y(angle: float) -> rl.Matrix = c.MatrixRotateY
|
|
119
|
+
public foreign function matrix_rotate_z(angle: float) -> rl.Matrix = c.MatrixRotateZ
|
|
120
|
+
public foreign function matrix_rotate_xyz(angle: rl.Vector3) -> rl.Matrix = c.MatrixRotateXYZ
|
|
121
|
+
public foreign function matrix_rotate_zyx(angle: rl.Vector3) -> rl.Matrix = c.MatrixRotateZYX
|
|
122
|
+
public foreign function matrix_scale(x: float, y: float, z: float) -> rl.Matrix = c.MatrixScale
|
|
123
|
+
public foreign function matrix_frustum(left: double, right: double, bottom: double, top: double, near_plane: double, far_plane: double) -> rl.Matrix = c.MatrixFrustum
|
|
124
|
+
public foreign function matrix_perspective(fov_y: double, aspect: double, near_plane: double, far_plane: double) -> rl.Matrix = c.MatrixPerspective
|
|
125
|
+
public foreign function matrix_ortho(left: double, right: double, bottom: double, top: double, near_plane: double, far_plane: double) -> rl.Matrix = c.MatrixOrtho
|
|
126
|
+
public foreign function matrix_look_at(eye: rl.Vector3, target: rl.Vector3, up: rl.Vector3) -> rl.Matrix = c.MatrixLookAt
|
|
127
|
+
public foreign function matrix_to_float_v(mat: rl.Matrix) -> array[float, 16] = c.MatrixToFloatV(mat).v
|
|
128
|
+
public foreign function quaternion_add(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion = c.QuaternionAdd
|
|
129
|
+
public foreign function quaternion_add_value(q: rl.Vector4, add: float) -> rl.Quaternion = c.QuaternionAddValue
|
|
130
|
+
public foreign function quaternion_subtract(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion = c.QuaternionSubtract
|
|
131
|
+
public foreign function quaternion_subtract_value(q: rl.Vector4, sub: float) -> rl.Quaternion = c.QuaternionSubtractValue
|
|
132
|
+
public foreign function quaternion_identity() -> rl.Quaternion = c.QuaternionIdentity
|
|
133
|
+
public foreign function quaternion_length(q: rl.Vector4) -> float = c.QuaternionLength
|
|
134
|
+
public foreign function quaternion_normalize(q: rl.Vector4) -> rl.Quaternion = c.QuaternionNormalize
|
|
135
|
+
public foreign function quaternion_invert(q: rl.Vector4) -> rl.Quaternion = c.QuaternionInvert
|
|
136
|
+
public foreign function quaternion_multiply(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion = c.QuaternionMultiply
|
|
137
|
+
public foreign function quaternion_scale(q: rl.Vector4, mul: float) -> rl.Quaternion = c.QuaternionScale
|
|
138
|
+
public foreign function quaternion_divide(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion = c.QuaternionDivide
|
|
139
|
+
public foreign function quaternion_lerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion = c.QuaternionLerp
|
|
140
|
+
public foreign function quaternion_nlerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion = c.QuaternionNlerp
|
|
141
|
+
public foreign function quaternion_slerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion = c.QuaternionSlerp
|
|
142
|
+
public foreign function quaternion_cubic_hermite_spline(q1: rl.Vector4, out_tangent1: rl.Vector4, q2: rl.Vector4, in_tangent2: rl.Vector4, t: float) -> rl.Quaternion = c.QuaternionCubicHermiteSpline
|
|
143
|
+
public foreign function quaternion_from_vector3_to_vector3(from: rl.Vector3, to: rl.Vector3) -> rl.Quaternion = c.QuaternionFromVector3ToVector3
|
|
144
|
+
public foreign function quaternion_from_matrix(mat: rl.Matrix) -> rl.Quaternion = c.QuaternionFromMatrix
|
|
145
|
+
public foreign function quaternion_to_matrix(q: rl.Vector4) -> rl.Matrix = c.QuaternionToMatrix
|
|
146
|
+
public foreign function quaternion_from_axis_angle(axis: rl.Vector3, angle: float) -> rl.Quaternion = c.QuaternionFromAxisAngle
|
|
147
|
+
public foreign function quaternion_to_axis_angle(q: rl.Quaternion, out axis: rl.Vector3, out angle: float) -> void = c.QuaternionToAxisAngle
|
|
148
|
+
public foreign function quaternion_from_euler(pitch: float, yaw: float, roll: float) -> rl.Quaternion = c.QuaternionFromEuler
|
|
149
|
+
public foreign function quaternion_to_euler(q: rl.Vector4) -> rl.Vector3 = c.QuaternionToEuler
|
|
150
|
+
public foreign function quaternion_transform(q: rl.Vector4, mat: rl.Matrix) -> rl.Quaternion = c.QuaternionTransform
|
|
151
|
+
public foreign function quaternion_equals(p: rl.Vector4, q: rl.Vector4) -> int = c.QuaternionEquals
|
|
152
|
+
public foreign function matrix_compose(translation: rl.Vector3, rotation: rl.Vector4, scale: rl.Vector3) -> rl.Matrix = c.MatrixCompose
|
|
153
|
+
public foreign function matrix_decompose(mat: rl.Matrix, out translation: rl.Vector3, out rotation: rl.Quaternion, out scale: rl.Vector3) -> void = c.MatrixDecompose
|
data/std/result.mt
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Standard library: Result type
|
|
2
|
+
#
|
|
3
|
+
# Result[T, E] represents a fallible computation:
|
|
4
|
+
# either Success(T) or Failure(E).
|
|
5
|
+
# Imported automatically as part of the language prelude.
|
|
6
|
+
|
|
7
|
+
import std.option
|
|
8
|
+
|
|
9
|
+
public variant Result[T, E]:
|
|
10
|
+
success(value: T)
|
|
11
|
+
failure(error: E)
|
|
12
|
+
|
|
13
|
+
extending Result[T, E]:
|
|
14
|
+
public function is_success() -> bool:
|
|
15
|
+
match this:
|
|
16
|
+
Result.success:
|
|
17
|
+
return true
|
|
18
|
+
Result.failure:
|
|
19
|
+
return false
|
|
20
|
+
|
|
21
|
+
public function is_failure() -> bool:
|
|
22
|
+
match this:
|
|
23
|
+
Result.success:
|
|
24
|
+
return false
|
|
25
|
+
Result.failure:
|
|
26
|
+
return true
|
|
27
|
+
|
|
28
|
+
public function unwrap() -> T:
|
|
29
|
+
match this:
|
|
30
|
+
Result.success as payload:
|
|
31
|
+
return payload.value
|
|
32
|
+
Result.failure:
|
|
33
|
+
fatal(c"called Result.unwrap on a failure value")
|
|
34
|
+
|
|
35
|
+
public function expect(msg: str) -> T:
|
|
36
|
+
match this:
|
|
37
|
+
Result.success as payload:
|
|
38
|
+
return payload.value
|
|
39
|
+
Result.failure:
|
|
40
|
+
fatal(msg)
|
|
41
|
+
|
|
42
|
+
public function unwrap_error() -> E:
|
|
43
|
+
match this:
|
|
44
|
+
Result.success:
|
|
45
|
+
fatal(c"called Result.unwrap_error on a success value")
|
|
46
|
+
Result.failure as payload:
|
|
47
|
+
return payload.error
|
|
48
|
+
|
|
49
|
+
public function expect_error(msg: str) -> E:
|
|
50
|
+
match this:
|
|
51
|
+
Result.success:
|
|
52
|
+
fatal(msg)
|
|
53
|
+
Result.failure as payload:
|
|
54
|
+
return payload.error
|
|
55
|
+
|
|
56
|
+
public function unwrap_or(default: T) -> T:
|
|
57
|
+
match this:
|
|
58
|
+
Result.success as payload:
|
|
59
|
+
return payload.value
|
|
60
|
+
Result.failure:
|
|
61
|
+
return default
|
|
62
|
+
|
|
63
|
+
public function unwrap_or_else(f: proc(error: E) -> T) -> T:
|
|
64
|
+
match this:
|
|
65
|
+
Result.success as payload:
|
|
66
|
+
return payload.value
|
|
67
|
+
Result.failure as payload:
|
|
68
|
+
return f(error=payload.error)
|
|
69
|
+
|
|
70
|
+
public function map_error[F](f: proc(error: E) -> F) -> Result[T, F]:
|
|
71
|
+
match this:
|
|
72
|
+
Result.success as payload:
|
|
73
|
+
return Result[T, F].success(value = payload.value)
|
|
74
|
+
Result.failure as payload:
|
|
75
|
+
return Result[T, F].failure(error = f(payload.error))
|
|
76
|
+
|
|
77
|
+
public function ok() -> Option[T]:
|
|
78
|
+
match this:
|
|
79
|
+
Result.success as payload:
|
|
80
|
+
return Option[T].some(value = payload.value)
|
|
81
|
+
Result.failure:
|
|
82
|
+
return Option[T].none
|
|
83
|
+
|
|
84
|
+
public function error() -> Option[E]:
|
|
85
|
+
match this:
|
|
86
|
+
Result.success:
|
|
87
|
+
return Option[E].none
|
|
88
|
+
Result.failure as payload:
|
|
89
|
+
return Option[E].some(value = payload.error)
|
data/std/rlgl.mt
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# generated by mtc imported-bindings from std.c.rlgl using bindings/imported/rlgl.binding.json
|
|
2
|
+
|
|
3
|
+
import std.c.rlgl as c
|
|
4
|
+
|
|
5
|
+
public type Matrix = c.Matrix
|
|
6
|
+
public type VertexBuffer = c.rlVertexBuffer
|
|
7
|
+
public type DrawCall = c.rlDrawCall
|
|
8
|
+
public type RenderBatch = c.rlRenderBatch
|
|
9
|
+
public type GlVersion = c.rlGlVersion
|
|
10
|
+
public type TraceLogLevel = c.rlTraceLogLevel
|
|
11
|
+
public type PixelFormat = c.rlPixelFormat
|
|
12
|
+
public type TextureFilter = c.rlTextureFilter
|
|
13
|
+
public type BlendMode = c.rlBlendMode
|
|
14
|
+
public type ShaderLocationIndex = c.rlShaderLocationIndex
|
|
15
|
+
public type ShaderUniformDataType = c.rlShaderUniformDataType
|
|
16
|
+
public type ShaderAttributeDataType = c.rlShaderAttributeDataType
|
|
17
|
+
public type FramebufferAttachType = c.rlFramebufferAttachType
|
|
18
|
+
public type FramebufferAttachTextureType = c.rlFramebufferAttachTextureType
|
|
19
|
+
public type CullMode = c.rlCullMode
|
|
20
|
+
|
|
21
|
+
public const RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = c.RL_DEFAULT_BATCH_BUFFER_ELEMENTS
|
|
22
|
+
public const RL_DEFAULT_BATCH_BUFFERS: int = c.RL_DEFAULT_BATCH_BUFFERS
|
|
23
|
+
public const RL_DEFAULT_BATCH_DRAWCALLS: int = c.RL_DEFAULT_BATCH_DRAWCALLS
|
|
24
|
+
public const RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS: int = c.RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS
|
|
25
|
+
public const RL_MAX_MATRIX_STACK_SIZE: int = c.RL_MAX_MATRIX_STACK_SIZE
|
|
26
|
+
public const RL_MAX_SHADER_LOCATIONS: int = c.RL_MAX_SHADER_LOCATIONS
|
|
27
|
+
public const RL_CULL_DISTANCE_NEAR: double = c.RL_CULL_DISTANCE_NEAR
|
|
28
|
+
public const RL_CULL_DISTANCE_FAR: double = c.RL_CULL_DISTANCE_FAR
|
|
29
|
+
public const RL_TEXTURE_WRAP_S: int = c.RL_TEXTURE_WRAP_S
|
|
30
|
+
public const RL_TEXTURE_WRAP_T: int = c.RL_TEXTURE_WRAP_T
|
|
31
|
+
public const RL_TEXTURE_MAG_FILTER: int = c.RL_TEXTURE_MAG_FILTER
|
|
32
|
+
public const RL_TEXTURE_MIN_FILTER: int = c.RL_TEXTURE_MIN_FILTER
|
|
33
|
+
public const RL_TEXTURE_FILTER_NEAREST: int = c.RL_TEXTURE_FILTER_NEAREST
|
|
34
|
+
public const RL_TEXTURE_FILTER_LINEAR: int = c.RL_TEXTURE_FILTER_LINEAR
|
|
35
|
+
public const RL_TEXTURE_FILTER_MIP_NEAREST: int = c.RL_TEXTURE_FILTER_MIP_NEAREST
|
|
36
|
+
public const RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR: int = c.RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR
|
|
37
|
+
public const RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST: int = c.RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST
|
|
38
|
+
public const RL_TEXTURE_FILTER_MIP_LINEAR: int = c.RL_TEXTURE_FILTER_MIP_LINEAR
|
|
39
|
+
public const RL_TEXTURE_FILTER_ANISOTROPIC: int = c.RL_TEXTURE_FILTER_ANISOTROPIC
|
|
40
|
+
public const RL_TEXTURE_MIPMAP_BIAS_RATIO: int = c.RL_TEXTURE_MIPMAP_BIAS_RATIO
|
|
41
|
+
public const RL_TEXTURE_WRAP_REPEAT: int = c.RL_TEXTURE_WRAP_REPEAT
|
|
42
|
+
public const RL_TEXTURE_WRAP_CLAMP: int = c.RL_TEXTURE_WRAP_CLAMP
|
|
43
|
+
public const RL_TEXTURE_WRAP_MIRROR_REPEAT: int = c.RL_TEXTURE_WRAP_MIRROR_REPEAT
|
|
44
|
+
public const RL_TEXTURE_WRAP_MIRROR_CLAMP: int = c.RL_TEXTURE_WRAP_MIRROR_CLAMP
|
|
45
|
+
public const RL_MODELVIEW: int = c.RL_MODELVIEW
|
|
46
|
+
public const RL_PROJECTION: int = c.RL_PROJECTION
|
|
47
|
+
public const RL_TEXTURE: int = c.RL_TEXTURE
|
|
48
|
+
public const RL_LINES: int = c.RL_LINES
|
|
49
|
+
public const RL_TRIANGLES: int = c.RL_TRIANGLES
|
|
50
|
+
public const RL_QUADS: int = c.RL_QUADS
|
|
51
|
+
public const RL_UNSIGNED_BYTE: int = c.RL_UNSIGNED_BYTE
|
|
52
|
+
public const RL_FLOAT: int = c.RL_FLOAT
|
|
53
|
+
public const RL_STREAM_DRAW: int = c.RL_STREAM_DRAW
|
|
54
|
+
public const RL_STREAM_READ: int = c.RL_STREAM_READ
|
|
55
|
+
public const RL_STREAM_COPY: int = c.RL_STREAM_COPY
|
|
56
|
+
public const RL_STATIC_DRAW: int = c.RL_STATIC_DRAW
|
|
57
|
+
public const RL_STATIC_READ: int = c.RL_STATIC_READ
|
|
58
|
+
public const RL_STATIC_COPY: int = c.RL_STATIC_COPY
|
|
59
|
+
public const RL_DYNAMIC_DRAW: int = c.RL_DYNAMIC_DRAW
|
|
60
|
+
public const RL_DYNAMIC_READ: int = c.RL_DYNAMIC_READ
|
|
61
|
+
public const RL_DYNAMIC_COPY: int = c.RL_DYNAMIC_COPY
|
|
62
|
+
public const RL_FRAGMENT_SHADER: int = c.RL_FRAGMENT_SHADER
|
|
63
|
+
public const RL_VERTEX_SHADER: int = c.RL_VERTEX_SHADER
|
|
64
|
+
public const RL_COMPUTE_SHADER: int = c.RL_COMPUTE_SHADER
|
|
65
|
+
public const RL_ZERO: int = c.RL_ZERO
|
|
66
|
+
public const RL_ONE: int = c.RL_ONE
|
|
67
|
+
public const RL_SRC_COLOR: int = c.RL_SRC_COLOR
|
|
68
|
+
public const RL_ONE_MINUS_SRC_COLOR: int = c.RL_ONE_MINUS_SRC_COLOR
|
|
69
|
+
public const RL_SRC_ALPHA: int = c.RL_SRC_ALPHA
|
|
70
|
+
public const RL_ONE_MINUS_SRC_ALPHA: int = c.RL_ONE_MINUS_SRC_ALPHA
|
|
71
|
+
public const RL_DST_ALPHA: int = c.RL_DST_ALPHA
|
|
72
|
+
public const RL_ONE_MINUS_DST_ALPHA: int = c.RL_ONE_MINUS_DST_ALPHA
|
|
73
|
+
public const RL_DST_COLOR: int = c.RL_DST_COLOR
|
|
74
|
+
public const RL_ONE_MINUS_DST_COLOR: int = c.RL_ONE_MINUS_DST_COLOR
|
|
75
|
+
public const RL_SRC_ALPHA_SATURATE: int = c.RL_SRC_ALPHA_SATURATE
|
|
76
|
+
public const RL_CONSTANT_COLOR: int = c.RL_CONSTANT_COLOR
|
|
77
|
+
public const RL_ONE_MINUS_CONSTANT_COLOR: int = c.RL_ONE_MINUS_CONSTANT_COLOR
|
|
78
|
+
public const RL_CONSTANT_ALPHA: int = c.RL_CONSTANT_ALPHA
|
|
79
|
+
public const RL_ONE_MINUS_CONSTANT_ALPHA: int = c.RL_ONE_MINUS_CONSTANT_ALPHA
|
|
80
|
+
public const RL_FUNC_ADD: int = c.RL_FUNC_ADD
|
|
81
|
+
public const RL_MIN: int = c.RL_MIN
|
|
82
|
+
public const RL_MAX: int = c.RL_MAX
|
|
83
|
+
public const RL_FUNC_SUBTRACT: int = c.RL_FUNC_SUBTRACT
|
|
84
|
+
public const RL_FUNC_REVERSE_SUBTRACT: int = c.RL_FUNC_REVERSE_SUBTRACT
|
|
85
|
+
public const RL_BLEND_EQUATION: int = c.RL_BLEND_EQUATION
|
|
86
|
+
public const RL_BLEND_EQUATION_RGB: int = c.RL_BLEND_EQUATION_RGB
|
|
87
|
+
public const RL_BLEND_EQUATION_ALPHA: int = c.RL_BLEND_EQUATION_ALPHA
|
|
88
|
+
public const RL_BLEND_DST_RGB: int = c.RL_BLEND_DST_RGB
|
|
89
|
+
public const RL_BLEND_SRC_RGB: int = c.RL_BLEND_SRC_RGB
|
|
90
|
+
public const RL_BLEND_DST_ALPHA: int = c.RL_BLEND_DST_ALPHA
|
|
91
|
+
public const RL_BLEND_SRC_ALPHA: int = c.RL_BLEND_SRC_ALPHA
|
|
92
|
+
public const RL_BLEND_COLOR: int = c.RL_BLEND_COLOR
|
|
93
|
+
public const RL_READ_FRAMEBUFFER: int = c.RL_READ_FRAMEBUFFER
|
|
94
|
+
public const RL_DRAW_FRAMEBUFFER: int = c.RL_DRAW_FRAMEBUFFER
|
|
95
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
|
|
96
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
|
|
97
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
|
|
98
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
|
|
99
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
|
|
100
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
|
|
101
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES
|
|
102
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES
|
|
103
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS
|
|
104
|
+
public const RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM: int = c.RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM
|
|
105
|
+
|
|
106
|
+
public foreign function matrix_mode(mode: int) -> void = c.rlMatrixMode
|
|
107
|
+
public foreign function push_matrix() -> void = c.rlPushMatrix
|
|
108
|
+
public foreign function pop_matrix() -> void = c.rlPopMatrix
|
|
109
|
+
public foreign function load_identity() -> void = c.rlLoadIdentity
|
|
110
|
+
public foreign function translatef(x: float, y: float, z: float) -> void = c.rlTranslatef
|
|
111
|
+
public foreign function rotatef(angle: float, x: float, y: float, z: float) -> void = c.rlRotatef
|
|
112
|
+
public foreign function scalef(x: float, y: float, z: float) -> void = c.rlScalef
|
|
113
|
+
public foreign function mult_matrixf(matf: const_ptr[float]) -> void = c.rlMultMatrixf
|
|
114
|
+
public foreign function frustum(left: double, right: double, bottom: double, top: double, znear: double, zfar: double) -> void = c.rlFrustum
|
|
115
|
+
public foreign function ortho(left: double, right: double, bottom: double, top: double, znear: double, zfar: double) -> void = c.rlOrtho
|
|
116
|
+
public foreign function viewport(x: int, y: int, width: int, height: int) -> void = c.rlViewport
|
|
117
|
+
public foreign function set_clip_planes(near_plane: double, far_plane: double) -> void = c.rlSetClipPlanes
|
|
118
|
+
public foreign function get_cull_distance_near() -> double = c.rlGetCullDistanceNear
|
|
119
|
+
public foreign function get_cull_distance_far() -> double = c.rlGetCullDistanceFar
|
|
120
|
+
public foreign function begin(mode: int) -> void = c.rlBegin
|
|
121
|
+
public foreign function end() -> void = c.rlEnd
|
|
122
|
+
public foreign function vertex2i(x: int, y: int) -> void = c.rlVertex2i
|
|
123
|
+
public foreign function vertex2f(x: float, y: float) -> void = c.rlVertex2f
|
|
124
|
+
public foreign function vertex3f(x: float, y: float, z: float) -> void = c.rlVertex3f
|
|
125
|
+
public foreign function tex_coord2f(x: float, y: float) -> void = c.rlTexCoord2f
|
|
126
|
+
public foreign function normal3f(x: float, y: float, z: float) -> void = c.rlNormal3f
|
|
127
|
+
public foreign function color4ub(r: ubyte, g: ubyte, b: ubyte, a: ubyte) -> void = c.rlColor4ub
|
|
128
|
+
public foreign function color3f(x: float, y: float, z: float) -> void = c.rlColor3f
|
|
129
|
+
public foreign function color4f(x: float, y: float, z: float, w: float) -> void = c.rlColor4f
|
|
130
|
+
public foreign function enable_vertex_array(vao_id: uint) -> bool = c.rlEnableVertexArray
|
|
131
|
+
public foreign function disable_vertex_array() -> void = c.rlDisableVertexArray
|
|
132
|
+
public foreign function enable_vertex_buffer(id: uint) -> void = c.rlEnableVertexBuffer
|
|
133
|
+
public foreign function disable_vertex_buffer() -> void = c.rlDisableVertexBuffer
|
|
134
|
+
public foreign function enable_vertex_buffer_element(id: uint) -> void = c.rlEnableVertexBufferElement
|
|
135
|
+
public foreign function disable_vertex_buffer_element() -> void = c.rlDisableVertexBufferElement
|
|
136
|
+
public foreign function enable_vertex_attribute(index: uint) -> void = c.rlEnableVertexAttribute
|
|
137
|
+
public foreign function disable_vertex_attribute(index: uint) -> void = c.rlDisableVertexAttribute
|
|
138
|
+
public foreign function enable_state_pointer(vertex_attrib_type: int, buffer: ptr[void]) -> void = c.rlEnableStatePointer
|
|
139
|
+
public foreign function disable_state_pointer(vertex_attrib_type: int) -> void = c.rlDisableStatePointer
|
|
140
|
+
public foreign function active_texture_slot(slot: int) -> void = c.rlActiveTextureSlot
|
|
141
|
+
public foreign function enable_texture(id: uint) -> void = c.rlEnableTexture
|
|
142
|
+
public foreign function disable_texture() -> void = c.rlDisableTexture
|
|
143
|
+
public foreign function enable_texture_cubemap(id: uint) -> void = c.rlEnableTextureCubemap
|
|
144
|
+
public foreign function disable_texture_cubemap() -> void = c.rlDisableTextureCubemap
|
|
145
|
+
public foreign function texture_parameters(id: uint, param: int, value: int) -> void = c.rlTextureParameters
|
|
146
|
+
public foreign function cubemap_parameters(id: uint, param: int, value: int) -> void = c.rlCubemapParameters
|
|
147
|
+
public foreign function enable_shader(id: uint) -> void = c.rlEnableShader
|
|
148
|
+
public foreign function disable_shader() -> void = c.rlDisableShader
|
|
149
|
+
public foreign function enable_framebuffer(id: uint) -> void = c.rlEnableFramebuffer
|
|
150
|
+
public foreign function disable_framebuffer() -> void = c.rlDisableFramebuffer
|
|
151
|
+
public foreign function get_active_framebuffer() -> uint = c.rlGetActiveFramebuffer
|
|
152
|
+
public foreign function active_draw_buffers(count: int) -> void = c.rlActiveDrawBuffers
|
|
153
|
+
public foreign function blit_framebuffer(src_x: int, src_y: int, src_width: int, src_height: int, dst_x: int, dst_y: int, dst_width: int, dst_height: int, buffer_mask: int) -> void = c.rlBlitFramebuffer
|
|
154
|
+
public foreign function bind_framebuffer(target: uint, framebuffer: uint) -> void = c.rlBindFramebuffer
|
|
155
|
+
public foreign function enable_color_blend() -> void = c.rlEnableColorBlend
|
|
156
|
+
public foreign function disable_color_blend() -> void = c.rlDisableColorBlend
|
|
157
|
+
public foreign function enable_depth_test() -> void = c.rlEnableDepthTest
|
|
158
|
+
public foreign function disable_depth_test() -> void = c.rlDisableDepthTest
|
|
159
|
+
public foreign function enable_depth_mask() -> void = c.rlEnableDepthMask
|
|
160
|
+
public foreign function disable_depth_mask() -> void = c.rlDisableDepthMask
|
|
161
|
+
public foreign function enable_backface_culling() -> void = c.rlEnableBackfaceCulling
|
|
162
|
+
public foreign function disable_backface_culling() -> void = c.rlDisableBackfaceCulling
|
|
163
|
+
public foreign function color_mask(r: bool, g: bool, b: bool, a: bool) -> void = c.rlColorMask
|
|
164
|
+
public foreign function set_cull_face(mode: int) -> void = c.rlSetCullFace
|
|
165
|
+
public foreign function enable_scissor_test() -> void = c.rlEnableScissorTest
|
|
166
|
+
public foreign function disable_scissor_test() -> void = c.rlDisableScissorTest
|
|
167
|
+
public foreign function scissor(x: int, y: int, width: int, height: int) -> void = c.rlScissor
|
|
168
|
+
public foreign function enable_point_mode() -> void = c.rlEnablePointMode
|
|
169
|
+
public foreign function disable_point_mode() -> void = c.rlDisablePointMode
|
|
170
|
+
public foreign function set_point_size(size: float) -> void = c.rlSetPointSize
|
|
171
|
+
public foreign function get_point_size() -> float = c.rlGetPointSize
|
|
172
|
+
public foreign function enable_wire_mode() -> void = c.rlEnableWireMode
|
|
173
|
+
public foreign function disable_wire_mode() -> void = c.rlDisableWireMode
|
|
174
|
+
public foreign function set_line_width(width: float) -> void = c.rlSetLineWidth
|
|
175
|
+
public foreign function get_line_width() -> float = c.rlGetLineWidth
|
|
176
|
+
public foreign function enable_smooth_lines() -> void = c.rlEnableSmoothLines
|
|
177
|
+
public foreign function disable_smooth_lines() -> void = c.rlDisableSmoothLines
|
|
178
|
+
public foreign function enable_stereo_render() -> void = c.rlEnableStereoRender
|
|
179
|
+
public foreign function disable_stereo_render() -> void = c.rlDisableStereoRender
|
|
180
|
+
public foreign function is_stereo_render_enabled() -> bool = c.rlIsStereoRenderEnabled
|
|
181
|
+
public foreign function clear_color(r: ubyte, g: ubyte, b: ubyte, a: ubyte) -> void = c.rlClearColor
|
|
182
|
+
public foreign function clear_screen_buffers() -> void = c.rlClearScreenBuffers
|
|
183
|
+
public foreign function check_errors() -> void = c.rlCheckErrors
|
|
184
|
+
public foreign function set_blend_mode(mode: int) -> void = c.rlSetBlendMode
|
|
185
|
+
public foreign function set_blend_factors(gl_src_factor: int, gl_dst_factor: int, gl_equation: int) -> void = c.rlSetBlendFactors
|
|
186
|
+
public foreign function set_blend_factors_separate(gl_src_rgb: int, gl_dst_rgb: int, gl_src_alpha: int, gl_dst_alpha: int, gl_eq_rgb: int, gl_eq_alpha: int) -> void = c.rlSetBlendFactorsSeparate
|
|
187
|
+
public foreign function gl_init(width: int, height: int) -> void = c.rlglInit
|
|
188
|
+
public foreign function gl_close() -> void = c.rlglClose
|
|
189
|
+
public foreign function load_extensions(loader: ptr[void]) -> void = c.rlLoadExtensions
|
|
190
|
+
public foreign function get_proc_address(proc_name: str as cstr) -> ptr[void]? = c.rlGetProcAddress
|
|
191
|
+
public foreign function get_version() -> int = c.rlGetVersion
|
|
192
|
+
public foreign function set_framebuffer_width(width: int) -> void = c.rlSetFramebufferWidth
|
|
193
|
+
public foreign function get_framebuffer_width() -> int = c.rlGetFramebufferWidth
|
|
194
|
+
public foreign function set_framebuffer_height(height: int) -> void = c.rlSetFramebufferHeight
|
|
195
|
+
public foreign function get_framebuffer_height() -> int = c.rlGetFramebufferHeight
|
|
196
|
+
public foreign function get_texture_id_default() -> uint = c.rlGetTextureIdDefault
|
|
197
|
+
public foreign function get_shader_id_default() -> uint = c.rlGetShaderIdDefault
|
|
198
|
+
public foreign function get_shader_locs_default() -> ptr[int] = c.rlGetShaderLocsDefault
|
|
199
|
+
public foreign function load_render_batch(num_buffers: int, buffer_elements: int) -> RenderBatch = c.rlLoadRenderBatch
|
|
200
|
+
public foreign function unload_render_batch(batch: RenderBatch) -> void = c.rlUnloadRenderBatch
|
|
201
|
+
public foreign function draw_render_batch(batch: ptr[RenderBatch]) -> void = c.rlDrawRenderBatch
|
|
202
|
+
public foreign function set_render_batch_active(batch: ptr[RenderBatch]?) -> void = c.rlSetRenderBatchActive
|
|
203
|
+
public foreign function draw_render_batch_active() -> void = c.rlDrawRenderBatchActive
|
|
204
|
+
public foreign function check_render_batch_limit(v_count: int) -> bool = c.rlCheckRenderBatchLimit
|
|
205
|
+
public foreign function set_texture(id: uint) -> void = c.rlSetTexture
|
|
206
|
+
public foreign function load_vertex_array() -> uint = c.rlLoadVertexArray
|
|
207
|
+
public foreign function load_vertex_buffer[T](buffer: ptr[T] as const_ptr[void], size: int, dynamic: bool) -> uint = c.rlLoadVertexBuffer
|
|
208
|
+
public foreign function load_vertex_buffer_element[T](buffer: ptr[T] as const_ptr[void], size: int, dynamic: bool) -> uint = c.rlLoadVertexBufferElement
|
|
209
|
+
public foreign function update_vertex_buffer[T](buffer_id: uint, data: ptr[T] as const_ptr[void], data_size: int, offset: int) -> void = c.rlUpdateVertexBuffer
|
|
210
|
+
public foreign function update_vertex_buffer_elements[T](id: uint, data: ptr[T] as const_ptr[void], data_size: int, offset: int) -> void = c.rlUpdateVertexBufferElements
|
|
211
|
+
public foreign function unload_vertex_array(vao_id: uint) -> void = c.rlUnloadVertexArray
|
|
212
|
+
public foreign function unload_vertex_buffer(vbo_id: uint) -> void = c.rlUnloadVertexBuffer
|
|
213
|
+
public foreign function set_vertex_attribute(index: uint, comp_size: int, type_: int, normalized: bool, stride: int, offset: int) -> void = c.rlSetVertexAttribute
|
|
214
|
+
public foreign function set_vertex_attribute_divisor(index: uint, divisor: int) -> void = c.rlSetVertexAttributeDivisor
|
|
215
|
+
public foreign function set_vertex_attribute_default[T](loc_index: int, value: ptr[T] as const_ptr[void], attrib_type: int, count: int) -> void = c.rlSetVertexAttributeDefault
|
|
216
|
+
public foreign function draw_vertex_array(offset: int, count: int) -> void = c.rlDrawVertexArray
|
|
217
|
+
public foreign function draw_vertex_array_elements(offset: int, count: int, buffer: const_ptr[void]) -> void = c.rlDrawVertexArrayElements
|
|
218
|
+
public foreign function draw_vertex_array_instanced(offset: int, count: int, instances: int) -> void = c.rlDrawVertexArrayInstanced
|
|
219
|
+
public foreign function draw_vertex_array_elements_instanced(offset: int, count: int, buffer: const_ptr[void], instances: int) -> void = c.rlDrawVertexArrayElementsInstanced
|
|
220
|
+
public foreign function load_texture(data: const_ptr[void]?, width: int, height: int, format: int, mipmap_count: int) -> uint = c.rlLoadTexture
|
|
221
|
+
public foreign function load_texture_depth(width: int, height: int, use_render_buffer: bool) -> uint = c.rlLoadTextureDepth
|
|
222
|
+
public foreign function load_texture_cubemap(data: const_ptr[void]?, size: int, format: int, mipmap_count: int) -> uint = c.rlLoadTextureCubemap
|
|
223
|
+
public foreign function update_texture[T](id: uint, offset_x: int, offset_y: int, width: int, height: int, format: int, data: ptr[T] as const_ptr[void]) -> void = c.rlUpdateTexture
|
|
224
|
+
public foreign function get_gl_texture_formats(format: int, out gl_internal_format: uint, out gl_format: uint, out gl_type: uint) -> void = c.rlGetGlTextureFormats
|
|
225
|
+
public foreign function get_pixel_format_name(format: uint) -> cstr = c.rlGetPixelFormatName
|
|
226
|
+
public foreign function unload_texture(id: uint) -> void = c.rlUnloadTexture
|
|
227
|
+
public foreign function gen_texture_mipmaps(id: uint, width: int, height: int, format: int, out mipmaps: int) -> void = c.rlGenTextureMipmaps
|
|
228
|
+
public foreign function read_texture_pixels(id: uint, width: int, height: int, format: int) -> ptr[void] = c.rlReadTexturePixels
|
|
229
|
+
public foreign function read_screen_pixels(width: int, height: int) -> ptr[ubyte] = c.rlReadScreenPixels
|
|
230
|
+
public foreign function load_framebuffer() -> uint = c.rlLoadFramebuffer
|
|
231
|
+
public foreign function framebuffer_attach(id: uint, tex_id: uint, attach_type: int, tex_type: int, mip_level: int) -> void = c.rlFramebufferAttach
|
|
232
|
+
public foreign function framebuffer_complete(id: uint) -> bool = c.rlFramebufferComplete
|
|
233
|
+
public foreign function unload_framebuffer(id: uint) -> void = c.rlUnloadFramebuffer
|
|
234
|
+
public foreign function copy_framebuffer(x: int, y: int, width: int, height: int, format: int, pixels: ptr[void]) -> void = c.rlCopyFramebuffer
|
|
235
|
+
public foreign function resize_framebuffer(width: int, height: int) -> void = c.rlResizeFramebuffer
|
|
236
|
+
public foreign function load_shader(code: str as cstr, type_: int) -> uint = c.rlLoadShader
|
|
237
|
+
public foreign function load_shader_program(vs_code: cstr?, fs_code: cstr?) -> uint = c.rlLoadShaderProgram
|
|
238
|
+
public foreign function load_shader_program_ex(vs_id: uint, fs_id: uint) -> uint = c.rlLoadShaderProgramEx
|
|
239
|
+
public foreign function load_shader_program_compute(cs_id: uint) -> uint = c.rlLoadShaderProgramCompute
|
|
240
|
+
public foreign function unload_shader(id: uint) -> void = c.rlUnloadShader
|
|
241
|
+
public foreign function unload_shader_program(id: uint) -> void = c.rlUnloadShaderProgram
|
|
242
|
+
public foreign function get_location_uniform(id: uint, uniform_name: str as cstr) -> int = c.rlGetLocationUniform
|
|
243
|
+
public foreign function get_location_attrib(id: uint, attrib_name: str as cstr) -> int = c.rlGetLocationAttrib
|
|
244
|
+
public foreign function set_uniform[T](loc_index: int, value: ptr[T] as const_ptr[void], uniform_type: int, count: int) -> void = c.rlSetUniform
|
|
245
|
+
public foreign function set_uniform_matrix(loc_index: int, mat: Matrix) -> void = c.rlSetUniformMatrix
|
|
246
|
+
public foreign function set_uniform_matrices(loc_index: int, mat: const_ptr[Matrix], count: int) -> void = c.rlSetUniformMatrices
|
|
247
|
+
public foreign function set_uniform_sampler(loc_index: int, texture_id: uint) -> void = c.rlSetUniformSampler
|
|
248
|
+
public foreign function set_shader(id: uint, locs: ptr[int]) -> void = c.rlSetShader
|
|
249
|
+
public foreign function compute_shader_dispatch(group_x: uint, group_y: uint, group_z: uint) -> void = c.rlComputeShaderDispatch
|
|
250
|
+
public foreign function load_shader_buffer(size: uint, data: const_ptr[void]?, usage_hint: int) -> uint = c.rlLoadShaderBuffer
|
|
251
|
+
public foreign function unload_shader_buffer(ssbo_id: uint) -> void = c.rlUnloadShaderBuffer
|
|
252
|
+
public foreign function update_shader_buffer[T](id: uint, data: ptr[T] as const_ptr[void], data_size: uint, offset: uint) -> void = c.rlUpdateShaderBuffer
|
|
253
|
+
public foreign function bind_shader_buffer(id: uint, index: uint) -> void = c.rlBindShaderBuffer
|
|
254
|
+
public foreign function read_shader_buffer[T](id: uint, dest: ptr[T] as ptr[void], count: uint, offset: uint) -> void = c.rlReadShaderBuffer
|
|
255
|
+
public foreign function copy_shader_buffer(dest_id: uint, src_id: uint, dest_offset: uint, src_offset: uint, count: uint) -> void = c.rlCopyShaderBuffer
|
|
256
|
+
public foreign function get_shader_buffer_size(id: uint) -> uint = c.rlGetShaderBufferSize
|
|
257
|
+
public foreign function bind_image_texture(id: uint, index: uint, format: int, readonly: bool) -> void = c.rlBindImageTexture
|
|
258
|
+
public foreign function get_matrix_modelview() -> Matrix = c.rlGetMatrixModelview
|
|
259
|
+
public foreign function get_matrix_projection() -> Matrix = c.rlGetMatrixProjection
|
|
260
|
+
public foreign function get_matrix_transform() -> Matrix = c.rlGetMatrixTransform
|
|
261
|
+
public foreign function get_matrix_projection_stereo(eye: int) -> Matrix = c.rlGetMatrixProjectionStereo
|
|
262
|
+
public foreign function get_matrix_view_offset_stereo(eye: int) -> Matrix = c.rlGetMatrixViewOffsetStereo
|
|
263
|
+
public foreign function set_matrix_projection(proj: Matrix) -> void = c.rlSetMatrixProjection
|
|
264
|
+
public foreign function set_matrix_modelview(view: Matrix) -> void = c.rlSetMatrixModelview
|
|
265
|
+
public foreign function set_matrix_projection_stereo(right: Matrix, left: Matrix) -> void = c.rlSetMatrixProjectionStereo
|
|
266
|
+
public foreign function set_matrix_view_offset_stereo(right: Matrix, left: Matrix) -> void = c.rlSetMatrixViewOffsetStereo
|
|
267
|
+
public foreign function load_draw_cube() -> void = c.rlLoadDrawCube
|
|
268
|
+
public foreign function load_draw_quad() -> void = c.rlLoadDrawQuad
|
data/std/rpng.mt
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# generated by mtc imported-bindings from std.c.rpng using bindings/imported/rpng.binding.json
|
|
2
|
+
|
|
3
|
+
import std.c.rpng as c
|
|
4
|
+
|
|
5
|
+
public type chunk = c.rpng_chunk
|
|
6
|
+
public type color = c.rpng_color
|
|
7
|
+
public type palette = c.rpng_palette
|
|
8
|
+
|
|
9
|
+
public const MAX_CHUNKS_COUNT: int = c.RPNG_MAX_CHUNKS_COUNT
|
|
10
|
+
public const SUCCESS: int = c.RPNG_SUCCESS
|
|
11
|
+
public const ERROR_FILE_OPEN: int = c.RPNG_ERROR_FILE_OPEN
|
|
12
|
+
public const ERROR_PIXEL_FORMAT: int = c.RPNG_ERROR_PIXEL_FORMAT
|
|
13
|
+
public const ERROR_MEMORY_ALLOC: int = c.RPNG_ERROR_MEMORY_ALLOC
|
|
14
|
+
|
|
15
|
+
public foreign function load_image(filename: cstr, width: ptr[int], height: ptr[int], color_channels: ptr[int], bit_depth: ptr[int]) -> ptr[char]? = c.rpng_load_image
|
|
16
|
+
public foreign function load_image_indexed(filename: cstr, width: ptr[int], height: ptr[int], palette: ptr[palette]) -> ptr[char]? = c.rpng_load_image_indexed
|
|
17
|
+
public foreign function save_image(filename: str as cstr, data: str as cstr, width: int, height: int, color_channels: int, bit_depth: int) -> int = c.rpng_save_image
|
|
18
|
+
public foreign function save_image_indexed(filename: str as cstr, indexed_data: str as cstr, width: int, height: int, palette: palette) -> int = c.rpng_save_image_indexed
|
|
19
|
+
public foreign function load_image_from_memory(buffer: cstr, width: ptr[int], height: ptr[int], color_channels: ptr[int], bit_depth: ptr[int]) -> ptr[char]? = c.rpng_load_image_from_memory
|
|
20
|
+
public foreign function load_image_indexed_from_memory(buffer: cstr, width: ptr[int], height: ptr[int], palette: ptr[palette]) -> ptr[char]? = c.rpng_load_image_indexed_from_memory
|
|
21
|
+
public foreign function save_image_to_memory(data: cstr, width: int, height: int, color_channels: int, bit_depth: int, output_size: ptr[int]) -> ptr[char]? = c.rpng_save_image_to_memory
|
|
22
|
+
public foreign function save_image_indexed_to_memory(indexed_data: cstr, width: int, height: int, palette: palette, output_size: ptr[int]) -> ptr[char]? = c.rpng_save_image_indexed_to_memory
|
|
23
|
+
public foreign function chunk_count(filename: str as cstr) -> int = c.rpng_chunk_count
|
|
24
|
+
public foreign function chunk_read(filename: str as cstr, chunk_type: str as cstr) -> chunk = c.rpng_chunk_read
|
|
25
|
+
public foreign function chunk_read_all(filename: cstr, count: ptr[int]) -> ptr[chunk]? = c.rpng_chunk_read_all
|
|
26
|
+
public foreign function chunk_remove(filename: str as cstr, chunk_type: str as cstr) -> void = c.rpng_chunk_remove
|
|
27
|
+
public foreign function chunk_remove_ancillary(filename: str as cstr) -> void = c.rpng_chunk_remove_ancillary
|
|
28
|
+
public foreign function chunk_write(filename: str as cstr, data: chunk) -> void = c.rpng_chunk_write
|
|
29
|
+
public foreign function chunk_write_text(filename: str as cstr, keyword: ptr[char], text: ptr[char]) -> void = c.rpng_chunk_write_text
|
|
30
|
+
public foreign function chunk_write_comp_text(filename: str as cstr, keyword: ptr[char], text: ptr[char]) -> void = c.rpng_chunk_write_comp_text
|
|
31
|
+
public foreign function chunk_write_gamma(filename: str as cstr, gamma: float) -> void = c.rpng_chunk_write_gamma
|
|
32
|
+
public foreign function chunk_write_srgb(filename: str as cstr, srgb_type: char) -> void = c.rpng_chunk_write_srgb
|
|
33
|
+
public foreign function chunk_write_time(filename: str as cstr, year: short, month: char, day: char, hour: char, min: char, sec: char) -> void = c.rpng_chunk_write_time
|
|
34
|
+
public foreign function chunk_write_physical_size(filename: str as cstr, pixels_unit_x: int, pixels_unit_y: int, meters: bool) -> void = c.rpng_chunk_write_physical_size
|
|
35
|
+
public foreign function chunk_write_chroma(filename: str as cstr, white_x: float, white_y: float, red_x: float, red_y: float, green_x: float, green_y: float, blue_x: float, blue_y: float) -> void = c.rpng_chunk_write_chroma
|
|
36
|
+
public foreign function chunk_check_all_valid(filename: str as cstr) -> bool = c.rpng_chunk_check_all_valid
|
|
37
|
+
public foreign function chunk_combine_image_data(filename: str as cstr) -> void = c.rpng_chunk_combine_image_data
|
|
38
|
+
public foreign function chunk_split_image_data(filename: str as cstr, split_size: int) -> void = c.rpng_chunk_split_image_data
|
|
39
|
+
public foreign function chunk_count_from_memory(buffer: str as cstr) -> int = c.rpng_chunk_count_from_memory
|
|
40
|
+
public foreign function chunk_read_from_memory(buffer: str as cstr, chunk_type: str as cstr) -> chunk = c.rpng_chunk_read_from_memory
|
|
41
|
+
public foreign function chunk_read_all_from_memory(buffer: cstr, count: ptr[int]) -> ptr[chunk]? = c.rpng_chunk_read_all_from_memory
|
|
42
|
+
public foreign function chunk_remove_from_memory(buffer: cstr, chunk_type: cstr, output_size: ptr[int]) -> ptr[char]? = c.rpng_chunk_remove_from_memory
|
|
43
|
+
public foreign function chunk_remove_ancillary_from_memory(buffer: cstr, output_size: ptr[int]) -> ptr[char]? = c.rpng_chunk_remove_ancillary_from_memory
|
|
44
|
+
public foreign function chunk_write_from_memory(buffer: cstr, chunk: chunk, output_size: ptr[int]) -> ptr[char]? = c.rpng_chunk_write_from_memory
|
|
45
|
+
public foreign function chunk_combine_image_data_from_memory(buffer: ptr[char], output_size: ptr[int]) -> ptr[char]? = c.rpng_chunk_combine_image_data_from_memory
|
|
46
|
+
public foreign function chunk_split_image_data_from_memory(buffer: ptr[char], split_size: int, output_size: ptr[int]) -> ptr[char]? = c.rpng_chunk_split_image_data_from_memory
|
data/std/rres.mt
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# generated by mtc imported-bindings from std.c.rres using bindings/imported/rres.binding.json
|
|
2
|
+
|
|
3
|
+
import std.c.rres as c
|
|
4
|
+
|
|
5
|
+
public type FileHeader = c.rresFileHeader
|
|
6
|
+
public type ResourceChunkInfo = c.rresResourceChunkInfo
|
|
7
|
+
public type ResourceChunkData = c.rresResourceChunkData
|
|
8
|
+
public type ResourceChunk = c.rresResourceChunk
|
|
9
|
+
public type ResourceMulti = c.rresResourceMulti
|
|
10
|
+
public type DirEntry = c.rresDirEntry
|
|
11
|
+
public type CentralDir = c.rresCentralDir
|
|
12
|
+
public type FontGlyphInfo = c.rresFontGlyphInfo
|
|
13
|
+
public type ResourceDataType = c.rresResourceDataType
|
|
14
|
+
public type CompressionType = c.rresCompressionType
|
|
15
|
+
public type EncryptionType = c.rresEncryptionType
|
|
16
|
+
public type ErrorType = c.rresErrorType
|
|
17
|
+
public type TextEncoding = c.rresTextEncoding
|
|
18
|
+
public type CodeLang = c.rresCodeLang
|
|
19
|
+
public type PixelFormat = c.rresPixelFormat
|
|
20
|
+
public type VertexAttribute = c.rresVertexAttribute
|
|
21
|
+
public type VertexFormat = c.rresVertexFormat
|
|
22
|
+
public type FontStyle = c.rresFontStyle
|
|
23
|
+
|
|
24
|
+
public foreign function load_resource_chunk(file_name: str as cstr, rres_id: int) -> ResourceChunk = c.rresLoadResourceChunk
|
|
25
|
+
public foreign function unload_resource_chunk(chunk: ResourceChunk) -> void = c.rresUnloadResourceChunk
|
|
26
|
+
public foreign function load_resource_multi(file_name: str as cstr, rres_id: int) -> ResourceMulti = c.rresLoadResourceMulti
|
|
27
|
+
public foreign function unload_resource_multi(multi: ResourceMulti) -> void = c.rresUnloadResourceMulti
|
|
28
|
+
public foreign function load_resource_chunk_info(file_name: str as cstr, rres_id: int) -> ResourceChunkInfo = c.rresLoadResourceChunkInfo
|
|
29
|
+
public foreign function load_resource_chunk_info_all(file_name: str as cstr, chunk_count: ptr[uint]) -> ptr[ResourceChunkInfo]? = c.rresLoadResourceChunkInfoAll
|
|
30
|
+
public foreign function load_central_directory(file_name: str as cstr) -> CentralDir = c.rresLoadCentralDirectory
|
|
31
|
+
public foreign function unload_central_directory(dir: CentralDir) -> void = c.rresUnloadCentralDirectory
|
|
32
|
+
public foreign function get_data_type(four_cc: const_ptr[ubyte]) -> uint = c.rresGetDataType
|
|
33
|
+
public foreign function get_resource_id(dir: CentralDir, file_name: str as cstr) -> int = c.rresGetResourceId
|
|
34
|
+
public foreign function compute_crc32(data: ptr[ubyte], len: int) -> uint = c.rresComputeCRC32
|
|
35
|
+
public foreign function set_cipher_password(password: str as cstr) -> void = c.rresSetCipherPassword
|
|
36
|
+
public foreign function get_cipher_password() -> cstr? = c.rresGetCipherPassword
|