neteja tidy a source/core i encamina Texture::loadFromFile pel ResourceHelper

This commit is contained in:
2026-05-14 20:22:54 +02:00
parent 88fa3f296f
commit 1912200b21
40 changed files with 699 additions and 578 deletions
+7 -7
View File
@@ -33,13 +33,13 @@ class Texture {
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(const std::string &path, SDL_Renderer *renderer, bool verbose = false);
auto loadFromFile(const std::string &path, SDL_Renderer *renderer, bool verbose = false) -> bool;
// Carga una imagen desde bytes en memoria
bool loadFromMemory(const uint8_t *data, size_t size, SDL_Renderer *renderer, bool verbose = false);
auto loadFromMemory(const uint8_t *data, size_t size, SDL_Renderer *renderer, bool verbose = false) -> bool;
// Crea una textura en blanco
bool createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);
auto createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess /*access*/ = SDL_TEXTUREACCESS_STREAMING) -> bool;
// Libera la memoria de la textura
void unload();
@@ -60,14 +60,14 @@ class Texture {
void setAsRenderTarget(SDL_Renderer *renderer);
// Obtiene el ancho de la imagen
int getWidth();
[[nodiscard]] auto getWidth() const -> int;
// Obtiene el alto de la imagen
int getHeight();
[[nodiscard]] auto getHeight() const -> int;
// Recarga la textura
bool reLoad();
auto reLoad() -> bool;
// Obtiene la textura
SDL_Texture *getSDLTexture();
auto getSDLTexture() -> SDL_Texture *;
};