[Scummvm-cvs-logs] SF.net SVN: scummvm:[39905] scummvm/trunk/engines/sci/engine/kgraphics.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Apr 9 10:49:42 CEST 2009


Revision: 39905
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39905&view=rev
Author:   fingolfin
Date:     2009-04-09 08:49:42 +0000 (Thu, 09 Apr 2009)

Log Message:
-----------
SCI: Clarify hack in kgraphics.cpp based on what lars wrote on scummvm-devel

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-09 03:38:41 UTC (rev 39904)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-09 08:49:42 UTC (rev 39905)
@@ -1339,9 +1339,25 @@
 	int type = GET_SEL32V(obj, type);
 	int state = GET_SEL32V(obj, state);
 
-	// FIXME: This seems to be some kind of of game specific workaround.
-	// Therefore, a proper WORKAROUND comment should be added here which
-	// explains what this does.
+	/*
+	 * WORKAROUND: The function is a "prevent the user from doing something
+	 * nasty" type of thing, and goes back to the ugly way in which savegame
+	 * deletion is implemented in SCI (and even worse in SQ4/Floppy, for
+	 * which the workaround is intended). The result is basically that you
+	 * can't implement savegame deletion for SQ4/Floppy unless you duplicate
+	 * the exact naming scheme of savefiles (i.e. savefiles must be named
+	 * SQ4SG.<number>) and the exact file format of the savegame index
+	 * (SQ4SG.DIR). From the earlier discussions on file I/O handling -
+	 * before as well as after the merge - I gather that this is not an
+	 * option. 
+	 * 
+	 * SQ4/Floppy is special, being the first game to implement savegame
+	 * deletion at all. For later games, we manage to implement deletion by
+	 * using gross hacks in kDeviceInfo() (essentially repurposing a few
+	 * subfunctions). I decided at the time that SQ4/Floppy was not worth the
+	 * effort (see above), and to simply disable the delete functionality for
+	 * that game - bringing the save/load dialog on a par with SCI0.
+	 */
 	if (type == K_CONTROL_BUTTON && text && (s->_gameName == "sq4") &&
 			s->version < SCI_VERSION(1, 001, 000) && !strcmp(text, " Delete ")) {
 		PUT_SEL32V(obj, state, (state | kControlStateDisabled) & ~kControlStateEnabled);


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