Add image
This commit is contained in:
24
include/image.h
Normal file
24
include/image.h
Normal 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
|
||||
Reference in New Issue
Block a user