summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
new file mode 100644
index 0000000..35bd0a9
--- /dev/null
+++ b/src/utils.c
@@ -0,0 +1,10 @@
+#include "utils.h"
+
+
+SDL_Texture *load_texture(SDL_Renderer *renderer, const char *path)
+{
+ SDL_Surface *s = SDL_LoadBMP(path);
+ SDL_Texture *res = SDL_CreateTextureFromSurface(renderer, s);
+ SDL_FreeSurface(s);
+ return res;
+}