mirror of
https://github.com/raylib-zig/raylib-zig.git
synced 2025-12-06 06:13:08 +00:00
Remove redundant namespaces from enums (#178)
This commit is contained in:
parent
0dcee846f4
commit
845af357e4
@ -69,7 +69,7 @@ pub fn main() anyerror!void {
|
|||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
if (rl.isMouseButtonDown(.mouse_button_left)) {
|
if (rl.isMouseButtonDown(.left)) {
|
||||||
// Sample mouse input.
|
// Sample mouse input.
|
||||||
const mousePosition = rl.getMousePosition();
|
const mousePosition = rl.getMousePosition();
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ pub fn main() anyerror!void {
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Player movement
|
// Player movement
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_right)) {
|
if (rl.isKeyDown(.right)) {
|
||||||
player.x += 2;
|
player.x += 2;
|
||||||
} else if (rl.isKeyDown(rl.KeyboardKey.key_left)) {
|
} else if (rl.isKeyDown(.left)) {
|
||||||
player.x -= 2;
|
player.x -= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,9 +61,9 @@ pub fn main() anyerror!void {
|
|||||||
camera.target = rl.Vector2.init(player.x + 20, player.y + 20);
|
camera.target = rl.Vector2.init(player.x + 20, player.y + 20);
|
||||||
|
|
||||||
// Camera rotation controls
|
// Camera rotation controls
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_a)) {
|
if (rl.isKeyDown(.a)) {
|
||||||
camera.rotation -= 1;
|
camera.rotation -= 1;
|
||||||
} else if (rl.isKeyDown(rl.KeyboardKey.key_s)) {
|
} else if (rl.isKeyDown(.s)) {
|
||||||
camera.rotation += 1;
|
camera.rotation += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ pub fn main() anyerror!void {
|
|||||||
camera.zoom = rl.math.clamp(camera.zoom, 0.1, 3.0);
|
camera.zoom = rl.math.clamp(camera.zoom, 0.1, 3.0);
|
||||||
|
|
||||||
// Camera reset (zoom and rotation)
|
// Camera reset (zoom and rotation)
|
||||||
if (rl.isKeyPressed(rl.KeyboardKey.key_r)) {
|
if (rl.isKeyPressed(.r)) {
|
||||||
camera.zoom = 1.0;
|
camera.zoom = 1.0;
|
||||||
camera.rotation = 0.0;
|
camera.rotation = 0.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,14 +27,14 @@ pub fn main() anyerror!void {
|
|||||||
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
if (rl.isKeyPressed(.key_one)) {
|
if (rl.isKeyPressed(.one)) {
|
||||||
zoomMode = 0;
|
zoomMode = 0;
|
||||||
} else if (rl.isKeyPressed(.key_two)) {
|
} else if (rl.isKeyPressed(.two)) {
|
||||||
zoomMode = 1;
|
zoomMode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate based on mouse right click
|
// Translate based on mouse right click
|
||||||
if (rl.isMouseButtonDown(.mouse_button_right)) {
|
if (rl.isMouseButtonDown(.right)) {
|
||||||
var delta = rl.getMouseDelta();
|
var delta = rl.getMouseDelta();
|
||||||
delta = rl.math.vector2Scale(delta, -1.0 / camera.zoom);
|
delta = rl.math.vector2Scale(delta, -1.0 / camera.zoom);
|
||||||
camera.target = rl.math.vector2Add(camera.target, delta);
|
camera.target = rl.math.vector2Add(camera.target, delta);
|
||||||
@ -63,7 +63,7 @@ pub fn main() anyerror!void {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Zoom based on left click
|
// Zoom based on left click
|
||||||
if (rl.isMouseButtonPressed(.mouse_button_left)) {
|
if (rl.isMouseButtonPressed(.left)) {
|
||||||
// Get the world point that is under the mouse
|
// Get the world point that is under the mouse
|
||||||
const mouseWorldPos = rl.getScreenToWorld2D(rl.getMousePosition(), camera);
|
const mouseWorldPos = rl.getScreenToWorld2D(rl.getMousePosition(), camera);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ pub fn main() anyerror!void {
|
|||||||
// under the cursor to the screen space point under the cursor at any zoom
|
// under the cursor to the screen space point under the cursor at any zoom
|
||||||
camera.target = mouseWorldPos;
|
camera.target = mouseWorldPos;
|
||||||
}
|
}
|
||||||
if (rl.isMouseButtonDown(.mouse_button_left)) {
|
if (rl.isMouseButtonDown(.left)) {
|
||||||
// Zoom increment
|
// Zoom increment
|
||||||
const deltaX = rl.getMouseDelta().x;
|
const deltaX = rl.getMouseDelta().x;
|
||||||
var scaleFactor = 1.0 + (0.01 * @abs(deltaX));
|
var scaleFactor = 1.0 + (0.01 * @abs(deltaX));
|
||||||
|
|||||||
@ -18,7 +18,7 @@ pub fn main() anyerror!void {
|
|||||||
.target = rl.Vector3.init(0, 1.8, 0),
|
.target = rl.Vector3.init(0, 1.8, 0),
|
||||||
.up = rl.Vector3.init(0, 1, 0),
|
.up = rl.Vector3.init(0, 1, 0),
|
||||||
.fovy = 60,
|
.fovy = 60,
|
||||||
.projection = rl.CameraProjection.camera_perspective,
|
.projection = .perspective,
|
||||||
};
|
};
|
||||||
|
|
||||||
var heights: [MAX_COLUMNS]f32 = undefined;
|
var heights: [MAX_COLUMNS]f32 = undefined;
|
||||||
@ -48,7 +48,7 @@ pub fn main() anyerror!void {
|
|||||||
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
camera.update(rl.CameraMode.camera_first_person);
|
camera.update(.first_person);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|||||||
@ -20,7 +20,7 @@ pub fn main() anyerror!void {
|
|||||||
.target = rl.Vector3.init(0, 0, 0),
|
.target = rl.Vector3.init(0, 0, 0),
|
||||||
.up = rl.Vector3.init(0, 1, 0),
|
.up = rl.Vector3.init(0, 1, 0),
|
||||||
.fovy = 45,
|
.fovy = 45,
|
||||||
.projection = rl.CameraProjection.camera_perspective,
|
.projection = .perspective,
|
||||||
};
|
};
|
||||||
|
|
||||||
const cubePosition = rl.Vector3.init(0, 0, 0);
|
const cubePosition = rl.Vector3.init(0, 0, 0);
|
||||||
@ -33,9 +33,9 @@ pub fn main() anyerror!void {
|
|||||||
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
||||||
// Update
|
// Update
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
camera.update(rl.CameraMode.camera_free);
|
camera.update(.free);
|
||||||
|
|
||||||
if (rl.isKeyPressed(rl.KeyboardKey.key_z)) {
|
if (rl.isKeyPressed(.z)) {
|
||||||
camera.target = rl.Vector3.init(0, 0, 0);
|
camera.target = rl.Vector3.init(0, 0, 0);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -15,7 +15,7 @@ pub fn main() anyerror!void {
|
|||||||
.target = rl.Vector3.init(0, 0, 0),
|
.target = rl.Vector3.init(0, 0, 0),
|
||||||
.up = rl.Vector3.init(0, 1, 0),
|
.up = rl.Vector3.init(0, 1, 0),
|
||||||
.fovy = 45,
|
.fovy = 45,
|
||||||
.projection = rl.CameraProjection.camera_perspective,
|
.projection = .perspective,
|
||||||
};
|
};
|
||||||
|
|
||||||
const cubePosition = rl.Vector3.init(0, 1, 0);
|
const cubePosition = rl.Vector3.init(0, 1, 0);
|
||||||
@ -31,14 +31,14 @@ pub fn main() anyerror!void {
|
|||||||
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
if (rl.isCursorHidden()) rl.updateCamera(&camera, rl.CameraMode.camera_first_person);
|
if (rl.isCursorHidden()) rl.updateCamera(&camera, .first_person);
|
||||||
|
|
||||||
// Toggle camera controls
|
// Toggle camera controls
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_right)) {
|
if (rl.isMouseButtonPressed(.right)) {
|
||||||
if (rl.isCursorHidden()) rl.enableCursor() else rl.disableCursor();
|
if (rl.isCursorHidden()) rl.enableCursor() else rl.disableCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
|
if (rl.isMouseButtonPressed(.left)) {
|
||||||
if (!collision.hit) {
|
if (!collision.hit) {
|
||||||
ray = rl.getScreenToWorldRay(rl.getMousePosition(), camera);
|
ray = rl.getScreenToWorldRay(rl.getMousePosition(), camera);
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ pub fn main() anyerror!void {
|
|||||||
// TODO: Update `title` state variables here!
|
// TODO: Update `title` state variables here!
|
||||||
|
|
||||||
// Press ENTER to change to `gameplay` state
|
// Press ENTER to change to `gameplay` state
|
||||||
if (rl.isKeyPressed(.key_enter) or rl.isGestureDetected(.gesture_tap)) {
|
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
|
||||||
current_screen = .gameplay;
|
current_screen = .gameplay;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -64,7 +64,7 @@ pub fn main() anyerror!void {
|
|||||||
// TODO: Update `gameplay` state variables here!
|
// TODO: Update `gameplay` state variables here!
|
||||||
|
|
||||||
// Press ENTER to change to `ending` state
|
// Press ENTER to change to `ending` state
|
||||||
if (rl.isKeyPressed(.key_enter) or rl.isGestureDetected(.gesture_tap)) {
|
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
|
||||||
current_screen = .ending;
|
current_screen = .ending;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -72,7 +72,7 @@ pub fn main() anyerror!void {
|
|||||||
// TODO: Update `ending` state variables here!
|
// TODO: Update `ending` state variables here!
|
||||||
|
|
||||||
// Press ENTER to return to `title` state
|
// Press ENTER to return to `title` state
|
||||||
if (rl.isKeyPressed(.key_enter) or rl.isGestureDetected(.gesture_tap)) {
|
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
|
||||||
current_screen = .title;
|
current_screen = .title;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -21,16 +21,16 @@ pub fn main() anyerror!void {
|
|||||||
|
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_right)) {
|
if (rl.isKeyDown(.right)) {
|
||||||
ballPosition.x += 2.0;
|
ballPosition.x += 2.0;
|
||||||
}
|
}
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_left)) {
|
if (rl.isKeyDown(.left)) {
|
||||||
ballPosition.x -= 2.0;
|
ballPosition.x -= 2.0;
|
||||||
}
|
}
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_up)) {
|
if (rl.isKeyDown(.up)) {
|
||||||
ballPosition.y -= 2.0;
|
ballPosition.y -= 2.0;
|
||||||
}
|
}
|
||||||
if (rl.isKeyDown(rl.KeyboardKey.key_down)) {
|
if (rl.isKeyDown(.down)) {
|
||||||
ballPosition.y += 2.0;
|
ballPosition.y += 2.0;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -25,11 +25,11 @@ pub fn main() anyerror!void {
|
|||||||
ballPosition.x = @as(f32, @floatFromInt(rl.getMouseX()));
|
ballPosition.x = @as(f32, @floatFromInt(rl.getMouseX()));
|
||||||
ballPosition.y = @as(f32, @floatFromInt(rl.getMouseY()));
|
ballPosition.y = @as(f32, @floatFromInt(rl.getMouseY()));
|
||||||
|
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
|
if (rl.isMouseButtonPressed(.left)) {
|
||||||
ballColor = rl.Color.maroon;
|
ballColor = rl.Color.maroon;
|
||||||
} else if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_middle)) {
|
} else if (rl.isMouseButtonPressed(.middle)) {
|
||||||
ballColor = rl.Color.lime;
|
ballColor = rl.Color.lime;
|
||||||
} else if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_right)) {
|
} else if (rl.isMouseButtonPressed(.right)) {
|
||||||
ballColor = rl.Color.dark_blue;
|
ballColor = rl.Color.dark_blue;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -28,23 +28,23 @@ pub fn main() anyerror!void {
|
|||||||
|
|
||||||
ballColor = rl.Color.beige;
|
ballColor = rl.Color.beige;
|
||||||
|
|
||||||
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_left)) {
|
if (rl.isMouseButtonDown(.left)) {
|
||||||
ballColor = rl.Color.maroon;
|
ballColor = rl.Color.maroon;
|
||||||
}
|
}
|
||||||
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_middle)) {
|
if (rl.isMouseButtonDown(.middle)) {
|
||||||
ballColor = rl.Color.lime;
|
ballColor = rl.Color.lime;
|
||||||
}
|
}
|
||||||
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_right)) {
|
if (rl.isMouseButtonDown(.right)) {
|
||||||
ballColor = rl.Color.dark_blue;
|
ballColor = rl.Color.dark_blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
|
if (rl.isMouseButtonPressed(.left)) {
|
||||||
touchCounter = 10;
|
touchCounter = 10;
|
||||||
}
|
}
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_middle)) {
|
if (rl.isMouseButtonPressed(.middle)) {
|
||||||
touchCounter = 10;
|
touchCounter = 10;
|
||||||
}
|
}
|
||||||
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_right)) {
|
if (rl.isMouseButtonPressed(.right)) {
|
||||||
touchCounter = 10;
|
touchCounter = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,9 +58,9 @@ pub fn main() anyerror!void {
|
|||||||
while (!rl.windowShouldClose()) {
|
while (!rl.windowShouldClose()) {
|
||||||
// Update
|
// Update
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
if (rl.isKeyPressed(.key_f)) rl.toggleFullscreen(); // Modifies window size when scaling!
|
if (rl.isKeyPressed(.f)) rl.toggleFullscreen(); // Modifies window size when scaling!
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_r)) {
|
if (rl.isKeyPressed(.r)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_resizable = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_resizable = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .window_resizable = true });
|
rl.clearWindowState(rl.ConfigFlags { .window_resizable = true });
|
||||||
} else {
|
} else {
|
||||||
@ -68,7 +68,7 @@ pub fn main() anyerror!void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_d)) {
|
if (rl.isKeyPressed(.d)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_undecorated = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_undecorated = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .window_undecorated = true });
|
rl.clearWindowState(rl.ConfigFlags { .window_undecorated = true });
|
||||||
} else {
|
} else {
|
||||||
@ -76,7 +76,7 @@ pub fn main() anyerror!void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_h)) {
|
if (rl.isKeyPressed(.h)) {
|
||||||
if (!rl.isWindowState(rl.ConfigFlags { .window_hidden = true })) {
|
if (!rl.isWindowState(rl.ConfigFlags { .window_hidden = true })) {
|
||||||
rl.setWindowState(rl.ConfigFlags { .window_hidden = true });
|
rl.setWindowState(rl.ConfigFlags { .window_hidden = true });
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ pub fn main() anyerror!void {
|
|||||||
if (frames_counter >= 240) rl.clearWindowState(rl.ConfigFlags { .window_hidden = true }); // Show window after 3 seconds
|
if (frames_counter >= 240) rl.clearWindowState(rl.ConfigFlags { .window_hidden = true }); // Show window after 3 seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_n)) {
|
if (rl.isKeyPressed(.n)) {
|
||||||
if (!rl.isWindowState(rl.ConfigFlags { .window_minimized = true })) {
|
if (!rl.isWindowState(rl.ConfigFlags { .window_minimized = true })) {
|
||||||
rl.minimizeWindow();
|
rl.minimizeWindow();
|
||||||
}
|
}
|
||||||
@ -100,32 +100,32 @@ pub fn main() anyerror!void {
|
|||||||
if (frames_counter >= 240) rl.restoreWindow(); // Restore window after 3 seconds
|
if (frames_counter >= 240) rl.restoreWindow(); // Restore window after 3 seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_m)) {
|
if (rl.isKeyPressed(.m)) {
|
||||||
// NOTE: Requires `flag_window_resizable` enabled!
|
// NOTE: Requires `flag_window_resizable` enabled!
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_maximized = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_maximized = true })) {
|
||||||
rl.restoreWindow();
|
rl.restoreWindow();
|
||||||
} else rl.maximizeWindow();
|
} else rl.maximizeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_u)) {
|
if (rl.isKeyPressed(.u)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_unfocused = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_unfocused = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .window_unfocused = true });
|
rl.clearWindowState(rl.ConfigFlags { .window_unfocused = true });
|
||||||
} else rl.setWindowState(rl.ConfigFlags { .window_unfocused = true });
|
} else rl.setWindowState(rl.ConfigFlags { .window_unfocused = true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_t)) {
|
if (rl.isKeyPressed(.t)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_topmost = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_topmost = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .window_topmost = true });
|
rl.clearWindowState(rl.ConfigFlags { .window_topmost = true });
|
||||||
} else rl.setWindowState(rl.ConfigFlags { .window_topmost = true });
|
} else rl.setWindowState(rl.ConfigFlags { .window_topmost = true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_a)) {
|
if (rl.isKeyPressed(.a)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .window_always_run = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .window_always_run = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .window_always_run = true });
|
rl.clearWindowState(rl.ConfigFlags { .window_always_run = true });
|
||||||
} else rl.setWindowState(rl.ConfigFlags { .window_always_run = true });
|
} else rl.setWindowState(rl.ConfigFlags { .window_always_run = true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rl.isKeyPressed(.key_v)) {
|
if (rl.isKeyPressed(.v)) {
|
||||||
if (rl.isWindowState(rl.ConfigFlags { .vsync_hint = true })) {
|
if (rl.isWindowState(rl.ConfigFlags { .vsync_hint = true })) {
|
||||||
rl.clearWindowState(rl.ConfigFlags { .vsync_hint = true });
|
rl.clearWindowState(rl.ConfigFlags { .vsync_hint = true });
|
||||||
} else rl.setWindowState(rl.ConfigFlags { .vsync_hint = true });
|
} else rl.setWindowState(rl.ConfigFlags { .vsync_hint = true });
|
||||||
|
|||||||
@ -38,19 +38,19 @@ pub fn main() anyerror!void {
|
|||||||
shdrOutline,
|
shdrOutline,
|
||||||
outlineSizeLoc,
|
outlineSizeLoc,
|
||||||
&outlineSize,
|
&outlineSize,
|
||||||
rl.ShaderUniformDataType.shader_uniform_float,
|
.float,
|
||||||
);
|
);
|
||||||
rl.setShaderValue(
|
rl.setShaderValue(
|
||||||
shdrOutline,
|
shdrOutline,
|
||||||
outlineColorLoc,
|
outlineColorLoc,
|
||||||
&outlineColor,
|
&outlineColor,
|
||||||
rl.ShaderUniformDataType.shader_uniform_vec4,
|
.vec4,
|
||||||
);
|
);
|
||||||
rl.setShaderValue(
|
rl.setShaderValue(
|
||||||
shdrOutline,
|
shdrOutline,
|
||||||
textureSizeLoc,
|
textureSizeLoc,
|
||||||
&textureSize,
|
&textureSize,
|
||||||
rl.ShaderUniformDataType.shader_uniform_vec2,
|
.vec2,
|
||||||
);
|
);
|
||||||
|
|
||||||
rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second
|
rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
@ -67,7 +67,7 @@ pub fn main() anyerror!void {
|
|||||||
shdrOutline,
|
shdrOutline,
|
||||||
outlineSizeLoc,
|
outlineSizeLoc,
|
||||||
&outlineSize,
|
&outlineSize,
|
||||||
rl.ShaderUniformDataType.shader_uniform_float,
|
.float,
|
||||||
);
|
);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ pub fn main() anyerror!void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Control frames speed
|
// Control frames speed
|
||||||
if (rl.isKeyPressed(rl.KeyboardKey.key_right)) {
|
if (rl.isKeyPressed(.right)) {
|
||||||
framesSpeed += 1;
|
framesSpeed += 1;
|
||||||
} else if (rl.isKeyPressed(rl.KeyboardKey.key_left)) {
|
} else if (rl.isKeyPressed(.left)) {
|
||||||
framesSpeed -= 1;
|
framesSpeed -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1611,347 +1611,347 @@ pub const ConfigFlags = packed struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub const TraceLogLevel = enum(c_int) {
|
pub const TraceLogLevel = enum(c_int) {
|
||||||
log_all = 0,
|
all = 0,
|
||||||
log_trace = 1,
|
trace = 1,
|
||||||
log_debug = 2,
|
debug = 2,
|
||||||
log_info = 3,
|
info = 3,
|
||||||
log_warning = 4,
|
warning = 4,
|
||||||
log_error = 5,
|
err = 5,
|
||||||
log_fatal = 6,
|
fatal = 6,
|
||||||
log_none = 7,
|
none = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const KeyboardKey = enum(c_int) {
|
pub const KeyboardKey = enum(c_int) {
|
||||||
key_null = 0,
|
null = 0,
|
||||||
key_apostrophe = 39,
|
apostrophe = 39,
|
||||||
key_comma = 44,
|
comma = 44,
|
||||||
key_minus = 45,
|
minus = 45,
|
||||||
key_period = 46,
|
period = 46,
|
||||||
key_slash = 47,
|
slash = 47,
|
||||||
key_zero = 48,
|
zero = 48,
|
||||||
key_one = 49,
|
one = 49,
|
||||||
key_two = 50,
|
two = 50,
|
||||||
key_three = 51,
|
three = 51,
|
||||||
key_four = 52,
|
four = 52,
|
||||||
key_five = 53,
|
five = 53,
|
||||||
key_six = 54,
|
six = 54,
|
||||||
key_seven = 55,
|
seven = 55,
|
||||||
key_eight = 56,
|
eight = 56,
|
||||||
key_nine = 57,
|
nine = 57,
|
||||||
key_semicolon = 59,
|
semicolon = 59,
|
||||||
key_equal = 61,
|
equal = 61,
|
||||||
key_a = 65,
|
a = 65,
|
||||||
key_b = 66,
|
b = 66,
|
||||||
key_c = 67,
|
c = 67,
|
||||||
key_d = 68,
|
d = 68,
|
||||||
key_e = 69,
|
e = 69,
|
||||||
key_f = 70,
|
f = 70,
|
||||||
key_g = 71,
|
g = 71,
|
||||||
key_h = 72,
|
h = 72,
|
||||||
key_i = 73,
|
i = 73,
|
||||||
key_j = 74,
|
j = 74,
|
||||||
key_k = 75,
|
k = 75,
|
||||||
key_l = 76,
|
l = 76,
|
||||||
key_m = 77,
|
m = 77,
|
||||||
key_n = 78,
|
n = 78,
|
||||||
key_o = 79,
|
o = 79,
|
||||||
key_p = 80,
|
p = 80,
|
||||||
key_q = 81,
|
q = 81,
|
||||||
key_r = 82,
|
r = 82,
|
||||||
key_s = 83,
|
s = 83,
|
||||||
key_t = 84,
|
t = 84,
|
||||||
key_u = 85,
|
u = 85,
|
||||||
key_v = 86,
|
v = 86,
|
||||||
key_w = 87,
|
w = 87,
|
||||||
key_x = 88,
|
x = 88,
|
||||||
key_y = 89,
|
y = 89,
|
||||||
key_z = 90,
|
z = 90,
|
||||||
key_space = 32,
|
space = 32,
|
||||||
key_escape = 256,
|
escape = 256,
|
||||||
key_enter = 257,
|
enter = 257,
|
||||||
key_tab = 258,
|
tab = 258,
|
||||||
key_backspace = 259,
|
backspace = 259,
|
||||||
key_insert = 260,
|
insert = 260,
|
||||||
key_delete = 261,
|
delete = 261,
|
||||||
key_right = 262,
|
right = 262,
|
||||||
key_left = 263,
|
left = 263,
|
||||||
key_down = 264,
|
down = 264,
|
||||||
key_up = 265,
|
up = 265,
|
||||||
key_page_up = 266,
|
page_up = 266,
|
||||||
key_page_down = 267,
|
page_down = 267,
|
||||||
key_home = 268,
|
home = 268,
|
||||||
key_end = 269,
|
end = 269,
|
||||||
key_caps_lock = 280,
|
caps_lock = 280,
|
||||||
key_scroll_lock = 281,
|
scroll_lock = 281,
|
||||||
key_num_lock = 282,
|
num_lock = 282,
|
||||||
key_print_screen = 283,
|
print_screen = 283,
|
||||||
key_pause = 284,
|
pause = 284,
|
||||||
key_f1 = 290,
|
f1 = 290,
|
||||||
key_f2 = 291,
|
f2 = 291,
|
||||||
key_f3 = 292,
|
f3 = 292,
|
||||||
key_f4 = 293,
|
f4 = 293,
|
||||||
key_f5 = 294,
|
f5 = 294,
|
||||||
key_f6 = 295,
|
f6 = 295,
|
||||||
key_f7 = 296,
|
f7 = 296,
|
||||||
key_f8 = 297,
|
f8 = 297,
|
||||||
key_f9 = 298,
|
f9 = 298,
|
||||||
key_f10 = 299,
|
f10 = 299,
|
||||||
key_f11 = 300,
|
f11 = 300,
|
||||||
key_f12 = 301,
|
f12 = 301,
|
||||||
key_left_shift = 340,
|
left_shift = 340,
|
||||||
key_left_control = 341,
|
left_control = 341,
|
||||||
key_left_alt = 342,
|
left_alt = 342,
|
||||||
key_left_super = 343,
|
left_super = 343,
|
||||||
key_right_shift = 344,
|
right_shift = 344,
|
||||||
key_right_control = 345,
|
right_control = 345,
|
||||||
key_right_alt = 346,
|
right_alt = 346,
|
||||||
key_right_super = 347,
|
right_super = 347,
|
||||||
key_kb_menu = 348,
|
kb_menu = 348,
|
||||||
key_left_bracket = 91,
|
left_bracket = 91,
|
||||||
key_backslash = 92,
|
backslash = 92,
|
||||||
key_right_bracket = 93,
|
right_bracket = 93,
|
||||||
key_grave = 96,
|
grave = 96,
|
||||||
key_kp_0 = 320,
|
kp_0 = 320,
|
||||||
key_kp_1 = 321,
|
kp_1 = 321,
|
||||||
key_kp_2 = 322,
|
kp_2 = 322,
|
||||||
key_kp_3 = 323,
|
kp_3 = 323,
|
||||||
key_kp_4 = 324,
|
kp_4 = 324,
|
||||||
key_kp_5 = 325,
|
kp_5 = 325,
|
||||||
key_kp_6 = 326,
|
kp_6 = 326,
|
||||||
key_kp_7 = 327,
|
kp_7 = 327,
|
||||||
key_kp_8 = 328,
|
kp_8 = 328,
|
||||||
key_kp_9 = 329,
|
kp_9 = 329,
|
||||||
key_kp_decimal = 330,
|
kp_decimal = 330,
|
||||||
key_kp_divide = 331,
|
kp_divide = 331,
|
||||||
key_kp_multiply = 332,
|
kp_multiply = 332,
|
||||||
key_kp_subtract = 333,
|
kp_subtract = 333,
|
||||||
key_kp_add = 334,
|
kp_add = 334,
|
||||||
key_kp_enter = 335,
|
kp_enter = 335,
|
||||||
key_kp_equal = 336,
|
kp_equal = 336,
|
||||||
key_back = 4,
|
back = 4,
|
||||||
//key_menu = 82,
|
//menu = 82,
|
||||||
key_volume_up = 24,
|
volume_up = 24,
|
||||||
key_volume_down = 25,
|
volume_down = 25,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MouseButton = enum(c_int) {
|
pub const MouseButton = enum(c_int) {
|
||||||
mouse_button_left = 0,
|
left = 0,
|
||||||
mouse_button_right = 1,
|
right = 1,
|
||||||
mouse_button_middle = 2,
|
middle = 2,
|
||||||
mouse_button_side = 3,
|
side = 3,
|
||||||
mouse_button_extra = 4,
|
extra = 4,
|
||||||
mouse_button_forward = 5,
|
forward = 5,
|
||||||
mouse_button_back = 6,
|
back = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MouseCursor = enum(c_int) {
|
pub const MouseCursor = enum(c_int) {
|
||||||
mouse_cursor_default = 0,
|
default = 0,
|
||||||
mouse_cursor_arrow = 1,
|
arrow = 1,
|
||||||
mouse_cursor_ibeam = 2,
|
ibeam = 2,
|
||||||
mouse_cursor_crosshair = 3,
|
crosshair = 3,
|
||||||
mouse_cursor_pointing_hand = 4,
|
pointing_hand = 4,
|
||||||
mouse_cursor_resize_ew = 5,
|
resize_ew = 5,
|
||||||
mouse_cursor_resize_ns = 6,
|
resize_ns = 6,
|
||||||
mouse_cursor_resize_nwse = 7,
|
resize_nwse = 7,
|
||||||
mouse_cursor_resize_nesw = 8,
|
resize_nesw = 8,
|
||||||
mouse_cursor_resize_all = 9,
|
resize_all = 9,
|
||||||
mouse_cursor_not_allowed = 10,
|
not_allowed = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const GamepadButton = enum(c_int) {
|
pub const GamepadButton = enum(c_int) {
|
||||||
gamepad_button_unknown = 0,
|
unknown = 0,
|
||||||
gamepad_button_left_face_up = 1,
|
left_face_up = 1,
|
||||||
gamepad_button_left_face_right = 2,
|
left_face_right = 2,
|
||||||
gamepad_button_left_face_down = 3,
|
left_face_down = 3,
|
||||||
gamepad_button_left_face_left = 4,
|
left_face_left = 4,
|
||||||
gamepad_button_right_face_up = 5,
|
right_face_up = 5,
|
||||||
gamepad_button_right_face_right = 6,
|
right_face_right = 6,
|
||||||
gamepad_button_right_face_down = 7,
|
right_face_down = 7,
|
||||||
gamepad_button_right_face_left = 8,
|
right_face_left = 8,
|
||||||
gamepad_button_left_trigger_1 = 9,
|
left_trigger_1 = 9,
|
||||||
gamepad_button_left_trigger_2 = 10,
|
left_trigger_2 = 10,
|
||||||
gamepad_button_right_trigger_1 = 11,
|
right_trigger_1 = 11,
|
||||||
gamepad_button_right_trigger_2 = 12,
|
right_trigger_2 = 12,
|
||||||
gamepad_button_middle_left = 13,
|
middle_left = 13,
|
||||||
gamepad_button_middle = 14,
|
middle = 14,
|
||||||
gamepad_button_middle_right = 15,
|
middle_right = 15,
|
||||||
gamepad_button_left_thumb = 16,
|
left_thumb = 16,
|
||||||
gamepad_button_right_thumb = 17,
|
right_thumb = 17,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const GamepadAxis = enum(c_int) {
|
pub const GamepadAxis = enum(c_int) {
|
||||||
gamepad_axis_left_x = 0,
|
left_x = 0,
|
||||||
gamepad_axis_left_y = 1,
|
left_y = 1,
|
||||||
gamepad_axis_right_x = 2,
|
right_x = 2,
|
||||||
gamepad_axis_right_y = 3,
|
right_y = 3,
|
||||||
gamepad_axis_left_trigger = 4,
|
left_trigger = 4,
|
||||||
gamepad_axis_right_trigger = 5,
|
right_trigger = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MaterialMapIndex = enum(c_int) {
|
pub const MaterialMapIndex = enum(c_int) {
|
||||||
material_map_albedo = 0,
|
albedo = 0,
|
||||||
material_map_metalness = 1,
|
metalness = 1,
|
||||||
material_map_normal = 2,
|
normal = 2,
|
||||||
material_map_roughness = 3,
|
roughness = 3,
|
||||||
material_map_occlusion = 4,
|
occlusion = 4,
|
||||||
material_map_emission = 5,
|
emission = 5,
|
||||||
material_map_height = 6,
|
height = 6,
|
||||||
material_map_cubemap = 7,
|
cubemap = 7,
|
||||||
material_map_irradiance = 8,
|
irradiance = 8,
|
||||||
material_map_prefilter = 9,
|
prefilter = 9,
|
||||||
material_map_brdf = 10,
|
brdf = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderLocationIndex = enum(c_int) {
|
pub const ShaderLocationIndex = enum(c_int) {
|
||||||
shader_loc_vertex_position = 0,
|
vertex_position = 0,
|
||||||
shader_loc_vertex_texcoord01 = 1,
|
vertex_texcoord01 = 1,
|
||||||
shader_loc_vertex_texcoord02 = 2,
|
vertex_texcoord02 = 2,
|
||||||
shader_loc_vertex_normal = 3,
|
vertex_normal = 3,
|
||||||
shader_loc_vertex_tangent = 4,
|
vertex_tangent = 4,
|
||||||
shader_loc_vertex_color = 5,
|
vertex_color = 5,
|
||||||
shader_loc_matrix_mvp = 6,
|
matrix_mvp = 6,
|
||||||
shader_loc_matrix_view = 7,
|
matrix_view = 7,
|
||||||
shader_loc_matrix_projection = 8,
|
matrix_projection = 8,
|
||||||
shader_loc_matrix_model = 9,
|
matrix_model = 9,
|
||||||
shader_loc_matrix_normal = 10,
|
matrix_normal = 10,
|
||||||
shader_loc_vector_view = 11,
|
vector_view = 11,
|
||||||
shader_loc_color_diffuse = 12,
|
color_diffuse = 12,
|
||||||
shader_loc_color_specular = 13,
|
color_specular = 13,
|
||||||
shader_loc_color_ambient = 14,
|
color_ambient = 14,
|
||||||
shader_loc_map_albedo = 15,
|
map_albedo = 15,
|
||||||
shader_loc_map_metalness = 16,
|
map_metalness = 16,
|
||||||
shader_loc_map_normal = 17,
|
map_normal = 17,
|
||||||
shader_loc_map_roughness = 18,
|
map_roughness = 18,
|
||||||
shader_loc_map_occlusion = 19,
|
map_occlusion = 19,
|
||||||
shader_loc_map_emission = 20,
|
map_emission = 20,
|
||||||
shader_loc_map_height = 21,
|
map_height = 21,
|
||||||
shader_loc_map_cubemap = 22,
|
map_cubemap = 22,
|
||||||
shader_loc_map_irradiance = 23,
|
map_irradiance = 23,
|
||||||
shader_loc_map_prefilter = 24,
|
map_prefilter = 24,
|
||||||
shader_loc_map_brdf = 25,
|
map_brdf = 25,
|
||||||
shader_loc_vertex_boneids = 26,
|
vertex_boneids = 26,
|
||||||
shader_loc_vertex_boneweights = 27,
|
vertex_boneweights = 27,
|
||||||
shader_loc_bone_matrices = 28,
|
bone_matrices = 28,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderUniformDataType = enum(c_int) {
|
pub const ShaderUniformDataType = enum(c_int) {
|
||||||
shader_uniform_float = 0,
|
float = 0,
|
||||||
shader_uniform_vec2 = 1,
|
vec2 = 1,
|
||||||
shader_uniform_vec3 = 2,
|
vec3 = 2,
|
||||||
shader_uniform_vec4 = 3,
|
vec4 = 3,
|
||||||
shader_uniform_int = 4,
|
int = 4,
|
||||||
shader_uniform_ivec2 = 5,
|
ivec2 = 5,
|
||||||
shader_uniform_ivec3 = 6,
|
ivec3 = 6,
|
||||||
shader_uniform_ivec4 = 7,
|
ivec4 = 7,
|
||||||
shader_uniform_sampler2d = 8,
|
sampler2d = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderAttribute = enum(c_int) {
|
pub const ShaderAttribute = enum(c_int) {
|
||||||
shader_attrib_float = 0,
|
float = 0,
|
||||||
shader_attrib_vec2 = 1,
|
vec2 = 1,
|
||||||
shader_attrib_vec3 = 2,
|
vec3 = 2,
|
||||||
shader_attrib_vec4 = 3,
|
vec4 = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformat_uncompressed_grayscale = 1,
|
uncompressed_grayscale = 1,
|
||||||
pixelformat_uncompressed_gray_alpha = 2,
|
uncompressed_gray_alpha = 2,
|
||||||
pixelformat_uncompressed_r5g6b5 = 3,
|
uncompressed_r5g6b5 = 3,
|
||||||
pixelformat_uncompressed_r8g8b8 = 4,
|
uncompressed_r8g8b8 = 4,
|
||||||
pixelformat_uncompressed_r5g5b5a1 = 5,
|
uncompressed_r5g5b5a1 = 5,
|
||||||
pixelformat_uncompressed_r4g4b4a4 = 6,
|
uncompressed_r4g4b4a4 = 6,
|
||||||
pixelformat_uncompressed_r8g8b8a8 = 7,
|
uncompressed_r8g8b8a8 = 7,
|
||||||
pixelformat_uncompressed_r32 = 8,
|
uncompressed_r32 = 8,
|
||||||
pixelformat_uncompressed_r32g32b32 = 9,
|
uncompressed_r32g32b32 = 9,
|
||||||
pixelformat_uncompressed_r32g32b32a32 = 10,
|
uncompressed_r32g32b32a32 = 10,
|
||||||
pixelformat_uncompressed_r16 = 11,
|
uncompressed_r16 = 11,
|
||||||
pixelformat_uncompressed_r16g16b16 = 12,
|
uncompressed_r16g16b16 = 12,
|
||||||
pixelformat_uncompressed_r16g16b16a16 = 13,
|
uncompressed_r16g16b16a16 = 13,
|
||||||
pixelformat_compressed_dxt1_rgb = 14,
|
compressed_dxt1_rgb = 14,
|
||||||
pixelformat_compressed_dxt1_rgba = 15,
|
compressed_dxt1_rgba = 15,
|
||||||
pixelformat_compressed_dxt3_rgba = 16,
|
compressed_dxt3_rgba = 16,
|
||||||
pixelformat_compressed_dxt5_rgba = 17,
|
compressed_dxt5_rgba = 17,
|
||||||
pixelformat_compressed_etc1_rgb = 18,
|
compressed_etc1_rgb = 18,
|
||||||
pixelformat_compressed_etc2_rgb = 19,
|
compressed_etc2_rgb = 19,
|
||||||
pixelformat_compressed_etc2_eac_rgba = 20,
|
compressed_etc2_eac_rgba = 20,
|
||||||
pixelformat_compressed_pvrt_rgb = 21,
|
compressed_pvrt_rgb = 21,
|
||||||
pixelformat_compressed_pvrt_rgba = 22,
|
compressed_pvrt_rgba = 22,
|
||||||
pixelformat_compressed_astc_4x4_rgba = 23,
|
compressed_astc_4x4_rgba = 23,
|
||||||
pixelformat_compressed_astc_8x8_rgba = 24,
|
compressed_astc_8x8_rgba = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TextureFilter = enum(c_int) {
|
pub const TextureFilter = enum(c_int) {
|
||||||
texture_filter_point = 0,
|
point = 0,
|
||||||
texture_filter_bilinear = 1,
|
bilinear = 1,
|
||||||
texture_filter_trilinear = 2,
|
trilinear = 2,
|
||||||
texture_filter_anisotropic_4x = 3,
|
anisotropic_4x = 3,
|
||||||
texture_filter_anisotropic_8x = 4,
|
anisotropic_8x = 4,
|
||||||
texture_filter_anisotropic_16x = 5,
|
anisotropic_16x = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TextureWrap = enum(c_int) {
|
pub const TextureWrap = enum(c_int) {
|
||||||
texture_wrap_repeat = 0,
|
repeat = 0,
|
||||||
texture_wrap_clamp = 1,
|
clamp = 1,
|
||||||
texture_wrap_mirror_repeat = 2,
|
mirror_repeat = 2,
|
||||||
texture_wrap_mirror_clamp = 3,
|
mirror_clamp = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CubemapLayout = enum(c_int) {
|
pub const CubemapLayout = enum(c_int) {
|
||||||
cubemap_layout_auto_detect = 0,
|
auto_detect = 0,
|
||||||
cubemap_layout_line_vertical = 1,
|
line_vertical = 1,
|
||||||
cubemap_layout_line_horizontal = 2,
|
line_horizontal = 2,
|
||||||
cubemap_layout_cross_three_by_four = 3,
|
cross_three_by_four = 3,
|
||||||
cubemap_layout_cross_four_by_three = 4,
|
cross_four_by_three = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FontType = enum(c_int) {
|
pub const FontType = enum(c_int) {
|
||||||
font_default = 0,
|
default = 0,
|
||||||
font_bitmap = 1,
|
bitmap = 1,
|
||||||
font_sdf = 2,
|
sdf = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = enum(c_int) {
|
pub const BlendMode = enum(c_int) {
|
||||||
blend_alpha = 0,
|
alpha = 0,
|
||||||
blend_additive = 1,
|
additive = 1,
|
||||||
blend_multiplied = 2,
|
multiplied = 2,
|
||||||
blend_add_colors = 3,
|
add_colors = 3,
|
||||||
blend_subtract_colors = 4,
|
subtract_colors = 4,
|
||||||
blend_alpha_premultiply = 5,
|
alpha_premultiply = 5,
|
||||||
blend_custom = 6,
|
custom = 6,
|
||||||
blend_custom_separate = 7,
|
custom_separate = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Gesture = enum(c_int) {
|
pub const Gesture = enum(c_int) {
|
||||||
gesture_none = 0,
|
none = 0,
|
||||||
gesture_tap = 1,
|
tap = 1,
|
||||||
gesture_doubletap = 2,
|
doubletap = 2,
|
||||||
gesture_hold = 4,
|
hold = 4,
|
||||||
gesture_drag = 8,
|
drag = 8,
|
||||||
gesture_swipe_right = 16,
|
swipe_right = 16,
|
||||||
gesture_swipe_left = 32,
|
swipe_left = 32,
|
||||||
gesture_swipe_up = 64,
|
swipe_up = 64,
|
||||||
gesture_swipe_down = 128,
|
swipe_down = 128,
|
||||||
gesture_pinch_in = 256,
|
pinch_in = 256,
|
||||||
gesture_pinch_out = 512,
|
pinch_out = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CameraMode = enum(c_int) {
|
pub const CameraMode = enum(c_int) {
|
||||||
camera_custom = 0,
|
custom = 0,
|
||||||
camera_free = 1,
|
free = 1,
|
||||||
camera_orbital = 2,
|
orbital = 2,
|
||||||
camera_first_person = 3,
|
first_person = 3,
|
||||||
camera_third_person = 4,
|
third_person = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CameraProjection = enum(c_int) {
|
pub const CameraProjection = enum(c_int) {
|
||||||
camera_perspective = 0,
|
perspective = 0,
|
||||||
camera_orthographic = 1,
|
orthographic = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const NPatchType = enum(c_int) {
|
pub const NPatchType = enum(c_int) {
|
||||||
npatch_nine_patch = 0,
|
nine_patch = 0,
|
||||||
npatch_three_patch_vertical = 1,
|
three_patch_vertical = 1,
|
||||||
npatch_three_patch_horizontal = 2,
|
three_patch_horizontal = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;
|
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;
|
||||||
|
|||||||
568
lib/raylib.zig
568
lib/raylib.zig
@ -1611,347 +1611,347 @@ pub const ConfigFlags = packed struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub const TraceLogLevel = enum(c_int) {
|
pub const TraceLogLevel = enum(c_int) {
|
||||||
log_all = 0,
|
all = 0,
|
||||||
log_trace = 1,
|
trace = 1,
|
||||||
log_debug = 2,
|
debug = 2,
|
||||||
log_info = 3,
|
info = 3,
|
||||||
log_warning = 4,
|
warning = 4,
|
||||||
log_error = 5,
|
err = 5,
|
||||||
log_fatal = 6,
|
fatal = 6,
|
||||||
log_none = 7,
|
none = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const KeyboardKey = enum(c_int) {
|
pub const KeyboardKey = enum(c_int) {
|
||||||
key_null = 0,
|
null = 0,
|
||||||
key_apostrophe = 39,
|
apostrophe = 39,
|
||||||
key_comma = 44,
|
comma = 44,
|
||||||
key_minus = 45,
|
minus = 45,
|
||||||
key_period = 46,
|
period = 46,
|
||||||
key_slash = 47,
|
slash = 47,
|
||||||
key_zero = 48,
|
zero = 48,
|
||||||
key_one = 49,
|
one = 49,
|
||||||
key_two = 50,
|
two = 50,
|
||||||
key_three = 51,
|
three = 51,
|
||||||
key_four = 52,
|
four = 52,
|
||||||
key_five = 53,
|
five = 53,
|
||||||
key_six = 54,
|
six = 54,
|
||||||
key_seven = 55,
|
seven = 55,
|
||||||
key_eight = 56,
|
eight = 56,
|
||||||
key_nine = 57,
|
nine = 57,
|
||||||
key_semicolon = 59,
|
semicolon = 59,
|
||||||
key_equal = 61,
|
equal = 61,
|
||||||
key_a = 65,
|
a = 65,
|
||||||
key_b = 66,
|
b = 66,
|
||||||
key_c = 67,
|
c = 67,
|
||||||
key_d = 68,
|
d = 68,
|
||||||
key_e = 69,
|
e = 69,
|
||||||
key_f = 70,
|
f = 70,
|
||||||
key_g = 71,
|
g = 71,
|
||||||
key_h = 72,
|
h = 72,
|
||||||
key_i = 73,
|
i = 73,
|
||||||
key_j = 74,
|
j = 74,
|
||||||
key_k = 75,
|
k = 75,
|
||||||
key_l = 76,
|
l = 76,
|
||||||
key_m = 77,
|
m = 77,
|
||||||
key_n = 78,
|
n = 78,
|
||||||
key_o = 79,
|
o = 79,
|
||||||
key_p = 80,
|
p = 80,
|
||||||
key_q = 81,
|
q = 81,
|
||||||
key_r = 82,
|
r = 82,
|
||||||
key_s = 83,
|
s = 83,
|
||||||
key_t = 84,
|
t = 84,
|
||||||
key_u = 85,
|
u = 85,
|
||||||
key_v = 86,
|
v = 86,
|
||||||
key_w = 87,
|
w = 87,
|
||||||
key_x = 88,
|
x = 88,
|
||||||
key_y = 89,
|
y = 89,
|
||||||
key_z = 90,
|
z = 90,
|
||||||
key_space = 32,
|
space = 32,
|
||||||
key_escape = 256,
|
escape = 256,
|
||||||
key_enter = 257,
|
enter = 257,
|
||||||
key_tab = 258,
|
tab = 258,
|
||||||
key_backspace = 259,
|
backspace = 259,
|
||||||
key_insert = 260,
|
insert = 260,
|
||||||
key_delete = 261,
|
delete = 261,
|
||||||
key_right = 262,
|
right = 262,
|
||||||
key_left = 263,
|
left = 263,
|
||||||
key_down = 264,
|
down = 264,
|
||||||
key_up = 265,
|
up = 265,
|
||||||
key_page_up = 266,
|
page_up = 266,
|
||||||
key_page_down = 267,
|
page_down = 267,
|
||||||
key_home = 268,
|
home = 268,
|
||||||
key_end = 269,
|
end = 269,
|
||||||
key_caps_lock = 280,
|
caps_lock = 280,
|
||||||
key_scroll_lock = 281,
|
scroll_lock = 281,
|
||||||
key_num_lock = 282,
|
num_lock = 282,
|
||||||
key_print_screen = 283,
|
print_screen = 283,
|
||||||
key_pause = 284,
|
pause = 284,
|
||||||
key_f1 = 290,
|
f1 = 290,
|
||||||
key_f2 = 291,
|
f2 = 291,
|
||||||
key_f3 = 292,
|
f3 = 292,
|
||||||
key_f4 = 293,
|
f4 = 293,
|
||||||
key_f5 = 294,
|
f5 = 294,
|
||||||
key_f6 = 295,
|
f6 = 295,
|
||||||
key_f7 = 296,
|
f7 = 296,
|
||||||
key_f8 = 297,
|
f8 = 297,
|
||||||
key_f9 = 298,
|
f9 = 298,
|
||||||
key_f10 = 299,
|
f10 = 299,
|
||||||
key_f11 = 300,
|
f11 = 300,
|
||||||
key_f12 = 301,
|
f12 = 301,
|
||||||
key_left_shift = 340,
|
left_shift = 340,
|
||||||
key_left_control = 341,
|
left_control = 341,
|
||||||
key_left_alt = 342,
|
left_alt = 342,
|
||||||
key_left_super = 343,
|
left_super = 343,
|
||||||
key_right_shift = 344,
|
right_shift = 344,
|
||||||
key_right_control = 345,
|
right_control = 345,
|
||||||
key_right_alt = 346,
|
right_alt = 346,
|
||||||
key_right_super = 347,
|
right_super = 347,
|
||||||
key_kb_menu = 348,
|
kb_menu = 348,
|
||||||
key_left_bracket = 91,
|
left_bracket = 91,
|
||||||
key_backslash = 92,
|
backslash = 92,
|
||||||
key_right_bracket = 93,
|
right_bracket = 93,
|
||||||
key_grave = 96,
|
grave = 96,
|
||||||
key_kp_0 = 320,
|
kp_0 = 320,
|
||||||
key_kp_1 = 321,
|
kp_1 = 321,
|
||||||
key_kp_2 = 322,
|
kp_2 = 322,
|
||||||
key_kp_3 = 323,
|
kp_3 = 323,
|
||||||
key_kp_4 = 324,
|
kp_4 = 324,
|
||||||
key_kp_5 = 325,
|
kp_5 = 325,
|
||||||
key_kp_6 = 326,
|
kp_6 = 326,
|
||||||
key_kp_7 = 327,
|
kp_7 = 327,
|
||||||
key_kp_8 = 328,
|
kp_8 = 328,
|
||||||
key_kp_9 = 329,
|
kp_9 = 329,
|
||||||
key_kp_decimal = 330,
|
kp_decimal = 330,
|
||||||
key_kp_divide = 331,
|
kp_divide = 331,
|
||||||
key_kp_multiply = 332,
|
kp_multiply = 332,
|
||||||
key_kp_subtract = 333,
|
kp_subtract = 333,
|
||||||
key_kp_add = 334,
|
kp_add = 334,
|
||||||
key_kp_enter = 335,
|
kp_enter = 335,
|
||||||
key_kp_equal = 336,
|
kp_equal = 336,
|
||||||
key_back = 4,
|
back = 4,
|
||||||
//key_menu = 82,
|
//menu = 82,
|
||||||
key_volume_up = 24,
|
volume_up = 24,
|
||||||
key_volume_down = 25,
|
volume_down = 25,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MouseButton = enum(c_int) {
|
pub const MouseButton = enum(c_int) {
|
||||||
mouse_button_left = 0,
|
left = 0,
|
||||||
mouse_button_right = 1,
|
right = 1,
|
||||||
mouse_button_middle = 2,
|
middle = 2,
|
||||||
mouse_button_side = 3,
|
side = 3,
|
||||||
mouse_button_extra = 4,
|
extra = 4,
|
||||||
mouse_button_forward = 5,
|
forward = 5,
|
||||||
mouse_button_back = 6,
|
back = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MouseCursor = enum(c_int) {
|
pub const MouseCursor = enum(c_int) {
|
||||||
mouse_cursor_default = 0,
|
default = 0,
|
||||||
mouse_cursor_arrow = 1,
|
arrow = 1,
|
||||||
mouse_cursor_ibeam = 2,
|
ibeam = 2,
|
||||||
mouse_cursor_crosshair = 3,
|
crosshair = 3,
|
||||||
mouse_cursor_pointing_hand = 4,
|
pointing_hand = 4,
|
||||||
mouse_cursor_resize_ew = 5,
|
resize_ew = 5,
|
||||||
mouse_cursor_resize_ns = 6,
|
resize_ns = 6,
|
||||||
mouse_cursor_resize_nwse = 7,
|
resize_nwse = 7,
|
||||||
mouse_cursor_resize_nesw = 8,
|
resize_nesw = 8,
|
||||||
mouse_cursor_resize_all = 9,
|
resize_all = 9,
|
||||||
mouse_cursor_not_allowed = 10,
|
not_allowed = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const GamepadButton = enum(c_int) {
|
pub const GamepadButton = enum(c_int) {
|
||||||
gamepad_button_unknown = 0,
|
unknown = 0,
|
||||||
gamepad_button_left_face_up = 1,
|
left_face_up = 1,
|
||||||
gamepad_button_left_face_right = 2,
|
left_face_right = 2,
|
||||||
gamepad_button_left_face_down = 3,
|
left_face_down = 3,
|
||||||
gamepad_button_left_face_left = 4,
|
left_face_left = 4,
|
||||||
gamepad_button_right_face_up = 5,
|
right_face_up = 5,
|
||||||
gamepad_button_right_face_right = 6,
|
right_face_right = 6,
|
||||||
gamepad_button_right_face_down = 7,
|
right_face_down = 7,
|
||||||
gamepad_button_right_face_left = 8,
|
right_face_left = 8,
|
||||||
gamepad_button_left_trigger_1 = 9,
|
left_trigger_1 = 9,
|
||||||
gamepad_button_left_trigger_2 = 10,
|
left_trigger_2 = 10,
|
||||||
gamepad_button_right_trigger_1 = 11,
|
right_trigger_1 = 11,
|
||||||
gamepad_button_right_trigger_2 = 12,
|
right_trigger_2 = 12,
|
||||||
gamepad_button_middle_left = 13,
|
middle_left = 13,
|
||||||
gamepad_button_middle = 14,
|
middle = 14,
|
||||||
gamepad_button_middle_right = 15,
|
middle_right = 15,
|
||||||
gamepad_button_left_thumb = 16,
|
left_thumb = 16,
|
||||||
gamepad_button_right_thumb = 17,
|
right_thumb = 17,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const GamepadAxis = enum(c_int) {
|
pub const GamepadAxis = enum(c_int) {
|
||||||
gamepad_axis_left_x = 0,
|
left_x = 0,
|
||||||
gamepad_axis_left_y = 1,
|
left_y = 1,
|
||||||
gamepad_axis_right_x = 2,
|
right_x = 2,
|
||||||
gamepad_axis_right_y = 3,
|
right_y = 3,
|
||||||
gamepad_axis_left_trigger = 4,
|
left_trigger = 4,
|
||||||
gamepad_axis_right_trigger = 5,
|
right_trigger = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MaterialMapIndex = enum(c_int) {
|
pub const MaterialMapIndex = enum(c_int) {
|
||||||
material_map_albedo = 0,
|
albedo = 0,
|
||||||
material_map_metalness = 1,
|
metalness = 1,
|
||||||
material_map_normal = 2,
|
normal = 2,
|
||||||
material_map_roughness = 3,
|
roughness = 3,
|
||||||
material_map_occlusion = 4,
|
occlusion = 4,
|
||||||
material_map_emission = 5,
|
emission = 5,
|
||||||
material_map_height = 6,
|
height = 6,
|
||||||
material_map_cubemap = 7,
|
cubemap = 7,
|
||||||
material_map_irradiance = 8,
|
irradiance = 8,
|
||||||
material_map_prefilter = 9,
|
prefilter = 9,
|
||||||
material_map_brdf = 10,
|
brdf = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderLocationIndex = enum(c_int) {
|
pub const ShaderLocationIndex = enum(c_int) {
|
||||||
shader_loc_vertex_position = 0,
|
vertex_position = 0,
|
||||||
shader_loc_vertex_texcoord01 = 1,
|
vertex_texcoord01 = 1,
|
||||||
shader_loc_vertex_texcoord02 = 2,
|
vertex_texcoord02 = 2,
|
||||||
shader_loc_vertex_normal = 3,
|
vertex_normal = 3,
|
||||||
shader_loc_vertex_tangent = 4,
|
vertex_tangent = 4,
|
||||||
shader_loc_vertex_color = 5,
|
vertex_color = 5,
|
||||||
shader_loc_matrix_mvp = 6,
|
matrix_mvp = 6,
|
||||||
shader_loc_matrix_view = 7,
|
matrix_view = 7,
|
||||||
shader_loc_matrix_projection = 8,
|
matrix_projection = 8,
|
||||||
shader_loc_matrix_model = 9,
|
matrix_model = 9,
|
||||||
shader_loc_matrix_normal = 10,
|
matrix_normal = 10,
|
||||||
shader_loc_vector_view = 11,
|
vector_view = 11,
|
||||||
shader_loc_color_diffuse = 12,
|
color_diffuse = 12,
|
||||||
shader_loc_color_specular = 13,
|
color_specular = 13,
|
||||||
shader_loc_color_ambient = 14,
|
color_ambient = 14,
|
||||||
shader_loc_map_albedo = 15,
|
map_albedo = 15,
|
||||||
shader_loc_map_metalness = 16,
|
map_metalness = 16,
|
||||||
shader_loc_map_normal = 17,
|
map_normal = 17,
|
||||||
shader_loc_map_roughness = 18,
|
map_roughness = 18,
|
||||||
shader_loc_map_occlusion = 19,
|
map_occlusion = 19,
|
||||||
shader_loc_map_emission = 20,
|
map_emission = 20,
|
||||||
shader_loc_map_height = 21,
|
map_height = 21,
|
||||||
shader_loc_map_cubemap = 22,
|
map_cubemap = 22,
|
||||||
shader_loc_map_irradiance = 23,
|
map_irradiance = 23,
|
||||||
shader_loc_map_prefilter = 24,
|
map_prefilter = 24,
|
||||||
shader_loc_map_brdf = 25,
|
map_brdf = 25,
|
||||||
shader_loc_vertex_boneids = 26,
|
vertex_boneids = 26,
|
||||||
shader_loc_vertex_boneweights = 27,
|
vertex_boneweights = 27,
|
||||||
shader_loc_bone_matrices = 28,
|
bone_matrices = 28,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderUniformDataType = enum(c_int) {
|
pub const ShaderUniformDataType = enum(c_int) {
|
||||||
shader_uniform_float = 0,
|
float = 0,
|
||||||
shader_uniform_vec2 = 1,
|
vec2 = 1,
|
||||||
shader_uniform_vec3 = 2,
|
vec3 = 2,
|
||||||
shader_uniform_vec4 = 3,
|
vec4 = 3,
|
||||||
shader_uniform_int = 4,
|
int = 4,
|
||||||
shader_uniform_ivec2 = 5,
|
ivec2 = 5,
|
||||||
shader_uniform_ivec3 = 6,
|
ivec3 = 6,
|
||||||
shader_uniform_ivec4 = 7,
|
ivec4 = 7,
|
||||||
shader_uniform_sampler2d = 8,
|
sampler2d = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ShaderAttribute = enum(c_int) {
|
pub const ShaderAttribute = enum(c_int) {
|
||||||
shader_attrib_float = 0,
|
float = 0,
|
||||||
shader_attrib_vec2 = 1,
|
vec2 = 1,
|
||||||
shader_attrib_vec3 = 2,
|
vec3 = 2,
|
||||||
shader_attrib_vec4 = 3,
|
vec4 = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformat_uncompressed_grayscale = 1,
|
uncompressed_grayscale = 1,
|
||||||
pixelformat_uncompressed_gray_alpha = 2,
|
uncompressed_gray_alpha = 2,
|
||||||
pixelformat_uncompressed_r5g6b5 = 3,
|
uncompressed_r5g6b5 = 3,
|
||||||
pixelformat_uncompressed_r8g8b8 = 4,
|
uncompressed_r8g8b8 = 4,
|
||||||
pixelformat_uncompressed_r5g5b5a1 = 5,
|
uncompressed_r5g5b5a1 = 5,
|
||||||
pixelformat_uncompressed_r4g4b4a4 = 6,
|
uncompressed_r4g4b4a4 = 6,
|
||||||
pixelformat_uncompressed_r8g8b8a8 = 7,
|
uncompressed_r8g8b8a8 = 7,
|
||||||
pixelformat_uncompressed_r32 = 8,
|
uncompressed_r32 = 8,
|
||||||
pixelformat_uncompressed_r32g32b32 = 9,
|
uncompressed_r32g32b32 = 9,
|
||||||
pixelformat_uncompressed_r32g32b32a32 = 10,
|
uncompressed_r32g32b32a32 = 10,
|
||||||
pixelformat_uncompressed_r16 = 11,
|
uncompressed_r16 = 11,
|
||||||
pixelformat_uncompressed_r16g16b16 = 12,
|
uncompressed_r16g16b16 = 12,
|
||||||
pixelformat_uncompressed_r16g16b16a16 = 13,
|
uncompressed_r16g16b16a16 = 13,
|
||||||
pixelformat_compressed_dxt1_rgb = 14,
|
compressed_dxt1_rgb = 14,
|
||||||
pixelformat_compressed_dxt1_rgba = 15,
|
compressed_dxt1_rgba = 15,
|
||||||
pixelformat_compressed_dxt3_rgba = 16,
|
compressed_dxt3_rgba = 16,
|
||||||
pixelformat_compressed_dxt5_rgba = 17,
|
compressed_dxt5_rgba = 17,
|
||||||
pixelformat_compressed_etc1_rgb = 18,
|
compressed_etc1_rgb = 18,
|
||||||
pixelformat_compressed_etc2_rgb = 19,
|
compressed_etc2_rgb = 19,
|
||||||
pixelformat_compressed_etc2_eac_rgba = 20,
|
compressed_etc2_eac_rgba = 20,
|
||||||
pixelformat_compressed_pvrt_rgb = 21,
|
compressed_pvrt_rgb = 21,
|
||||||
pixelformat_compressed_pvrt_rgba = 22,
|
compressed_pvrt_rgba = 22,
|
||||||
pixelformat_compressed_astc_4x4_rgba = 23,
|
compressed_astc_4x4_rgba = 23,
|
||||||
pixelformat_compressed_astc_8x8_rgba = 24,
|
compressed_astc_8x8_rgba = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TextureFilter = enum(c_int) {
|
pub const TextureFilter = enum(c_int) {
|
||||||
texture_filter_point = 0,
|
point = 0,
|
||||||
texture_filter_bilinear = 1,
|
bilinear = 1,
|
||||||
texture_filter_trilinear = 2,
|
trilinear = 2,
|
||||||
texture_filter_anisotropic_4x = 3,
|
anisotropic_4x = 3,
|
||||||
texture_filter_anisotropic_8x = 4,
|
anisotropic_8x = 4,
|
||||||
texture_filter_anisotropic_16x = 5,
|
anisotropic_16x = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TextureWrap = enum(c_int) {
|
pub const TextureWrap = enum(c_int) {
|
||||||
texture_wrap_repeat = 0,
|
repeat = 0,
|
||||||
texture_wrap_clamp = 1,
|
clamp = 1,
|
||||||
texture_wrap_mirror_repeat = 2,
|
mirror_repeat = 2,
|
||||||
texture_wrap_mirror_clamp = 3,
|
mirror_clamp = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CubemapLayout = enum(c_int) {
|
pub const CubemapLayout = enum(c_int) {
|
||||||
cubemap_layout_auto_detect = 0,
|
auto_detect = 0,
|
||||||
cubemap_layout_line_vertical = 1,
|
line_vertical = 1,
|
||||||
cubemap_layout_line_horizontal = 2,
|
line_horizontal = 2,
|
||||||
cubemap_layout_cross_three_by_four = 3,
|
cross_three_by_four = 3,
|
||||||
cubemap_layout_cross_four_by_three = 4,
|
cross_four_by_three = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FontType = enum(c_int) {
|
pub const FontType = enum(c_int) {
|
||||||
font_default = 0,
|
default = 0,
|
||||||
font_bitmap = 1,
|
bitmap = 1,
|
||||||
font_sdf = 2,
|
sdf = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = enum(c_int) {
|
pub const BlendMode = enum(c_int) {
|
||||||
blend_alpha = 0,
|
alpha = 0,
|
||||||
blend_additive = 1,
|
additive = 1,
|
||||||
blend_multiplied = 2,
|
multiplied = 2,
|
||||||
blend_add_colors = 3,
|
add_colors = 3,
|
||||||
blend_subtract_colors = 4,
|
subtract_colors = 4,
|
||||||
blend_alpha_premultiply = 5,
|
alpha_premultiply = 5,
|
||||||
blend_custom = 6,
|
custom = 6,
|
||||||
blend_custom_separate = 7,
|
custom_separate = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Gesture = enum(c_int) {
|
pub const Gesture = enum(c_int) {
|
||||||
gesture_none = 0,
|
none = 0,
|
||||||
gesture_tap = 1,
|
tap = 1,
|
||||||
gesture_doubletap = 2,
|
doubletap = 2,
|
||||||
gesture_hold = 4,
|
hold = 4,
|
||||||
gesture_drag = 8,
|
drag = 8,
|
||||||
gesture_swipe_right = 16,
|
swipe_right = 16,
|
||||||
gesture_swipe_left = 32,
|
swipe_left = 32,
|
||||||
gesture_swipe_up = 64,
|
swipe_up = 64,
|
||||||
gesture_swipe_down = 128,
|
swipe_down = 128,
|
||||||
gesture_pinch_in = 256,
|
pinch_in = 256,
|
||||||
gesture_pinch_out = 512,
|
pinch_out = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CameraMode = enum(c_int) {
|
pub const CameraMode = enum(c_int) {
|
||||||
camera_custom = 0,
|
custom = 0,
|
||||||
camera_free = 1,
|
free = 1,
|
||||||
camera_orbital = 2,
|
orbital = 2,
|
||||||
camera_first_person = 3,
|
first_person = 3,
|
||||||
camera_third_person = 4,
|
third_person = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CameraProjection = enum(c_int) {
|
pub const CameraProjection = enum(c_int) {
|
||||||
camera_perspective = 0,
|
perspective = 0,
|
||||||
camera_orthographic = 1,
|
orthographic = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const NPatchType = enum(c_int) {
|
pub const NPatchType = enum(c_int) {
|
||||||
npatch_nine_patch = 0,
|
nine_patch = 0,
|
||||||
npatch_three_patch_vertical = 1,
|
three_patch_vertical = 1,
|
||||||
npatch_three_patch_horizontal = 2,
|
three_patch_horizontal = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;
|
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user