aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-06-13 15:31:45 +0000
committerFilippos Karapetis2007-06-13 15:31:45 +0000
commit7af7e3f192e12f8abcc99f708b9cc9f79f55e780 (patch)
tree53e47b646f1f23c2892299c754f5fac3c3c6d9f8
parentcbb378de1fe5ef2638ba9bfa5e4784f0a18e3495 (diff)
downloadscummvm-rg350-7af7e3f192e12f8abcc99f708b9cc9f79f55e780.tar.gz
scummvm-rg350-7af7e3f192e12f8abcc99f708b9cc9f79f55e780.tar.bz2
scummvm-rg350-7af7e3f192e12f8abcc99f708b9cc9f79f55e780.zip
Fix the quit panel in IHNM
svn-id: r27387
-rw-r--r--engines/saga/detection_tables.h3
-rw-r--r--engines/saga/displayinfo.h10
-rw-r--r--engines/saga/interface.cpp21
-rw-r--r--engines/saga/saga.h1
4 files changed, 28 insertions, 7 deletions
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 81a91dae42..89fdbcd876 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -31,6 +31,7 @@ static const GameResourceDescription ITE_Resources = {
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 @@ static const GameResourceDescription ITEDemo_Resources = {
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 @@ static const GameResourceDescription IHNM_Resources = {
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,
diff --git a/engines/saga/displayinfo.h b/engines/saga/displayinfo.h
index 139ddfa891..4598158620 100644
--- a/engines/saga/displayinfo.h
+++ b/engines/saga/displayinfo.h
@@ -340,11 +340,9 @@ static PanelButton IHNM_OptionPanelButtons[] = {
};
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 @@ static const GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
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,
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index cff9262d2a..5251a822ad 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -91,6 +91,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
error("Interface::Interface() resource context not found");
}
+ // Main panel
_mainPanel.buttons = _vm->getDisplayInfo().mainPanelButtons;
_mainPanel.buttonsCount = _vm->getDisplayInfo().mainPanelButtonsCount;
@@ -110,6 +111,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
free(resource);
+ // Converse panel
_conversePanel.buttons = _vm->getDisplayInfo().conversePanelButtons;
_conversePanel.buttonsCount = _vm->getDisplayInfo().conversePanelButtonsCount;
@@ -118,6 +120,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
&_conversePanel.imageLength, &_conversePanel.imageWidth, &_conversePanel.imageHeight);
free(resource);
+ // Option panel
_optionPanel.buttons = _vm->getDisplayInfo().optionPanelButtons;
_optionPanel.buttonsCount = _vm->getDisplayInfo().optionPanelButtonsCount;
@@ -126,6 +129,18 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
&_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 @@ void Interface::drawQuit() {
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) {
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index b4eba6e314..e43d2f15d3 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -289,6 +289,7 @@ struct GameResourceDescription {
uint32 mainPanelResourceId;
uint32 conversePanelResourceId;
uint32 optionPanelResourceId;
+ uint32 warningPanelResourceId;
uint32 mainSpritesResourceId;
uint32 mainPanelSpritesResourceId;
uint32 defaultPortraitsResourceId;