Commit graph

493 commits

Author SHA1 Message Date
Stephen Gutekanst
0c3ae9a048 ecs: correctly update invalidated pointer post-allocation
Potentially fixes hexops/mach#1178

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
3898995c4c all: get ECS running on revised module system
All ECS `examples/` now run on the revised module system.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
cd2f3fbc3f module: test empty/minimal module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
388a1fbfca module: move namespaced state/components to ecs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
e24d09cd62 module: event handlers can return inferred error set
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
fcf6be9e6d module: make global event argument types always known
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
135e9b8121 module: add GlobalEvent enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
e25281cc64 module: add event arguments & dependency injection support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
e4e834e054 module: add API variants for global/local events
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
6f23812fa6 module: initial runtime event dispatch implementation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
5b6020508c module: runtime local event handler calling
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
18a391f446 module: build addressable event handler names, runtime invocation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
afc5a50c09 testing: fix runtime parameters
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
35f55df696 testing: export allocator/RefAllDeclsRecursive
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
c6db530d74 module: begin working towards dynamic dispatch
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
5e353e60bb module: improve testing
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
56fc29743f move mach.ecs.Module -> mach.Module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
3ba511ffaf correct wasm32-freestanding build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-08 23:56:59 -07:00
Stephen Gutekanst
b7fb2057f7 fix x86_64-linux-gnu build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-08 23:44:33 -07:00
Stephen Gutekanst
a433937d39 update to Zig 2024.03-mach
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-08 22:34:28 -07:00
Stephen Gutekanst
7d1b5e4466 move examples into this repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-06 11:09:13 -07:00
Stephen Gutekanst
f25f435275 core: fix gamemode import path
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 01:03:42 -07:00
Stephen Gutekanst
55317a1afc fix wasm32-freestanding builds
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
f29b775b27 mach-core moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
38f296ecce src/core: move mach-core@9a4d09707d9f1cb6ea5602bdf58caeefc46146be package to here
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
fa3f6161ad mach-sysgpu moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
e7b2ebef70 src/sysgpu: move mach-sysgpu@d6ed118f54c4784f7ce01b70fc1b94f887fae1a8 package to here
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
e38a441b69 fix linux build (gamemode requires libc)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
e77a5a2ca2 mach-sysaudio moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
bca1543391 src/sysaudio: move mach-sysaudio@ce8ab30dd300b822224d14997c58c06520b642c9 package to here
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
d64d30c7db mach-gamemode moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
221364415e mach-ecs moves back into the main repository
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
5f70579360 src/ecs: move mach-ecs@83a3ed801008a976dd79e10068157b02c3b76a36 package to here
Helps hexops/mach#1165

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00
Stephen Gutekanst
89622810f8 all: use mach.math instead of std.math; fixes hexops/mach#1021
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-18 22:34:12 -07:00
Stephen Gutekanst
b5531f84cb update to Zig 2024.1.0-mach
Related to hexops/mach#1145

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-14 19:11:20 -07:00
Stephen Gutekanst
fc24a1148a gfx: use Mat4x4.projection2D once again
Helps hexops/mach#1103

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-06 13:11:23 -07:00
Stephen Gutekanst
0d938ef6be math: add inf, isInf
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-06 13:11:23 -07:00
Stephen Gutekanst
aa2435e10e math: add well-tested, reverse-z 2D projection matrix
Helps hexops/mach#1103

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-06 13:11:23 -07:00
Stephen Gutekanst
fb69b0cda7 testing: improve printing on testing.expect inequality
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-01-06 13:11:23 -07:00
Joel
59bb156bf9
math: Add vector comparison functions (#1131) 2024-01-06 12:37:58 -07:00
Ali Chraghi
e9489ee560
math: add Mat2x2 (#1130) 2023-12-30 15:57:43 -07:00
btipling
9cf37cdc39
Early return with null for a ray with no direction (#1132) 2023-12-30 15:48:39 -07:00
Stephen Gutekanst
260802f777 all: update ECS Mod(.module_tag) -> Mod(ModuleType)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-12-16 22:56:46 -07:00
Stephen Gutekanst
8ff30c931f all: update to global vs. local ECS change
See hexops/mach-ecs@ef06fb6473

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-12-16 19:41:34 -07:00
Caleb Katzenstein
11aed4d16f
math: Add vec3.mulQuat() (#1067)
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-12-16 13:28:47 -07:00
Stephen Gutekanst
9250310c4a math: remove invalid test
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-11-10 14:30:40 -07:00
Stephen Gutekanst
c87ea394db math: remove incorrect perspective/ortho projection implementations
See https://github.com/hexops/mach/issues/1103

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-11-10 14:29:51 -07:00
Joel D. Schüller
3e025ef7b1 math: Make Mat3x3's underlying type Vec3 2023-10-24 23:32:55 -07:00
Om Prakaash
c1abc7a06f
math: add fromInt constructor helper for vectors (#1061) 2023-10-16 19:35:45 -07:00
Joel
fde4f820d7
math: Add Matrix multiplication tests (#1066)
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-10-16 19:32:20 -07:00