diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-05-09 01:01:18 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-05-09 01:01:18 -0300 |
| commit | 5c6b3c19172948cf2e1800a9333cfcd858ee829c (patch) | |
| tree | b8da3f436cba5736d481690935135fe5c6b3badc /sdl3_main.c | |
| parent | a21ae8219e67783c52ba5f415e1ca4745755adb5 (diff) | |
adicionado vecmath.h
Diffstat (limited to 'sdl3_main.c')
| -rw-r--r-- | sdl3_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sdl3_main.c b/sdl3_main.c index 7a0435a..7d29a97 100644 --- a/sdl3_main.c +++ b/sdl3_main.c @@ -3,14 +3,15 @@ #include <SDL3/SDL.h> +#include <vecmath.h> #include "dat.h" static void render(void); static void update(float delta); static void process_events(void); -static void renderrect(float p[2], float s[2]); -static void renderfillrect(float p[2], float s[2]); +static void renderrect(vec2 p, vec2 s); +static void renderfillrect(vec2 p, vec2 s); static SDL_Window *window; static SDL_Renderer *renderer; @@ -159,7 +160,7 @@ process_events() } void -renderrect(float p[2], float s[2]) +renderrect(vec2 p, vec2 s) { SDL_RenderRect(renderer, &(SDL_FRect){ .x = p[0] - s[0] - camera_x, @@ -170,7 +171,7 @@ renderrect(float p[2], float s[2]) } void -renderfillrect(float p[2], float s[2]) +renderfillrect(vec2 p, vec2 s) { SDL_RenderFillRect(renderer, &(SDL_FRect){ .x = p[0] - s[0] - camera_x, |
