From a99d45e2c44fb22459e9978888b1e3e0d7b8a8c8 Mon Sep 17 00:00:00 2001 From: abux Date: Mon, 3 Aug 2026 16:54:23 +0100 Subject: [PATCH] Improved docs n stuff --- src/event/storage.zig | 4 +++- src/plugin/storage.zig | 4 +++- src/resource/storage.zig | 13 +++++++++---- src/scheduler/storage.zig | 4 +++- src/template/handle.zig | 8 -------- 5 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 src/template/handle.zig diff --git a/src/event/storage.zig b/src/event/storage.zig index 3d03be8..255e4d8 100644 --- a/src/event/storage.zig +++ b/src/event/storage.zig @@ -1,4 +1,6 @@ -// --- LIBS --- +//! ---------------------------------------------------- +//! ---------------------------------------------------- + const std = @import("std"); const Event = @import("event.zig"); const TypeID = @import("../template/type_id.zig").of; diff --git a/src/plugin/storage.zig b/src/plugin/storage.zig index a81cc0d..4b41afa 100644 --- a/src/plugin/storage.zig +++ b/src/plugin/storage.zig @@ -1,4 +1,6 @@ -// --- LIBS --- +//! ---------------------------------------------------- +//! ---------------------------------------------------- + const std = @import("std"); const App = @import("../app.zig"); const Plugin = @import("plugin.zig"); diff --git a/src/resource/storage.zig b/src/resource/storage.zig index 4b8636f..5dac0b4 100644 --- a/src/resource/storage.zig +++ b/src/resource/storage.zig @@ -1,4 +1,6 @@ -// --- LIBS --- +//! ---------------------------------------------------- +//! ---------------------------------------------------- + const std = @import("std"); const Resource = @import("resource.zig"); const TypeID = @import("../template/type_id.zig").of; @@ -117,13 +119,16 @@ pub fn require( } /// ---------------------------------------------------- -/// Example -/// ``` +/// # Example +/// +/// ```zig /// const res = try app.resources.getMany(struct { +/// state: *GameState, /// server: ?*const Server, /// client: ?*const Client, -/// player: *Entity, /// }); +/// +/// res.state.score += 1; /// ``` /// ---------------------------------------------------- pub fn getMany( diff --git a/src/scheduler/storage.zig b/src/scheduler/storage.zig index f1d0e3d..aff9b7d 100644 --- a/src/scheduler/storage.zig +++ b/src/scheduler/storage.zig @@ -1,4 +1,6 @@ -// --- LIBS --- +//! ---------------------------------------------------- +//! ---------------------------------------------------- + const std = @import("std"); const App = @import("../app.zig"); const System = @import("system.zig"); diff --git a/src/template/handle.zig b/src/template/handle.zig deleted file mode 100644 index 4e72149..0000000 --- a/src/template/handle.zig +++ /dev/null @@ -1,8 +0,0 @@ -pub fn Handle(comptime T: type) type { - return struct { - pub const Type: type = T; - - idx: u32 = 0, - gen: u32 = 0, - }; -}