Add image

This commit is contained in:
2024-01-09 23:59:54 +00:00
parent 86e367c721
commit 754454c366
2 changed files with 117 additions and 0 deletions

24
include/image.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef IMAGE_H
#define IMAGE_H
#include "SDL_render.h"
#include "aliases/aliases.h"
#include "window.h"
#include <linux/limits.h>
#include <stdbool.h>
typedef struct {
char path[PATH_MAX];
u64 length;
} path_t;
typedef struct {
i64 width;
i64 height;
SDL_Texture *texture;
path_t filepath;
} image_t;
bool load_image(const window_t *wnd, image_t *img, const char *path);
#endif // !IMAGE_H