-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.zig
60 lines (52 loc) · 2.69 KB
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const std = @import("std");
const GBABuilder = @import("GBA/builder.zig");
pub fn build(b: *std.Build) void {
_ = GBABuilder.addGBAExecutable(b, "first", "examples/first/first.zig");
_ = GBABuilder.addGBAExecutable(b, "mode3draw", "examples/mode3draw/mode3draw.zig");
_ = GBABuilder.addGBAExecutable(b, "mode4draw", "examples/mode4draw/mode4draw.zig");
_ = GBABuilder.addGBAExecutable(b, "debugPrint", "examples/debugPrint/debugPrint.zig");
// Mode 4 Flip
const mode4flip = GBABuilder.addGBAExecutable(b, "mode4flip", "examples/mode4flip/mode4flip.zig");
GBABuilder.convertMode4Images(mode4flip, &[_]GBABuilder.ImageSourceTarget{
.{
.source = "examples/mode4flip/front.bmp",
.target = "examples/mode4flip/front.agi",
},
.{
.source = "examples/mode4flip/back.bmp",
.target = "examples/mode4flip/back.agi",
},
}, "examples/mode4flip/mode4flip.agp");
// Key demo, TODO: Use image created by the build system once we support indexed image
_ = GBABuilder.addGBAExecutable(b, "keydemo", "examples/keydemo/keydemo.zig");
// keydemo.addCSourceFile(.{
// .file = .{ .src_path = .{ .owner = b, .sub_path = "examples/keydemo/gba_pic.c" } },
// .flags = &[_][]const u8{"-std=c99"},
// });
// Simple OBJ demo, TODO: Use tile and palette data created by the build system
_ = GBABuilder.addGBAExecutable(b, "objDemo", "examples/objDemo/objDemo.zig");
// objDemo.addCSourceFile(.{
// .file = .{ .src_path = .{ .owner = b, .sub_path = "examples/objDemo/metroid_sprite_data.c" } },
// .flags = &[_][]const u8{"-std=c99"},
// });
// tileDemo, TODO: Use tileset, tile and palette created by the build system
_ = GBABuilder.addGBAExecutable(b, "tileDemo", "examples/tileDemo/tileDemo.zig");
// tileDemo.addCSourceFile(.{
// .file = .{ .src_path = .{ .owner = b, .sub_path = "examples/tileDemo/brin.c" } },
// .flags = &[_][]const u8{"-std=c99"},
// });
// screenBlock
_ = GBABuilder.addGBAExecutable(b, "screenBlock", "examples/screenBlock/screenBlock.zig");
// charBlock
_ = GBABuilder.addGBAExecutable(b, "charBlock", "examples/charBlock/charBlock.zig");
// charBlock.addCSourceFile(.{
// .file = .{ .src_path = .{.owner = b, .sub_path = "examples/charBlock/cbb_ids.c" } },
// .flags = &[_][]const u8{"-std=c99"},
// });
// objAffine
_ = GBABuilder.addGBAExecutable(b, "objAffine", "examples/objAffine/objAffine.zig");
// objAffine.addCSourceFile(.{
// .file = .{ .src_path = .{ .owner = b, .sub_path = "examples/objAffine/metr.c" } },
// .flags = &[_][]const u8{"-std=c99"},
// });
}