mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 15:18:11 +00:00
CRYO: minor polishing
This commit is contained in:
parent
d879ecdfb5
commit
899d22805f
@ -33,7 +33,7 @@ soundgroup_t *CLSoundGroup_New(int16 numSounds, int16 length, int16 sampleSize,
|
||||
|
||||
for (int i = 0; i < sg->_numSounds; i++) {
|
||||
sound_t *sound = CLSoundRaw_New(length, rate, sampleSize, mode);
|
||||
sg->_sound[i] = sound;
|
||||
sg->_sounds[i] = sound;
|
||||
sound->_maxLength = length;
|
||||
}
|
||||
sg->_soundIndex = 0;
|
||||
@ -45,24 +45,24 @@ soundgroup_t *CLSoundGroup_New(int16 numSounds, int16 length, int16 sampleSize,
|
||||
|
||||
void CLSoundGroup_Free(soundgroup_t *sg) {
|
||||
for (int16 i = 0; i < sg->_numSounds; i++)
|
||||
CLSoundRaw_Free(sg->_sound[i]);
|
||||
CLSoundRaw_Free(sg->_sounds[i]);
|
||||
free(sg);
|
||||
}
|
||||
|
||||
void CLSoundGroup_Reverse16All(soundgroup_t *sg) {
|
||||
for (int16 i = 0; i < sg->_numSounds; i++)
|
||||
sg->_sound[i]->_reversed = true;
|
||||
sg->_sounds[i]->_reversed = true;
|
||||
}
|
||||
|
||||
void *CLSoundGroup_GetNextBuffer(soundgroup_t *sg) {
|
||||
sound_t *sound = sg->_sound[sg->_soundIndex];
|
||||
sound_t *sound = sg->_sounds[sg->_soundIndex];
|
||||
if (sg->_forceWait)
|
||||
while (sound->_locked) ;
|
||||
return sound->sndHandle + sound->_headerLen;
|
||||
}
|
||||
|
||||
bool CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, bool isSigned) {
|
||||
sound_t *sound = sg->_sound[sg->_soundIndex];
|
||||
sound_t *sound = sg->_sounds[sg->_soundIndex];
|
||||
if (sg->_forceWait)
|
||||
while (sound->_locked) ;
|
||||
else if (sound->_locked)
|
||||
@ -83,7 +83,7 @@ bool CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, bool i
|
||||
}
|
||||
|
||||
bool CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, bool isSigned) {
|
||||
sound_t *sound = sg->_sound[sg->_soundIndex];
|
||||
sound_t *sound = sg->_sounds[sg->_soundIndex];
|
||||
if (length >= sound->_maxLength)
|
||||
error("CLSoundGroup_SetDatas - Unexpected length");
|
||||
|
||||
@ -110,7 +110,7 @@ bool CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, bool isSign
|
||||
}
|
||||
|
||||
void CLSoundGroup_PlayNextSample(soundgroup_t *sg, soundchannel_t *ch) {
|
||||
CLSoundChannel_Play(ch, sg->_sound[sg->_playIndex]);
|
||||
CLSoundChannel_Play(ch, sg->_sounds[sg->_playIndex]);
|
||||
if (sg->_playIndex == sg->_numSounds - 1)
|
||||
sg->_playIndex = 0;
|
||||
else
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
CryoEngine *g_ed = 0;
|
||||
CryoEngine *g_ed = nullptr;
|
||||
|
||||
CryoEngine::CryoEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _console(nullptr) {
|
||||
// Put your engine in a sane state, but do nothing big yet;
|
||||
|
@ -388,7 +388,7 @@ soundchannel_t *CLSoundChannel_New(int arg1) {
|
||||
ch->_numSounds = 0;
|
||||
|
||||
for (int16 i = 0; i < kCryoMaxChSounds; i++)
|
||||
ch->_sounds[i] = 0;
|
||||
ch->_sounds[i] = nullptr;
|
||||
|
||||
return ch;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ typedef struct sound_t sound_t;
|
||||
#define kCryoMaxClSounds 64
|
||||
|
||||
struct soundgroup_t {
|
||||
sound_t *_sound[kCryoMaxClSounds];
|
||||
sound_t *_sounds[kCryoMaxClSounds];
|
||||
int16 _numSounds;
|
||||
int16 _soundIndex;
|
||||
int16 _playIndex;
|
||||
|
@ -110,7 +110,7 @@ EdenGame::EdenGame(CryoEngine *vm) : _vm(vm) {
|
||||
gameStarted = false;
|
||||
_soundAllocated = false;
|
||||
_musicChannel = _voiceChannel = nullptr;
|
||||
hnmsound_ch = nullptr;
|
||||
_hnmSoundChannel = nullptr;
|
||||
voiceSound = nullptr;
|
||||
p_view2 = p_underSubtitlesView = p_subtitlesview = p_underBarsView = p_mainview = p_hnmview = nullptr;
|
||||
_hnmContext = nullptr;
|
||||
@ -5574,7 +5574,7 @@ void EdenGame::run() {
|
||||
CLHNM_SetForceZero2Black(true);
|
||||
CLHNM_SetupTimer(12.5);
|
||||
voiceSound = CLSoundRaw_New(0, 11025 * 65536.0, 8, 0);
|
||||
hnmsound_ch = CLHNM_GetSoundChannel();
|
||||
_hnmSoundChannel = CLHNM_GetSoundChannel();
|
||||
CLSound_SetWantsDesigned(1); // CHECKME: Used?
|
||||
|
||||
_musicChannel = new CSoundChannel(_vm->_mixer, 11025, false);
|
||||
@ -5677,19 +5677,19 @@ void EdenGame::edmain() {
|
||||
void EdenGame::intro() {
|
||||
if (_vm->getPlatform() == Common::kPlatformMacintosh) {
|
||||
// Play intro videos in HQ
|
||||
CLSoundChannel_Stop(hnmsound_ch);
|
||||
CLSoundChannel_Stop(_hnmSoundChannel);
|
||||
CLHNM_CloseSound();
|
||||
CLHNM_SetupSound(5, 0x2000, 16, 22050 * 65536.0, 0);
|
||||
hnmsound_ch = CLHNM_GetSoundChannel();
|
||||
_hnmSoundChannel = CLHNM_GetSoundChannel();
|
||||
playHNM(2012);
|
||||
playHNM(171);
|
||||
CLBlitter_FillScreenView(0);
|
||||
specialTextMode = false;
|
||||
playHNM(2001);
|
||||
CLSoundChannel_Stop(hnmsound_ch);
|
||||
CLSoundChannel_Stop(_hnmSoundChannel);
|
||||
CLHNM_CloseSound();
|
||||
CLHNM_SetupSound(5, 0x2000, 8, 11025 * 65536.0, 0);
|
||||
hnmsound_ch = CLHNM_GetSoundChannel();
|
||||
_hnmSoundChannel = CLHNM_GetSoundChannel();
|
||||
} else {
|
||||
playHNM(98); // Cryo logo
|
||||
playHNM(171); // Virgin logo
|
||||
@ -6211,8 +6211,8 @@ void EdenGame::showMovie(char arg1) {
|
||||
CLHNM_ReadHeader(_hnmContext);
|
||||
if (p_global->curVideoNum == 92) {
|
||||
// _hnmContext->_header._unusedFlag2 = 0; CHECKME: Useless?
|
||||
CLSoundChannel_SetVolumeLeft(hnmsound_ch, 0);
|
||||
CLSoundChannel_SetVolumeRight(hnmsound_ch, 0);
|
||||
CLSoundChannel_SetVolumeLeft(_hnmSoundChannel, 0);
|
||||
CLSoundChannel_SetVolumeRight(_hnmSoundChannel, 0);
|
||||
}
|
||||
bool playing = true;
|
||||
if (CLHNM_GetVersion(_hnmContext) != 4)
|
||||
|
@ -646,7 +646,7 @@ private:
|
||||
|
||||
CSoundChannel *_musicChannel;
|
||||
CSoundChannel *_voiceChannel;
|
||||
soundchannel_t *hnmsound_ch;
|
||||
soundchannel_t *_hnmSoundChannel;
|
||||
sound_t *voiceSound;
|
||||
|
||||
View *p_view2;
|
||||
|
Loading…
Reference in New Issue
Block a user