aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-21 18:07:17 +0000
committerFilippos Karapetis2007-08-21 18:07:17 +0000
commit296080e44fc97ad9f3f199517708061afeb39fcb (patch)
tree939a89aa9c6945c70d4cac668a7e2357ddd3a155 /engines
parentbf1f23d378c6ef37d019eecb576aedace79b2893 (diff)
downloadscummvm-rg350-296080e44fc97ad9f3f199517708061afeb39fcb.tar.gz
scummvm-rg350-296080e44fc97ad9f3f199517708061afeb39fcb.tar.bz2
scummvm-rg350-296080e44fc97ad9f3f199517708061afeb39fcb.zip
The button sprites of the warnings dialogs of IHNM are loaded correctly now. Also, the save file slider is shown correctly now (although it still needs some tweaking, as its virtual height is still the same as in ITE)
svn-id: r28690
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/detection_tables.h4
-rw-r--r--engines/saga/interface.cpp43
-rw-r--r--engines/saga/saga.h1
-rw-r--r--engines/saga/sagaresnames.h4
4 files changed, 39 insertions, 13 deletions
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 4bcbb004a0..8b41844932 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -34,6 +34,7 @@ static const GameResourceDescription ITE_Resources = {
RID_ITE_CONVERSE_PANEL,
RID_ITE_OPTION_PANEL,
0, // Warning panel (IHNM only)
+ 0, // Warning panel sprites (IHNM only)
RID_ITE_MAIN_SPRITES,
RID_ITE_MAIN_PANEL_SPRITES,
0, // Option panel sprites (IHNM only)
@@ -50,6 +51,7 @@ static const GameResourceDescription ITEDemo_Resources = {
RID_ITEDEMO_CONVERSE_PANEL,
RID_ITEDEMO_OPTION_PANEL,
0, // Warning panel (IHNM only)
+ 0, // Warning panel sprites (IHNM only)
RID_ITEDEMO_MAIN_SPRITES,
RID_ITEDEMO_MAIN_PANEL_SPRITES,
0, // Option panel sprites (IHNM only)
@@ -248,6 +250,7 @@ static const GameResourceDescription IHNM_Resources = {
RID_IHNM_CONVERSE_PANEL,
RID_IHNM_OPTION_PANEL,
RID_IHNM_WARNING_PANEL,
+ RID_IHNM_WARNING_PANEL_SPRITES,
RID_IHNM_MAIN_SPRITES,
RID_IHNM_MAIN_PANEL_SPRITES,
RID_IHNM_OPTION_PANEL_SPRITES,
@@ -264,6 +267,7 @@ static const GameResourceDescription IHNMDEMO_Resources = {
RID_IHNMDEMO_CONVERSE_PANEL,
RID_IHNMDEMO_OPTION_PANEL,
RID_IHNMDEMO_WARNING_PANEL,
+ RID_IHNMDEMO_WARNING_PANEL_SPRITES,
RID_IHNMDEMO_MAIN_SPRITES,
RID_IHNMDEMO_MAIN_PANEL_SPRITES,
RID_IHNMDEMO_OPTION_PANEL_SPRITES,
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 3d8ccc7e0f..ecf0e2b147 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -229,6 +229,12 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
_vm->_sprite->loadList(_vm->getResourceDescription()->mainPanelSpritesResourceId, _mainPanel.sprites);
// Option panel sprites
_vm->_sprite->loadList(_vm->getResourceDescription()->optionPanelSpritesResourceId, _optionPanel.sprites);
+ // Save panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _savePanel.sprites);
+ // Load panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _loadPanel.sprites);
+ // Quit panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _quitPanel.sprites);
if (_vm->getGameType() == GType_ITE) {
_vm->_sprite->loadList(_vm->getResourceDescription()->defaultPortraitsResourceId, _defPortraits);
@@ -921,6 +927,7 @@ void Interface::drawOption() {
PanelButton *panelButton;
Point textPoint;
Point point;
+ Point sliderPoint;
int spritenum = 0;
backBuffer = _vm->_gfx->getBackBuffer();
@@ -949,7 +956,15 @@ void Interface::drawOption() {
backBuffer->drawRect(_optionSaveRectTop, kITEColorDarkGrey);
}
- drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+ if (_vm->getGameType() == GType_ITE) {
+ drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+ } else {
+ panelButton = &_optionPanel.buttons[0];
+ sliderPoint.x = _optionPanel.x + panelButton->xOffset;
+ sliderPoint.y = _optionSaveRectSlider.top;
+ _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _optionPanel.sprites, 0 + _optionSaveFileSlider->state, sliderPoint, 256);
+
+ }
if (_optionSaveRectBottom.height() > 0) {
backBuffer->drawRect(_optionSaveRectBottom, kITEColorDarkGrey);
@@ -2245,21 +2260,25 @@ void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelBut
litButton = panelButton->state > 0;
if (panel == &_optionPanel) {
- texturePoint.x = _optionPanel.x + panelButton->xOffset;
- texturePoint.y = _optionPanel.y + panelButton->yOffset;
+ texturePoint.x = _optionPanel.x + panelButton->xOffset - 1;
+ texturePoint.y = _optionPanel.y + panelButton->yOffset - 1;
_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, spritenum + 2 + litButton, texturePoint, 256);
} else if (panel == &_quitPanel) {
- texturePoint.x = _quitPanel.x + panelButton->xOffset;
- texturePoint.y = _quitPanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _quitPanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _quitPanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _quitPanel.sprites, litButton, texturePoint, 256);
} else if (panel == &_savePanel) {
- texturePoint.x = _savePanel.x + panelButton->xOffset;
- texturePoint.y = _savePanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _savePanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _savePanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, litButton, texturePoint, 256);
+ // Input text box sprite
+ texturePoint.x = _savePanel.x + _saveEdit->xOffset - 2;
+ texturePoint.y = _savePanel.y + _saveEdit->yOffset - 2;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, 2, texturePoint, 256);
} else if (panel == &_loadPanel) {
- texturePoint.x = _loadPanel.x + panelButton->xOffset;
- texturePoint.y = _loadPanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _loadPanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _loadPanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _loadPanel.sprites, litButton, texturePoint, 256);
} else {
// revert to default behavior
drawButtonBox(ds, rect, kButton, panelButton->state > 0);
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index b228c26b01..4f59e729bd 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -297,6 +297,7 @@ struct GameResourceDescription {
uint32 conversePanelResourceId;
uint32 optionPanelResourceId;
uint32 warningPanelResourceId;
+ uint32 warningPanelSpritesResourceId;
uint32 mainSpritesResourceId;
uint32 mainPanelSpritesResourceId;
uint32 optionPanelSpritesResourceId;
diff --git a/engines/saga/sagaresnames.h b/engines/saga/sagaresnames.h
index 761ac1ab68..b416d85fd8 100644
--- a/engines/saga/sagaresnames.h
+++ b/engines/saga/sagaresnames.h
@@ -108,6 +108,7 @@ namespace Saga {
#define RID_IHNM_OPTION_PANEL 15
#define RID_IHNM_OPTION_PANEL_SPRITES 16
#define RID_IHNM_WARNING_PANEL 17
+#define RID_IHNM_WARNING_PANEL_SPRITES 18
#define RID_IHNM_BOSS_SCREEN 19
#define RID_IHNM_PROFILE_BG 20
#define RID_IHNM_MAIN_STRINGS 21
@@ -122,7 +123,8 @@ namespace Saga {
#define RID_IHNMDEMO_OPTION_PANEL 10
#define RID_IHNMDEMO_OPTION_PANEL_SPRITES 11
#define RID_IHNMDEMO_WARNING_PANEL 12
-#define RID_IHNMDEMO_BOSS_SCREEN 13 // Does not exist in the demo
+#define RID_IHNMDEMO_WARNING_PANEL_SPRITES 13
+#define RID_IHNMDEMO_BOSS_SCREEN 14 // Does not exist in the demo
#define RID_IHNMDEMO_PROFILE_BG 15
#define RID_IHNMDEMO_MAIN_STRINGS 16