diff options
author | kdx <kikoodx@paranoici.org> | 2023-02-13 11:13:02 +0100 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-02-13 11:46:56 +0100 |
commit | 15864008b90cf2d543b6a98f55e925aa6d69f119 (patch) | |
tree | 1d1e0a41d82ad498f12c9eb2e923d7ae0d958074 /headers/TZR_types.h | |
parent | e3003242c3dfcc0d218f38f8f1f5776b2f68f213 (diff) | |
download | tzr-15864008b90cf2d543b6a98f55e925aa6d69f119.tar.gz |
load resource from memory
Diffstat (limited to 'headers/TZR_types.h')
-rw-r--r-- | headers/TZR_types.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/headers/TZR_types.h b/headers/TZR_types.h index 69f0258..511e5a2 100644 --- a/headers/TZR_types.h +++ b/headers/TZR_types.h @@ -1,8 +1,9 @@ #pragma once #include <stdbool.h> +#include <SDL2/SDL_render.h> enum TZR_ResourceType { - TZR_RES_UNKNOWN, + TZR_RES_RAW, TZR_RES_IMAGE, }; @@ -26,13 +27,14 @@ struct TZR_Rect { struct TZR_Image { int width, height; + SDL_Texture *ptr; }; struct TZR_Resource { TZR_ResourceType type; char *path; /* allocated and freed by TZR; can be NULL */ union { - void *unknown; /* raw file data */ + void *raw; /* raw file data */ struct TZR_Image image; }; }; |