afegit suport multiidioma

afegida traducció al valencià
This commit is contained in:
2026-03-22 09:00:51 +01:00
parent 9b7abc7725
commit c6e2779429
80 changed files with 680 additions and 163 deletions

View File

@@ -5,6 +5,7 @@
#include "core/audio/audio.hpp" // Para Audio
#include "core/input/global_inputs.hpp" // Para check
#include "core/input/input.hpp" // Para Input
#include "core/locale/locale.hpp" // Para Locale
#include "core/rendering/pixel_reveal.hpp" // Para PixelReveal
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
@@ -170,37 +171,38 @@ void Ending::updateState(float delta_time) {
// Inicializa los textos
void Ending::iniTexts() {
// Vector con los textos
// Vector con los textos (traducidos según el idioma activo)
std::vector<TextAndPosition> texts;
auto* loc = Locale::get();
// Escena #0
texts.push_back({"HE FINALLY MANAGED", 32});
texts.push_back({"TO GET TO THE JAIL", 42});
texts.push_back({"WITH ALL HIS PROJECTS", 142});
texts.push_back({"READY TO BE FREED", 152});
texts.push_back({loc->get("ending.t0"), 32});
texts.push_back({loc->get("ending.t1"), 42});
texts.push_back({loc->get("ending.t2"), 142});
texts.push_back({loc->get("ending.t3"), 152});
// Escena #1
texts.push_back({"ALL THE JAILERS WERE THERE", 1});
texts.push_back({"WAITING FOR THE JAILGAMES", 11});
texts.push_back({"TO BE RELEASED", 21});
texts.push_back({loc->get("ending.t4"), 1});
texts.push_back({loc->get("ending.t5"), 11});
texts.push_back({loc->get("ending.t6"), 21});
texts.push_back({"THERE WERE EVEN BARRULLS AND", 161});
texts.push_back({"BEGINNERS AMONG THE CROWD", 171});
texts.push_back({loc->get("ending.t7"), 161});
texts.push_back({loc->get("ending.t8"), 171});
texts.push_back({"BRY WAS CRYING...", 181});
texts.push_back({loc->get("ending.t9"), 181});
// Escena #2
texts.push_back({"BUT SUDDENLY SOMETHING", 19});
texts.push_back({"CAUGHT HIS ATTENTION", 29});
texts.push_back({loc->get("ending.t10"), 19});
texts.push_back({loc->get("ending.t11"), 29});
// Escena #3
texts.push_back({"A PILE OF JUNK!", 36});
texts.push_back({"FULL OF NON WORKING TRASH!!", 46});
texts.push_back({loc->get("ending.t12"), 36});
texts.push_back({loc->get("ending.t13"), 46});
// Escena #4
texts.push_back({"AND THEN,", 36});
texts.push_back({"FOURTY NEW PROJECTS", 46});
texts.push_back({"WERE BORN...", 158});
texts.push_back({loc->get("ending.t14"), 36});
texts.push_back({loc->get("ending.t15"), 46});
texts.push_back({loc->get("ending.t16"), 158});
// Crea los sprites
sprite_texts_.clear();