[Scummvm-cvs-logs] SF.net SVN: scummvm: [27387] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Jun 13 17:31:46 CEST 2007
Revision: 27387
http://scummvm.svn.sourceforge.net/scummvm/?rev=27387&view=rev
Author: thebluegr
Date: 2007-06-13 08:31:45 -0700 (Wed, 13 Jun 2007)
Log Message:
-----------
Fix the quit panel in IHNM
Modified Paths:
--------------
scummvm/trunk/engines/saga/detection_tables.h
scummvm/trunk/engines/saga/displayinfo.h
scummvm/trunk/engines/saga/interface.cpp
scummvm/trunk/engines/saga/saga.h
Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h 2007-06-13 13:26:46 UTC (rev 27386)
+++ scummvm/trunk/engines/saga/detection_tables.h 2007-06-13 15:31:45 UTC (rev 27387)
@@ -31,6 +31,7 @@
RID_ITE_MAIN_PANEL,
RID_ITE_CONVERSE_PANEL,
RID_ITE_OPTION_PANEL,
+ 0,
RID_ITE_MAIN_SPRITES,
RID_ITE_MAIN_PANEL_SPRITES,
RID_ITE_DEFAULT_PORTRAITS,
@@ -44,6 +45,7 @@
RID_ITEDEMO_MAIN_PANEL,
RID_ITEDEMO_CONVERSE_PANEL,
RID_ITEDEMO_OPTION_PANEL,
+ 0,
RID_ITEDEMO_MAIN_SPRITES,
RID_ITEDEMO_MAIN_PANEL_SPRITES,
RID_ITEDEMO_DEFAULT_PORTRAITS,
@@ -287,6 +289,7 @@
RID_IHNM_MAIN_PANEL,
RID_IHNM_CONVERSE_PANEL,
RID_IHNM_OPTION_PANEL,
+ RID_IHNM_WARNING_PANEL,
RID_IHNM_MAIN_SPRITES,
RID_IHNM_MAIN_PANEL_SPRITES,
0,
Modified: scummvm/trunk/engines/saga/displayinfo.h
===================================================================
--- scummvm/trunk/engines/saga/displayinfo.h 2007-06-13 13:26:46 UTC (rev 27386)
+++ scummvm/trunk/engines/saga/displayinfo.h 2007-06-13 15:31:45 UTC (rev 27387)
@@ -340,11 +340,9 @@
};
static PanelButton IHNM_QuitPanelButtons[] = {
- //FIXME: Show the correct quit dialog background
- //TODO: Those coordinates might not be pixel perfect, check with the original interpreter
- {kPanelButtonQuit, 25,80, 80,25, kTextQuit,'q',0, 0,0,0},
- {kPanelButtonQuit, 155,80, 80,25, kTextCancel,'c',0, 0,0,0},
- {kPanelButtonQuitText, -1,5, 0,0, kTextQuitTheGameQuestion,'-',0, 0,0,0},
+ {kPanelButtonQuit, 25,79, 80,25, kTextQuit,'q',0, 0,0,0},
+ {kPanelButtonQuit, 155,79, 80,25, kTextCancel,'c',0, 0,0,0},
+ {kPanelButtonQuitText, 75,30, 0,0, kTextQuitTheGameQuestion,'-',0, 0,0,0},
};
static PanelButton IHNM_LoadPanelButtons[] = {
@@ -397,7 +395,7 @@
ARRAYSIZE(IHNM_OptionPanelButtons),
IHNM_OptionPanelButtons,
- 190,180, // quit panel offsets
+ 190,94, // quit panel offsets
260,115, // quit panel width & height
ARRAYSIZE(IHNM_QuitPanelButtons),
IHNM_QuitPanelButtons,
Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp 2007-06-13 13:26:46 UTC (rev 27386)
+++ scummvm/trunk/engines/saga/interface.cpp 2007-06-13 15:31:45 UTC (rev 27387)
@@ -91,6 +91,7 @@
error("Interface::Interface() resource context not found");
}
+ // Main panel
_mainPanel.buttons = _vm->getDisplayInfo().mainPanelButtons;
_mainPanel.buttonsCount = _vm->getDisplayInfo().mainPanelButtonsCount;
@@ -110,6 +111,7 @@
free(resource);
+ // Converse panel
_conversePanel.buttons = _vm->getDisplayInfo().conversePanelButtons;
_conversePanel.buttonsCount = _vm->getDisplayInfo().conversePanelButtonsCount;
@@ -118,6 +120,7 @@
&_conversePanel.imageLength, &_conversePanel.imageWidth, &_conversePanel.imageHeight);
free(resource);
+ // Option panel
_optionPanel.buttons = _vm->getDisplayInfo().optionPanelButtons;
_optionPanel.buttonsCount = _vm->getDisplayInfo().optionPanelButtonsCount;
@@ -126,6 +129,18 @@
&_optionPanel.imageLength, &_optionPanel.imageWidth, &_optionPanel.imageHeight);
free(resource);
+ // Quit panel
+ if (_vm->getGameType() == GType_IHNM) {
+ _quitPanel.buttons = _vm->getDisplayInfo().quitPanelButtons;
+ _quitPanel.buttonsCount = _vm->getDisplayInfo().quitPanelButtonsCount;
+
+ _vm->_resource->loadResource(_interfaceContext, _vm->getResourceDescription()->warningPanelResourceId, resource, resourceLength);
+ _vm->decodeBGImage(resource, resourceLength, &_quitPanel.image,
+ &_quitPanel.imageLength, &_quitPanel.imageWidth, &_quitPanel.imageHeight);
+ free(resource);
+ }
+
+ // Main panel sprites
_vm->_sprite->loadList(_vm->getResourceDescription()->mainPanelSpritesResourceId, _mainPanel.sprites);
if (_vm->getGameType() == GType_ITE) {
@@ -817,7 +832,11 @@
backBuffer = _vm->_gfx->getBackBuffer();
_quitPanel.getRect(rect);
- drawButtonBox(backBuffer, rect, kButton, false);
+ if (_vm->getGameType() == GType_ITE)
+ drawButtonBox(backBuffer, rect, kButton, false);
+ else
+ backBuffer->blit(rect, _quitPanel.image);
+
for (i = 0; i < _quitPanel.buttonsCount; i++) {
panelButton = &_quitPanel.buttons[i];
if (panelButton->type == kPanelButtonQuit) {
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2007-06-13 13:26:46 UTC (rev 27386)
+++ scummvm/trunk/engines/saga/saga.h 2007-06-13 15:31:45 UTC (rev 27387)
@@ -289,6 +289,7 @@
uint32 mainPanelResourceId;
uint32 conversePanelResourceId;
uint32 optionPanelResourceId;
+ uint32 warningPanelResourceId;
uint32 mainSpritesResourceId;
uint32 mainPanelSpritesResourceId;
uint32 defaultPortraitsResourceId;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list