diff options
author | Strangerke | 2017-01-03 16:26:15 -0800 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:20 +0100 |
commit | d748674193551d7815a98c6332b81761bcc0270f (patch) | |
tree | e83fd50ae7e03b67e436e96508e0b3cfbf83639a | |
parent | b669a704e2c4bf13894f2729fbd8c63bdebba082 (diff) | |
download | scummvm-rg350-d748674193551d7815a98c6332b81761bcc0270f.tar.gz scummvm-rg350-d748674193551d7815a98c6332b81761bcc0270f.tar.bz2 scummvm-rg350-d748674193551d7815a98c6332b81761bcc0270f.zip |
CRYO: Rename sound_t
-rw-r--r-- | engines/cryo/cryolib.cpp | 14 | ||||
-rw-r--r-- | engines/cryo/cryolib.h | 10 | ||||
-rw-r--r-- | engines/cryo/eden.cpp | 2 | ||||
-rw-r--r-- | engines/cryo/eden.h | 2 | ||||
-rw-r--r-- | engines/cryo/sound.cpp | 8 | ||||
-rw-r--r-- | engines/cryo/sound.h | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp index c9788549b2..89404d0548 100644 --- a/engines/cryo/cryolib.cpp +++ b/engines/cryo/cryolib.cpp @@ -342,7 +342,7 @@ void CLFile_Write(Common::File &handle, void *buffer, int32 *size) { ///// CLSound // base sound -sound_t::sound_t(int16 length, float rate, int16 sampleSize, int16 mode) { +Sound::Sound(int16 length, float rate, int16 sampleSize, int16 mode) { _sndHandle = nullptr; _headerLen = 0; _headerOffset = 0; @@ -366,12 +366,12 @@ sound_t::sound_t(int16 length, float rate, int16 sampleSize, int16 mode) { prepareSample(mode); } -sound_t::~sound_t() { +Sound::~Sound() { while (_locked) ; } -void CLSoundRaw_AssignBuffer(sound_t *sound, void *buffer, int bufferOffs, int length) { +void CLSoundRaw_AssignBuffer(Sound *sound, void *buffer, int bufferOffs, int length) { sound->setLength(length); sound->_length = length; char *buf = bufferOffs + (char *)buffer; @@ -382,7 +382,7 @@ void CLSoundRaw_AssignBuffer(sound_t *sound, void *buffer, int bufferOffs, int l // ReverseBlock16(buf, length); } -void sound_t::prepareSample(int16 mode) { +void Sound::prepareSample(int16 mode) { _mode = mode; _locked = 0; _loopTimes = 0; @@ -391,10 +391,10 @@ void sound_t::prepareSample(int16 mode) { _volume = 255; } -void sound_t::setWantsDesigned(int16 designed) { +void Sound::setWantsDesigned(int16 designed) { } -void sound_t::setLength(int length) { +void Sound::setLength(int length) { } ///// CLSoundChannel @@ -414,7 +414,7 @@ void SoundChannel::stop() { // _vm->_mixer->stopHandle(this); } -void SoundChannel::play(sound_t *sound) { +void SoundChannel::play(Sound *sound) { } int16 SoundChannel::getVolume() { diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h index e9e1cd631f..cad24020a2 100644 --- a/engines/cryo/cryolib.h +++ b/engines/cryo/cryolib.h @@ -136,7 +136,7 @@ struct hnm_t { }; typedef struct hnm_t hnm_t; -class sound_t { +class Sound { private: int32 _headerOffset; int16 _unused0A; @@ -149,8 +149,8 @@ private: int16 _volume; public: - sound_t(int16 length, float rate, int16 sampleSize, int16 mode); - ~sound_t(); + Sound(int16 length, float rate, int16 sampleSize, int16 mode); + ~Sound(); void assignBuffer(void *buffer, int bufferOffs, int length); void prepareSample(int16 mode); @@ -181,14 +181,14 @@ private: int16 _volumeRight; int16 _numSounds; - sound_t *_sounds[kCryoMaxChSounds]; + Sound *_sounds[kCryoMaxChSounds]; public: SoundChannel(int arg1); ~SoundChannel(); void stop(); - void play(sound_t *sound); + void play(Sound *sound); int16 getVolume(); void setVolume(int16 volume); void setVolumeRight(int16 volume); diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 2df7644259..b129ab71d7 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -5734,7 +5734,7 @@ void EdenGame::run() { _vm->_video->setupSound(5, 0x2000, 8, 11025 * 65536.0 , 0); _vm->_video->setForceZero2Black(true); _vm->_video->setupTimer(12.5); - _voiceSound = new sound_t(0, 11025 * 65536.0, 8, 0); + _voiceSound = new Sound(0, 11025 * 65536.0, 8, 0); _hnmSoundChannel = _vm->_video->getSoundChannel(); _voiceSound->setWantsDesigned(1); // CHECKME: Used? diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h index 75c974a939..d44f278209 100644 --- a/engines/cryo/eden.h +++ b/engines/cryo/eden.h @@ -642,7 +642,7 @@ private: CSoundChannel *_musicChannel; CSoundChannel *_voiceChannel; SoundChannel *_hnmSoundChannel; - sound_t *_voiceSound; + Sound *_voiceSound; View *_view2; View *_underSubtitlesView; diff --git a/engines/cryo/sound.cpp b/engines/cryo/sound.cpp index 597f05e7c8..279e237454 100644 --- a/engines/cryo/sound.cpp +++ b/engines/cryo/sound.cpp @@ -77,7 +77,7 @@ SoundGroup::SoundGroup(CryoEngine *vm, int16 numSounds, int16 length, int16 samp error("SoundGroup - numSounds >= kCryoMaxClSounds");
for (int i = 0; i < _numSounds; i++) {
- _sounds[i] = new sound_t(length, rate, sampleSize, mode);
+ _sounds[i] = new Sound(length, rate, sampleSize, mode);
_sounds[i]->_maxLength = length;
}
_soundIndex = 0;
@@ -99,7 +99,7 @@ void SoundGroup::reverse16All() { // Original name: CLSoundGroup_GetNextBuffer
void *SoundGroup::getNextBuffer() {
- sound_t *sound = _sounds[_soundIndex];
+ Sound *sound = _sounds[_soundIndex];
if (_forceWait)
while (sound->_locked) ;
return sound->_sndHandle + sound->_headerLen;
@@ -107,7 +107,7 @@ void *SoundGroup::getNextBuffer() { // Original name: CLSoundGroup_AssignDatas
bool SoundGroup::assignDatas(void *buffer, int length, bool isSigned) {
- sound_t *sound = _sounds[_soundIndex];
+ Sound *sound = _sounds[_soundIndex];
if (_forceWait)
while (sound->_locked)
;
@@ -131,7 +131,7 @@ bool SoundGroup::assignDatas(void *buffer, int length, bool isSigned) { // Original name: CLSoundGroup_SetDatas
bool SoundGroup::setDatas(void *data, int length, bool isSigned) {
- sound_t *sound = _sounds[_soundIndex];
+ Sound *sound = _sounds[_soundIndex];
if (length >= sound->_maxLength)
error("CLSoundGroup_SetDatas - Unexpected length");
diff --git a/engines/cryo/sound.h b/engines/cryo/sound.h index 54c6f2dca2..25129fcdfd 100644 --- a/engines/cryo/sound.h +++ b/engines/cryo/sound.h @@ -58,7 +58,7 @@ public: bool setDatas(void *data, int length, bool isSigned);
void playNextSample(SoundChannel *ch);
- sound_t *_sounds[kCryoMaxClSounds];
+ Sound *_sounds[kCryoMaxClSounds];
int16 _numSounds;
int16 _soundIndex;
int16 _playIndex;
|