module: remove TupleHACK now that dependency loop is resolved

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-05 05:42:07 -07:00 committed by Stephen Gutekanst
parent b3663f7899
commit 3ea64966f0
5 changed files with 43 additions and 80 deletions

View file

@ -108,7 +108,7 @@ fn init(
try text_mod.set(player, .text, text1);
try text_mod.set(player, .style, styles);
text_mod.send(.init_pipeline, .{ .@"0" = Text.PipelineOptions{
text_mod.send(.init_pipeline, .{ Text.PipelineOptions{
.pipeline = @intFromEnum(Pipeline.default),
} });
engine.dispatchNoError(); // TODO: no dispatch in user code
@ -226,14 +226,14 @@ fn tick(
player_pos.v[0] += direction.x() * speed * delta_time;
player_pos.v[1] += direction.y() * speed * delta_time;
try text_mod.set(game.state.player, .transform, Mat4x4.scaleScalar(upscale).mul(&Mat4x4.translate(player_pos)));
text_mod.send(.updated, .{ .@"0" = @intFromEnum(Pipeline.default) });
text_mod.send(.updated, .{ @intFromEnum(Pipeline.default) });
// Perform pre-render work
text_mod.send(.pre_render, .{ .@"0" = @intFromEnum(Pipeline.default) });
text_mod.send(.pre_render, .{ @intFromEnum(Pipeline.default) });
// Render a frame
engine.send(.begin_pass, .{ .@"0" = gpu.Color{ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 } });
text_mod.send(.render, .{ .@"0" = @intFromEnum(Pipeline.default) });
engine.send(.begin_pass, .{ gpu.Color{ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 } });
text_mod.send(.render, .{ @intFromEnum(Pipeline.default) });
engine.send(.end_pass, .{});
engine.send(.present, .{}); // Present the frame