diff options
author | Travis Howell | 2006-04-24 02:11:04 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-24 02:11:04 +0000 |
commit | e8b3fa84a752da647d4131b1cc8c063741cd028a (patch) | |
tree | 82faf210f3534ff9f77f8be2a37e21d85d64b745 /engines | |
parent | 7d975539c2214f7c726f00b92f62ec63c53d10f0 (diff) | |
download | scummvm-rg350-e8b3fa84a752da647d4131b1cc8c063741cd028a.tar.gz scummvm-rg350-e8b3fa84a752da647d4131b1cc8c063741cd028a.tar.bz2 scummvm-rg350-e8b3fa84a752da647d4131b1cc8c063741cd028a.zip |
Free screen buffers on exit
svn-id: r22129
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/simon.cpp | 21 | ||||
-rw-r--r-- | engines/simon/simon.h | 2 |
2 files changed, 15 insertions, 8 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 4245846ec5..24f0a08f05 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -377,7 +377,7 @@ SimonEngine::SimonEngine(OSystem *syst) _backGroundBuf = 0; _frontBuf = 0; _backBuf = 0; - _sdl_buf_scaled = 0; + _scaleBuf = 0; _vc10BasePtrOld = 0; memcpy (_hebrewCharWidths, @@ -571,13 +571,20 @@ SimonEngine::~SimonEngine() { midi.close(); - free(_stringTabPtr); - free(_itemArrayPtr); free(_itemHeapPtr - _itemHeapCurPos); free(_tablesHeapPtr - _tablesHeapCurPos); - free(_tblList); - free(_iconFilePtr); + free(_gameOffsetsPtr); + free(_iconFilePtr); + free(_itemArrayPtr); + free(_stringTabPtr); + free(_strippedTxtMem); + free(_tblList); + + free(_backGroundBuf); + free(_frontBuf); + free(_backBuf); + free(_scaleBuf); delete _dummyItem1; delete _dummyItem2; @@ -3501,7 +3508,7 @@ int SimonEngine::go() { _frontBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); _backBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); if (getGameType() == GType_FF) - _sdl_buf_scaled = (byte *)calloc(_screenWidth * _screenHeight, 1); + _scaleBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); allocItemHeap(); allocTablesHeap(); @@ -3771,7 +3778,7 @@ byte *SimonEngine::getBackGround() { byte *SimonEngine::getScaleBuf() { _dxSurfacePitch = _screenWidth; - return _sdl_buf_scaled; + return _scaleBuf; } void SimonEngine::set_volume(int volume) { diff --git a/engines/simon/simon.h b/engines/simon/simon.h index d39d842675..e0a797fbd7 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -468,7 +468,7 @@ protected: byte *_backGroundBuf; byte *_frontBuf; byte *_backBuf; - byte *_sdl_buf_scaled; + byte *_scaleBuf; Common::RandomSource _rnd; |