repeating textures in sprite rendering

This commit is contained in:
veclavtalica committed 2024-08-01 00:23:32 +03:00
1 parent e4e2c203a1
commit 374a9b9c58
8 files changed
+152 -63

No files matched your search

+5
View File
@@ -54,6 +54,11 @@ static void ingame_tick(struct state *state) {
input_set_mouse_captured(&ctx.input, !input_is_mouse_captured(&ctx.input));
}
m_sprite(m_set(path, "/assets/light.png"),
m_set(rect, ((t_frect){ 0, 128, 256, 32 })),
m_opt(color, ((t_color){ 255, 0, 0, 255 })),
m_opt(scale, false ));
m_sprite(m_set(path, "/assets/light.png"),
m_set(rect, ((t_frect){ 48, 64, 64, 64 })),
m_opt(color, ((t_color){ 255, 0, 0, 255 })));