From 0b338bbd007048551526ab4fa4130d53b414e650 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Wed, 24 Feb 2021 16:38:42 +0100 Subject: fire and movement animations --- render/render_text.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'render/render_text.c') diff --git a/render/render_text.c b/render/render_text.c index 6b801eb..c701fd7 100644 --- a/render/render_text.c +++ b/render/render_text.c @@ -50,15 +50,14 @@ void render_text_scaled (SDL_Renderer* rend, char str[], } } -void render_text_small (SDL_Renderer* rend, char str[], float off[], - SDL_Texture *texsmall) +void render_text_small (SDL_Renderer* rend, char str[], float off[], txtd *t) { int width = 0; for (int i=0; str[i]!='\0'; i++) { int char_i = str[i]; SDL_Rect srcRect = { (char_i%32)*5+1, (char_i/32)*7+1, 4, 6 }; SDL_Rect dstRect = { off[0]+width, off[1], 4, 6 }; - SDL_RenderCopy(rend, texsmall, &srcRect, &dstRect); + SDL_RenderCopy(rend, t->tex_small, &srcRect, &dstRect); width += 5; } } \ No newline at end of file -- cgit v1.2.3-54-g00ecf