twn_rendering: m_sprite texture_origin changed for texture_region, stretched subregion work now
This commit is contained in:
@ -55,11 +55,9 @@ 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/player/baron-walk.png"),
|
||||
m_set(rect, ((t_frect){ 256, 256, 48, 48 })),
|
||||
m_opt(color, ((t_color){ 255, 255, 255, 255 })),
|
||||
m_opt(stretch, false ),
|
||||
m_opt(texture_origin, ((t_fvec2){ (float)(ctx.tick_count % 48), (float)(ctx.tick_count % 48) })));
|
||||
m_sprite(m_set(path, "/assets/9slice.png"),
|
||||
m_set(rect, ((t_frect){ 16, 16, 128, 128 })),
|
||||
m_opt(texture_region, ((t_frect){ 0, 0, (float)(ctx.tick_count % 48), (float)(ctx.tick_count % 48) })));
|
||||
|
||||
m_sprite(m_set(path, "/assets/light.png"),
|
||||
m_set(rect, ((t_frect){ 48, 64, 64, 64 })),
|
||||
|
Reference in New Issue
Block a user