-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: refactor: cleanup module structure
Signed-off-by: Stephen Gutekanst <[email protected]>
- Loading branch information
Showing
7 changed files
with
88 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pub const util = @import("util.zig"); | ||
pub const Sprite = @import("Sprite.zig"); | ||
pub const Text = @import("Text.zig"); | ||
pub const FontRenderer = @import("font.zig").FontRenderer; | ||
pub const RGBA32 = @import("font.zig").RGBA32; | ||
pub const Glyph = @import("font.zig").Glyph; | ||
pub const GlyphMetrics = @import("font.zig").GlyphMetrics; | ||
|
||
test { | ||
const std = @import("std"); | ||
// TODO: refactor code so we can use this here: | ||
// std.testing.refAllDeclsRecursive(@This()); | ||
std.testing.refAllDeclsRecursive(util); | ||
// std.testing.refAllDeclsRecursive(Sprite); | ||
// std.testing.refAllDeclsRecursive(Text); | ||
std.testing.refAllDeclsRecursive(FontRenderer); | ||
std.testing.refAllDeclsRecursive(RGBA32); | ||
std.testing.refAllDeclsRecursive(Glyph); | ||
std.testing.refAllDeclsRecursive(GlyphMetrics); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
// Core re-exports | ||
pub const core = @import("mach-core"); | ||
pub const GPUInterface = core.GPUInterface; | ||
pub const Timer = core.Timer; | ||
pub const scope_levels = core.scope_levels; | ||
pub const log_level = core.log_level; | ||
pub const Timer = core.Timer; | ||
pub const gpu = core.gpu; | ||
|
||
// Mach packages | ||
pub const gpu = core.gpu; | ||
pub const sysjs = @import("sysjs"); | ||
pub const ecs = @import("mach-ecs"); | ||
pub const sysaudio = @import("mach-sysaudio"); | ||
pub const gfx = @import("gfx/util.zig"); | ||
pub const gfx2d = struct { | ||
pub const Sprite2D = @import("gfx2d/Sprite2D.zig"); | ||
pub const Text2D = @import("gfx2d/Text2D.zig"); | ||
pub const FontRenderer = @import("gfx2d/font.zig").FontRenderer; | ||
pub const RGBA32 = @import("gfx2d/font.zig").RGBA32; | ||
pub const Glyph = @import("gfx2d/font.zig").Glyph; | ||
pub const GlyphMetrics = @import("gfx2d/font.zig").GlyphMetrics; | ||
}; | ||
pub const math = @import("math/main.zig"); | ||
pub const testing = @import("testing.zig"); | ||
|
||
// Mach standard library | ||
pub const Atlas = @import("atlas/Atlas.zig"); | ||
pub const gfx = @import("gfx/main.zig"); | ||
pub const math = @import("math/main.zig"); | ||
pub const testing = @import("testing.zig"); | ||
|
||
// Engine exports | ||
pub const App = @import("engine.zig").App; | ||
pub const Engine = @import("engine.zig").Engine; | ||
pub const World = @import("engine.zig").World; | ||
pub const Mod = World.Mod; | ||
|
||
const std = @import("std"); | ||
|
||
test { | ||
std.testing.refAllDeclsRecursive(gfx); | ||
const std = @import("std"); | ||
// TODO: refactor code so we can use this here: | ||
// std.testing.refAllDeclsRecursive(@This()); | ||
_ = core; | ||
_ = gpu; | ||
_ = ecs; | ||
_ = sysaudio; | ||
_ = gfx; | ||
_ = math; | ||
_ = testing; | ||
std.testing.refAllDeclsRecursive(Atlas); | ||
std.testing.refAllDeclsRecursive(math); | ||
_ = ecs; | ||
} |