Remove redundant namespaces from enums (#178)

This commit is contained in:
vent 2024-12-23 20:27:02 +00:00 committed by GitHub
parent 0dcee846f4
commit 845af357e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 620 additions and 620 deletions

View File

@ -69,7 +69,7 @@ pub fn main() anyerror!void {
// Update
//----------------------------------------------------------------------------------
if (rl.isMouseButtonDown(.mouse_button_left)) {
if (rl.isMouseButtonDown(.left)) {
// Sample mouse input.
const mousePosition = rl.getMousePosition();

View File

@ -51,9 +51,9 @@ pub fn main() anyerror!void {
//----------------------------------------------------------------------------------
// Player movement
if (rl.isKeyDown(rl.KeyboardKey.key_right)) {
if (rl.isKeyDown(.right)) {
player.x += 2;
} else if (rl.isKeyDown(rl.KeyboardKey.key_left)) {
} else if (rl.isKeyDown(.left)) {
player.x -= 2;
}
@ -61,9 +61,9 @@ pub fn main() anyerror!void {
camera.target = rl.Vector2.init(player.x + 20, player.y + 20);
// Camera rotation controls
if (rl.isKeyDown(rl.KeyboardKey.key_a)) {
if (rl.isKeyDown(.a)) {
camera.rotation -= 1;
} else if (rl.isKeyDown(rl.KeyboardKey.key_s)) {
} else if (rl.isKeyDown(.s)) {
camera.rotation += 1;
}
@ -76,7 +76,7 @@ pub fn main() anyerror!void {
camera.zoom = rl.math.clamp(camera.zoom, 0.1, 3.0);
// Camera reset (zoom and rotation)
if (rl.isKeyPressed(rl.KeyboardKey.key_r)) {
if (rl.isKeyPressed(.r)) {
camera.zoom = 1.0;
camera.rotation = 0.0;
}

View File

@ -27,14 +27,14 @@ pub fn main() anyerror!void {
while (!rl.windowShouldClose()) { // Detect window close button or ESC key
// Update
//----------------------------------------------------------------------------------
if (rl.isKeyPressed(.key_one)) {
if (rl.isKeyPressed(.one)) {
zoomMode = 0;
} else if (rl.isKeyPressed(.key_two)) {
} else if (rl.isKeyPressed(.two)) {
zoomMode = 1;
}
// Translate based on mouse right click
if (rl.isMouseButtonDown(.mouse_button_right)) {
if (rl.isMouseButtonDown(.right)) {
var delta = rl.getMouseDelta();
delta = rl.math.vector2Scale(delta, -1.0 / camera.zoom);
camera.target = rl.math.vector2Add(camera.target, delta);
@ -63,7 +63,7 @@ pub fn main() anyerror!void {
}
} else {
// Zoom based on left click
if (rl.isMouseButtonPressed(.mouse_button_left)) {
if (rl.isMouseButtonPressed(.left)) {
// Get the world point that is under the mouse
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
camera.target = mouseWorldPos;
}
if (rl.isMouseButtonDown(.mouse_button_left)) {
if (rl.isMouseButtonDown(.left)) {
// Zoom increment
const deltaX = rl.getMouseDelta().x;
var scaleFactor = 1.0 + (0.01 * @abs(deltaX));

View File

@ -18,7 +18,7 @@ pub fn main() anyerror!void {
.target = rl.Vector3.init(0, 1.8, 0),
.up = rl.Vector3.init(0, 1, 0),
.fovy = 60,
.projection = rl.CameraProjection.camera_perspective,
.projection = .perspective,
};
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
// Update
//----------------------------------------------------------------------------------
camera.update(rl.CameraMode.camera_first_person);
camera.update(.first_person);
//----------------------------------------------------------------------------------
// Draw

View File

@ -20,7 +20,7 @@ pub fn main() anyerror!void {
.target = rl.Vector3.init(0, 0, 0),
.up = rl.Vector3.init(0, 1, 0),
.fovy = 45,
.projection = rl.CameraProjection.camera_perspective,
.projection = .perspective,
};
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
// 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);
}
//-----------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@ pub fn main() anyerror!void {
.target = rl.Vector3.init(0, 0, 0),
.up = rl.Vector3.init(0, 1, 0),
.fovy = 45,
.projection = rl.CameraProjection.camera_perspective,
.projection = .perspective,
};
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
// Update
//----------------------------------------------------------------------------------
if (rl.isCursorHidden()) rl.updateCamera(&camera, rl.CameraMode.camera_first_person);
if (rl.isCursorHidden()) rl.updateCamera(&camera, .first_person);
// 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.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
if (rl.isMouseButtonPressed(.left)) {
if (!collision.hit) {
ray = rl.getScreenToWorldRay(rl.getMousePosition(), camera);

View File

@ -56,7 +56,7 @@ pub fn main() anyerror!void {
// TODO: Update `title` state variables here!
// 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;
}
},
@ -64,7 +64,7 @@ pub fn main() anyerror!void {
// TODO: Update `gameplay` state variables here!
// 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;
}
},
@ -72,7 +72,7 @@ pub fn main() anyerror!void {
// TODO: Update `ending` state variables here!
// 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;
}
},

View File

@ -21,16 +21,16 @@ pub fn main() anyerror!void {
// Update
//----------------------------------------------------------------------------------
if (rl.isKeyDown(rl.KeyboardKey.key_right)) {
if (rl.isKeyDown(.right)) {
ballPosition.x += 2.0;
}
if (rl.isKeyDown(rl.KeyboardKey.key_left)) {
if (rl.isKeyDown(.left)) {
ballPosition.x -= 2.0;
}
if (rl.isKeyDown(rl.KeyboardKey.key_up)) {
if (rl.isKeyDown(.up)) {
ballPosition.y -= 2.0;
}
if (rl.isKeyDown(rl.KeyboardKey.key_down)) {
if (rl.isKeyDown(.down)) {
ballPosition.y += 2.0;
}
//----------------------------------------------------------------------------------

View File

@ -25,11 +25,11 @@ pub fn main() anyerror!void {
ballPosition.x = @as(f32, @floatFromInt(rl.getMouseX()));
ballPosition.y = @as(f32, @floatFromInt(rl.getMouseY()));
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
if (rl.isMouseButtonPressed(.left)) {
ballColor = rl.Color.maroon;
} else if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_middle)) {
} else if (rl.isMouseButtonPressed(.middle)) {
ballColor = rl.Color.lime;
} else if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_right)) {
} else if (rl.isMouseButtonPressed(.right)) {
ballColor = rl.Color.dark_blue;
}
//----------------------------------------------------------------------------------

View File

@ -28,23 +28,23 @@ pub fn main() anyerror!void {
ballColor = rl.Color.beige;
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_left)) {
if (rl.isMouseButtonDown(.left)) {
ballColor = rl.Color.maroon;
}
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_middle)) {
if (rl.isMouseButtonDown(.middle)) {
ballColor = rl.Color.lime;
}
if (rl.isMouseButtonDown(rl.MouseButton.mouse_button_right)) {
if (rl.isMouseButtonDown(.right)) {
ballColor = rl.Color.dark_blue;
}
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_left)) {
if (rl.isMouseButtonPressed(.left)) {
touchCounter = 10;
}
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_middle)) {
if (rl.isMouseButtonPressed(.middle)) {
touchCounter = 10;
}
if (rl.isMouseButtonPressed(rl.MouseButton.mouse_button_right)) {
if (rl.isMouseButtonPressed(.right)) {
touchCounter = 10;
}

View File

@ -58,9 +58,9 @@ pub fn main() anyerror!void {
while (!rl.windowShouldClose()) {
// 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 })) {
rl.clearWindowState(rl.ConfigFlags { .window_resizable = true });
} 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 })) {
rl.clearWindowState(rl.ConfigFlags { .window_undecorated = true });
} 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 })) {
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 (rl.isKeyPressed(.key_n)) {
if (rl.isKeyPressed(.n)) {
if (!rl.isWindowState(rl.ConfigFlags { .window_minimized = true })) {
rl.minimizeWindow();
}
@ -100,32 +100,32 @@ pub fn main() anyerror!void {
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!
if (rl.isWindowState(rl.ConfigFlags { .window_maximized = true })) {
rl.restoreWindow();
} else rl.maximizeWindow();
}
if (rl.isKeyPressed(.key_u)) {
if (rl.isKeyPressed(.u)) {
if (rl.isWindowState(rl.ConfigFlags { .window_unfocused = true })) {
rl.clearWindowState(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 })) {
rl.clearWindowState(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 })) {
rl.clearWindowState(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 })) {
rl.clearWindowState(rl.ConfigFlags { .vsync_hint = true });
} else rl.setWindowState(rl.ConfigFlags { .vsync_hint = true });

View File

@ -38,19 +38,19 @@ pub fn main() anyerror!void {
shdrOutline,
outlineSizeLoc,
&outlineSize,
rl.ShaderUniformDataType.shader_uniform_float,
.float,
);
rl.setShaderValue(
shdrOutline,
outlineColorLoc,
&outlineColor,
rl.ShaderUniformDataType.shader_uniform_vec4,
.vec4,
);
rl.setShaderValue(
shdrOutline,
textureSizeLoc,
&textureSize,
rl.ShaderUniformDataType.shader_uniform_vec2,
.vec2,
);
rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second
@ -67,7 +67,7 @@ pub fn main() anyerror!void {
shdrOutline,
outlineSizeLoc,
&outlineSize,
rl.ShaderUniformDataType.shader_uniform_float,
.float,
);
//----------------------------------------------------------------------------------

View File

@ -51,9 +51,9 @@ pub fn main() anyerror!void {
}
// Control frames speed
if (rl.isKeyPressed(rl.KeyboardKey.key_right)) {
if (rl.isKeyPressed(.right)) {
framesSpeed += 1;
} else if (rl.isKeyPressed(rl.KeyboardKey.key_left)) {
} else if (rl.isKeyPressed(.left)) {
framesSpeed -= 1;
}

View File

@ -1611,347 +1611,347 @@ pub const ConfigFlags = packed struct {
};
pub const TraceLogLevel = enum(c_int) {
log_all = 0,
log_trace = 1,
log_debug = 2,
log_info = 3,
log_warning = 4,
log_error = 5,
log_fatal = 6,
log_none = 7,
all = 0,
trace = 1,
debug = 2,
info = 3,
warning = 4,
err = 5,
fatal = 6,
none = 7,
};
pub const KeyboardKey = enum(c_int) {
key_null = 0,
key_apostrophe = 39,
key_comma = 44,
key_minus = 45,
key_period = 46,
key_slash = 47,
key_zero = 48,
key_one = 49,
key_two = 50,
key_three = 51,
key_four = 52,
key_five = 53,
key_six = 54,
key_seven = 55,
key_eight = 56,
key_nine = 57,
key_semicolon = 59,
key_equal = 61,
key_a = 65,
key_b = 66,
key_c = 67,
key_d = 68,
key_e = 69,
key_f = 70,
key_g = 71,
key_h = 72,
key_i = 73,
key_j = 74,
key_k = 75,
key_l = 76,
key_m = 77,
key_n = 78,
key_o = 79,
key_p = 80,
key_q = 81,
key_r = 82,
key_s = 83,
key_t = 84,
key_u = 85,
key_v = 86,
key_w = 87,
key_x = 88,
key_y = 89,
key_z = 90,
key_space = 32,
key_escape = 256,
key_enter = 257,
key_tab = 258,
key_backspace = 259,
key_insert = 260,
key_delete = 261,
key_right = 262,
key_left = 263,
key_down = 264,
key_up = 265,
key_page_up = 266,
key_page_down = 267,
key_home = 268,
key_end = 269,
key_caps_lock = 280,
key_scroll_lock = 281,
key_num_lock = 282,
key_print_screen = 283,
key_pause = 284,
key_f1 = 290,
key_f2 = 291,
key_f3 = 292,
key_f4 = 293,
key_f5 = 294,
key_f6 = 295,
key_f7 = 296,
key_f8 = 297,
key_f9 = 298,
key_f10 = 299,
key_f11 = 300,
key_f12 = 301,
key_left_shift = 340,
key_left_control = 341,
key_left_alt = 342,
key_left_super = 343,
key_right_shift = 344,
key_right_control = 345,
key_right_alt = 346,
key_right_super = 347,
key_kb_menu = 348,
key_left_bracket = 91,
key_backslash = 92,
key_right_bracket = 93,
key_grave = 96,
key_kp_0 = 320,
key_kp_1 = 321,
key_kp_2 = 322,
key_kp_3 = 323,
key_kp_4 = 324,
key_kp_5 = 325,
key_kp_6 = 326,
key_kp_7 = 327,
key_kp_8 = 328,
key_kp_9 = 329,
key_kp_decimal = 330,
key_kp_divide = 331,
key_kp_multiply = 332,
key_kp_subtract = 333,
key_kp_add = 334,
key_kp_enter = 335,
key_kp_equal = 336,
key_back = 4,
//key_menu = 82,
key_volume_up = 24,
key_volume_down = 25,
null = 0,
apostrophe = 39,
comma = 44,
minus = 45,
period = 46,
slash = 47,
zero = 48,
one = 49,
two = 50,
three = 51,
four = 52,
five = 53,
six = 54,
seven = 55,
eight = 56,
nine = 57,
semicolon = 59,
equal = 61,
a = 65,
b = 66,
c = 67,
d = 68,
e = 69,
f = 70,
g = 71,
h = 72,
i = 73,
j = 74,
k = 75,
l = 76,
m = 77,
n = 78,
o = 79,
p = 80,
q = 81,
r = 82,
s = 83,
t = 84,
u = 85,
v = 86,
w = 87,
x = 88,
y = 89,
z = 90,
space = 32,
escape = 256,
enter = 257,
tab = 258,
backspace = 259,
insert = 260,
delete = 261,
right = 262,
left = 263,
down = 264,
up = 265,
page_up = 266,
page_down = 267,
home = 268,
end = 269,
caps_lock = 280,
scroll_lock = 281,
num_lock = 282,
print_screen = 283,
pause = 284,
f1 = 290,
f2 = 291,
f3 = 292,
f4 = 293,
f5 = 294,
f6 = 295,
f7 = 296,
f8 = 297,
f9 = 298,
f10 = 299,
f11 = 300,
f12 = 301,
left_shift = 340,
left_control = 341,
left_alt = 342,
left_super = 343,
right_shift = 344,
right_control = 345,
right_alt = 346,
right_super = 347,
kb_menu = 348,
left_bracket = 91,
backslash = 92,
right_bracket = 93,
grave = 96,
kp_0 = 320,
kp_1 = 321,
kp_2 = 322,
kp_3 = 323,
kp_4 = 324,
kp_5 = 325,
kp_6 = 326,
kp_7 = 327,
kp_8 = 328,
kp_9 = 329,
kp_decimal = 330,
kp_divide = 331,
kp_multiply = 332,
kp_subtract = 333,
kp_add = 334,
kp_enter = 335,
kp_equal = 336,
back = 4,
//menu = 82,
volume_up = 24,
volume_down = 25,
};
pub const MouseButton = enum(c_int) {
mouse_button_left = 0,
mouse_button_right = 1,
mouse_button_middle = 2,
mouse_button_side = 3,
mouse_button_extra = 4,
mouse_button_forward = 5,
mouse_button_back = 6,
left = 0,
right = 1,
middle = 2,
side = 3,
extra = 4,
forward = 5,
back = 6,
};
pub const MouseCursor = enum(c_int) {
mouse_cursor_default = 0,
mouse_cursor_arrow = 1,
mouse_cursor_ibeam = 2,
mouse_cursor_crosshair = 3,
mouse_cursor_pointing_hand = 4,
mouse_cursor_resize_ew = 5,
mouse_cursor_resize_ns = 6,
mouse_cursor_resize_nwse = 7,
mouse_cursor_resize_nesw = 8,
mouse_cursor_resize_all = 9,
mouse_cursor_not_allowed = 10,
default = 0,
arrow = 1,
ibeam = 2,
crosshair = 3,
pointing_hand = 4,
resize_ew = 5,
resize_ns = 6,
resize_nwse = 7,
resize_nesw = 8,
resize_all = 9,
not_allowed = 10,
};
pub const GamepadButton = enum(c_int) {
gamepad_button_unknown = 0,
gamepad_button_left_face_up = 1,
gamepad_button_left_face_right = 2,
gamepad_button_left_face_down = 3,
gamepad_button_left_face_left = 4,
gamepad_button_right_face_up = 5,
gamepad_button_right_face_right = 6,
gamepad_button_right_face_down = 7,
gamepad_button_right_face_left = 8,
gamepad_button_left_trigger_1 = 9,
gamepad_button_left_trigger_2 = 10,
gamepad_button_right_trigger_1 = 11,
gamepad_button_right_trigger_2 = 12,
gamepad_button_middle_left = 13,
gamepad_button_middle = 14,
gamepad_button_middle_right = 15,
gamepad_button_left_thumb = 16,
gamepad_button_right_thumb = 17,
unknown = 0,
left_face_up = 1,
left_face_right = 2,
left_face_down = 3,
left_face_left = 4,
right_face_up = 5,
right_face_right = 6,
right_face_down = 7,
right_face_left = 8,
left_trigger_1 = 9,
left_trigger_2 = 10,
right_trigger_1 = 11,
right_trigger_2 = 12,
middle_left = 13,
middle = 14,
middle_right = 15,
left_thumb = 16,
right_thumb = 17,
};
pub const GamepadAxis = enum(c_int) {
gamepad_axis_left_x = 0,
gamepad_axis_left_y = 1,
gamepad_axis_right_x = 2,
gamepad_axis_right_y = 3,
gamepad_axis_left_trigger = 4,
gamepad_axis_right_trigger = 5,
left_x = 0,
left_y = 1,
right_x = 2,
right_y = 3,
left_trigger = 4,
right_trigger = 5,
};
pub const MaterialMapIndex = enum(c_int) {
material_map_albedo = 0,
material_map_metalness = 1,
material_map_normal = 2,
material_map_roughness = 3,
material_map_occlusion = 4,
material_map_emission = 5,
material_map_height = 6,
material_map_cubemap = 7,
material_map_irradiance = 8,
material_map_prefilter = 9,
material_map_brdf = 10,
albedo = 0,
metalness = 1,
normal = 2,
roughness = 3,
occlusion = 4,
emission = 5,
height = 6,
cubemap = 7,
irradiance = 8,
prefilter = 9,
brdf = 10,
};
pub const ShaderLocationIndex = enum(c_int) {
shader_loc_vertex_position = 0,
shader_loc_vertex_texcoord01 = 1,
shader_loc_vertex_texcoord02 = 2,
shader_loc_vertex_normal = 3,
shader_loc_vertex_tangent = 4,
shader_loc_vertex_color = 5,
shader_loc_matrix_mvp = 6,
shader_loc_matrix_view = 7,
shader_loc_matrix_projection = 8,
shader_loc_matrix_model = 9,
shader_loc_matrix_normal = 10,
shader_loc_vector_view = 11,
shader_loc_color_diffuse = 12,
shader_loc_color_specular = 13,
shader_loc_color_ambient = 14,
shader_loc_map_albedo = 15,
shader_loc_map_metalness = 16,
shader_loc_map_normal = 17,
shader_loc_map_roughness = 18,
shader_loc_map_occlusion = 19,
shader_loc_map_emission = 20,
shader_loc_map_height = 21,
shader_loc_map_cubemap = 22,
shader_loc_map_irradiance = 23,
shader_loc_map_prefilter = 24,
shader_loc_map_brdf = 25,
shader_loc_vertex_boneids = 26,
shader_loc_vertex_boneweights = 27,
shader_loc_bone_matrices = 28,
vertex_position = 0,
vertex_texcoord01 = 1,
vertex_texcoord02 = 2,
vertex_normal = 3,
vertex_tangent = 4,
vertex_color = 5,
matrix_mvp = 6,
matrix_view = 7,
matrix_projection = 8,
matrix_model = 9,
matrix_normal = 10,
vector_view = 11,
color_diffuse = 12,
color_specular = 13,
color_ambient = 14,
map_albedo = 15,
map_metalness = 16,
map_normal = 17,
map_roughness = 18,
map_occlusion = 19,
map_emission = 20,
map_height = 21,
map_cubemap = 22,
map_irradiance = 23,
map_prefilter = 24,
map_brdf = 25,
vertex_boneids = 26,
vertex_boneweights = 27,
bone_matrices = 28,
};
pub const ShaderUniformDataType = enum(c_int) {
shader_uniform_float = 0,
shader_uniform_vec2 = 1,
shader_uniform_vec3 = 2,
shader_uniform_vec4 = 3,
shader_uniform_int = 4,
shader_uniform_ivec2 = 5,
shader_uniform_ivec3 = 6,
shader_uniform_ivec4 = 7,
shader_uniform_sampler2d = 8,
float = 0,
vec2 = 1,
vec3 = 2,
vec4 = 3,
int = 4,
ivec2 = 5,
ivec3 = 6,
ivec4 = 7,
sampler2d = 8,
};
pub const ShaderAttribute = enum(c_int) {
shader_attrib_float = 0,
shader_attrib_vec2 = 1,
shader_attrib_vec3 = 2,
shader_attrib_vec4 = 3,
float = 0,
vec2 = 1,
vec3 = 2,
vec4 = 3,
};
pub const PixelFormat = enum(c_int) {
pixelformat_uncompressed_grayscale = 1,
pixelformat_uncompressed_gray_alpha = 2,
pixelformat_uncompressed_r5g6b5 = 3,
pixelformat_uncompressed_r8g8b8 = 4,
pixelformat_uncompressed_r5g5b5a1 = 5,
pixelformat_uncompressed_r4g4b4a4 = 6,
pixelformat_uncompressed_r8g8b8a8 = 7,
pixelformat_uncompressed_r32 = 8,
pixelformat_uncompressed_r32g32b32 = 9,
pixelformat_uncompressed_r32g32b32a32 = 10,
pixelformat_uncompressed_r16 = 11,
pixelformat_uncompressed_r16g16b16 = 12,
pixelformat_uncompressed_r16g16b16a16 = 13,
pixelformat_compressed_dxt1_rgb = 14,
pixelformat_compressed_dxt1_rgba = 15,
pixelformat_compressed_dxt3_rgba = 16,
pixelformat_compressed_dxt5_rgba = 17,
pixelformat_compressed_etc1_rgb = 18,
pixelformat_compressed_etc2_rgb = 19,
pixelformat_compressed_etc2_eac_rgba = 20,
pixelformat_compressed_pvrt_rgb = 21,
pixelformat_compressed_pvrt_rgba = 22,
pixelformat_compressed_astc_4x4_rgba = 23,
pixelformat_compressed_astc_8x8_rgba = 24,
uncompressed_grayscale = 1,
uncompressed_gray_alpha = 2,
uncompressed_r5g6b5 = 3,
uncompressed_r8g8b8 = 4,
uncompressed_r5g5b5a1 = 5,
uncompressed_r4g4b4a4 = 6,
uncompressed_r8g8b8a8 = 7,
uncompressed_r32 = 8,
uncompressed_r32g32b32 = 9,
uncompressed_r32g32b32a32 = 10,
uncompressed_r16 = 11,
uncompressed_r16g16b16 = 12,
uncompressed_r16g16b16a16 = 13,
compressed_dxt1_rgb = 14,
compressed_dxt1_rgba = 15,
compressed_dxt3_rgba = 16,
compressed_dxt5_rgba = 17,
compressed_etc1_rgb = 18,
compressed_etc2_rgb = 19,
compressed_etc2_eac_rgba = 20,
compressed_pvrt_rgb = 21,
compressed_pvrt_rgba = 22,
compressed_astc_4x4_rgba = 23,
compressed_astc_8x8_rgba = 24,
};
pub const TextureFilter = enum(c_int) {
texture_filter_point = 0,
texture_filter_bilinear = 1,
texture_filter_trilinear = 2,
texture_filter_anisotropic_4x = 3,
texture_filter_anisotropic_8x = 4,
texture_filter_anisotropic_16x = 5,
point = 0,
bilinear = 1,
trilinear = 2,
anisotropic_4x = 3,
anisotropic_8x = 4,
anisotropic_16x = 5,
};
pub const TextureWrap = enum(c_int) {
texture_wrap_repeat = 0,
texture_wrap_clamp = 1,
texture_wrap_mirror_repeat = 2,
texture_wrap_mirror_clamp = 3,
repeat = 0,
clamp = 1,
mirror_repeat = 2,
mirror_clamp = 3,
};
pub const CubemapLayout = enum(c_int) {
cubemap_layout_auto_detect = 0,
cubemap_layout_line_vertical = 1,
cubemap_layout_line_horizontal = 2,
cubemap_layout_cross_three_by_four = 3,
cubemap_layout_cross_four_by_three = 4,
auto_detect = 0,
line_vertical = 1,
line_horizontal = 2,
cross_three_by_four = 3,
cross_four_by_three = 4,
};
pub const FontType = enum(c_int) {
font_default = 0,
font_bitmap = 1,
font_sdf = 2,
default = 0,
bitmap = 1,
sdf = 2,
};
pub const BlendMode = enum(c_int) {
blend_alpha = 0,
blend_additive = 1,
blend_multiplied = 2,
blend_add_colors = 3,
blend_subtract_colors = 4,
blend_alpha_premultiply = 5,
blend_custom = 6,
blend_custom_separate = 7,
alpha = 0,
additive = 1,
multiplied = 2,
add_colors = 3,
subtract_colors = 4,
alpha_premultiply = 5,
custom = 6,
custom_separate = 7,
};
pub const Gesture = enum(c_int) {
gesture_none = 0,
gesture_tap = 1,
gesture_doubletap = 2,
gesture_hold = 4,
gesture_drag = 8,
gesture_swipe_right = 16,
gesture_swipe_left = 32,
gesture_swipe_up = 64,
gesture_swipe_down = 128,
gesture_pinch_in = 256,
gesture_pinch_out = 512,
none = 0,
tap = 1,
doubletap = 2,
hold = 4,
drag = 8,
swipe_right = 16,
swipe_left = 32,
swipe_up = 64,
swipe_down = 128,
pinch_in = 256,
pinch_out = 512,
};
pub const CameraMode = enum(c_int) {
camera_custom = 0,
camera_free = 1,
camera_orbital = 2,
camera_first_person = 3,
camera_third_person = 4,
custom = 0,
free = 1,
orbital = 2,
first_person = 3,
third_person = 4,
};
pub const CameraProjection = enum(c_int) {
camera_perspective = 0,
camera_orthographic = 1,
perspective = 0,
orthographic = 1,
};
pub const NPatchType = enum(c_int) {
npatch_nine_patch = 0,
npatch_three_patch_vertical = 1,
npatch_three_patch_horizontal = 2,
nine_patch = 0,
three_patch_vertical = 1,
three_patch_horizontal = 2,
};
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;

View File

@ -1611,347 +1611,347 @@ pub const ConfigFlags = packed struct {
};
pub const TraceLogLevel = enum(c_int) {
log_all = 0,
log_trace = 1,
log_debug = 2,
log_info = 3,
log_warning = 4,
log_error = 5,
log_fatal = 6,
log_none = 7,
all = 0,
trace = 1,
debug = 2,
info = 3,
warning = 4,
err = 5,
fatal = 6,
none = 7,
};
pub const KeyboardKey = enum(c_int) {
key_null = 0,
key_apostrophe = 39,
key_comma = 44,
key_minus = 45,
key_period = 46,
key_slash = 47,
key_zero = 48,
key_one = 49,
key_two = 50,
key_three = 51,
key_four = 52,
key_five = 53,
key_six = 54,
key_seven = 55,
key_eight = 56,
key_nine = 57,
key_semicolon = 59,
key_equal = 61,
key_a = 65,
key_b = 66,
key_c = 67,
key_d = 68,
key_e = 69,
key_f = 70,
key_g = 71,
key_h = 72,
key_i = 73,
key_j = 74,
key_k = 75,
key_l = 76,
key_m = 77,
key_n = 78,
key_o = 79,
key_p = 80,
key_q = 81,
key_r = 82,
key_s = 83,
key_t = 84,
key_u = 85,
key_v = 86,
key_w = 87,
key_x = 88,
key_y = 89,
key_z = 90,
key_space = 32,
key_escape = 256,
key_enter = 257,
key_tab = 258,
key_backspace = 259,
key_insert = 260,
key_delete = 261,
key_right = 262,
key_left = 263,
key_down = 264,
key_up = 265,
key_page_up = 266,
key_page_down = 267,
key_home = 268,
key_end = 269,
key_caps_lock = 280,
key_scroll_lock = 281,
key_num_lock = 282,
key_print_screen = 283,
key_pause = 284,
key_f1 = 290,
key_f2 = 291,
key_f3 = 292,
key_f4 = 293,
key_f5 = 294,
key_f6 = 295,
key_f7 = 296,
key_f8 = 297,
key_f9 = 298,
key_f10 = 299,
key_f11 = 300,
key_f12 = 301,
key_left_shift = 340,
key_left_control = 341,
key_left_alt = 342,
key_left_super = 343,
key_right_shift = 344,
key_right_control = 345,
key_right_alt = 346,
key_right_super = 347,
key_kb_menu = 348,
key_left_bracket = 91,
key_backslash = 92,
key_right_bracket = 93,
key_grave = 96,
key_kp_0 = 320,
key_kp_1 = 321,
key_kp_2 = 322,
key_kp_3 = 323,
key_kp_4 = 324,
key_kp_5 = 325,
key_kp_6 = 326,
key_kp_7 = 327,
key_kp_8 = 328,
key_kp_9 = 329,
key_kp_decimal = 330,
key_kp_divide = 331,
key_kp_multiply = 332,
key_kp_subtract = 333,
key_kp_add = 334,
key_kp_enter = 335,
key_kp_equal = 336,
key_back = 4,
//key_menu = 82,
key_volume_up = 24,
key_volume_down = 25,
null = 0,
apostrophe = 39,
comma = 44,
minus = 45,
period = 46,
slash = 47,
zero = 48,
one = 49,
two = 50,
three = 51,
four = 52,
five = 53,
six = 54,
seven = 55,
eight = 56,
nine = 57,
semicolon = 59,
equal = 61,
a = 65,
b = 66,
c = 67,
d = 68,
e = 69,
f = 70,
g = 71,
h = 72,
i = 73,
j = 74,
k = 75,
l = 76,
m = 77,
n = 78,
o = 79,
p = 80,
q = 81,
r = 82,
s = 83,
t = 84,
u = 85,
v = 86,
w = 87,
x = 88,
y = 89,
z = 90,
space = 32,
escape = 256,
enter = 257,
tab = 258,
backspace = 259,
insert = 260,
delete = 261,
right = 262,
left = 263,
down = 264,
up = 265,
page_up = 266,
page_down = 267,
home = 268,
end = 269,
caps_lock = 280,
scroll_lock = 281,
num_lock = 282,
print_screen = 283,
pause = 284,
f1 = 290,
f2 = 291,
f3 = 292,
f4 = 293,
f5 = 294,
f6 = 295,
f7 = 296,
f8 = 297,
f9 = 298,
f10 = 299,
f11 = 300,
f12 = 301,
left_shift = 340,
left_control = 341,
left_alt = 342,
left_super = 343,
right_shift = 344,
right_control = 345,
right_alt = 346,
right_super = 347,
kb_menu = 348,
left_bracket = 91,
backslash = 92,
right_bracket = 93,
grave = 96,
kp_0 = 320,
kp_1 = 321,
kp_2 = 322,
kp_3 = 323,
kp_4 = 324,
kp_5 = 325,
kp_6 = 326,
kp_7 = 327,
kp_8 = 328,
kp_9 = 329,
kp_decimal = 330,
kp_divide = 331,
kp_multiply = 332,
kp_subtract = 333,
kp_add = 334,
kp_enter = 335,
kp_equal = 336,
back = 4,
//menu = 82,
volume_up = 24,
volume_down = 25,
};
pub const MouseButton = enum(c_int) {
mouse_button_left = 0,
mouse_button_right = 1,
mouse_button_middle = 2,
mouse_button_side = 3,
mouse_button_extra = 4,
mouse_button_forward = 5,
mouse_button_back = 6,
left = 0,
right = 1,
middle = 2,
side = 3,
extra = 4,
forward = 5,
back = 6,
};
pub const MouseCursor = enum(c_int) {
mouse_cursor_default = 0,
mouse_cursor_arrow = 1,
mouse_cursor_ibeam = 2,
mouse_cursor_crosshair = 3,
mouse_cursor_pointing_hand = 4,
mouse_cursor_resize_ew = 5,
mouse_cursor_resize_ns = 6,
mouse_cursor_resize_nwse = 7,
mouse_cursor_resize_nesw = 8,
mouse_cursor_resize_all = 9,
mouse_cursor_not_allowed = 10,
default = 0,
arrow = 1,
ibeam = 2,
crosshair = 3,
pointing_hand = 4,
resize_ew = 5,
resize_ns = 6,
resize_nwse = 7,
resize_nesw = 8,
resize_all = 9,
not_allowed = 10,
};
pub const GamepadButton = enum(c_int) {
gamepad_button_unknown = 0,
gamepad_button_left_face_up = 1,
gamepad_button_left_face_right = 2,
gamepad_button_left_face_down = 3,
gamepad_button_left_face_left = 4,
gamepad_button_right_face_up = 5,
gamepad_button_right_face_right = 6,
gamepad_button_right_face_down = 7,
gamepad_button_right_face_left = 8,
gamepad_button_left_trigger_1 = 9,
gamepad_button_left_trigger_2 = 10,
gamepad_button_right_trigger_1 = 11,
gamepad_button_right_trigger_2 = 12,
gamepad_button_middle_left = 13,
gamepad_button_middle = 14,
gamepad_button_middle_right = 15,
gamepad_button_left_thumb = 16,
gamepad_button_right_thumb = 17,
unknown = 0,
left_face_up = 1,
left_face_right = 2,
left_face_down = 3,
left_face_left = 4,
right_face_up = 5,
right_face_right = 6,
right_face_down = 7,
right_face_left = 8,
left_trigger_1 = 9,
left_trigger_2 = 10,
right_trigger_1 = 11,
right_trigger_2 = 12,
middle_left = 13,
middle = 14,
middle_right = 15,
left_thumb = 16,
right_thumb = 17,
};
pub const GamepadAxis = enum(c_int) {
gamepad_axis_left_x = 0,
gamepad_axis_left_y = 1,
gamepad_axis_right_x = 2,
gamepad_axis_right_y = 3,
gamepad_axis_left_trigger = 4,
gamepad_axis_right_trigger = 5,
left_x = 0,
left_y = 1,
right_x = 2,
right_y = 3,
left_trigger = 4,
right_trigger = 5,
};
pub const MaterialMapIndex = enum(c_int) {
material_map_albedo = 0,
material_map_metalness = 1,
material_map_normal = 2,
material_map_roughness = 3,
material_map_occlusion = 4,
material_map_emission = 5,
material_map_height = 6,
material_map_cubemap = 7,
material_map_irradiance = 8,
material_map_prefilter = 9,
material_map_brdf = 10,
albedo = 0,
metalness = 1,
normal = 2,
roughness = 3,
occlusion = 4,
emission = 5,
height = 6,
cubemap = 7,
irradiance = 8,
prefilter = 9,
brdf = 10,
};
pub const ShaderLocationIndex = enum(c_int) {
shader_loc_vertex_position = 0,
shader_loc_vertex_texcoord01 = 1,
shader_loc_vertex_texcoord02 = 2,
shader_loc_vertex_normal = 3,
shader_loc_vertex_tangent = 4,
shader_loc_vertex_color = 5,
shader_loc_matrix_mvp = 6,
shader_loc_matrix_view = 7,
shader_loc_matrix_projection = 8,
shader_loc_matrix_model = 9,
shader_loc_matrix_normal = 10,
shader_loc_vector_view = 11,
shader_loc_color_diffuse = 12,
shader_loc_color_specular = 13,
shader_loc_color_ambient = 14,
shader_loc_map_albedo = 15,
shader_loc_map_metalness = 16,
shader_loc_map_normal = 17,
shader_loc_map_roughness = 18,
shader_loc_map_occlusion = 19,
shader_loc_map_emission = 20,
shader_loc_map_height = 21,
shader_loc_map_cubemap = 22,
shader_loc_map_irradiance = 23,
shader_loc_map_prefilter = 24,
shader_loc_map_brdf = 25,
shader_loc_vertex_boneids = 26,
shader_loc_vertex_boneweights = 27,
shader_loc_bone_matrices = 28,
vertex_position = 0,
vertex_texcoord01 = 1,
vertex_texcoord02 = 2,
vertex_normal = 3,
vertex_tangent = 4,
vertex_color = 5,
matrix_mvp = 6,
matrix_view = 7,
matrix_projection = 8,
matrix_model = 9,
matrix_normal = 10,
vector_view = 11,
color_diffuse = 12,
color_specular = 13,
color_ambient = 14,
map_albedo = 15,
map_metalness = 16,
map_normal = 17,
map_roughness = 18,
map_occlusion = 19,
map_emission = 20,
map_height = 21,
map_cubemap = 22,
map_irradiance = 23,
map_prefilter = 24,
map_brdf = 25,
vertex_boneids = 26,
vertex_boneweights = 27,
bone_matrices = 28,
};
pub const ShaderUniformDataType = enum(c_int) {
shader_uniform_float = 0,
shader_uniform_vec2 = 1,
shader_uniform_vec3 = 2,
shader_uniform_vec4 = 3,
shader_uniform_int = 4,
shader_uniform_ivec2 = 5,
shader_uniform_ivec3 = 6,
shader_uniform_ivec4 = 7,
shader_uniform_sampler2d = 8,
float = 0,
vec2 = 1,
vec3 = 2,
vec4 = 3,
int = 4,
ivec2 = 5,
ivec3 = 6,
ivec4 = 7,
sampler2d = 8,
};
pub const ShaderAttribute = enum(c_int) {
shader_attrib_float = 0,
shader_attrib_vec2 = 1,
shader_attrib_vec3 = 2,
shader_attrib_vec4 = 3,
float = 0,
vec2 = 1,
vec3 = 2,
vec4 = 3,
};
pub const PixelFormat = enum(c_int) {
pixelformat_uncompressed_grayscale = 1,
pixelformat_uncompressed_gray_alpha = 2,
pixelformat_uncompressed_r5g6b5 = 3,
pixelformat_uncompressed_r8g8b8 = 4,
pixelformat_uncompressed_r5g5b5a1 = 5,
pixelformat_uncompressed_r4g4b4a4 = 6,
pixelformat_uncompressed_r8g8b8a8 = 7,
pixelformat_uncompressed_r32 = 8,
pixelformat_uncompressed_r32g32b32 = 9,
pixelformat_uncompressed_r32g32b32a32 = 10,
pixelformat_uncompressed_r16 = 11,
pixelformat_uncompressed_r16g16b16 = 12,
pixelformat_uncompressed_r16g16b16a16 = 13,
pixelformat_compressed_dxt1_rgb = 14,
pixelformat_compressed_dxt1_rgba = 15,
pixelformat_compressed_dxt3_rgba = 16,
pixelformat_compressed_dxt5_rgba = 17,
pixelformat_compressed_etc1_rgb = 18,
pixelformat_compressed_etc2_rgb = 19,
pixelformat_compressed_etc2_eac_rgba = 20,
pixelformat_compressed_pvrt_rgb = 21,
pixelformat_compressed_pvrt_rgba = 22,
pixelformat_compressed_astc_4x4_rgba = 23,
pixelformat_compressed_astc_8x8_rgba = 24,
uncompressed_grayscale = 1,
uncompressed_gray_alpha = 2,
uncompressed_r5g6b5 = 3,
uncompressed_r8g8b8 = 4,
uncompressed_r5g5b5a1 = 5,
uncompressed_r4g4b4a4 = 6,
uncompressed_r8g8b8a8 = 7,
uncompressed_r32 = 8,
uncompressed_r32g32b32 = 9,
uncompressed_r32g32b32a32 = 10,
uncompressed_r16 = 11,
uncompressed_r16g16b16 = 12,
uncompressed_r16g16b16a16 = 13,
compressed_dxt1_rgb = 14,
compressed_dxt1_rgba = 15,
compressed_dxt3_rgba = 16,
compressed_dxt5_rgba = 17,
compressed_etc1_rgb = 18,
compressed_etc2_rgb = 19,
compressed_etc2_eac_rgba = 20,
compressed_pvrt_rgb = 21,
compressed_pvrt_rgba = 22,
compressed_astc_4x4_rgba = 23,
compressed_astc_8x8_rgba = 24,
};
pub const TextureFilter = enum(c_int) {
texture_filter_point = 0,
texture_filter_bilinear = 1,
texture_filter_trilinear = 2,
texture_filter_anisotropic_4x = 3,
texture_filter_anisotropic_8x = 4,
texture_filter_anisotropic_16x = 5,
point = 0,
bilinear = 1,
trilinear = 2,
anisotropic_4x = 3,
anisotropic_8x = 4,
anisotropic_16x = 5,
};
pub const TextureWrap = enum(c_int) {
texture_wrap_repeat = 0,
texture_wrap_clamp = 1,
texture_wrap_mirror_repeat = 2,
texture_wrap_mirror_clamp = 3,
repeat = 0,
clamp = 1,
mirror_repeat = 2,
mirror_clamp = 3,
};
pub const CubemapLayout = enum(c_int) {
cubemap_layout_auto_detect = 0,
cubemap_layout_line_vertical = 1,
cubemap_layout_line_horizontal = 2,
cubemap_layout_cross_three_by_four = 3,
cubemap_layout_cross_four_by_three = 4,
auto_detect = 0,
line_vertical = 1,
line_horizontal = 2,
cross_three_by_four = 3,
cross_four_by_three = 4,
};
pub const FontType = enum(c_int) {
font_default = 0,
font_bitmap = 1,
font_sdf = 2,
default = 0,
bitmap = 1,
sdf = 2,
};
pub const BlendMode = enum(c_int) {
blend_alpha = 0,
blend_additive = 1,
blend_multiplied = 2,
blend_add_colors = 3,
blend_subtract_colors = 4,
blend_alpha_premultiply = 5,
blend_custom = 6,
blend_custom_separate = 7,
alpha = 0,
additive = 1,
multiplied = 2,
add_colors = 3,
subtract_colors = 4,
alpha_premultiply = 5,
custom = 6,
custom_separate = 7,
};
pub const Gesture = enum(c_int) {
gesture_none = 0,
gesture_tap = 1,
gesture_doubletap = 2,
gesture_hold = 4,
gesture_drag = 8,
gesture_swipe_right = 16,
gesture_swipe_left = 32,
gesture_swipe_up = 64,
gesture_swipe_down = 128,
gesture_pinch_in = 256,
gesture_pinch_out = 512,
none = 0,
tap = 1,
doubletap = 2,
hold = 4,
drag = 8,
swipe_right = 16,
swipe_left = 32,
swipe_up = 64,
swipe_down = 128,
pinch_in = 256,
pinch_out = 512,
};
pub const CameraMode = enum(c_int) {
camera_custom = 0,
camera_free = 1,
camera_orbital = 2,
camera_first_person = 3,
camera_third_person = 4,
custom = 0,
free = 1,
orbital = 2,
first_person = 3,
third_person = 4,
};
pub const CameraProjection = enum(c_int) {
camera_perspective = 0,
camera_orthographic = 1,
perspective = 0,
orthographic = 1,
};
pub const NPatchType = enum(c_int) {
npatch_nine_patch = 0,
npatch_three_patch_vertical = 1,
npatch_three_patch_horizontal = 2,
nine_patch = 0,
three_patch_vertical = 1,
three_patch_horizontal = 2,
};
// pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;