diff --git a/desktop_version/lang/ar/strings.xml b/desktop_version/lang/ar/strings.xml index dc4ab172..d415c59d 100644 --- a/desktop_version/lang/ar/strings.xml +++ b/desktop_version/lang/ar/strings.xml @@ -249,6 +249,14 @@ + + + + + + + + diff --git a/desktop_version/lang/ca/strings.xml b/desktop_version/lang/ca/strings.xml index 9067a50d..a8121033 100644 --- a/desktop_version/lang/ca/strings.xml +++ b/desktop_version/lang/ca/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/cy/strings.xml b/desktop_version/lang/cy/strings.xml index 75233e0a..b293efe0 100644 --- a/desktop_version/lang/cy/strings.xml +++ b/desktop_version/lang/cy/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/de/strings.xml b/desktop_version/lang/de/strings.xml index 8bc440f8..057f9178 100644 --- a/desktop_version/lang/de/strings.xml +++ b/desktop_version/lang/de/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/en/strings.xml b/desktop_version/lang/en/strings.xml index 86a4217f..b15abd00 100644 --- a/desktop_version/lang/en/strings.xml +++ b/desktop_version/lang/en/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/eo/strings.xml b/desktop_version/lang/eo/strings.xml index 6c085043..77e28848 100644 --- a/desktop_version/lang/eo/strings.xml +++ b/desktop_version/lang/eo/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/es/strings.xml b/desktop_version/lang/es/strings.xml index 68c8a246..812efa15 100644 --- a/desktop_version/lang/es/strings.xml +++ b/desktop_version/lang/es/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/es_419/strings.xml b/desktop_version/lang/es_419/strings.xml index 827a3b97..3d2e6585 100644 --- a/desktop_version/lang/es_419/strings.xml +++ b/desktop_version/lang/es_419/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/es_AR/strings.xml b/desktop_version/lang/es_AR/strings.xml index e2cdc457..90ecaad1 100644 --- a/desktop_version/lang/es_AR/strings.xml +++ b/desktop_version/lang/es_AR/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/fr/strings.xml b/desktop_version/lang/fr/strings.xml index 411cc564..908d2a01 100644 --- a/desktop_version/lang/fr/strings.xml +++ b/desktop_version/lang/fr/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/ga/strings.xml b/desktop_version/lang/ga/strings.xml index cbdf9987..4f278b34 100644 --- a/desktop_version/lang/ga/strings.xml +++ b/desktop_version/lang/ga/strings.xml @@ -245,6 +245,14 @@ Déan cóip chúltaca, ar eagla na heagla." explanation="translation maintenance + + + + + + + + diff --git a/desktop_version/lang/it/strings.xml b/desktop_version/lang/it/strings.xml index f4798b2b..42226339 100644 --- a/desktop_version/lang/it/strings.xml +++ b/desktop_version/lang/it/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/ja/strings.xml b/desktop_version/lang/ja/strings.xml index f7fe0042..43f206d3 100644 --- a/desktop_version/lang/ja/strings.xml +++ b/desktop_version/lang/ja/strings.xml @@ -258,6 +258,14 @@ Escキーを押すと表示を終了する。" explanation="" max="38*6" max_loc + + + + + + + + diff --git a/desktop_version/lang/ko/strings.xml b/desktop_version/lang/ko/strings.xml index e7b69f1f..f33b999e 100755 --- a/desktop_version/lang/ko/strings.xml +++ b/desktop_version/lang/ko/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/nl/strings.xml b/desktop_version/lang/nl/strings.xml index 6d1aeebc..af335ea7 100644 --- a/desktop_version/lang/nl/strings.xml +++ b/desktop_version/lang/nl/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/pl/strings.xml b/desktop_version/lang/pl/strings.xml index 059bd1ed..ed1fcf8d 100644 --- a/desktop_version/lang/pl/strings.xml +++ b/desktop_version/lang/pl/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/pt_BR/strings.xml b/desktop_version/lang/pt_BR/strings.xml index 0d084ab8..346fa40e 100644 --- a/desktop_version/lang/pt_BR/strings.xml +++ b/desktop_version/lang/pt_BR/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/pt_PT/strings.xml b/desktop_version/lang/pt_PT/strings.xml index 3d24a84f..5cc4fac8 100644 --- a/desktop_version/lang/pt_PT/strings.xml +++ b/desktop_version/lang/pt_PT/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/ru/strings.xml b/desktop_version/lang/ru/strings.xml index 04c6476b..b2cebd4a 100644 --- a/desktop_version/lang/ru/strings.xml +++ b/desktop_version/lang/ru/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/szl/strings.xml b/desktop_version/lang/szl/strings.xml index 3eadda25..eb41bb9e 100644 --- a/desktop_version/lang/szl/strings.xml +++ b/desktop_version/lang/szl/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/tr/strings.xml b/desktop_version/lang/tr/strings.xml index c7cfdf82..14c269b6 100644 --- a/desktop_version/lang/tr/strings.xml +++ b/desktop_version/lang/tr/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/uk/strings.xml b/desktop_version/lang/uk/strings.xml index dbfc81a9..2b4f8424 100644 --- a/desktop_version/lang/uk/strings.xml +++ b/desktop_version/lang/uk/strings.xml @@ -244,6 +244,14 @@ + + + + + + + + diff --git a/desktop_version/lang/zh/strings.xml b/desktop_version/lang/zh/strings.xml index d437c5ba..73e1c347 100644 --- a/desktop_version/lang/zh/strings.xml +++ b/desktop_version/lang/zh/strings.xml @@ -250,6 +250,14 @@ + + + + + + + + diff --git a/desktop_version/lang/zh_TW/strings.xml b/desktop_version/lang/zh_TW/strings.xml index 157c0cba..2ab10df7 100644 --- a/desktop_version/lang/zh_TW/strings.xml +++ b/desktop_version/lang/zh_TW/strings.xml @@ -250,6 +250,14 @@ + + + + + + + + diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 1d7bad14..fad16998 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -154,6 +154,7 @@ void Game::init(void) musicmutebutton = 0; glitchrunkludge = false; + glitchlessmode = false; gamestate = TITLEMODE; prevgamestate = TITLEMODE; hascontrol = true; @@ -4826,6 +4827,11 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett GlitchrunnerMode_set(GlitchrunnerMode_string_to_enum(pText)); } + if (SDL_strcmp(pKey, "glitchlessmode") == 0) + { + glitchlessmode = help.Int(pText); + } + if (SDL_strcmp(pKey, "showingametimer") == 0) { showingametimer = help.Int(pText); @@ -4939,6 +4945,14 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett } setdefaultcontrollerbuttons(); + + if (GlitchrunnerMode_get() != GlitchrunnerNone && glitchlessmode) + { + /* Glitchrunner and glitchless mode are incompatible. + * If the file was manually edited to enable both, disable both. */ + GlitchrunnerMode_set(GlitchrunnerNone); + glitchlessmode = false; + } } bool Game::savestats(bool sync /*= true*/) @@ -5115,6 +5129,8 @@ void Game::serializesettings(tinyxml2::XMLElement* dataNode, const struct Screen GlitchrunnerMode_enum_to_string(GlitchrunnerMode_get()) ); + xml::update_tag(dataNode, "glitchlessmode", (int) glitchlessmode); + xml::update_tag(dataNode, "showingametimer", (int) showingametimer); xml::update_tag(dataNode, "vsync", (int) screen_settings->useVsync); @@ -6826,7 +6842,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) maxspacing = 15; break; case Menu::speedrunneroptions: - option(loc::gettext("glitchrunner mode")); + option(loc::gettext("glitchrunner mode"), !glitchlessmode); + option(loc::gettext("glitchless mode"), GlitchrunnerMode_get() == GlitchrunnerNone); option(loc::gettext("input delay")); option(loc::gettext("interact button")); option(loc::gettext("fake load screen")); diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index 362a956c..fdac0c0d 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -330,6 +330,7 @@ public: int state, statedelay; bool glitchrunkludge; + bool glitchlessmode; enum GameGamestate gamestate; enum GameGamestate prevgamestate; //only used sometimes diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 468c265a..968d8833 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -787,36 +787,56 @@ static void menuactionpress(void) { case 0: // Glitchrunner mode + if (game.glitchlessmode) + { + music.playef(Sound_CRY); + break; + } + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::setglitchrunner); game.currentmenuoption = GlitchrunnerMode_get(); map.nexttowercolour(); break; case 1: + /* Glitchless mode */ + if (GlitchrunnerMode_get() != GlitchrunnerNone) + { + music.playef(2); + break; + } + + music.playef(11); + game.glitchlessmode = !game.glitchlessmode; + + /* Recreate menu to update glitchrunner mode */ + game.createmenu(game.currentmenuname, true); + break; + case 2: /* Input delay */ music.playef(Sound_VIRIDIAN); game.inputdelay = !game.inputdelay; game.savestatsandsettings_menu(); break; - case 2: + case 3: /* Interact button toggle */ music.playef(Sound_VIRIDIAN); game.separate_interact = !game.separate_interact; game.savestatsandsettings_menu(); break; - case 3: + case 4: // toggle fake load screen game.skipfakeload = !game.skipfakeload; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; - case 4: + case 5: // toggle in game timer game.showingametimer = !game.showingametimer; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; - case 5: + case 6: // english sprites loc::english_sprites = !loc::english_sprites; if (!loc::english_sprites) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 20efc8ff..a42352d6 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1022,10 +1022,38 @@ static void menurender(void) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Glitchrunner Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Re-enable glitches that existed in previous versions of the game."), tr, tg, tb); + + if (game.glitchlessmode) + { + font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Glitchrunner mode is incompatible with glitchless mode."), tr, tg, tb); + break; + } + drawglitchrunnertext(next_y); break; } case 1: + { + font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Glitchless Mode"), tr, tg, tb); + const int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable glitches that might otherwise be useful for speedruns."), tr, tg, tb); + + if (GlitchrunnerMode_get() != GlitchrunnerNone) + { + font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Glitchless mode is incompatible with glitchrunner mode."), tr, tg, tb); + break; + } + + if (game.glitchlessmode) + { + font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Glitchless mode is ON"), tr, tg, tb); + } + else + { + font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Glitchless mode is OFF"), tr / 2, tg / 2, tb / 2); + } + break; + } + case 2: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Input Delay"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Re-enable the 1-frame input delay from previous versions of the game."), tr, tg, tb); @@ -1039,7 +1067,7 @@ static void menurender(void) } break; } - case 2: + case 3: { char buffer[SCREEN_WIDTH_CHARS + 1]; const char* button; @@ -1060,7 +1088,7 @@ static void menurender(void) font::print_wrap(PR_CEN, -1, next_y, buffer, tr, tg, tb); break; } - case 3: + case 4: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Fake Load Screen"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable the fake loading screen which appears on game launch."), tr, tg, tb); @@ -1070,7 +1098,7 @@ static void menurender(void) font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Fake loading screen is ON"), tr, tg, tb); break; } - case 4: + case 5: { 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); @@ -1084,7 +1112,7 @@ static void menurender(void) } break; } - case 5: + case 6: { 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); @@ -2265,6 +2293,12 @@ static void mode_indicator_text(const int alpha) y += spacing; } + if (game.glitchlessmode) + { + font::print(flags, x, y, loc::gettext("Glitchless mode enabled"), r, g, b); + y += spacing; + } + if (graphics.flipmode) { const char* english = "Flip Mode enabled"; @@ -2356,6 +2390,7 @@ void gamerender(void) ); bool any_mode_active = map.invincibility || GlitchrunnerMode_get() != GlitchrunnerNone + || game.glitchlessmode || graphics.flipmode || game.slowdown < 30; bool draw_mode_indicator_text = mode_indicator_alpha > 100 && any_mode_active;