aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword1/animation.cpp')
-rw-r--r--engines/sword1/animation.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 7e9d1142be..f19efd2635 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"
@@ -113,7 +114,7 @@ bool MoviePlayer::load(uint32 id) {
int startFrame = strtoul(ptr, const_cast<char **>(&ptr), 10);
int endFrame = strtoul(ptr, const_cast<char **>(&ptr), 10);
- while (*ptr && isspace(*ptr))
+ while (*ptr && isspace(static_cast<unsigned char>(*ptr)))
ptr++;
if (startFrame > endFrame) {
@@ -260,7 +261,7 @@ bool MoviePlayer::playVideo() {
uint32 minWeight = 0xFFFFFFFF;
uint32 weight;
byte r, g, b;
-
+
const byte *palette = _decoder->getPalette();
for (int i = 0; i < 256; i++) {
@@ -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;