Patch #1656801 (BASS: various control panel fixes), which fixes bug #1548779 (BASS: Control panel inconsistency for FX/Music button texts)
svn-id: r25473
This commit is contained in:
parent
a14e90478c
commit
063e09be02
7 changed files with 39 additions and 26 deletions
3
AUTHORS
3
AUTHORS
|
@ -211,7 +211,8 @@ Other contributions
|
||||||
|
|
||||||
Code contributions
|
Code contributions
|
||||||
------------------
|
------------------
|
||||||
Ori Avtalion - Subtitle control options in the GUI
|
Ori Avtalion - Subtitle control options in the GUI; BASS GUI
|
||||||
|
fixes
|
||||||
Stuart Caie - Decoders for Simon 1 Amiga data files
|
Stuart Caie - Decoders for Simon 1 Amiga data files
|
||||||
Paolo Costabel - PSP port contributions
|
Paolo Costabel - PSP port contributions
|
||||||
Thierry Crozat - Support for Broken Sword 1 Macintosh version
|
Thierry Crozat - Support for Broken Sword 1 Macintosh version
|
||||||
|
|
|
@ -350,7 +350,7 @@ All active team members
|
||||||
\item \textbf{\large Code contributions}
|
\item \textbf{\large Code contributions}
|
||||||
\begin{list}{}{\setlength{\leftmargin}{0.2cm}}
|
\begin{list}{}{\setlength{\leftmargin}{0.2cm}}
|
||||||
\item \begin{tabular}[h]{p{0.3\linewidth}p{0.6\linewidth}}
|
\item \begin{tabular}[h]{p{0.3\linewidth}p{0.6\linewidth}}
|
||||||
Ori Avtalion & \textit{Subtitle control options in the GUI}\\
|
Ori Avtalion & \textit{Subtitle control options in the GUI; BASS GUI fixes}\\
|
||||||
Stuart Caie & \textit{Decoders for Simon 1 Amiga data files}\\
|
Stuart Caie & \textit{Decoders for Simon 1 Amiga data files}\\
|
||||||
Paolo Costabel & \textit{PSP port contributions}\\
|
Paolo Costabel & \textit{PSP port contributions}\\
|
||||||
Thierry Crozat & \textit{Support for Broken Sword 1 Macintosh version}\\
|
Thierry Crozat & \textit{Support for Broken Sword 1 Macintosh version}\\
|
||||||
|
|
|
@ -284,10 +284,7 @@ void Control::initPanel(void) {
|
||||||
_savePanButton = createResource( _sprites.button, 3, 0, 58, 39, 48, SAVE_GAME_PANEL, MAINPANEL);
|
_savePanButton = createResource( _sprites.button, 3, 0, 58, 39, 48, SAVE_GAME_PANEL, MAINPANEL);
|
||||||
_dosPanButton = createResource( _sprites.button, 3, 0, 58, 59, 93, QUIT_TO_DOS, MAINPANEL);
|
_dosPanButton = createResource( _sprites.button, 3, 0, 58, 59, 93, QUIT_TO_DOS, MAINPANEL);
|
||||||
_restartPanButton = createResource( _sprites.button, 3, 0, 58, 79, 94, RESTART, MAINPANEL);
|
_restartPanButton = createResource( _sprites.button, 3, 0, 58, 79, 94, RESTART, MAINPANEL);
|
||||||
if (SkyEngine::_systemVars.systemFlags & SF_FX_OFF)
|
_fxPanButton = createResource( _sprites.button, 3, 0, 58, 99, 90, TOGGLE_FX, MAINPANEL);
|
||||||
_fxPanButton = createResource( _sprites.button, 3, 0, 58, 99, 87, TOGGLE_FX, MAINPANEL);
|
|
||||||
else
|
|
||||||
_fxPanButton = createResource( _sprites.button, 3, 2, 58, 99, 86, TOGGLE_FX, MAINPANEL);
|
|
||||||
|
|
||||||
if (SkyEngine::isCDVersion()) { // CD Version: Toggle text/speech
|
if (SkyEngine::isCDVersion()) { // CD Version: Toggle text/speech
|
||||||
_musicPanButton = createResource( _sprites.button, 3, 0, 58, 119, 52, TOGGLE_TEXT, MAINPANEL);
|
_musicPanButton = createResource( _sprites.button, 3, 0, 58, 119, 52, TOGGLE_TEXT, MAINPANEL);
|
||||||
|
@ -474,6 +471,15 @@ void Control::doControlPanel(void) {
|
||||||
else
|
else
|
||||||
_skyScreen->setPalette(60510);
|
_skyScreen->setPalette(60510);
|
||||||
|
|
||||||
|
// Set initial button lights
|
||||||
|
_fxPanButton->_curSprite =
|
||||||
|
(SkyEngine::_systemVars.systemFlags & SF_FX_OFF ? 0 : 2);
|
||||||
|
|
||||||
|
// music button only available in floppy version
|
||||||
|
if (!SkyEngine::isCDVersion())
|
||||||
|
_musicPanButton->_curSprite =
|
||||||
|
(SkyEngine::_systemVars.systemFlags & SF_MUS_OFF ? 0 : 2);
|
||||||
|
|
||||||
drawMainPanel();
|
drawMainPanel();
|
||||||
|
|
||||||
_savedMouse = _skyMouse->giveCurrentMouseType();
|
_savedMouse = _skyMouse->giveCurrentMouseType();
|
||||||
|
@ -573,10 +579,10 @@ uint16 Control::handleClick(ConResource *pButton) {
|
||||||
_mouseClicked = true;
|
_mouseClicked = true;
|
||||||
return doMusicSlide();
|
return doMusicSlide();
|
||||||
case TOGGLE_FX:
|
case TOGGLE_FX:
|
||||||
return toggleFx(pButton);
|
toggleFx(pButton);
|
||||||
|
return TOGGLED;
|
||||||
case TOGGLE_MS:
|
case TOGGLE_MS:
|
||||||
animClick(pButton);
|
toggleMusic(pButton);
|
||||||
toggleMusic();
|
|
||||||
return TOGGLED;
|
return TOGGLED;
|
||||||
case TOGGLE_TEXT:
|
case TOGGLE_TEXT:
|
||||||
animClick(pButton);
|
animClick(pButton);
|
||||||
|
@ -647,6 +653,7 @@ bool Control::getYesNo(char *text) {
|
||||||
wantMouse = MOUSE_NORMAL;
|
wantMouse = MOUSE_NORMAL;
|
||||||
}
|
}
|
||||||
_mouseClicked = false;
|
_mouseClicked = false;
|
||||||
|
_skyMouse->spriteMouse(MOUSE_NORMAL, 0, 0);
|
||||||
if (dlgTextDat)
|
if (dlgTextDat)
|
||||||
free(dlgTextDat);
|
free(dlgTextDat);
|
||||||
delete dlgText;
|
delete dlgText;
|
||||||
|
@ -708,25 +715,21 @@ uint16 Control::doSpeedSlide(void) {
|
||||||
return SPEED_CHANGED;
|
return SPEED_CHANGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Control::toggleFx(ConResource *pButton) {
|
void Control::toggleFx(ConResource *pButton) {
|
||||||
|
|
||||||
SkyEngine::_systemVars.systemFlags ^= SF_FX_OFF;
|
SkyEngine::_systemVars.systemFlags ^= SF_FX_OFF;
|
||||||
if (SkyEngine::_systemVars.systemFlags & SF_FX_OFF) {
|
if (SkyEngine::_systemVars.systemFlags & SF_FX_OFF) {
|
||||||
pButton->_curSprite = 0;
|
pButton->_curSprite = 0;
|
||||||
pButton->_text = 0x7000 + 87;
|
|
||||||
_statusBar->setToText(0x7000 + 87);
|
_statusBar->setToText(0x7000 + 87);
|
||||||
} else {
|
} else {
|
||||||
pButton->_curSprite = 2;
|
pButton->_curSprite = 2;
|
||||||
pButton->_text = 0x7000 + 86;
|
|
||||||
_statusBar->setToText(0x7000 + 86);
|
_statusBar->setToText(0x7000 + 86);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfMan.setBool("sfx_mute", (SkyEngine::_systemVars.systemFlags & SF_FX_OFF) != 0);
|
ConfMan.setBool("sfx_mute", (SkyEngine::_systemVars.systemFlags & SF_FX_OFF) != 0);
|
||||||
|
|
||||||
pButton->drawToScreen(WITH_MASK);
|
pButton->drawToScreen(WITH_MASK);
|
||||||
buttonControl(pButton);
|
|
||||||
_system->updateScreen();
|
_system->updateScreen();
|
||||||
return TOGGLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Control::toggleText(void) {
|
uint16 Control::toggleText(void) {
|
||||||
|
@ -756,17 +759,23 @@ uint16 Control::toggleText(void) {
|
||||||
return TOGGLED;
|
return TOGGLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Control::toggleMusic(void) {
|
void Control::toggleMusic(ConResource *pButton) {
|
||||||
|
|
||||||
|
SkyEngine::_systemVars.systemFlags ^= SF_MUS_OFF;
|
||||||
if (SkyEngine::_systemVars.systemFlags & SF_MUS_OFF) {
|
if (SkyEngine::_systemVars.systemFlags & SF_MUS_OFF) {
|
||||||
SkyEngine::_systemVars.systemFlags &= ~SF_MUS_OFF;
|
|
||||||
_skyMusic->startMusic(SkyEngine::_systemVars.currentMusic);
|
|
||||||
_statusBar->setToText(0x7000 + 88);
|
|
||||||
} else {
|
|
||||||
SkyEngine::_systemVars.systemFlags |= SF_MUS_OFF;
|
|
||||||
_skyMusic->startMusic(0);
|
_skyMusic->startMusic(0);
|
||||||
|
pButton->_curSprite = 0;
|
||||||
_statusBar->setToText(0x7000 + 89);
|
_statusBar->setToText(0x7000 + 89);
|
||||||
|
} else {
|
||||||
|
_skyMusic->startMusic(SkyEngine::_systemVars.currentMusic);
|
||||||
|
pButton->_curSprite = 2;
|
||||||
|
_statusBar->setToText(0x7000 + 88);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfMan.setBool("music_mute", (SkyEngine::_systemVars.systemFlags & SF_MUS_OFF) != 0);
|
||||||
|
|
||||||
|
pButton->drawToScreen(WITH_MASK);
|
||||||
|
_system->updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Control::shiftDown(uint8 speed) {
|
uint16 Control::shiftDown(uint8 speed) {
|
||||||
|
|
|
@ -203,9 +203,9 @@ private:
|
||||||
uint16 handleClick(ConResource *pButton);
|
uint16 handleClick(ConResource *pButton);
|
||||||
uint16 doMusicSlide(void);
|
uint16 doMusicSlide(void);
|
||||||
uint16 doSpeedSlide(void);
|
uint16 doSpeedSlide(void);
|
||||||
uint16 toggleFx(ConResource *pButton);
|
void toggleFx(ConResource *pButton);
|
||||||
uint16 toggleText(void);
|
uint16 toggleText(void);
|
||||||
void toggleMusic(void);
|
void toggleMusic(ConResource *pButton);
|
||||||
uint16 shiftDown(uint8 speed);
|
uint16 shiftDown(uint8 speed);
|
||||||
uint16 shiftUp(uint8 speed);
|
uint16 shiftUp(uint8 speed);
|
||||||
void drawTextCross(uint32 flags);
|
void drawTextCross(uint32 flags);
|
||||||
|
|
|
@ -356,6 +356,9 @@ int SkyEngine::init() {
|
||||||
|
|
||||||
if (ConfMan.getBool("sfx_mute")) {
|
if (ConfMan.getBool("sfx_mute")) {
|
||||||
SkyEngine::_systemVars.systemFlags |= SF_FX_OFF;
|
SkyEngine::_systemVars.systemFlags |= SF_FX_OFF;
|
||||||
|
}
|
||||||
|
if (ConfMan.getBool("music_mute")) {
|
||||||
|
SkyEngine::_systemVars.systemFlags |= SF_MUS_OFF;
|
||||||
}
|
}
|
||||||
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
|
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
|
||||||
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
|
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
|
||||||
|
|
|
@ -234,7 +234,7 @@ static const char *credits[] = {
|
||||||
"\\C\\c0""",
|
"\\C\\c0""",
|
||||||
"\\C\\c1""Code contributions",
|
"\\C\\c1""Code contributions",
|
||||||
"\\C\\c0""Ori Avtalion",
|
"\\C\\c0""Ori Avtalion",
|
||||||
"\\C\\c2""Subtitle control options in the GUI",
|
"\\C\\c2""Subtitle control options in the GUI; BASS GUI fixes",
|
||||||
"\\C\\c0""Stuart Caie",
|
"\\C\\c0""Stuart Caie",
|
||||||
"\\C\\c2""Decoders for Simon 1 Amiga data files",
|
"\\C\\c2""Decoders for Simon 1 Amiga data files",
|
||||||
"\\C\\c0""Paolo Costabel",
|
"\\C\\c0""Paolo Costabel",
|
||||||
|
|
|
@ -716,7 +716,7 @@ begin_credits("Credits");
|
||||||
|
|
||||||
begin_section("Code contributions");
|
begin_section("Code contributions");
|
||||||
begin_persons();
|
begin_persons();
|
||||||
add_person("Ori Avtalion", "salty-horse", "Subtitle control options in the GUI");
|
add_person("Ori Avtalion", "salty-horse", "Subtitle control options in the GUI; BASS GUI fixes");
|
||||||
add_person("Stuart Caie", "", "Decoders for Simon 1 Amiga data files");
|
add_person("Stuart Caie", "", "Decoders for Simon 1 Amiga data files");
|
||||||
add_person("Paolo Costabel", "", "PSP port contributions");
|
add_person("Paolo Costabel", "", "PSP port contributions");
|
||||||
add_person("Thierry Crozat", "criezy", "Support for Broken Sword 1 Macintosh version");
|
add_person("Thierry Crozat", "criezy", "Support for Broken Sword 1 Macintosh version");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue