diff options
author | Cameron Cawley | 2020-01-03 08:37:26 +0000 |
---|---|---|
committer | Filippos Karapetis | 2020-01-03 10:37:26 +0200 |
commit | 16b2b3ac8f67a67de8c1bf0f62e3a47848c57efc (patch) | |
tree | 06f573f81b2b8126924c193474ee8c0138fc7dfa /engines/cryo | |
parent | 346dd3ec637dd21d5c52dac56d65f229f3087454 (diff) | |
download | scummvm-rg350-16b2b3ac8f67a67de8c1bf0f62e3a47848c57efc.tar.gz scummvm-rg350-16b2b3ac8f67a67de8c1bf0f62e3a47848c57efc.tar.bz2 scummvm-rg350-16b2b3ac8f67a67de8c1bf0f62e3a47848c57efc.zip |
CRYO: Remove dead code
Diffstat (limited to 'engines/cryo')
-rw-r--r-- | engines/cryo/cryo.h | 7 | ||||
-rw-r--r-- | engines/cryo/cryolib.cpp | 90 | ||||
-rw-r--r-- | engines/cryo/cryolib.h | 48 | ||||
-rw-r--r-- | engines/cryo/eden.cpp | 3 | ||||
-rw-r--r-- | engines/cryo/eden.h | 1 |
5 files changed, 0 insertions, 149 deletions
diff --git a/engines/cryo/cryo.h b/engines/cryo/cryo.h index 9a8bc913ba..47089019ad 100644 --- a/engines/cryo/cryo.h +++ b/engines/cryo/cryo.h @@ -89,13 +89,6 @@ public: extern CryoEngine *g_ed; -// Example console class -class Console : public GUI::Debugger { -public: - Console(CryoEngine *vm) {} - virtual ~Console(void) {} -}; - } // End of namespace Cryo #endif diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp index 8b8efad588..9d291c2740 100644 --- a/engines/cryo/cryolib.cpp +++ b/engines/cryo/cryolib.cpp @@ -313,96 +313,6 @@ bool CryoEngine::isMouseButtonDown() { return _mouseButton != 0; } -///// CLSound -// base sound - -Sound::Sound(int16 length, float rate, int16 sampleSize, int16 mode) { - _sndHandle = nullptr; - _headerLen = 0; - _headerOffset = 0; - - _length = 0; - _mode = 0; - _volume = 0; - - _maxLength = length; - _rate = rate; - _sampleSize = sampleSize; - _buffer = nullptr; - // sndHandle = CLMemory_AllocHandle(arg1 + 100); - // if(!sndHandle) - // error("CLSoundRaw_New - Not enough memory"); - // else - prepareSample(mode); -} - -Sound::~Sound() { -} - -void CLSoundRaw_AssignBuffer(Sound *sound, void *buffer, int bufferOffs, int length) { - sound->_length = length; - char *buf = bufferOffs + (char *)buffer; - // if(CLSound_GetWantsDesigned()) - // CLSound_Signed2NonSigned(buf, length); - sound->_buffer = buf; - // if(sound->reversed && sound->sampleSize == 16) - // ReverseBlock16(buf, length); -} - -void Sound::prepareSample(int16 mode) { - _mode = mode; - _volume = 255; -} - -void Sound::setWantsDesigned(int16 designed) { -} - -///// CLSoundChannel -/// sound output device that plays queue of sounds -SoundChannel::SoundChannel(int arg1) { - _volumeLeft = _volumeRight = 255; - _numSounds = 0; - - for (int16 i = 0; i < kCryoMaxChSounds; i++) - _sounds[i] = nullptr; -} - -SoundChannel::~SoundChannel() { -} - -void SoundChannel::stop() { - // _vm->_mixer->stopHandle(this); -} - -void SoundChannel::play(Sound *sound) { -} - -int16 SoundChannel::getVolume() { - return (_volumeLeft + _volumeRight) / 2; -} - -void SoundChannel::setVolume(int16 volume) { - if (volume < 0 || volume > 255) - return; - - _volumeLeft = volume; - _volumeRight = volume; -} - -void SoundChannel::setVolumeRight(int16 volume) { - if (volume < 0 || volume > 255) - return; - - _volumeRight = volume; -} - -void SoundChannel::setVolumeLeft(int16 volume) { - if (volume < 0 || volume > 255) - return; - - _volumeLeft = volume; -} - ///// CLTimer void CLTimer_Action(void *arg) { // long& counter = *((long*)arg); diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h index 4a7ca01fcc..d88ed6fae6 100644 --- a/engines/cryo/cryolib.h +++ b/engines/cryo/cryolib.h @@ -79,54 +79,6 @@ struct HNMHeader { int32 _bufferSize; }; -class Sound { -private: - int32 _headerOffset; - int16 _mode; - int16 _volume; - -public: - Sound(int16 length, float rate, int16 sampleSize, int16 mode); - ~Sound(); - - void assignBuffer(void *buffer, int bufferOffs, int length); - void prepareSample(int16 mode); - void setWantsDesigned(int16 designed); - - char *_sndHandle; - char *_buffer; - - float _rate; - - int16 _maxLength; - int16 _headerLen; - int16 _sampleSize; - - int _length; -}; - -#define kCryoMaxChSounds 10 - -class SoundChannel { -private: - int16 _volumeLeft; - int16 _volumeRight; - int16 _numSounds; - - Sound *_sounds[kCryoMaxChSounds]; - -public: - SoundChannel(int arg1); - ~SoundChannel(); - - void stop(); - void play(Sound *sound); - int16 getVolume(); - void setVolume(int16 volume); - void setVolumeRight(int16 volume); - void setVolumeLeft(int16 volume); -}; - void SysBeep(int x); void FlushEvents(int16 arg1, int16 arg2); diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 4753a347b7..3204cb2913 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -113,7 +113,6 @@ EdenGame::EdenGame(CryoEngine *vm) : _vm(vm), kMaxMusicSize(2200000) { _soundAllocated = false; _musicChannel = _voiceChannel = nullptr; _hnmSoundChannel = nullptr; - _voiceSound = nullptr; _cirsorPanX = 0; _inventoryScrollDelay = 0; _cursorPosY = _cursorPosX = 0; @@ -4084,9 +4083,7 @@ void EdenGame::run() { _vm->_video->setupSound(11025, false, false); _vm->_video->setForceZero2Black(true); _vm->_video->setupTimer(12.5); - _voiceSound = new Sound(0, 11025 * 65536.0, 8, 0); _hnmSoundChannel = _vm->_video->getSoundChannel(); - _voiceSound->setWantsDesigned(1); // CHECKME: Used? _musicChannel = new CSoundChannel(_vm->_mixer, 11025, false); _voiceChannel = new CSoundChannel(_vm->_mixer, 11025, false); diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h index f2983e80c3..5c1392f511 100644 --- a/engines/cryo/eden.h +++ b/engines/cryo/eden.h @@ -649,7 +649,6 @@ private: CSoundChannel *_musicChannel; CSoundChannel *_voiceChannel; CSoundChannel *_hnmSoundChannel; - Sound *_voiceSound; int _demoCurrentTicks; int _demoStartTicks; |