[Scummvm-cvs-logs] SF.net SVN: scummvm:[33491] scummvm/branches/branch-0-12-0/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Aug 1 16:03:52 CEST 2008
Revision: 33491
http://scummvm.svn.sourceforge.net/scummvm/?rev=33491&view=rev
Author: thebluegr
Date: 2008-08-01 14:03:52 +0000 (Fri, 01 Aug 2008)
Log Message:
-----------
(backport) Added load confirmation dialog for IHNM, like in the original.
Fixes bug #1971699 - "IHNM: No Load Game Confirmation"
Modified Paths:
--------------
scummvm/branches/branch-0-12-0/engines/saga/displayinfo.h
scummvm/branches/branch-0-12-0/engines/saga/interface.cpp
scummvm/branches/branch-0-12-0/engines/saga/itedata.cpp
scummvm/branches/branch-0-12-0/engines/saga/itedata.h
scummvm/branches/branch-0-12-0/engines/saga/saga.h
Modified: scummvm/branches/branch-0-12-0/engines/saga/displayinfo.h
===================================================================
--- scummvm/branches/branch-0-12-0/engines/saga/displayinfo.h 2008-08-01 14:03:20 UTC (rev 33490)
+++ scummvm/branches/branch-0-12-0/engines/saga/displayinfo.h 2008-08-01 14:03:52 UTC (rev 33491)
@@ -348,9 +348,9 @@
};
static PanelButton IHNM_LoadPanelButtons[] = {
- // TODO
- {kPanelButtonLoad, 101,19, 60,16, kTextOK,'o',0, 0,0,0},
- {kPanelButtonLoadText, -1,5, 0,0, kTextLoadSuccessful,'-',0, 0,0,0},
+ {kPanelButtonLoad, 26,80, 80,25, kTextOK,'o',0, 0,0,0},
+ {kPanelButtonLoad, 156,80, 80,25, kTextCancel,'c',0, 0,0,0},
+ {kPanelButtonLoadText, -1,30, 0,0, kTextLoadSavedGame,'-',0, 0,0,0},
};
static PanelButton IHNM_SavePanelButtons[] = {
Modified: scummvm/branches/branch-0-12-0/engines/saga/interface.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/saga/interface.cpp 2008-08-01 14:03:20 UTC (rev 33490)
+++ scummvm/branches/branch-0-12-0/engines/saga/interface.cpp 2008-08-01 14:03:52 UTC (rev 33491)
@@ -94,7 +94,7 @@
8, // Give
10, // Options
11, // Test
- 12, //
+ 12, // Demo
13, // Help
14, // Quit Game
16, // Fast
@@ -905,10 +905,13 @@
textFont = kKnownFontMedium;
textShadowKnownColor = kKnownColorVerbTextShadow;
} else {
- if (panelButton->id < 39 || panelButton->id > 50) {
+ if ((panelButton->id < 39 || panelButton->id > 50) && panelButton->id != kTextLoadSavedGame) {
// Read non-hardcoded strings from the LUT string table, loaded from the game
// data files
text = _vm->_script->_mainStrings.getString(IHNMTextStringIdsLUT[panelButton->id]);
+ } else if (panelButton->id == kTextLoadSavedGame) {
+ // a bit of a kludge, but it will do
+ text = _vm->getTextString(52);
} else {
// Hardcoded strings in IHNM are read from the ITE hardcoded strings
text = _vm->getTextString(panelButton->id);
@@ -1142,8 +1145,22 @@
_loadPanel.currentButton = NULL;
switch (panelButton->id) {
case kTextOK:
- setMode(kPanelMain);
+ if (_vm->getGameType() == GType_ITE) {
+ setMode(kPanelMain);
+ } else {
+ if (_vm->getSaveFilesCount() > 0) {
+ if (_vm->isSaveListFull() || (_optionSaveFileTitleNumber > 0)) {
+ debug(1, "Loading save game %d", _vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
+ setMode(kPanelMain);
+ _vm->load(_vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber));
+ }
+ }
+ }
break;
+ case kTextCancel:
+ // IHNM only
+ setMode(kPanelOption);
+ break;
}
}
@@ -1573,7 +1590,6 @@
}
void Interface::setOption(PanelButton *panelButton) {
- char * fileName;
_optionPanel.currentButton = NULL;
switch (panelButton->id) {
case kTextContinuePlaying:
@@ -1594,13 +1610,16 @@
setMode(kPanelQuit);
break;
case kTextLoad:
- if (_vm->getSaveFilesCount() > 0) {
- if (_vm->isSaveListFull() || (_optionSaveFileTitleNumber > 0)) {
- debug(1, "Loading save game %d", _vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
- fileName = _vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
- setMode(kPanelMain);
- _vm->load(fileName);
+ if (_vm->getGameType() == GType_ITE) {
+ if (_vm->getSaveFilesCount() > 0) {
+ if (_vm->isSaveListFull() || (_optionSaveFileTitleNumber > 0)) {
+ debug(1, "Loading save game %d", _vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
+ setMode(kPanelMain);
+ _vm->load(_vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber));
+ }
}
+ } else {
+ setMode(kPanelLoad);
}
break;
case kTextSave:
Modified: scummvm/branches/branch-0-12-0/engines/saga/itedata.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/saga/itedata.cpp 2008-08-01 14:03:20 UTC (rev 33490)
+++ scummvm/branches/branch-0-12-0/engines/saga/itedata.cpp 2008-08-01 14:03:52 UTC (rev 33491)
@@ -339,7 +339,7 @@
{ 73, 64 }
};
-const char *ITEinterfaceTextStrings[][52] = {
+const char *ITEinterfaceTextStrings[][53] = {
{
// Note that the "Load Successful!" string is never used in ScummVM
"Walk to", "Look At", "Pick Up", "Talk to", "Open",
@@ -358,7 +358,8 @@
"There's no opening to close.",
"I don't know how to do that.",
"Show Dialog",
- "What is Rif's reply?"
+ "What is Rif's reply?",
+ "Loading a saved game"
},
// German
{
@@ -378,7 +379,8 @@
"Hier ist keine \231ffnung zum Schlie$en.",
"Ich wei$ nicht, wie ich das machen soll.",
"Text zeigen",
- "Wie lautet die Antwort?"
+ "Wie lautet die Antwort?",
+ "Spielstand wird geladen"
},
// Italian fan translation
{
@@ -398,7 +400,8 @@
"Nessuna apertura da chiudere.",
"Non saprei come farlo.",
"Dialoghi",
- "Come risponderebbe Rif?"
+ "Come risponderebbe Rif?",
+ "Loading a saved game" // TODO
},
// Spanish IHNM
{
@@ -420,7 +423,8 @@
NULL,
NULL,
NULL,
- NULL
+ NULL,
+ "Cardango una partida guardada"
}
};
Modified: scummvm/branches/branch-0-12-0/engines/saga/itedata.h
===================================================================
--- scummvm/branches/branch-0-12-0/engines/saga/itedata.h 2008-08-01 14:03:20 UTC (rev 33490)
+++ scummvm/branches/branch-0-12-0/engines/saga/itedata.h 2008-08-01 14:03:52 UTC (rev 33491)
@@ -88,7 +88,7 @@
extern ObjectTableData ITE_ObjectTable[ITE_OBJECTCOUNT];
extern FxTable ITE_SfxTable[ITE_SFXCOUNT];
-extern const char *ITEinterfaceTextStrings[][52];
+extern const char *ITEinterfaceTextStrings[][53];
#define PUZZLE_PIECES 15
Modified: scummvm/branches/branch-0-12-0/engines/saga/saga.h
===================================================================
--- scummvm/branches/branch-0-12-0/engines/saga/saga.h 2008-08-01 14:03:20 UTC (rev 33490)
+++ scummvm/branches/branch-0-12-0/engines/saga/saga.h 2008-08-01 14:03:52 UTC (rev 33491)
@@ -295,7 +295,8 @@
kTextVoices,
kTextText,
kTextAudio,
- kTextBoth
+ kTextBoth,
+ kTextLoadSavedGame
};
struct GameResourceDescription {
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