[Scummvm-cvs-logs] SF.net SVN: scummvm: [24718] scummvm/trunk/engines/cine
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Nov 14 10:29:41 CET 2006
Revision: 24718
http://svn.sourceforge.net/scummvm/?rev=24718&view=rev
Author: sev
Date: 2006-11-14 01:29:41 -0800 (Tue, 14 Nov 2006)
Log Message:
-----------
Added per game target saves.
Modified Paths:
--------------
scummvm/trunk/engines/cine/cine.h
scummvm/trunk/engines/cine/main_loop.cpp
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h 2006-11-13 23:38:44 UTC (rev 24717)
+++ scummvm/trunk/engines/cine/cine.h 2006-11-14 09:29:41 UTC (rev 24718)
@@ -84,6 +84,9 @@
Common::Language getLanguage() const { return _gameDescription->desc.language; }
Common::Platform getPlatform() const { return _gameDescription->desc.platform; }
+ bool loadSaveDirectory(void);
+ void makeSystemMenu(void);
+
const CINEGameDescription *_gameDescription;
};
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp 2006-11-13 23:38:44 UTC (rev 24717)
+++ scummvm/trunk/engines/cine/main_loop.cpp 2006-11-14 09:29:41 UTC (rev 24718)
@@ -106,7 +106,7 @@
break;
case 291: // F10
if (allowPlayerInput) {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
}
break;
default:
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2006-11-13 23:38:44 UTC (rev 24717)
+++ scummvm/trunk/engines/cine/various.cpp 2006-11-14 09:29:41 UTC (rev 24718)
@@ -301,22 +301,21 @@
static commandeType currentSaveName[10];
-int16 loadSaveDirectory(void) {
+bool CineEngine::loadSaveDirectory(void) {
Common::InSaveFile *fHandle;
+ char tmp[80];
- if (g_cine->getGameType() == Cine::GType_FW)
- fHandle = g_saveFileMan->openForLoading("FW.DIR");
- else
- fHandle = g_saveFileMan->openForLoading("OS.DIR");
+ snprintf(tmp, 80, "%s.dir", _targetName.c_str());
+ fHandle = g_saveFileMan->openForLoading(tmp);
if (!fHandle) {
- return 0;
+ return false;
}
fHandle->read(currentSaveName, 10 * 20);
delete fHandle;
- return 1;
+ return true;
}
int16 currentDisk;
@@ -904,7 +903,7 @@
setMouseCursor(MOUSE_CURSOR_NORMAL);
}
-void makeSystemMenu(void) {
+void CineEngine::makeSystemMenu(void) {
int16 numEntry;
int16 mouseButton;
int16 mouseX;
@@ -965,10 +964,7 @@
if (selectedSave >= 0) {
char saveNameBuffer[256];
- if (g_cine->getGameType() == Cine::GType_FW)
- sprintf(saveNameBuffer, "FW.%1d", selectedSave);
- else
- sprintf(saveNameBuffer, "OS.%1d", selectedSave);
+ sprintf(saveNameBuffer, "%s.%1d", _targetName.c_str(), selectedSave);
getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton, (uint16 *)&mouseX, (uint16 *)&mouseY);
if (!makeMenuChoice(confirmMenu, 2, mouseX, mouseY + 8, 100)) {
@@ -1007,22 +1003,18 @@
//makeTextEntryMenu(otherMessages[7], ¤tSaveName[selectedSave], 120);
sprintf(currentSaveName[selectedSave], otherMessages[6]);
- if (g_cine->getGameType() == Cine::GType_FW)
- sprintf(saveFileName, "FW.%1d", selectedSave);
- else
- sprintf(saveFileName, "OS.%1d", selectedSave);
+ sprintf(saveFileName, "%s.%1d", _targetName.c_str(), selectedSave);
getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton, (uint16 *)&mouseX, (uint16 *)&mouseY);
if (!makeMenuChoice(confirmMenu, 2, mouseX, mouseY + 8, 100)) {
- char saveString[256];
+ char saveString[256], tmp[80];
Common::OutSaveFile *fHandle;
- if (g_cine->getGameType() == Cine::GType_FW)
- fHandle = g_saveFileMan->openForSaving("FW.DIR");
- else
- fHandle = g_saveFileMan->openForSaving("OS.DIR");
+ snprintf(tmp, 80, "%s.dir", _targetName.c_str());
+ fHandle = g_saveFileMan->openForSaving(tmp);
+
fHandle->write(currentSaveName, 200);
delete fHandle;
@@ -1905,7 +1897,7 @@
if (playerCommand != -1) {
if (mouseButton & 1) {
if (mouseButton & 2) {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
} else {
int16 si;
do {
@@ -1954,7 +1946,7 @@
} else {
if (mouseButton & 2) {
if (mouseButton & 1) {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
}
makeActionMenu();
@@ -1997,7 +1989,7 @@
makeCommandLine();
} else {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
}
} else {
if (mouseButton & 1) {
@@ -2025,7 +2017,7 @@
}
}
} else {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
}
}
}
@@ -2052,7 +2044,7 @@
}
if ((mouseButton & 1) && (mouseButton & 2)) {
- makeSystemMenu();
+ g_cine->makeSystemMenu();
}
}
@@ -2166,10 +2158,10 @@
break;
case 9:
case 24:
- makeSystemMenu();
+ g_cine->makeSystemMenu();
break;
default:
- // printf("Unhandled case %d in last part of executePLayerInput\n",var2-59);
+ // printf("Unhandled case %d in last part of executePlayerInput\n",var2-59);
break;
}
}
Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h 2006-11-13 23:38:44 UTC (rev 24717)
+++ scummvm/trunk/engines/cine/various.h 2006-11-14 09:29:41 UTC (rev 24718)
@@ -37,7 +37,6 @@
int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
void makeCommandLine(void);
-void makeSystemMenu(void);
void makeActionMenu(void);
extern int16 allowSystemMenu;
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