diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2024-02-06 11:52:32 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2024-02-06 11:52:32 +0000 |
| commit | c7a3dcdc8a26eb5bf98ce2079abd66fd64534459 (patch) | |
| tree | ff5c572f94c3bf3e11e7f9e75e617d4454cc263a /src/resources/include/engine/resources.h | |
| parent | 3705b14a4b2ac0d6baa418f08991424cfad89891 (diff) | |
Fixup window handling & rendering
Diffstat (limited to 'src/resources/include/engine/resources.h')
| -rw-r--r-- | src/resources/include/engine/resources.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/resources/include/engine/resources.h b/src/resources/include/engine/resources.h index 9de24ce..32e68ac 100644 --- a/src/resources/include/engine/resources.h +++ b/src/resources/include/engine/resources.h @@ -3,6 +3,7 @@ #include <engine/core/types.h> +// TODO /* We need some "global resources", available to all states. * These are resources such as common fonts, GUI frames, button background * images. @@ -49,6 +50,29 @@ typedef union { Asset_AudioSpec audio; } asset_t; +// The resource spec +struct Resources { + // Was: +// usize textures_len; +// usize textures_size; +// usize fonts_len; +// +// usize texturepaths_len; +// usize fontpaths_len; +// +// /* Paths for our sources, kept in case the user wants to reload them */ +// Asset_TextureSpec** texture_paths; +// Asset_FontSpec** font_paths; +// +// /* Our actual sources */ +// Texture** textures; +// //TTF_Font** fonts; + + // But with the new way: + // usize assets_len; + // asset_t assets*; +}; + #define Resource_FontDefinition(_path, _fontsize) \ (const Asset_FontSpec) { \ .type = Asset_font, .font_path = _path, .ptsize = _fontsize \ @@ -76,4 +100,6 @@ isize resource_load_audio(Asset_AudioSpec audio_def); * to `engine_run` */ isize resource_make_global(isize resource_id); +#include <engine/resources/texture.h> + #endif |
