mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
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
This commit is contained in:
parent
bf1f23d378
commit
296080e44f
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -297,6 +297,7 @@ struct GameResourceDescription {
|
||||
uint32 conversePanelResourceId;
|
||||
uint32 optionPanelResourceId;
|
||||
uint32 warningPanelResourceId;
|
||||
uint32 warningPanelSpritesResourceId;
|
||||
uint32 mainSpritesResourceId;
|
||||
uint32 mainPanelSpritesResourceId;
|
||||
uint32 optionPanelSpritesResourceId;
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user