From 3e5a506e2de909e4d1e7c48f89cd20b8d20cf1b1 Mon Sep 17 00:00:00 2001 From: Dennis Meinen Date: Tue, 23 Jul 2024 22:44:41 +0200 Subject: [PATCH] Added id on Texture asset to easily access the internal ID of the texture. --- assettypes/texture.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assettypes/texture.h b/assettypes/texture.h index 50019d7..9433c8a 100644 --- a/assettypes/texture.h +++ b/assettypes/texture.h @@ -8,10 +8,13 @@ * @brief Represents a texture asset for rendering images using SDL. */ struct TextureAsset { + int32_t id; int width = -1; /**< Width of the texture. */ int height = -1; /**< Height of the texture. */ std::string filename; /**< Filename of the texture image file. */ + + SDL_Surface *surface = nullptr; /**< Pointer to the SDL surface representing the texture. */ SDL_Texture *texture = nullptr; /**< Pointer to the SDL texture. */ };