From 5392f970f970ba0d5f4642b11935e61653086aae Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Mon, 11 May 2020 13:26:16 +0200 Subject: work --- src/assets.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/assets.h') 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); -- cgit v1.2.3-70-g09d2