Rename library files

This commit is contained in:
Not-Nik 2024-04-14 22:20:30 +02:00
parent ee7593d5ef
commit 9600e2108a
No known key found for this signature in database
GPG Key ID: 08BB71E672DB3BFD
10 changed files with 22 additions and 22 deletions

View File

@ -84,21 +84,21 @@ pub fn getModule(b: *std.Build, comptime rl_path: []const u8) *std.Build.Module
if (b.modules.contains("raylib")) {
return b.modules.get("raylib").?;
}
return b.addModule("raylib", .{ .source_file = .{ .path = rl_path ++ "/lib/raylib-zig.zig" } });
return b.addModule("raylib", .{ .source_file = .{ .path = rl_path ++ "/lib/raylib.zig" } });
}
fn getModuleInternal(b: *std.Build) *std.Build.Module {
if (b.modules.contains("raylib")) {
return b.modules.get("raylib").?;
}
return b.addModule("raylib", .{ .source_file = .{ .path = "lib/raylib-zig.zig" } });
return b.addModule("raylib", .{ .source_file = .{ .path = "lib/raylib.zig" } });
}
pub const math = struct {
pub fn getModule(b: *std.Build, comptime rl_path: []const u8) *std.Build.Module {
const raylib = rl.getModule(b, rl_path);
return b.addModule("raylib-math", .{
.source_file = .{ .path = rl_path ++ "/lib/raylib-zig-math.zig" },
.source_file = .{ .path = rl_path ++ "/lib/raymath.zig" },
.dependencies = &.{.{ .name = "raylib-zig", .module = raylib }},
});
}
@ -106,7 +106,7 @@ pub const math = struct {
fn getModuleInternal(b: *std.Build) *std.Build.Module {
const raylib = rl.getModuleInternal(b);
return b.addModule("raylib-math", .{
.source_file = .{ .path = "lib/raylib-zig-math.zig" },
.source_file = .{ .path = "lib/raymath.zig" },
.dependencies = &.{.{ .name = "raylib-zig", .module = raylib }},
});
}
@ -214,13 +214,13 @@ pub fn build(b: *std.Build) !void {
const rlgl = rl.gl.getModuleInternal(b);
const raylib_test = b.addTest(.{
.root_source_file = .{ .path = "lib/raylib-zig.zig" },
.root_source_file = .{ .path = "lib/raylib.zig" },
.target = target,
.optimize = optimize,
});
const raylib_math_test = b.addTest(.{
.root_source_file = .{ .path = "lib/raylib-zig-math.zig" },
.root_source_file = .{ .path = "lib/raymath.zig" },
.target = target,
.optimize = optimize,
});

View File

@ -331,19 +331,19 @@ def parse_header(header_name: str, output_file: str, ext_file: str, prefix: str,
if __name__ == "__main__":
parse_header(
"raylib.h",
"raylib-zig.zig",
"raylib-zig-ext.zig",
"raylib.zig",
"raylib-ext.zig",
"RLAPI ",
"preludes/raylib-zig-prelude.zig",
"preludes/raylib-zig-ext-prelude.zig"
"preludes/raylib-prelude.zig",
"preludes/raylib-ext-prelude.zig"
)
parse_header(
"raymath.h",
"raylib-zig-math.zig",
"raylib-zig-math-ext.zig",
"raymath.zig",
"raymath-ext.zig",
"RMAPI ",
"preludes/raylib-zig-math-prelude.zig",
"preludes/raylib-zig-math-ext-prelude.zig"
"preludes/raymath-prelude.zig",
"preludes/raymath-ext-prelude.zig"
)
parse_header(
"rlgl.h",

View File

@ -1,3 +1,3 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig.zig");
const rl = @import("raylib.zig");

View File

@ -1189,7 +1189,7 @@ pub const MATERIAL_MAP_SPECULAR = MaterialMapIndex.material_map_metalness;
pub const SHADER_LOC_MAP_DIFFUSE = ShaderLocationIndex.shader_loc_map_albedo;
pub const SHADER_LOC_MAP_SPECULAR = ShaderLocationIndex.shader_loc_map_metalness;
const cdef = @import("raylib-zig-ext.zig");
const cdef = @import("raylib-ext.zig");
pub fn setWindowIcons(images: []Image) void {
cdef.SetWindowIcons(@as([*c]Image, @ptrCast(images)), @as(c_int, @intCast(images.len)));

View File

@ -1,4 +1,4 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig");
const rlm = @import("raylib-zig-math.zig");
const rlm = @import("raymath.zig");

View File

@ -1,7 +1,7 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig");
const cdef = @import("raylib-zig-math-ext.zig");
const cdef = @import("raymath-ext.zig");
const std = @import("std");
test {

View File

@ -1,6 +1,6 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig.zig");
const rl = @import("raylib.zig");
pub extern "c" fn InitWindow(width: c_int, height: c_int, title: [*c]const u8) void;
pub extern "c" fn CloseWindow() void;

View File

@ -1189,7 +1189,7 @@ pub const MATERIAL_MAP_SPECULAR = MaterialMapIndex.material_map_metalness;
pub const SHADER_LOC_MAP_DIFFUSE = ShaderLocationIndex.shader_loc_map_albedo;
pub const SHADER_LOC_MAP_SPECULAR = ShaderLocationIndex.shader_loc_map_metalness;
const cdef = @import("raylib-zig-ext.zig");
const cdef = @import("raylib-ext.zig");
pub fn setWindowIcons(images: []Image) void {
cdef.SetWindowIcons(@as([*c]Image, @ptrCast(images)), @as(c_int, @intCast(images.len)));

View File

@ -1,7 +1,7 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig");
const rlm = @import("raylib-zig-math.zig");
const rlm = @import("raymath.zig");
pub extern "c" fn Clamp(value: f32, min: f32, max: f32) f32;
pub extern "c" fn Lerp(start: f32, end: f32, amount: f32) f32;

2
lib/raylib-zig-math.zig → lib/raymath.zig Executable file → Normal file
View File

@ -1,7 +1,7 @@
// raylib-zig (c) Nikolas Wipper 2023
const rl = @import("raylib-zig");
const cdef = @import("raylib-zig-math-ext.zig");
const cdef = @import("raymath-ext.zig");
const std = @import("std");
test {