diff options
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/animation.cpp | 10 | ||||
-rw-r--r-- | engines/sword1/control.cpp | 12 | ||||
-rw-r--r-- | engines/sword1/logic.cpp | 3 |
3 files changed, 13 insertions, 12 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 7e9d1142be..cb86264eeb 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -24,6 +24,7 @@ #include "common/events.h" #include "common/keyboard.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sword1/sword1.h" #include "sword1/animation.h" #include "sword1/text.h" @@ -324,7 +325,6 @@ uint32 DXADecoderWithSound::getElapsedTime() const { MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system) { Common::String filename; - char buf[60]; Audio::SoundHandle *bgSoundHandle = new Audio::SoundHandle; filename = Common::String::format("%s.smk", sequenceList[id]); @@ -341,7 +341,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::M DXADecoderWithSound *dxaDecoder = new DXADecoderWithSound(snd, bgSoundHandle); return new MoviePlayer(vm, textMan, snd, system, bgSoundHandle, dxaDecoder, kVideoDecoderDXA); #else - GUI::MessageDialog dialog("DXA cutscenes found but ScummVM has been built without zlib support", "OK"); + GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK")); dialog.runModal(); return NULL; #endif @@ -351,13 +351,13 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::M filename = Common::String::format("%s.mp2", sequenceList[id]); if (Common::File::exists(filename)) { - GUI::MessageDialog dialog("MPEG2 cutscenes are no longer supported", "OK"); + GUI::MessageDialog dialog(_("MPEG2 cutscenes are no longer supported"), _("OK")); dialog.runModal(); return NULL; } - sprintf(buf, "Cutscene '%s' not found", sequenceList[id]); - GUI::MessageDialog dialog(buf, "OK"); + Common::String buf = Common::String::format(_("Cutscene '%s' not found"), sequenceList[id]); + GUI::MessageDialog dialog(buf, _("OK")); dialog.runModal(); return NULL; diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 86947db8ae..36d5a24e99 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -27,6 +27,7 @@ #include "common/system.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "graphics/palette.h" #include "graphics/thumbnail.h" @@ -859,9 +860,9 @@ void Control::checkForOldSaveGames() { } GUI::MessageDialog dialog0( - "ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" + _("ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" "The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n\n" - "Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n", "OK", "Cancel"); + "Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n"), _("OK"), _("Cancel")); int choice = dialog0.runModal(); if (choice == GUI::kMessageCancel) { @@ -1228,11 +1229,10 @@ bool Control::convertSaveGame(uint8 slot, char* desc) { if (testSave) { delete testSave; - char msg[200]; - sprintf(msg, "Target new save game already exists!\n" - "Would you like to keep the old save game (%s) or the new one (%s)?\n", + Common::String msg = Common::String::format(_("Target new save game already exists!\n" + "Would you like to keep the old save game (%s) or the new one (%s)?\n"), oldFileName, newFileName); - GUI::MessageDialog dialog0(msg, "Keep the old one", "Keep the new one"); + GUI::MessageDialog dialog0(msg, _("Keep the old one"), _("Keep the new one")); int choice = dialog0.runModal(); if (choice == GUI::kMessageCancel) { diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp index 00f7112c05..5b42c9340e 100644 --- a/engines/sword1/logic.cpp +++ b/engines/sword1/logic.cpp @@ -23,6 +23,7 @@ #include "common/endian.h" #include "common/util.h" #include "common/textconsole.h" +#include "common/translation.h" #include "sword1/logic.h" #include "sword1/text.h" @@ -1629,7 +1630,7 @@ int Logic::fnRestartGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 int Logic::fnQuitGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) { if (SwordEngine::_systemVars.isDemo) { - GUI::MessageDialog dialog("This is the end of the Broken Sword 1 Demo", "OK", NULL); + GUI::MessageDialog dialog(_("This is the end of the Broken Sword 1 Demo"), _("OK"), NULL); dialog.runModal(); Engine::quitGame(); } else |