mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-07 09:14:11 +00:00
- Updated debug output for KyraEngine::snd_playTheme
- cleanup svn-id: r31464
This commit is contained in:
parent
aac2b7019a
commit
b54b9b34b4
engines/kyra
@ -151,7 +151,7 @@ public:
|
|||||||
int resetGameFlag(int flag);
|
int resetGameFlag(int flag);
|
||||||
|
|
||||||
// sound
|
// sound
|
||||||
virtual void snd_playTheme(int file, int track = 0);
|
virtual void snd_playTheme(int file, int track);
|
||||||
virtual void snd_playSoundEffect(int id);
|
virtual void snd_playSoundEffect(int id);
|
||||||
virtual void snd_playWanderScoreViaMap(int command, int restart);
|
virtual void snd_playWanderScoreViaMap(int command, int restart);
|
||||||
virtual void snd_playVoiceFile(int id) = 0;
|
virtual void snd_playVoiceFile(int id) = 0;
|
||||||
|
@ -401,7 +401,7 @@ void KyraEngine_v1::startup() {
|
|||||||
if (!_scriptInterpreter->loadScript("_NPC.EMC", _npcScriptData, &_opcodes))
|
if (!_scriptInterpreter->loadScript("_NPC.EMC", _npcScriptData, &_opcodes))
|
||||||
error("Could not load \"_NPC.EMC\" script");
|
error("Could not load \"_NPC.EMC\" script");
|
||||||
|
|
||||||
snd_playTheme(1);
|
snd_playTheme(1, 0);
|
||||||
if (_gameToLoad == -1) {
|
if (_gameToLoad == -1) {
|
||||||
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
|
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
|
||||||
if (_abortIntroFlag && _skipIntroFlag) {
|
if (_abortIntroFlag && _skipIntroFlag) {
|
||||||
|
@ -459,7 +459,7 @@ int KyraEngine_v2::o2_checkForItem(ScriptState *script) {
|
|||||||
int KyraEngine_v2::o2_loadSoundFile(ScriptState *script) {
|
int KyraEngine_v2::o2_loadSoundFile(ScriptState *script) {
|
||||||
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
|
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
|
||||||
if (_sound->hasSoundFile(stackPos(0)))
|
if (_sound->hasSoundFile(stackPos(0)))
|
||||||
snd_playTheme(stackPos(0));
|
snd_playTheme(stackPos(0), -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,13 +460,14 @@ void SoundMidiPC::beginFadeOut() {
|
|||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
void KyraEngine::snd_playTheme(int file, int track) {
|
void KyraEngine::snd_playTheme(int file, int track) {
|
||||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playTheme(%d)", file);
|
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playTheme(%d, %d)", file, track);
|
||||||
if (_curMusicTheme == file)
|
if (_curMusicTheme == file)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_curSfxFile = _curMusicTheme = file;
|
_curSfxFile = _curMusicTheme = file;
|
||||||
_sound->loadSoundFile(_curMusicTheme);
|
_sound->loadSoundFile(_curMusicTheme);
|
||||||
_sound->playTrack(track);
|
if (track != -1)
|
||||||
|
_sound->playTrack(track);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KyraEngine::snd_playSoundEffect(int track) {
|
void KyraEngine::snd_playSoundEffect(int track) {
|
||||||
@ -492,7 +493,7 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
|
|||||||
assert(command*2+1 < _trackMapSize);
|
assert(command*2+1 < _trackMapSize);
|
||||||
if (_curMusicTheme != _trackMap[command*2]) {
|
if (_curMusicTheme != _trackMap[command*2]) {
|
||||||
if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2)
|
if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2)
|
||||||
snd_playTheme(_trackMap[command*2]);
|
snd_playTheme(_trackMap[command*2], -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command != 1) {
|
if (command != 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user