diff options
author | Paul Gilbert | 2016-07-20 07:56:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-20 07:56:26 -0400 |
commit | c5792fce4bcf8a4e2e89d83242a248a56f579bc6 (patch) | |
tree | 7b6b5aadb2c82c8d2f837a3192cb9740f3a9d7df /engines/titanic/support | |
parent | d5bf17e73ff9533d2f54588622048ab755f4151b (diff) | |
download | scummvm-rg350-c5792fce4bcf8a4e2e89d83242a248a56f579bc6.tar.gz scummvm-rg350-c5792fce4bcf8a4e2e89d83242a248a56f579bc6.tar.bz2 scummvm-rg350-c5792fce4bcf8a4e2e89d83242a248a56f579bc6.zip |
TITANIC: Clarify movie/surface has frame fields & variables
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/movie.cpp | 13 | ||||
-rw-r--r-- | engines/titanic/support/movie.h | 7 | ||||
-rw-r--r-- | engines/titanic/support/video_surface.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/support/video_surface.h | 7 |
4 files changed, 24 insertions, 15 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp index 2943ee1a84..3856c44e7f 100644 --- a/engines/titanic/support/movie.cpp +++ b/engines/titanic/support/movie.cpp @@ -36,7 +36,7 @@ namespace Titanic { CMovieList *CMovie::_playingMovies; CVideoSurface *CMovie::_movieSurface; -CMovie::CMovie() : ListItem(), _handled(false), _field10(0), +CMovie::CMovie() : ListItem(), _handled(false), _hasVideoFrame(false), _field14(0) { } @@ -67,9 +67,9 @@ bool CMovie::isActive() const { return _playingMovies->contains(this); } -bool CMovie::get10() { - if (_field10) { - _field10 = 0; +bool CMovie::hasVideoFrame() { + if (_hasVideoFrame) { + _hasVideoFrame = 0; return true; } else { return false; @@ -171,6 +171,9 @@ bool OSMovie::handleEvents(CMovieEventList &events) { _videoSurface->setMovieFrameSurface(_aviSurface.getSecondarySurface()); } + // Flag there's a video frame + _hasVideoFrame = true; + return _aviSurface._isPlaying; } @@ -192,7 +195,7 @@ void OSMovie::movieStarted() { // Register the movie in the playing list addToPlayingMovies(); - _field10 = 1; + _hasVideoFrame = true; } void OSMovie::setFrameRate(double rate) { diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h index feb320f0b2..2a7d589194 100644 --- a/engines/titanic/support/movie.h +++ b/engines/titanic/support/movie.h @@ -49,7 +49,7 @@ protected: void addToPlayingMovies(); public: bool _handled; - int _field10; + bool _hasVideoFrame; int _field14; public: static CMovieList *_playingMovies; @@ -143,7 +143,10 @@ public: */ bool isActive() const; - bool get10(); + /** + * Returns true if there's a video frame + */ + bool hasVideoFrame(); }; class OSMovie : public CMovie { diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 4169a80b4b..49388b64d8 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -33,7 +33,7 @@ CVideoSurface::CVideoSurface(CScreenManager *screenManager) : _screenManager(screenManager), _rawSurface(nullptr), _movie(nullptr), _pendingLoad(false), _transBlitFlag(false), _fastBlitFlag(false), _movieFrameSurface(nullptr), _transparencyMode(TRANS_DEFAULT), - _field48(0), _field50(1), _lockCount(0) { + _field48(0), _hasFrame(true), _lockCount(0) { _videoSurfaceNum = _videoSurfaceCounter++; } @@ -170,12 +170,12 @@ uint CVideoSurface::getTransparencyColor() { return val; } -bool CVideoSurface::proc45() { - if (_field50) { - _field50 = 0; +bool CVideoSurface::hasFrame() { + if (_hasFrame) { + _hasFrame = false; return true; } else if (_movie) { - return _movie->get10(); + return _movie->hasVideoFrame(); } else { return false; } @@ -519,7 +519,7 @@ bool OSVideoSurface::loadIfReady() { if (hasSurface()) { return true; } else if (_pendingLoad) { - _field50 = 1; + _hasFrame = true; load(); return true; } else { diff --git a/engines/titanic/support/video_surface.h b/engines/titanic/support/video_surface.h index 040161fe8e..0e777bac1e 100644 --- a/engines/titanic/support/video_surface.h +++ b/engines/titanic/support/video_surface.h @@ -67,7 +67,7 @@ protected: Graphics::ManagedSurface *_movieFrameSurface; int _field48; int _videoSurfaceNum; - int _field50; + bool _hasFrame; int _lockCount; public: CMovie *_movie; @@ -257,7 +257,10 @@ public: */ virtual void transPixelate() = 0; - virtual bool proc45(); + /** + * Returns true if there's a frame to display on the video surface + */ + virtual bool hasFrame(); /** * Duplicates movie frame surface |