[Scummvm-cvs-logs] SF.net SVN: scummvm: [24333] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sun Oct 15 07:59:31 CEST 2006


Revision: 24333
          http://svn.sourceforge.net/scummvm/?rev=24333&view=rev
Author:   kirben
Date:     2006-10-14 22:59:22 -0700 (Sat, 14 Oct 2006)

Log Message:
-----------
Minor cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/game.cpp
    scummvm/trunk/engines/agos/intern.h
    scummvm/trunk/engines/agos/midi.cpp
    scummvm/trunk/engines/agos/res.cpp
    scummvm/trunk/engines/agos/saveload.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/agos.cpp	2006-10-15 05:59:22 UTC (rev 24333)
@@ -2403,7 +2403,7 @@
 			if (f.isOpen() == false)
 				error("loadMusic: Can't load music from '%s'", filename);
 
-			if (getGameId() == GID_SIMON1DEMO)
+			if (getFeatures() & GF_DEMO)
 				midi.loadS1D (&f);
 			else
 				midi.loadSMF (&f, music);

Modified: scummvm/trunk/engines/agos/game.cpp
===================================================================
--- scummvm/trunk/engines/agos/game.cpp	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/game.cpp	2006-10-15 05:59:22 UTC (rev 24333)
@@ -722,8 +722,8 @@
 		},
 
 		GType_ELVIRA1,
-		GID_ELVIRA1DEMO,
-		GF_OLD_BUNDLE | GF_CRUNCHED,
+		GID_ELVIRA1,
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_DEMO,
 	},
 
 	// Elvira - English Atari ST Floppy
@@ -930,8 +930,8 @@
 		},
 
 		GType_SIMON1,
-		GID_SIMON1AMIGADEMO,
-		GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE,
+		GID_SIMON1AMIGA,
+		GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE | GF_DEMO,
 	},
 
 	// Simon the Sorcerer 1 - English Amiga AGA Floppy
@@ -1026,8 +1026,8 @@
 		},
 
 		GType_SIMON1,
-		GID_SIMON1DEMO,
-		GF_OLD_BUNDLE,
+		GID_SIMON1DOS,
+		GF_OLD_BUNDLE | GF_DEMO,
 	},
 
 	// Simon the Sorcerer 1 - English DOS Floppy

Modified: scummvm/trunk/engines/agos/intern.h
===================================================================
--- scummvm/trunk/engines/agos/intern.h	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/intern.h	2006-10-15 05:59:22 UTC (rev 24333)
@@ -209,7 +209,8 @@
 	GF_OLD_BUNDLE = 1 << 1,
 	GF_CRUNCHED   = 1 << 2,
 	GF_ZLIBCOMP   = 1 << 3,
-	GF_32COLOR    = 1 << 4
+	GF_32COLOR    = 1 << 4,
+	GF_DEMO       = 1 << 5
 };
 
 enum GameFileTypes {
@@ -227,14 +228,11 @@
 
 enum GameIds {
 	GID_ELVIRA1,
-	GID_ELVIRA1DEMO,
 	GID_ELVIRA2,
 	GID_WAXWORKS,
 
 	GID_SIMON1DOS,
-	GID_SIMON1DEMO,
 	GID_SIMON1AMIGA,
-	GID_SIMON1AMIGADEMO,
 	GID_SIMON1CD32,
 	GID_SIMON1TALKIE,
 

Modified: scummvm/trunk/engines/agos/midi.cpp
===================================================================
--- scummvm/trunk/engines/agos/midi.cpp	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/midi.cpp	2006-10-15 05:59:22 UTC (rev 24333)
@@ -552,7 +552,7 @@
 
 	uint16 size = in->readUint16LE();
 	if (size != in->size() - 2) {
-		error("Size mismatch in simon1demo MUS file (%ld versus reported %d)", (long)in->size() - 2, (int)size);
+		error("Size mismatch in MUS file (%ld versus reported %d)", (long)in->size() - 2, (int)size);
 	}
 
 	p->data = (byte *)calloc(size, 1);

Modified: scummvm/trunk/engines/agos/res.cpp
===================================================================
--- scummvm/trunk/engines/agos/res.cpp	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/res.cpp	2006-10-15 05:59:22 UTC (rev 24333)
@@ -660,23 +660,21 @@
 		if (getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformAtariST) {
 			if (getFeatures() & GF_TALKIE) {
 				sprintf(filename, "%.3d%d.out", id, type);
+			} else if (getGameType() == GType_ELVIRA1 && getFeatures() & GF_DEMO) {
+				if (id == 20)
+					sprintf(filename, "D%d.out", type);
+				else if (id == 26)
+					sprintf(filename, "J%d.out", type);
+				else if (id == 27)
+					sprintf(filename, "K%d.out", type);
+				else if (id == 33)
+					sprintf(filename, "Q%d.out", type);
+				else if (id == 34)
+					sprintf(filename, "R%d.out", type);
+				else
+					sprintf(filename, "%.1d%d.out", id, type);
 			} else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
-				if (getGameId() == GID_ELVIRA1DEMO) {
-					if (id == 20)
-						sprintf(filename, "D%d.out", type);
-					else if (id == 26)
-						sprintf(filename, "J%d.out", type);
-					else if (id == 27)
-						sprintf(filename, "K%d.out", type);
-					else if (id == 33)
-						sprintf(filename, "Q%d.out", type);
-					else if (id == 34)
-						sprintf(filename, "R%d.out", type);
-					else
-						sprintf(filename, "%.1d%d.out", id, type);
-				} else {
-					sprintf(filename, "%.2d%d.pkd", id, type);
-				}
+				sprintf(filename, "%.2d%d.pkd", id, type);
 			} else {
 				sprintf(filename, "%.3d%d.pkd", id, type);
 			}

Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp	2006-10-15 04:15:48 UTC (rev 24332)
+++ scummvm/trunk/engines/agos/saveload.cpp	2006-10-15 05:59:22 UTC (rev 24333)
@@ -133,10 +133,11 @@
 }
 
 void AGOSEngine::quickLoadOrSave() {
-	// The demo of Simon 1 (DOS Floppy) is missing too many segments
-	// and the Feeble Files doesn't always allow a load or save
-	if (getGameId() == GID_SIMON1DEMO || getGameType() == GType_FF)
+	// Quick load & save is only supported complete version of Simon the Sorcerer 1/2
+	if (getGameType() != GType_SIMON1 && getGameType() != GType_SIMON2 &&
+		!(getFeatures() & GF_DEMO)) {
 		return;
+	}
 
 	bool success;
 	char buf[50];


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