diff options
| author | Robert Göffringmann | 2004-01-04 05:21:22 +0000 |
|---|---|---|
| committer | Robert Göffringmann | 2004-01-04 05:21:22 +0000 |
| commit | f0d0e4d4b337a9d39e384634d6ef1d1b23e329f3 (patch) | |
| tree | 1116a7e40e9d8221589c7da79dab38fded10a033 | |
| parent | 7cc972791683c232338f01818b8ccef1fccae62d (diff) | |
| download | scummvm-rg350-f0d0e4d4b337a9d39e384634d6ef1d1b23e329f3.tar.gz scummvm-rg350-f0d0e4d4b337a9d39e384634d6ef1d1b23e329f3.tar.bz2 scummvm-rg350-f0d0e4d4b337a9d39e384634d6ef1d1b23e329f3.zip | |
removed speed button from control panel and made the game do a full screen refresh after leaving the control panel
svn-id: r12127
| -rw-r--r-- | sword1/control.cpp | 18 | ||||
| -rw-r--r-- | sword1/control.h | 2 | ||||
| -rw-r--r-- | sword1/screen.cpp | 3 | ||||
| -rw-r--r-- | sword1/screen.h | 2 | ||||
| -rw-r--r-- | sword1/sword1.cpp | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp index 5fc2508cec..8c248e8452 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -317,7 +317,7 @@ uint8 SwordControl::handleButtonClick(uint8 id, uint8 mode, uint8 *retVal) { return id; else if (id == BUTTON_TEXT) { SwordEngine::_systemVars.showText ^= 1; - _buttons[6]->setSelected(SwordEngine::_systemVars.showText); + _buttons[5]->setSelected(SwordEngine::_systemVars.showText); } break; case BUTTON_SAVE_PANEL: @@ -365,8 +365,8 @@ void SwordControl::setupMainPanel(void) { if (SwordEngine::_systemVars.deathScreenFlag) createButtons(_deathButtons, 3); else { - createButtons(_panelButtons, 8); - _buttons[6]->setSelected(SwordEngine::_systemVars.showText); + createButtons(_panelButtons, 7); + _buttons[5]->setSelected(SwordEngine::_systemVars.showText); } if (SwordEngine::_systemVars.deathScreenFlag == 2) // end of game @@ -379,9 +379,8 @@ void SwordControl::setupMainPanel(void) { renderText(_lStrings[STR_RESTART], 180, 260 + 40, TEXT_LEFT_ALIGN); renderText(_lStrings[STR_QUIT], 180, 296 + 40, TEXT_LEFT_ALIGN); - renderText(_lStrings[STR_SPEED], 460, 188 + 40, TEXT_RIGHT_ALIGN); - renderText(_lStrings[STR_VOLUME], 460, 224 + 40, TEXT_RIGHT_ALIGN); - renderText(_lStrings[STR_TEXT], 460, 260 + 40, TEXT_RIGHT_ALIGN); + renderText(_lStrings[STR_VOLUME], 460, 188 + 40, TEXT_RIGHT_ALIGN); + renderText(_lStrings[STR_TEXT], 460, 224 + 40, TEXT_RIGHT_ALIGN); } else { renderText(_lStrings[STR_RESTORE], 285, 224 + 40, TEXT_LEFT_ALIGN); if (SwordEngine::_systemVars.deathScreenFlag == 3) // just started game @@ -794,14 +793,13 @@ const ButtonInfo SwordControl::_deathButtons[3] = { {250, 296 + 40, SR_BUTTON, BUTTON_QUIT } }; -const ButtonInfo SwordControl::_panelButtons[8] = { +const ButtonInfo SwordControl::_panelButtons[7] = { {145, 188 + 40, SR_BUTTON, BUTTON_SAVE_PANEL }, {145, 224 + 40, SR_BUTTON, BUTTON_RESTORE_PANEL }, {145, 260 + 40, SR_BUTTON, BUTTON_RESTART }, {145, 296 + 40, SR_BUTTON, BUTTON_QUIT }, - {475, 188 + 40, SR_BUTTON, BUTTON_SPEED }, - {475, 224 + 40, SR_BUTTON, BUTTON_VOLUME_PANEL }, - {475, 260 + 40, SR_TEXT_BUTTON, BUTTON_TEXT }, + {475, 188 + 40, SR_BUTTON, BUTTON_VOLUME_PANEL }, + {475, 224 + 40, SR_TEXT_BUTTON, BUTTON_TEXT }, {475, 332 + 40, SR_BUTTON, BUTTON_DONE } }; diff --git a/sword1/control.h b/sword1/control.h index e0cc5daa31..c606e80912 100644 --- a/sword1/control.h +++ b/sword1/control.h @@ -108,7 +108,7 @@ private: void createButtons(const ButtonInfo *buttons, uint8 num); void destroyButtons(void); ControlButton *_buttons[MAX_BUTTONS]; - static const ButtonInfo _deathButtons[3], _panelButtons[8], _saveButtons[16], _volumeButtons[1]; + static const ButtonInfo _deathButtons[3], _panelButtons[7], _saveButtons[16], _volumeButtons[1]; static const uint8 _languageStrings[8 * 20][43]; const uint8 (*_lStrings)[43]; ObjectMan *_objMan; diff --git a/sword1/screen.cpp b/sword1/screen.cpp index 919e5248b9..55135c9670 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -110,7 +110,8 @@ void SwordScreen::fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeU _system->set_palette(_targetPalette + 4 * start, start, length); } -void SwordScreen::refreshPalette(void) { +void SwordScreen::fullRefresh(void) { + _fullRefresh = true; _system->set_palette(_targetPalette, 0, 256); } diff --git a/sword1/screen.h b/sword1/screen.h index b71d343398..563fab87fb 100644 --- a/sword1/screen.h +++ b/sword1/screen.h @@ -78,7 +78,7 @@ public: void fadeUpPalette(void); void fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeUp); bool stillFading(void); - void refreshPalette(void); + void fullRefresh(void); void updateScreen(void); void showFrame(uint16 x, uint16 y, uint32 resId, uint32 frameNo, const byte *fadeMask = NULL, int8 fadeStatus = 0); diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 5360910410..eaf46f4369 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -1144,7 +1144,7 @@ uint8 SwordEngine::mainLoop(void) { else if (((_keyPressed == 63) && (SwordLogic::_scriptVars[MOUSE_STATUS] & 1)) || (_systemVars.deathScreenFlag)) { retCode = _control->runPanel(); if (!retCode) - _screen->refreshPalette(); + _screen->fullRefresh(); } // do something smart here to implement pausing the game. If we even want that, that is. |
