BAGEL: Remove a useless include, add a couple of default cases, remove useless initialization in MusicPlayer::play

This commit is contained in:
Strangerke 2024-06-10 21:48:32 +01:00
parent d2d52ad372
commit b314b79619
3 changed files with 8 additions and 3 deletions

View File

@ -25,7 +25,6 @@
#include "bagel/boflib/gui/dialog.h"
#include "bagel/boflib/gui/button.h"
#include "bagel/boflib/gfx/text.h"
namespace Bagel {

View File

@ -49,8 +49,8 @@ void MusicPlayer::play(CBofSound *sound) {
return;
}
MidiParser *parser = nullptr;
bool loaded = false;
MidiParser *parser;
bool loaded;
if (sound->_chType == SOUND_TYPE_XM) {
parser = MidiParser::createParser_XMIDI();
loaded = parser->loadMusic(sound->_pFileBuf, sound->_iFileSize);

View File

@ -727,6 +727,9 @@ ErrorCode CBibbleWindow::playGame() {
case 2:
BofPlaySoundEx(BuildDir(BIBBLE_AUDIO_PAYS4), SOUND_MIX | SOUND_QUEUE, 7, true);
break;
default:
break;
}
}
@ -983,6 +986,9 @@ void CBibbleWindow::calcOutcome() {
g_engine->g_cBetAreas[i]._bWon = true;
}
break;
default:
break;
}
}