예제 #1
0
void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
	if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel))
		force = 1;
	else if (_musicSoundChannel == -1)
		force = 1;

	if (track == _lastMusicCommand && !force)
		return;

	stopMusicTrack();

	if (_musicSoundChannel == -1) {
		assert(track < _soundListSize && track >= 0);

		_musicSoundChannel = _soundDigital->playSound(_soundList[track], 0xFF, Audio::Mixer::kMusicSoundType, 255, true);
	}

	_lastMusicCommand = track;
}
예제 #2
0
int KyraEngine_MR::o3_stopMusic(EMCState *script) {
	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_stopMusic(%p) ()", (const void *)script);
	stopMusicTrack();
	return 0;
}