From fad3f324a81e4baf752cd388cda24e2608838945 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 29 Jan 2017 23:29:01 +0100 Subject: CRYO: Remove a couple of unused class members --- engines/cryo/cryo.cpp | 2 +- engines/cryo/cryolib.cpp | 2 +- engines/cryo/cryolib.h | 5 +---- engines/cryo/eden.cpp | 12 ++++++------ engines/cryo/sound.cpp | 2 +- engines/cryo/sound.h | 4 +--- 6 files changed, 11 insertions(+), 16 deletions(-) (limited to 'engines/cryo') diff --git a/engines/cryo/cryo.cpp b/engines/cryo/cryo.cpp index be7c5d779e..1538ee4110 100644 --- a/engines/cryo/cryo.cpp +++ b/engines/cryo/cryo.cpp @@ -86,7 +86,7 @@ CryoEngine::~CryoEngine() { Common::Error CryoEngine::run() { _game = new EdenGame(this); _video = new HnmPlayer(this); - _screenView = new View(this, 320, 200); + _screenView = new View(320, 200); _debugger = new Debugger(this); ///// CLTimer diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp index 49c3bae50c..daf5da05fd 100644 --- a/engines/cryo/cryolib.cpp +++ b/engines/cryo/cryolib.cpp @@ -41,7 +41,7 @@ void FlushEvents(int16 arg1, int16 arg2) { ///// CLView -View::View(CryoEngine *vm, int w, int h) : _vm(vm) { +View::View(int w, int h) { void *buffer = (byte *)malloc(w * h); if (buffer) initDatas(w, h, buffer); diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h index 2f60931a7c..5c1afef84e 100644 --- a/engines/cryo/cryolib.h +++ b/engines/cryo/cryolib.h @@ -62,11 +62,8 @@ struct BlitView{ }; class View { -private: - CryoEngine *_vm; - public: - View(CryoEngine *vm, int w, int h); + View(int w, int h); ~View(); void setSrcZoomValues(int x, int y); diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index c19469de99..8969759691 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -5739,19 +5739,19 @@ void EdenGame::freebuf() { } void EdenGame::openWindow() { - _underBarsView = new View(_vm, 320, 40); + _underBarsView = new View(320, 40); _underBarsView->_normal._width = 320; - _view2 = new View(_vm, 32, 32); + _view2 = new View(32, 32); _view2Buf = _view2->_bufferPtr; - _subtitlesView = new View(_vm, _subtitlesXWidth, 60); + _subtitlesView = new View(_subtitlesXWidth, 60); _subtitlesViewBuf = _subtitlesView->_bufferPtr; - _underSubtitlesView = new View(_vm, _subtitlesXWidth, 60); + _underSubtitlesView = new View(_subtitlesXWidth, 60); _underSubtitlesViewBuf = _underSubtitlesView->_bufferPtr; - _mainView = new View(_vm, 640, 200); + _mainView = new View(640, 200); _mainView->_normal._width = 320; CLBlitter_FillView(_mainView, 0xFFFFFFFF); _mainView->setSrcZoomValues(0, 0); @@ -6417,7 +6417,7 @@ void EdenGame::showMovie(char arg1) { bool playing = true; _vm->_video->allocMemory(); - _hnmView = new View(_vm, _vm->_video->_header._width, _vm->_video->_header._height); + _hnmView = new View(_vm->_video->_header._width, _vm->_video->_header._height); _hnmView->setSrcZoomValues(0, 0); _hnmView->setDisplayZoomValues(_vm->_video->_header._width * 2, _vm->_video->_header._height * 2); _hnmView->centerIn(_vm->_screenView); diff --git a/engines/cryo/sound.cpp b/engines/cryo/sound.cpp index f4eec8cabb..f3b57de04a 100644 --- a/engines/cryo/sound.cpp +++ b/engines/cryo/sound.cpp @@ -112,7 +112,7 @@ void CSoundChannel::applyVolumeChange() { /****************************************************************/ -SoundGroup::SoundGroup(CryoEngine *vm, int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode) : _vm(vm) { +SoundGroup::SoundGroup(int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode) { if (numSounds < kCryoMaxClSounds) _numSounds = numSounds; else diff --git a/engines/cryo/sound.h b/engines/cryo/sound.h index b05c08ea71..c6fee3c45f 100644 --- a/engines/cryo/sound.h +++ b/engines/cryo/sound.h @@ -71,15 +71,13 @@ public: class SoundGroup { private: - CryoEngine *_vm; - Sound *_sounds[kCryoMaxClSounds]; int16 _numSounds; int16 _soundIndex; int16 _playIndex; public: - SoundGroup(CryoEngine *vm, int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode); + SoundGroup(int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode); ~SoundGroup(); bool assignDatas(void *buffer, int length, bool isSigned); -- cgit v1.2.3