mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
92f9940464
commit
8ef000554d
5 changed files with 35 additions and 0 deletions
|
@ -4637,6 +4637,11 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett
|
||||||
loc::lang_set = help.Int(pText);
|
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)
|
if (SDL_strcmp(pKey, "new_level_font") == 0)
|
||||||
{
|
{
|
||||||
loc::new_level_font = std::string(pText);
|
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", loc::lang.c_str());
|
||||||
xml::update_tag(dataNode, "lang_set", (int) loc::lang_set);
|
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, "new_level_font", loc::new_level_font.c_str());
|
||||||
xml::update_tag(dataNode, "roomname_translator", (int) roomname_translator::enabled);
|
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("interact button"));
|
||||||
option(loc::gettext("fake load screen"));
|
option(loc::gettext("fake load screen"));
|
||||||
option(loc::gettext("toggle in-game timer"));
|
option(loc::gettext("toggle in-game timer"));
|
||||||
|
option(loc::gettext("english sprites"));
|
||||||
option(loc::gettext("return"));
|
option(loc::gettext("return"));
|
||||||
menuyoff = 0;
|
menuyoff = 0;
|
||||||
maxspacing = 15;
|
maxspacing = 15;
|
||||||
|
|
|
@ -797,6 +797,16 @@ static void menuactionpress(void)
|
||||||
game.savestatsandsettings_menu();
|
game.savestatsandsettings_menu();
|
||||||
music.playef(Sound_VIRIDIAN);
|
music.playef(Sound_VIRIDIAN);
|
||||||
break;
|
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:
|
default:
|
||||||
//back
|
//back
|
||||||
music.playef(Sound_VIRIDIAN);
|
music.playef(Sound_VIRIDIAN);
|
||||||
|
|
|
@ -16,6 +16,7 @@ bool pre_title_lang_menu = false;
|
||||||
|
|
||||||
std::string lang = "en";
|
std::string lang = "en";
|
||||||
std::string lang_custom = "";
|
std::string lang_custom = "";
|
||||||
|
bool english_sprites = false;
|
||||||
std::string new_level_font = "";
|
std::string new_level_font = "";
|
||||||
LangMeta langmeta;
|
LangMeta langmeta;
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ extern bool pre_title_lang_menu;
|
||||||
|
|
||||||
extern std::string lang;
|
extern std::string lang;
|
||||||
extern std::string lang_custom;
|
extern std::string lang_custom;
|
||||||
|
extern bool english_sprites;
|
||||||
extern std::string new_level_font;
|
extern std::string new_level_font;
|
||||||
extern LangMeta langmeta;
|
extern LangMeta langmeta;
|
||||||
extern std::vector<LangMeta> languagelist;
|
extern std::vector<LangMeta> languagelist;
|
||||||
|
|
|
@ -1019,6 +1019,7 @@ static void menurender(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
|
{
|
||||||
font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("In-Game Timer"), tr, tg, tb);
|
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);
|
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)
|
if (game.showingametimer)
|
||||||
|
@ -1031,6 +1032,21 @@ static void menurender(void)
|
||||||
}
|
}
|
||||||
break;
|
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;
|
break;
|
||||||
case Menu::setglitchrunner:
|
case Menu::setglitchrunner:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue