[Scummvm-cvs-logs] scummvm master -> 68118bdf7a02b95d83d673db4897ab2dd758b0d1

bluegr md5 at scummvm.org
Thu May 5 11:56:37 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9abc42019a SWORD25: Remove unused code
68118bdf7a SWORD25: Added some FIXMEs in the save game and thumbnail code


Commit: 9abc42019acc58a6028b3ed902317eedd0eee826
    https://github.com/scummvm/scummvm/commit/9abc42019acc58a6028b3ed902317eedd0eee826
Author: md5 (md5 at scummvm.org)
Date: 2011-05-05T02:54:31-07:00

Commit Message:
SWORD25: Remove unused code

Changed paths:
    engines/sword25/gfx/graphicengine.cpp
    engines/sword25/gfx/graphicengine.h



diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 8bdf2a4..2772401 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -239,10 +239,6 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
 	return true;
 }
 
-Graphics::Surface *GraphicEngine::getScreenshot() {
-	return &_frameBuffer;
-}
-
 // -----------------------------------------------------------------------------
 // RESOURCE MANAGING
 // -----------------------------------------------------------------------------
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index 38eecaa..ebd8159 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -146,17 +146,6 @@ public:
 	 */
 	bool saveThumbnailScreenshot(const Common::String &filename);
 
-	/**
-	 * Reads the current contents of the frame buffer
-	 * Notes: This method is for creating screenshots. It is not very optimised. It should only be called
-	 * after a call to EndFrame(), and before the next call to StartFrame().
-	 * @param Width     Returns the width of the frame buffer
-	 * @param Height    Returns the height of the frame buffer
-	 * @param Data      Returns the raw data of the frame buffer as an array of 32-bit color values.
-	*/
-	Graphics::Surface *getScreenshot();
-
-
 	RenderObjectPtr<Panel> getMainPanel();
 
 	/**


Commit: 68118bdf7a02b95d83d673db4897ab2dd758b0d1
    https://github.com/scummvm/scummvm/commit/68118bdf7a02b95d83d673db4897ab2dd758b0d1
Author: md5 (md5 at scummvm.org)
Date: 2011-05-05T02:54:32-07:00

Commit Message:
SWORD25: Added some FIXMEs in the save game and thumbnail code

Also, translated some comments

Changed paths:
    engines/sword25/kernel/persistenceservice.cpp



diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index 506eef3..1312e1f 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<uint>(file->pos());
 			}
 






More information about the Scummvm-git-logs mailing list