[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src games.cpp,1.12,1.13 games.h,1.12,1.13

Chris Apers chrilith at users.sourceforge.net
Sat Nov 5 03:51:33 CET 2005


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26763

Modified Files:
	games.cpp games.h 
Log Message:
Cleanup

Index: games.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/games.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- games.cpp	5 Nov 2005 11:29:10 -0000	1.12
+++ games.cpp	5 Nov 2005 11:51:06 -0000	1.13
@@ -38,7 +38,7 @@
 static Err GamUpdateList() {
 	if (gameDB) {
 		UInt16 numRecs = DmNumRecords(gameDB);
-		
+
 		if (numRecs > 0) {
 			MemHandle tmpH;
 			UInt32 version, size;
@@ -57,7 +57,7 @@
 				GameInfoType gitCur;
 				void *tmpP;
 				FormPtr ofmP, frmP;
-				
+
 				// show dialog
 				ofmP = FrmGetActiveForm();
 				frmP = FrmInitForm(ConvertForm);
@@ -154,13 +154,13 @@
 						DmWrite(tmpP, 0, &gitCur, sizeof(GameInfoType));
 						MemPtrUnlock(tmpP);
 					}
-					
+
 				} else if (version == itemVersion_20) {
 					// need conversion from V2 -> V3.4
 					GameInfoTypeV2 git0;
 
 					for (index = 0; index < numRecs; index++) {
-						
+
 						// get old data
 						tmpH = DmQueryRecord(gameDB, index);
 						tmpP = MemHandleLock(tmpH);
@@ -175,7 +175,7 @@
 						StrCopy(gitCur.pathP, git0.pathP);
 						StrCopy(gitCur.gameP, git0.gameP);
 						gitCur.gfxMode = (git0.gfxMode == 3 ? 1 : 0); // v3.4 only 2 modes
-						
+
 						gitCur.autoLoad = git0.autoLoad;
 						gitCur.bootParam = git0.bootParam;
 						gitCur.setPlatform = git0.setPlatform;
@@ -193,11 +193,11 @@
 						gitCur.musicInfo.volume.sfx = 192;
 						gitCur.musicInfo.volume.speech = 192;
 						gitCur.musicInfo.volume.audiocd = 50;
-						
+
 						gitCur.musicInfo.sound.tempo = 100;
 						gitCur.musicInfo.sound.defaultTrackLength = 10;
 						gitCur.musicInfo.sound.firstTrack = 1;
-						
+
 						// to V3.4
 								if (gitCur.platform == 2) gitCur.platform = 6;
 						else	if (gitCur.platform == 5) gitCur.platform = 8;
@@ -216,12 +216,12 @@
 						else	if (gitCur.language == 11) gitCur.language = 12;
 						else	if (gitCur.language == 12) gitCur.language = 2;
 						else	if (gitCur.language == 13) gitCur.language = 3;
-						
+
 								if (gitCur.musicInfo.sound.drvMusic == 1) gitCur.musicInfo.sound.drvMusic = 4;
 						else	if (gitCur.musicInfo.sound.drvMusic == 2) gitCur.musicInfo.sound.drvMusic = 5;
 						else	if (gitCur.musicInfo.sound.drvMusic == 4) gitCur.musicInfo.sound.drvMusic = 2;
 						else	if (gitCur.musicInfo.sound.drvMusic == 5) gitCur.musicInfo.sound.drvMusic = 1;
-		
+
 						gitCur.engine = ENGINE_SCUMM;
 
 						tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType));	// TODO : check error on resize tmpH==NULL
@@ -234,7 +234,7 @@
 					GameInfoTypeV0 git0;
 
 					for (index = 0; index < numRecs; index++) {
-						
+
 						// get old data
 						tmpH = DmQueryRecord(gameDB, index);
 						tmpP = MemHandleLock(tmpH);
@@ -249,7 +249,7 @@
 						StrCopy(gitCur.pathP, git0.pathP);
 						StrCopy(gitCur.gameP, git0.gameP);
 						gitCur.gfxMode = (git0.gfxMode == 3 ? 1 : 0); // v3.4 only 2 modes
-						
+
 						gitCur.autoLoad = git0.autoLoad;
 						gitCur.bootParam = git0.bootParam;
 						gitCur.setPlatform = git0.amiga;	// amiga become platform amiga/atari-st/machintosh
@@ -267,11 +267,11 @@
 						gitCur.musicInfo.volume.sfx = 192;
 						gitCur.musicInfo.volume.speech = 192;
 						gitCur.musicInfo.volume.audiocd = 50;
-						
+
 						gitCur.musicInfo.sound.tempo = 100;
 						gitCur.musicInfo.sound.defaultTrackLength = 10;
 						gitCur.musicInfo.sound.firstTrack = 1;
-						
+
 						gitCur.engine = ENGINE_SCUMM;
 
 						tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType));	// TODO : check error on resize tmpH==NULL
@@ -288,7 +288,7 @@
 			}	
 		}
 	}
-	
+
 	return errNone;
 }
 
@@ -301,7 +301,7 @@
 		err = DmCreateDatabase(0, "ScummVM-Data", appFileCreator, 'DATA', false);
 		if (!err) {
 			gameDB = DmOpenDatabaseByTypeCreator( 'DATA', appFileCreator, dmModeReadWrite);
-			
+
 			if (!gameDB)
 				err = DmGetLastErr();
 		}
@@ -319,7 +319,7 @@
 	if (gPrefs->card.volRefNum != sysInvalidRefNum && gPrefs->card.moveDB) {
 		FileRef file;
 		Err e;
-		
+
 		e = VFSFileOpen(gPrefs->card.volRefNum, "/Palm/Programs/ScummVM/listdata.pdb", vfsModeRead, &file);
 		if (!e) {
 			UInt16 oCardNo, nCardNo;
@@ -332,7 +332,7 @@
 					gPrefs->card.moveDB = false;
 					return;
 				}
- 			
+
  			// get current db info and rename it
  			DmOpenDatabaseInfo(gameDB, &oDbID, 0, 0, &oCardNo, 0);
 			GamCloseDatabase(true);
@@ -351,7 +351,7 @@
 	if (gameDB) {
 		LocalID dbID;
 		UInt16 cardNo;
-		
+
 		DmOpenDatabaseInfo(gameDB, &dbID, 0, 0, &cardNo, 0);
 		DmCloseDatabase(gameDB);
 
@@ -387,13 +387,13 @@
 	UInt16 index;
 
 	index = GamGetSelected();
-	
+
 	if (index != dmMaxRecordIndex) {
 		Boolean newValue;
-		
+
 		recordH = DmGetRecord(gameDB, index);
 		game = (GameInfoType *)MemHandleLock(recordH);
-		
+
 		newValue = false;
 		DmWrite(game, OffsetOf(GameInfoType,selected), &newValue, sizeof(Boolean));
 
@@ -407,7 +407,7 @@
 	GameInfoType *game;
 	Boolean selected;
 	UInt16 index = DmNumRecords(gameDB)-1;
-	
+
 	while (index != (UInt16)-1) {
 		record = DmQueryRecord(gameDB, index);
 		game = (GameInfoType *)MemHandleLock(record);
@@ -434,7 +434,7 @@
 	while (index < maxIndex) {
 		record = DmGetRecord(gameDB, index);
 		game = (GameInfoType *)MemHandleLock(record);
-		
+
 		if (tolower(game->nameP[0]) == tolower(letter)) {
 			found = true;
 
@@ -458,7 +458,7 @@
 		DmReleaseRecord (gameDB, index, 0);
 
 		index++;
-		
+
 		if (found)
 			return found;
 	}

Index: games.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/games.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- games.h	5 Nov 2005 11:29:11 -0000	1.12
+++ games.h	5 Nov 2005 11:51:06 -0000	1.13
@@ -91,7 +91,7 @@
 		UInt16 speech;
 		UInt16 audiocd;
 	} volume;
-	
+
 	struct {
 		// midi
 		Boolean multiMidi;
@@ -130,11 +130,11 @@
 	UInt16 talkValue;
 	UInt8 platform;
 	UInt8 language;			// |- 	v2.5
-	
+
 	Boolean filter;			// 		v2.6
 	Boolean fullscreen;		// |
 	Boolean aspectRatio;	// |-	v2.7
-	
+
 	MusicInfoType musicInfo;// 		v3.0
 
 	UInt8 engine;			// |-	v3.1





More information about the Scummvm-git-logs mailing list