Skip to content

Commit

Permalink
update mach and mach-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Mar 7, 2024
1 parent 710bc18 commit 0c6388d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 28 deletions.
16 changes: 2 additions & 14 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ const cimgui = @import("libs/cimgui/build.zig");
const iconv = @import("libs/iconv-zig/build.zig");
const ImageProcessor = @import("image_processor.zig");
const builtin = @import("builtin");
const mach_core = @import("mach_core");
const mach_core = @import("mach");

pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

const mach_core_dep = b.dependency("mach_core", .{
.target = target,
.optimize = optimize,
});

const zig_bass = b.addModule("bass", .{
.root_source_file = .{ .path = root_path ++ "libs/zig-bass/src/bass.zig" },
});
Expand All @@ -29,19 +24,12 @@ pub fn build(b: *std.Build) !void {
stb_truetype.addIncludePath(.{ .path = root_path ++ "libs/stb" });

const zigimg_module = b.dependency("zigimg", .{}).module("zigimg");
const app = try mach_core.App.init(b, mach_core_dep.builder, .{
const app = try mach_core.App.init(b, .{
.name = "ztyping",
.src = "game/app.zig",
.target = target,
.optimize = optimize,
.deps = &[_]std.Build.Module.Import{
.{
.name = "mach",
.module = b.dependency("mach", .{
.target = target,
.optimize = optimize,
}).module("mach"),
},
.{
.name = "zigimg",
.module = zigimg_module,
Expand Down
8 changes: 2 additions & 6 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
.name = "ztyping",
.version = "0.0.0",
.dependencies = .{
.mach_core = .{
.url = "https://pkg.machengine.org/mach-core/6a62bcc90e0d072d632788a6575d77942bd09a19.tar.gz",
.hash = "12209d39954fcda0be158461c10f64d14d5c7d097bd6d26785b332d75ffefa7dd7a0",
},
.mach = .{
.url = "https://pkg.machengine.org/mach/d4cd79440ea16bf59156cd57707e5833acb8e1b5.tar.gz",
.hash = "12204662d0dc8a74270b1b219ad1b41e63568f7ae532a243a5fc38b1a95f58f756ae",
.url = "https://pkg.machengine.org/mach/f42135795afaf52307f3a2a8757462fd8efa71ac.tar.gz",
.hash = "12208fd50c06eaa0a88a489303da7ed99fb4fea839b6b75a10990d014aadc638c2d0",
},
.zigimg = .{
.url = "https://github.com/Beyley/zigimg/archive/d54b946d4b33cf1a18c31ab8ce6a1b4e4f7c2d38.tar.gz",
Expand Down
2 changes: 1 addition & 1 deletion game/app.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const std = @import("std");
const bass = @import("bass");
const core = @import("mach-core");
const core = @import("mach").core;
const gpu = core.gpu;
const builtin = @import("builtin");
const Gfx = @import("gfx.zig");
Expand Down
2 changes: 1 addition & 1 deletion game/fontstash.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const std = @import("std");
const core = @import("mach-core");
const core = @import("mach").core;

const Gfx = @import("gfx.zig");
const Renderer = @import("renderer.zig");
Expand Down
2 changes: 1 addition & 1 deletion game/gfx.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const std = @import("std");
const builtin = @import("builtin");
const core = @import("mach-core");
const core = @import("mach").core;
const math = @import("mach").math;
const img = @import("zigimg");

Expand Down
2 changes: 1 addition & 1 deletion game/renderer.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const std = @import("std");
const core = @import("mach-core");
const core = @import("mach").core;

const Gfx = @import("gfx.zig");

Expand Down
2 changes: 1 addition & 1 deletion game/screen.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const std = @import("std");
const bass = @import("bass");
const core = @import("mach-core");
const core = @import("mach").core;

const App = @import("app.zig");
const Renderer = @import("renderer.zig");
Expand Down
2 changes: 1 addition & 1 deletion game/screens/gameplay.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const std = @import("std");
const bass = @import("bass");
const builtin = @import("builtin");
const fumen_compiler = @import("fumen_compiler");
const core = @import("mach-core");
const core = @import("mach").core;

const Screen = @import("../screen.zig");
const Gfx = @import("../gfx.zig");
Expand Down
2 changes: 1 addition & 1 deletion game/screens/main_menu.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const std = @import("std");

const core = @import("mach-core");
const core = @import("mach").core;

const SongSelect = @import("song_select.zig");

Expand Down
2 changes: 1 addition & 1 deletion game/screens/song_select.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const builtin = @import("builtin");
const std = @import("std");
const core = @import("mach-core");
const core = @import("mach").core;

const Screen = @import("../screen.zig");
const Gfx = @import("../gfx.zig");
Expand Down

0 comments on commit 0c6388d

Please sign in to comment.