resource.pack

This commit is contained in:
2026-04-15 23:26:43 +02:00
parent c3534ace9c
commit 0faa605ad9
35 changed files with 1537 additions and 1851 deletions

View File

@@ -2,7 +2,9 @@
#include <SDL3/SDL.h>
#include <cstdint>
#include <string> // for basic_string, string
#include <vector>
class Texture {
private:
@@ -24,12 +26,18 @@ class Texture {
// Constructor
Texture(SDL_Renderer *renderer, std::string path = "", bool verbose = false);
// Constructor desde bytes (PNG en memoria)
Texture(SDL_Renderer *renderer, const std::vector<uint8_t> &bytes, bool verbose = false);
// Destructor
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(std::string path, SDL_Renderer *renderer, bool verbose = false);
// Carga una imagen desde bytes en memoria
bool loadFromMemory(const uint8_t *data, size_t size, SDL_Renderer *renderer, bool verbose = false);
// Crea una textura en blanco
bool createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);