aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/video
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-18 18:31:56 +0200
committerEinar Johan Trøan Sømåen2012-07-18 18:31:56 +0200
commit136ae9857f3401f5dea13c63c3c0702b08040e2a (patch)
treeab51032b31e1f27e9e96e30babb234e1d9bd8758 /engines/wintermute/video
parent95c0efb93720fa2415693cd138b14144cd7b0bb6 (diff)
downloadscummvm-rg350-136ae9857f3401f5dea13c63c3c0702b08040e2a.tar.gz
scummvm-rg350-136ae9857f3401f5dea13c63c3c0702b08040e2a.tar.bz2
scummvm-rg350-136ae9857f3401f5dea13c63c3c0702b08040e2a.zip
WINTERMUTE: Rename ERRORCODE (formerly HRESULT) to bool
Diffstat (limited to 'engines/wintermute/video')
-rw-r--r--engines/wintermute/video/VidPlayer.cpp22
-rw-r--r--engines/wintermute/video/VidPlayer.h16
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.cpp30
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.h26
4 files changed, 47 insertions, 47 deletions
diff --git a/engines/wintermute/video/VidPlayer.cpp b/engines/wintermute/video/VidPlayer.cpp
index a962608691..93f3196eee 100644
--- a/engines/wintermute/video/VidPlayer.cpp
+++ b/engines/wintermute/video/VidPlayer.cpp
@@ -45,7 +45,7 @@ CVidPlayer::CVidPlayer(CBGame *inGame): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::SetDefaults() {
+bool CVidPlayer::SetDefaults() {
_playing = false;
/* _aviFile = NULL;
@@ -91,7 +91,7 @@ CVidPlayer::~CVidPlayer() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::cleanup() {
+bool CVidPlayer::cleanup() {
#if 0
if (_sound) _sound->Stop();
if (_videoPGF) AVIStreamGetFrameClose(_videoPGF);
@@ -124,7 +124,7 @@ ERRORCODE CVidPlayer::cleanup() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::initialize(const char *inFilename, const char *SubtitleFile) {
+bool CVidPlayer::initialize(const char *inFilename, const char *SubtitleFile) {
#if 0
cleanup();
@@ -183,7 +183,7 @@ ERRORCODE CVidPlayer::initialize(const char *inFilename, const char *SubtitleFil
// create sound buffer
- ERRORCODE res;
+ bool res;
if (_soundAvailable) {
_sound = new CBSoundAVI(_gameRef);
@@ -204,11 +204,11 @@ ERRORCODE CVidPlayer::initialize(const char *inFilename, const char *SubtitleFil
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::update() {
+bool CVidPlayer::update() {
#if 0
if (!m_Playing) return STATUS_OK;
- ERRORCODE res;
+ bool res;
if (_soundAvailable && m_Sound) {
res = _sound->update();
@@ -274,11 +274,11 @@ ERRORCODE CVidPlayer::update() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::display() {
+bool CVidPlayer::display() {
#if 0
if (!m_Playing) return STATUS_OK;
- ERRORCODE res;
+ bool res;
if (_vidRenderer) res = _vidRenderer->display(m_PlayPosX, m_PlayPosY, m_PlayZoom);
else res = STATUS_FAILED;
@@ -298,7 +298,7 @@ ERRORCODE CVidPlayer::display() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) {
+bool CVidPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) {
#if 0
if (!_videoStream || !_vidRenderer) return STATUS_FAILED;
@@ -359,7 +359,7 @@ ERRORCODE CVidPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic)
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::stop() {
+bool CVidPlayer::stop() {
#if 0
if (!_playing) return STATUS_OK;
@@ -378,7 +378,7 @@ bool CVidPlayer::isPlaying() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) {
+bool CVidPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) {
#if 0
if (!Filename) return STATUS_OK;
diff --git a/engines/wintermute/video/VidPlayer.h b/engines/wintermute/video/VidPlayer.h
index 6b729cac20..fd587aa609 100644
--- a/engines/wintermute/video/VidPlayer.h
+++ b/engines/wintermute/video/VidPlayer.h
@@ -46,23 +46,23 @@ class CVidPlayer : public CBBase {
public:
bool _showSubtitle;
int _currentSubtitle;
- ERRORCODE loadSubtitles(const char *filename, const char *SubtitleFile);
+ bool loadSubtitles(const char *filename, const char *SubtitleFile);
bool _slowRendering;
bool isPlaying();
char *_filename;
- ERRORCODE stop();
- ERRORCODE play(TVideoPlayback Type = VID_PLAY_CENTER, int X = 0, int Y = 0, bool FreezeMusic = true);
+ bool stop();
+ bool play(TVideoPlayback Type = VID_PLAY_CENTER, int X = 0, int Y = 0, bool FreezeMusic = true);
uint32 _totalVideoTime;
uint32 _startTime;
//CVidRenderer *_vidRenderer;
//CBSoundAVI *_sound;
bool _soundAvailable;
- ERRORCODE SetDefaults();
+ bool SetDefaults();
bool _playing;
- ERRORCODE display();
- ERRORCODE update();
- ERRORCODE initialize(const char *inFilename, const char *SubtitleFile = NULL);
- ERRORCODE cleanup();
+ bool display();
+ bool update();
+ bool initialize(const char *inFilename, const char *SubtitleFile = NULL);
+ bool cleanup();
CVidPlayer(CBGame *inGame);
virtual ~CVidPlayer();
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp
index 6a622449ab..d7e8850177 100644
--- a/engines/wintermute/video/VidTheoraPlayer.cpp
+++ b/engines/wintermute/video/VidTheoraPlayer.cpp
@@ -133,7 +133,7 @@ void CVidTheoraPlayer::cleanup() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::initialize(const Common::String &filename, const Common::String &subtitleFile) {
+bool CVidTheoraPlayer::initialize(const Common::String &filename, const Common::String &subtitleFile) {
cleanup();
_filename = filename;
@@ -294,7 +294,7 @@ ERRORCODE CVidTheoraPlayer::initialize(const Common::String &filename, const Com
vorbis_comment_clear(&m_VorbisComment);
}
- ERRORCODE Res = STATUS_OK;
+ bool Res = STATUS_OK;
// create sound buffer
if (m_VorbisStreams && _gameRef->m_SoundMgr->m_SoundAvailable) {
@@ -334,7 +334,7 @@ ERRORCODE CVidTheoraPlayer::initialize(const Common::String &filename, const Com
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::resetStream() {
+bool CVidTheoraPlayer::resetStream() {
warning("VidTheoraPlayer::resetStream - stubbed");
#if 0
if (_sound) _sound->Stop();
@@ -347,7 +347,7 @@ ERRORCODE CVidTheoraPlayer::resetStream() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame, bool freezeMusic, bool looping, uint32 startTime, float forceZoom, int volume) {
+bool CVidTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame, bool freezeMusic, bool looping, uint32 startTime, float forceZoom, int volume) {
if (forceZoom < 0.0f)
forceZoom = 100.0f;
if (volume < 0)
@@ -451,7 +451,7 @@ ERRORCODE CVidTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeG
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::stop() {
+bool CVidTheoraPlayer::stop() {
_theoraDecoder->close();
_state = THEORA_STATE_FINISHED;
if (_freezeGame) {
@@ -466,7 +466,7 @@ ERRORCODE CVidTheoraPlayer::stop() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::update() {
+bool CVidTheoraPlayer::update() {
_currentTime = _freezeGame ? _gameRef->_liveTimer : _gameRef->_timer;
if (!isPlaying()) return STATUS_OK;
@@ -614,7 +614,7 @@ uint32 CVidTheoraPlayer::getMovieFrame() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::WriteVideo() {
+bool CVidTheoraPlayer::WriteVideo() {
if (!_texture) return STATUS_FAILED;
_texture->startPixelOp();
@@ -651,9 +651,9 @@ void CVidTheoraPlayer::writeAlpha() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::display(uint32 alpha) {
+bool CVidTheoraPlayer::display(uint32 alpha) {
Rect32 rc;
- ERRORCODE res;
+ bool res;
if (_texture && _videoFrameReady) {
CBPlatform::setRect(&rc, 0, 0, _texture->getWidth(), _texture->getHeight());
@@ -667,7 +667,7 @@ ERRORCODE CVidTheoraPlayer::display(uint32 alpha) {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::setAlphaImage(const Common::String &filename) {
+bool CVidTheoraPlayer::setAlphaImage(const Common::String &filename) {
warning("CVidTheoraPlayer::SetAlphaImage(%s) - Not implemented", filename.c_str());
delete _alphaImage;
@@ -716,7 +716,7 @@ inline int intlog(int num) {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::SeekToTime(uint32 time) {
+bool CVidTheoraPlayer::SeekToTime(uint32 time) {
warning("CVidTheoraPlayer::SeekToTime(%d) - not supported", time);
#if 0
if (!m_TheoraStreams) return STATUS_FAILED;
@@ -780,7 +780,7 @@ finish:
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::pause() {
+bool CVidTheoraPlayer::pause() {
if (_state == THEORA_STATE_PLAYING) {
_state = THEORA_STATE_PAUSED;
_theoraDecoder->pauseVideo(true);
@@ -791,7 +791,7 @@ ERRORCODE CVidTheoraPlayer::pause() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::resume() {
+bool CVidTheoraPlayer::resume() {
if (_state == THEORA_STATE_PAUSED) {
_state = THEORA_STATE_PLAYING;
_theoraDecoder->pauseVideo(false);
@@ -802,7 +802,7 @@ ERRORCODE CVidTheoraPlayer::resume() {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::persist(CBPersistMgr *persistMgr) {
+bool CVidTheoraPlayer::persist(CBPersistMgr *persistMgr) {
//CBBase::persist(persistMgr);
if (persistMgr->_saving) {
@@ -832,7 +832,7 @@ ERRORCODE CVidTheoraPlayer::persist(CBPersistMgr *persistMgr) {
}
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CVidTheoraPlayer::initializeSimple() {
+bool CVidTheoraPlayer::initializeSimple() {
if (DID_SUCCEED(initialize(_filename))) {
if (_alphaFilename != "") setAlphaImage(_alphaFilename);
play(_playbackType, _posX, _posY, false, false, _looping, _savedPos, _playZoom);
diff --git a/engines/wintermute/video/VidTheoraPlayer.h b/engines/wintermute/video/VidTheoraPlayer.h
index 6061ad3199..74fc0ce5b4 100644
--- a/engines/wintermute/video/VidTheoraPlayer.h
+++ b/engines/wintermute/video/VidTheoraPlayer.h
@@ -63,16 +63,16 @@ public:
//CVidSubtitler *_subtitler;
// control methods
- ERRORCODE initialize(const Common::String &filename, const Common::String &subtitleFile = NULL);
- ERRORCODE initializeSimple();
- ERRORCODE update();
- ERRORCODE play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool Looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1);
- ERRORCODE stop();
- ERRORCODE display(uint32 alpha = 0xFFFFFFFF);
- //ERRORCODE RenderFrame(CBSurface *Texture, yuv_buffer *yuv);
+ bool initialize(const Common::String &filename, const Common::String &subtitleFile = NULL);
+ bool initializeSimple();
+ bool update();
+ bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool Looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1);
+ bool stop();
+ bool display(uint32 alpha = 0xFFFFFFFF);
+ //bool RenderFrame(CBSurface *Texture, yuv_buffer *yuv);
- ERRORCODE pause();
- ERRORCODE resume();
+ bool pause();
+ bool resume();
bool isPlaying() {
return _state == THEORA_STATE_PLAYING;
@@ -99,15 +99,15 @@ public:
// alpha related
CBImage *_alphaImage;
Common::String _alphaFilename;
- ERRORCODE setAlphaImage(const Common::String &filename);
+ bool setAlphaImage(const Common::String &filename);
__inline byte getAlphaAt(int x, int y);
void writeAlpha();
- ERRORCODE SeekToTime(uint32 Time);
+ bool SeekToTime(uint32 Time);
void cleanup();
- ERRORCODE resetStream();
+ bool resetStream();
// video properties
TVideoPlayback _playbackType;
@@ -137,7 +137,7 @@ private:
bool _videoFrameReady;
float _videobufTime;
- ERRORCODE WriteVideo();
+ bool WriteVideo();
bool _playbackStarted;