diff options
author | Paul Gilbert | 2016-07-20 13:44:19 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-20 13:44:19 -0400 |
commit | a13134b38d1400bfc6746657faf87907f9575e80 (patch) | |
tree | b704f87ea16cd60da146ecc933875d4ae198ed1f /engines/titanic/support | |
parent | c5792fce4bcf8a4e2e89d83242a248a56f579bc6 (diff) | |
download | scummvm-rg350-a13134b38d1400bfc6746657faf87907f9575e80.tar.gz scummvm-rg350-a13134b38d1400bfc6746657faf87907f9575e80.tar.bz2 scummvm-rg350-a13134b38d1400bfc6746657faf87907f9575e80.zip |
TITANIC: Clarify CVideoSurface _field48 as _freeMovieSurface
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/video_surface.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/support/video_surface.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 49388b64d8..594f660937 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), _hasFrame(true), _lockCount(0) { + _freeMovieSurface(DisposeAfterUse::NO), _hasFrame(true), _lockCount(0) { _videoSurfaceNum = _videoSurfaceCounter++; } @@ -41,6 +41,9 @@ CVideoSurface::~CVideoSurface() { if (_ddSurface) _videoSurfaceCounter -= freeSurface(); --_videoSurfaceCounter; + + if (_freeMovieSurface == DisposeAfterUse::YES) + delete _movieFrameSurface; } void CVideoSurface::setSurface(CScreenManager *screenManager, DirectDrawSurface *surface) { diff --git a/engines/titanic/support/video_surface.h b/engines/titanic/support/video_surface.h index 0e777bac1e..1f3a0fa2b3 100644 --- a/engines/titanic/support/video_surface.h +++ b/engines/titanic/support/video_surface.h @@ -65,7 +65,7 @@ protected: Graphics::ManagedSurface *_rawSurface; bool _pendingLoad; Graphics::ManagedSurface *_movieFrameSurface; - int _field48; + DisposeAfterUse::Flag _freeMovieSurface; int _videoSurfaceNum; bool _hasFrame; int _lockCount; |