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 -8
View File
@@ -24,15 +24,13 @@ auto Lang::get() -> Lang * {
}
// Constructor
Lang::Lang() {
}
Lang::Lang() = default;
// Destructor
Lang::~Lang() {
}
Lang::~Lang() = default;
// Inicializa los textos del juego en el idioma seleccionado
bool Lang::setLang(Uint8 lang) {
auto Lang::setLang(Uint8 lang) -> bool {
std::string file;
switch (lang) {
@@ -53,8 +51,9 @@ bool Lang::setLang(Uint8 lang) {
break;
}
for (int i = 0; i < MAX_TEXT_STRINGS; i++)
mTextStrings[i] = "";
for (auto &mTextString : mTextStrings) {
mTextString = "";
}
// Lee el fichero via ResourceHelper (pack o filesystem)
auto bytes = ResourceHelper::loadFile(file);
@@ -90,6 +89,6 @@ bool Lang::setLang(Uint8 lang) {
}
// Obtiene la cadena de texto del indice
std::string Lang::getText(int index) {
auto Lang::getText(int index) -> std::string {
return mTextStrings[index];
}