Open main menu

Difference between revisions of "User talk:David corrales"

Added the savefile manager information
(Added the savefile manager information)
Line 332: Line 332:


'''Update 19/06''': added the isValid() method as removed. Also updated getChildren().
'''Update 19/06''': added the isValid() method as removed. Also updated getChildren().
== Savefile manager information ==
Due to request from Max, I've started working on the savefile manager also. Although this isn't technically part of the GSoC project, it's a closely related and in need of work.
This section deals with information about the current state of affairs concerning the savefile manager class.
For more information about what needs to be done, one can visit http://wiki.scummvm.org/index.php/User:Fingolfin#TODO or http://wiki.scummvm.org/index.php/TODO#Savegames.
=== Save game procedure for the Scumm engine ===
#Click on the save button. (dialogs.cpp: save())
#Set the listed files from the list provided by generateSavegameList(). (dialogs.cpp)
##Mark the flags of the available savefiles using listSavegames(). (default-saves.cpp)
##For the available saves call getSavegameName(index, name). (Reads the user input name from the header) (saveload.cpp)
###Call makeSavegameName() to create a default filename.
####Creates a filename with "game|type|slot" format. Game is given by _targetName.
###Try to open the generated filename with openForLoading(filename).
###If 2.2.2 fails, return. Else continue loading the header, etc...
##Return the list of user input names from 2.2.
#Run the dialog and catch an index and a name for the savefile.
#Request a save file using requestSave() with the given index and file description.
=== Save file name format strings for all engines ===
*agi:
:sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), num + _firstSlot);
*agos:
:if (getGameId() == GID_DIMP) {
::sprintf(buf, "dimp.sav");
:} else if (getGameType() == GType_PP) {
::sprintf(buf, "swampy.sav");
:} else if (getGameType() == GType_FF) {
::sprintf(buf, "feeble.%.3d", slot);
:} else if (getGameType() == GType_SIMON2) {
::sprintf(buf, "simon2.%.3d", slot);
:} else if (getGameType() == GType_SIMON1) {
::sprintf(buf, "simon1.%.3d", slot);
:} else if (getGameType() == GType_WW) {
::sprintf(buf, "waxworks.%.3d", slot);
:} else if (getGameType() == GType_ELVIRA2) {
::sprintf(buf, "elvira2.%.3d", slot);
:} else if (getGameType() == GType_ELVIRA1) {
::sprintf(buf, "elvira1.%.3d", slot);
:}
*cine:
:snprintf(tmp, 80, "%s.dir", _targetName.c_str());
*gob:
:snprintf(slotBase, 3, "%02d", slot);
*kyra:
:sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), num + _firstSlot);
*lure:
:sprintf(buffer, "lure.%.3d", slotNumber);
*parallaction:
:sprintf(filename, "game.%i", slot);
*queen:
:strcpy(buf, "queen.asd");
:sprintf(buf, "queen.s%02d", slot);
*saga:
:sprintf(name, "%s.s%02d", _targetName.c_str(), slotNumber);
*scumm:
:sprintf(out, "%s.%c%.2d", _targetName.c_str(), temporary ? 'c' : 's', slot);
*sky:
:strcpy(fName, "SKY-VM-CD.ASD");
:sprintf(fName, "SKY-VM%03d.ASD", SkyEngine::_systemVars.gameVersion);
*sword1:
:_saveFileMan->openForLoading("SAVEGAME.INF");
:sprintf(fName, "SAVEGAME.%03d", slot);
*sword2:
:snprintf(buf, sizeof(buf), "%s.%.3d", _targetName.c_str(), slotNo);
*touche:
:snprintf(dst, len, "%s.%d", _targetName.c_str(), num);


== Misc ==
== Misc ==