diff options
author | Tobia Tesan | 2014-02-08 00:39:59 +0100 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:45 +0200 |
commit | 7c6f9772d37e3ab7724d20c838883ee8abc2c2b3 (patch) | |
tree | d1544b5d4fa7b18dae8c2d906cd3a359c343e3af /engines/wintermute/video | |
parent | afb3ae303461668d4807eaa047a5585a7c870adc (diff) | |
download | scummvm-rg350-7c6f9772d37e3ab7724d20c838883ee8abc2c2b3.tar.gz scummvm-rg350-7c6f9772d37e3ab7724d20c838883ee8abc2c2b3.tar.bz2 scummvm-rg350-7c6f9772d37e3ab7724d20c838883ee8abc2c2b3.zip |
WINTERMUTE: Save frames as uint rather than long
It's just as good: at 30 FPS, this allows for
2 ^ 32 / 30 / 60 = 2386093 mins, which is, I guess, a reasonable limit.
Diffstat (limited to 'engines/wintermute/video')
-rw-r--r-- | engines/wintermute/video/video_subtitle.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/video/video_subtitle.h | 10 | ||||
-rw-r--r-- | engines/wintermute/video/video_subtitler.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/video/video_subtitler.h | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/video/video_subtitle.cpp b/engines/wintermute/video/video_subtitle.cpp index c9892b59a4..eb95f25944 100644 --- a/engines/wintermute/video/video_subtitle.cpp +++ b/engines/wintermute/video/video_subtitle.cpp @@ -34,7 +34,7 @@ VideoSubtitle::VideoSubtitle(BaseGame *inGame): BaseClass(inGame) { _startFrame = _endFrame = 0; } -VideoSubtitle::VideoSubtitle(BaseGame *inGame, const Common::String &text, const long &startFrame, const long &endFrame): BaseClass(inGame) { +VideoSubtitle::VideoSubtitle(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame): BaseClass(inGame) { // TODO: Fix expandStringByStringTable instead of this ugly hack char *tmp = new char[text.size()]; strcpy(tmp, text.c_str()); @@ -44,11 +44,11 @@ VideoSubtitle::VideoSubtitle(BaseGame *inGame, const Common::String &text, const _endFrame = endFrame; } -long VideoSubtitle::getStartFrame() { +uint VideoSubtitle::getStartFrame() { return _startFrame; } -long VideoSubtitle::getEndFrame() { +uint VideoSubtitle::getEndFrame() { return _endFrame; } diff --git a/engines/wintermute/video/video_subtitle.h b/engines/wintermute/video/video_subtitle.h index 03d4b6bc05..4c80c0cdfd 100644 --- a/engines/wintermute/video/video_subtitle.h +++ b/engines/wintermute/video/video_subtitle.h @@ -36,13 +36,13 @@ namespace Wintermute { class VideoSubtitle : public BaseClass { public: VideoSubtitle(BaseGame *inGame); - VideoSubtitle(BaseGame *inGame, const Common::String &text, const long &startFrame, const long &endFrame); - long getEndFrame(); - long getStartFrame(); + VideoSubtitle(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame); + uint getEndFrame(); + uint getStartFrame(); Common::String getText(); private: - long _endFrame; - long _startFrame; + uint _endFrame; + uint _startFrame; Common::String _text; }; diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp index 0ade366fb5..8f3032a95a 100644 --- a/engines/wintermute/video/video_subtitler.cpp +++ b/engines/wintermute/video/video_subtitler.cpp @@ -76,7 +76,7 @@ bool VideoSubtitler::loadSubtitles(const Common::String &filename, const Common: newFile = PathUtil::combine(path, name + ext); } - long size; + int size; Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(newFile, true, false); @@ -88,7 +88,7 @@ bool VideoSubtitler::loadSubtitles(const Common::String &filename, const Common: char *buffer = new char[size]; file->read(buffer, size); - long start, end; + int start, end; bool inToken; char *tokenStart; int tokenLength; @@ -184,7 +184,7 @@ bool VideoSubtitler::display() { return false; } -bool VideoSubtitler::update(long frame) { +bool VideoSubtitler::update(uint frame) { if (_subtitles.size() == 0) { // Edge case: we have loaded subtitles early on... from a blank file. diff --git a/engines/wintermute/video/video_subtitler.h b/engines/wintermute/video/video_subtitler.h index b369d0bff8..2940d69785 100644 --- a/engines/wintermute/video/video_subtitler.h +++ b/engines/wintermute/video/video_subtitler.h @@ -44,7 +44,7 @@ public: uint _currentSubtitle; bool loadSubtitles(const Common::String &filename, const Common::String &subtitleFile); bool display(); - bool update(long frame); + bool update(uint frame); private: Common::Array<VideoSubtitle *> _subtitles; long _lastSample; |