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 string
#include <vector>
class Sprite;
class Texture;
#include "utils.h"
@@ -28,6 +30,9 @@ struct textFile_t {
// Llena una estructuta textFile_t desde un fichero
textFile_t LoadTextFile(std::string file, bool verbose = false);
// Llena una estructura textFile_t desde bytes en memoria
textFile_t LoadTextFileFromMemory(const std::vector<uint8_t> &bytes, bool verbose = false);
// Clase texto. Pinta texto en pantalla a partir de un bitmap
class Text {
private:
@@ -47,6 +52,9 @@ class Text {
Text(std::string textFile, Texture *texture, SDL_Renderer *renderer);
Text(textFile_t *textFile, Texture *texture, SDL_Renderer *renderer);
// Constructor desde bytes en memoria: comparte ownership del texture (no lo libera)
Text(const std::vector<uint8_t> &pngBytes, const std::vector<uint8_t> &txtBytes, SDL_Renderer *renderer);
// Destructor
~Text();