diff --git a/include/SpriteComponent.h b/include/SpriteComponent.h index 0c84359..01056ce 100644 --- a/include/SpriteComponent.h +++ b/include/SpriteComponent.h @@ -37,7 +37,7 @@ private: //there should be a better solution as this variable is only used for the loading of the tmx map //TODO: improve this in the future and also remove it from the scope of the developer - const char* path; //empty string if texture has a texture enum value, otherwise the path of the texture + const char* path; //!< empty string if texture has a texture enum value, otherwise the path of the texture public: SpriteComponent(Textures texture, int zIndex); diff --git a/include/TextureManager.h b/include/TextureManager.h index d77ad18..bd4a087 100644 --- a/include/TextureManager.h +++ b/include/TextureManager.h @@ -16,7 +16,7 @@ * and rendering in the engine. It provides functions to add, load, and draw textures * from files, as well as manage sprite sheets. * - * \sa Textures "Textures" are used to identify textures within the engine. + * \sa Textures are used to identify textures within the engine. * It is expected that they are implemented within the games scope. */ @@ -37,9 +37,10 @@ class TextureManager * \brief Adds a single texture to the cache. * \param texture The texture identifier. * \param filePath The file path to the texture file. + * \throws std::runtime_error Is thrown if the texture could not be loaded correctly * * This function loads the texture from the specified file and stores it in - * a cache. If loading the texture fails, an exception is thrown. + * a cache. */ void addSingleTexture(Textures texture, const char* filePath); @@ -70,11 +71,11 @@ class TextureManager * \brief Loads a map tile texture from the file system and caches it. * \param path The file path to the texture. * \return `SDL_Texture*` representing the map tile. + * \throws std::runtime_error Is thrown if the texture could not be loaded correctly * * This function checks if the map tile texture is already cached. If not, it * loads the texture from the file system and stores it in the cache. * - * If loading fails, an exception is thrown with a descriptive error message. * \todo should not be usable for the developer and only be accessed by the map class */ SDL_Texture* loadMapTileTexture(const char* path);