1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

Add "English sprites" setting

It'll start working in the next commit... See the description there.

(This commit does not add the new strings to the language files, since
Terry now added them separately in his own branch)
This commit is contained in:
Dav999 2023-10-02 02:44:13 +02:00 committed by Misa Elizabeth Kai
parent 92f9940464
commit 8ef000554d
5 changed files with 35 additions and 0 deletions

View File

@ -4637,6 +4637,11 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett
loc::lang_set = help.Int(pText);
}
if (SDL_strcmp(pKey, "english_sprites") == 0)
{
loc::english_sprites = help.Int(pText);
}
if (SDL_strcmp(pKey, "new_level_font") == 0)
{
loc::new_level_font = std::string(pText);
@ -4902,6 +4907,7 @@ void Game::serializesettings(tinyxml2::XMLElement* dataNode, const struct Screen
xml::update_tag(dataNode, "lang", loc::lang.c_str());
xml::update_tag(dataNode, "lang_set", (int) loc::lang_set);
xml::update_tag(dataNode, "english_sprites", (int) loc::english_sprites);
xml::update_tag(dataNode, "new_level_font", loc::new_level_font.c_str());
xml::update_tag(dataNode, "roomname_translator", (int) roomname_translator::enabled);
}
@ -6514,6 +6520,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option(loc::gettext("interact button"));
option(loc::gettext("fake load screen"));
option(loc::gettext("toggle in-game timer"));
option(loc::gettext("english sprites"));
option(loc::gettext("return"));
menuyoff = 0;
maxspacing = 15;

View File

@ -797,6 +797,16 @@ static void menuactionpress(void)
game.savestatsandsettings_menu();
music.playef(Sound_VIRIDIAN);
break;
case 5:
// english sprites
loc::english_sprites = !loc::english_sprites;
if (!loc::english_sprites)
{
graphics.grphx.init_translations();
}
game.savestatsandsettings_menu();
music.playef(Sound_VIRIDIAN);
break;
default:
//back
music.playef(Sound_VIRIDIAN);

View File

@ -16,6 +16,7 @@ bool pre_title_lang_menu = false;
std::string lang = "en";
std::string lang_custom = "";
bool english_sprites = false;
std::string new_level_font = "";
LangMeta langmeta;

View File

@ -49,6 +49,7 @@ extern bool pre_title_lang_menu;
extern std::string lang;
extern std::string lang_custom;
extern bool english_sprites;
extern std::string new_level_font;
extern LangMeta langmeta;
extern std::vector<LangMeta> languagelist;

View File

@ -1019,6 +1019,7 @@ static void menurender(void)
break;
}
case 4:
{
font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("In-Game Timer"), tr, tg, tb);
int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle the in-game timer outside of time trials."), tr, tg, tb);
if (game.showingametimer)
@ -1031,6 +1032,21 @@ static void menurender(void)
}
break;
}
case 5:
{
font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("English Sprites"), tr, tg, tb);
int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Show the original English word enemies regardless of your language setting."), tr, tg, tb);
if (loc::english_sprites)
{
font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Sprites are currently ALWAYS ENGLISH"), tr, tg, tb);
}
else
{
font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Sprites are currently translated"), tr / 2, tg / 2, tb / 2);
}
break;
}
}
break;
case Menu::setglitchrunner:
{