mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
added toggling music on/off
svn-id: r8884
This commit is contained in:
parent
2c065bcffe
commit
5f9845b2cb
@ -556,7 +556,9 @@ uint16 SkyControl::handleClick(SkyConResource *pButton) {
|
||||
return toggleFx(pButton);
|
||||
|
||||
case TOGGLE_MS:
|
||||
return 0;
|
||||
animClick(pButton);
|
||||
toggleMusic();
|
||||
return TOGGLED;
|
||||
|
||||
case TOGGLE_TEXT:
|
||||
animClick(pButton);
|
||||
@ -734,6 +736,19 @@ uint16 SkyControl::toggleText(void) {
|
||||
return TOGGLED;
|
||||
}
|
||||
|
||||
void SkyControl::toggleMusic(void) {
|
||||
|
||||
if (SkyState::_systemVars.systemFlags & SF_MUS_OFF) {
|
||||
SkyState::_systemVars.systemFlags &= ~SF_MUS_OFF;
|
||||
_skyMusic->startMusic(SkyState::_systemVars.currentMusic);
|
||||
_statusBar->setToText(0x7000 + 88);
|
||||
} else {
|
||||
SkyState::_systemVars.systemFlags |= SF_MUS_OFF;
|
||||
_skyMusic->startMusic(0);
|
||||
_statusBar->setToText(0x7000 + 89);
|
||||
}
|
||||
}
|
||||
|
||||
uint16 SkyControl::shiftDown(uint8 speed) {
|
||||
|
||||
if (speed == SLOW) {
|
||||
|
@ -188,6 +188,7 @@ private:
|
||||
uint16 doSpeedSlide(void);
|
||||
uint16 toggleFx(SkyConResource *pButton);
|
||||
uint16 toggleText(void);
|
||||
void toggleMusic(void);
|
||||
uint16 shiftDown(uint8 speed);
|
||||
uint16 shiftUp(uint8 speed);
|
||||
void drawTextCross(uint32 flags);
|
||||
|
@ -2235,6 +2235,7 @@ bool SkyLogic::fnEnterSection(uint32 sectionNo, uint32 b, uint32 c) {
|
||||
error("End of demo");
|
||||
|
||||
_scriptVariables[CUR_SECTION] = sectionNo;
|
||||
SkyState::_systemVars.currentMusic = 0;
|
||||
|
||||
if (sectionNo == 5) //linc section - has different mouse icons
|
||||
_skyMouse->replaceMouseCursors(60302);
|
||||
@ -2380,12 +2381,15 @@ bool SkyLogic::fnStopFx(uint32 a, uint32 b, uint32 c) {
|
||||
}
|
||||
|
||||
bool SkyLogic::fnStartMusic(uint32 a, uint32 b, uint32 c) {
|
||||
_skyMusic->startMusic((uint16)a);
|
||||
if (!(SkyState::_systemVars.systemFlags & SF_MUS_OFF))
|
||||
_skyMusic->startMusic((uint16)a);
|
||||
SkyState::_systemVars.currentMusic = (uint16)a;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SkyLogic::fnStopMusic(uint32 a, uint32 b, uint32 c) {
|
||||
_skyMusic->startMusic(0);
|
||||
SkyState::_systemVars.currentMusic = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ Engine *Engine_SKY_create(GameDetector *detector, OSystem *syst) {
|
||||
|
||||
void **SkyState::_itemList[300];
|
||||
|
||||
SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316, 0, false, false };
|
||||
SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false };
|
||||
|
||||
SkyState::SkyState(GameDetector *detector, OSystem *syst)
|
||||
: Engine(detector, syst) {
|
||||
@ -245,6 +245,7 @@ void SkyState::loadBase0(void) {
|
||||
|
||||
_skyLogic->fnEnterSection(0, 0, 0);
|
||||
_skyMusic->startMusic(2);
|
||||
_systemVars.currentMusic = 2;
|
||||
}
|
||||
|
||||
void SkyState::loadFixedItems(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user