From 68118bdf7a02b95d83d673db4897ab2dd758b0d1 Mon Sep 17 00:00:00 2001 From: md5 Date: Thu, 5 May 2011 12:53:32 +0300 Subject: SWORD25: Added some FIXMEs in the save game and thumbnail code Also, translated some comments --- engines/sword25/kernel/persistenceservice.cpp | 29 ++++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'engines/sword25') diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp index 506eef3c57..1312e1f1f6 100644 --- a/engines/sword25/kernel/persistenceservice.cpp +++ b/engines/sword25/kernel/persistenceservice.cpp @@ -133,18 +133,26 @@ struct PersistenceService::Impl { } void reloadSlots() { - // Über alle Spielstanddateien iterieren und deren Infos einlesen. + // Iterate through all the saved games, and read their thumbnails. for (uint i = 0; i < SLOT_COUNT; ++i) { readSlotSavegameInformation(i); + // TODO: This function is supposed to load savegame screenshots + // into an appropriate array (or the header struct of each saved + // game). Currently, it's a stub. For each slot, we should skip + // the header plus gameDataLength bytes and read the screenshot + // data. Then, these screenshots should be used for the save list + // screen. The thumbnail code seems to be missing completely, + // though (unless I'm mistaken), so these thumbnails aren't used + // anywhere currently. } } void readSlotSavegameInformation(uint slotID) { - // Aktuelle Slotinformationen in den Ausgangszustand versetzen, er wird im Folgenden neu gefüllt. + // Get the information corresponding to the requested save slot. SavegameInformation &curSavegameInfo = _savegameInformations[slotID]; curSavegameInfo.clear(); - // Den Dateinamen für den Spielstand des Slots generieren. + // Generate the save slot file name. Common::String filename = generateSavegameFilename(slotID); // Try to open the savegame for loading @@ -163,16 +171,17 @@ struct PersistenceService::Impl { // If the header can be read in and is detected to be valid, we will have a valid file if (storedMarker == FILE_MARKER) { - // Der Slot wird als belegt markiert. + // The slot is marked as occupied. curSavegameInfo.isOccupied = true; - // Speichern, ob der Spielstand kompatibel mit der aktuellen Engine-Version ist. + // Check if the saved game is compatible with the current engine version. curSavegameInfo.isCompatible = (storedVersionID == Common::String(VERSIONID)); - // Dateinamen des Spielstandes speichern. - curSavegameInfo.filename = generateSavegameFilename(slotID); - // Die Beschreibung des Spielstandes besteht aus einer textuellen Darstellung des Änderungsdatums der Spielstanddatei. + // Store the save game name - FIXME: Why is this needed? + curSavegameInfo.filename = filename; + // Load the save game description. curSavegameInfo.description = gameDescription; - // Den Offset zu den gespeicherten Spieldaten innerhalb der Datei speichern. - // Dieses entspricht der aktuellen Position, da nach der letzten Headerinformation noch ein Leerzeichen als trenner folgt. + // The offset to the stored save game data within the file. + // This reflects the current position, as the header information + // is still followed by a space as separator. curSavegameInfo.gamedataOffset = static_cast(file->pos()); } -- cgit v1.2.3