From: Ondřej Hošek Date: Thu, 12 Jul 2007 10:53:10 +0000 (+0000) Subject: * Added English as a static entry into the language menu. (We don't have an en.po.) X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=b8bb8a85f28cce0eaecbcd91ad7ed8fc957ef53f;p=supertux.git * Added English as a static entry into the language menu. (We don't have an en.po.) * Made Mr Bomb preload the "explosion" sound on creation. Otherwise, if the first Mr Bomb in a level is killed e.g. by Star Power, the game stutters. SVN-Revision: 5129 --- diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 4ebe6fbf5..93a58c2f2 100644 --- a/src/badguy/mrbomb.cpp +++ b/src/badguy/mrbomb.cpp @@ -23,6 +23,7 @@ #include "bomb.hpp" #include "object/explosion.hpp" #include "sprite/sprite_manager.hpp" +#include "audio/sound_manager.hpp" MrBomb::MrBomb(const lisp::Lisp& reader) : WalkingBadguy(reader, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right") @@ -31,6 +32,9 @@ MrBomb::MrBomb(const lisp::Lisp& reader) max_drop_height = 16; grabbed = false; + //Prevent stutter when Tux jumps on Mr Bomb + sound_manager->preload("sounds/explosion.wav"); + //Check if we need another sprite if( !reader.get( "sprite", sprite_name ) ){ return; @@ -50,6 +54,7 @@ MrBomb::MrBomb(const Vector& pos, Direction d) walk_speed = 80; max_drop_height = 16; grabbed = false; + sound_manager->preload("sounds/explosion.wav"); } void diff --git a/src/options_menu.cpp b/src/options_menu.cpp index a87676e01..c4c7ac9a6 100644 --- a/src/options_menu.cpp +++ b/src/options_menu.cpp @@ -42,6 +42,7 @@ public: add_label(_("Language")); add_hl(); add_entry(0, std::string("(")+_("auto-detect language")+")"); + add_entry(1, "English"); int mnid = 10; std::set languages = dictionary_manager.get_languages(); @@ -66,6 +67,12 @@ public: config->save(); Menu::set_current(0); } + else if (item->id == 1) { + config->locale = "en"; + dictionary_manager.set_language(config->locale); + config->save(); + Menu::set_current(0); + } int mnid = 10; std::set languages = dictionary_manager.get_languages(); for (std::set::iterator i = languages.begin(); i != languages.end(); i++) {