reestructuració

This commit is contained in:
2026-04-17 17:15:38 +02:00
parent 55caef3210
commit 5fec0110b3
66 changed files with 221 additions and 217 deletions

35
source/core/locale/lang.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include <SDL3/SDL.h>
#include <string> // for string, basic_string
class Asset;
// Códigos de idioma
constexpr int es_ES = 0;
constexpr int ba_BA = 1;
constexpr int en_UK = 2;
constexpr int MAX_LANGUAGES = 3;
// Textos
constexpr int MAX_TEXT_STRINGS = 100;
// Clase Lang
class Lang {
private:
Asset *mAsset; // Objeto que gestiona todos los ficheros de recursos
std::string mTextStrings[MAX_TEXT_STRINGS]; // Vector con los textos
public:
// Constructor
Lang(Asset *mAsset);
// Destructor
~Lang();
// Inicializa los textos del juego en el idioma seleccionado
bool setLang(Uint8 lang);
// Obtiene la cadena de texto del indice
std::string getText(int index);
};