diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-05-11 13:26:16 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-05-11 13:26:16 +0200 |
| commit | 5392f970f970ba0d5f4642b11935e61653086aae (patch) | |
| tree | 020b881d0b93d3af82d2b4d83e7ca7e44101f052 /src/assets.h | |
| parent | 45d1a969f70e1b127eb0aaab94dfce33b18e42ee (diff) | |
work
Diffstat (limited to 'src/assets.h')
| -rw-r--r-- | src/assets.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/assets.h b/src/assets.h index a2b02da..870ab97 100644 --- a/src/assets.h +++ b/src/assets.h @@ -12,12 +12,13 @@ typedef struct t_image { u8 *end_addr;
bool loaded;
bool keep_in_memory;
+ bool is_bitmap;
s32 width;
s32 height;
s32 channels;
void *data;
s16 references;
- GLuint textureID;
+ u32 textureID;
} image;
#define TEXT_CHARSET_START 0
@@ -33,7 +34,7 @@ typedef struct t_glyph s32 xoff;
s32 yoff;
void *bitmap;
- GLuint textureID;
+ u32 textureID;
} glyph;
typedef struct t_font
@@ -52,6 +53,7 @@ typedef struct t_font typedef enum t_asset_task_type
{
ASSET_IMAGE,
+ ASSET_BITMAP,
ASSET_FONT,
} asset_task_type;
@@ -92,6 +94,9 @@ void *assets_queue_worker(); image *assets_load_image(u8 *start_addr, u8 *end_addr, bool keep_in_memory);
void assets_destroy_image(image *image);
+image *assets_load_bitmap(u8 *start_addr, s32 width, s32 height, s32 channels);
+void assets_destroy_bitmap(image *image);
+
font *assets_load_font(u8 *start_addr, u8 *end_addr, s16 size);
void assets_destroy_font(font *font);
|
