[Scummvm-cvs-logs] CVS: scummvm/queen credits.cpp,1.5,1.6 graphics.cpp,1.90,1.91 resource.cpp,1.41,1.42 talk.cpp,1.86,1.87

Gregory Montoir cyx at users.sourceforge.net
Thu Jan 29 10:49:29 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3875/queen

Modified Files:
	credits.cpp graphics.cpp resource.cpp talk.cpp 
Log Message:
change sscanf() calls to atoi() to please PalmOS :)

Index: credits.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/credits.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- credits.cpp	19 Jan 2004 22:31:21 -0000	1.5
+++ credits.cpp	23 Jan 2004 16:57:22 -0000	1.6
@@ -93,7 +93,7 @@
 					break;
 
 				case 'p' :
-					sscanf(&line[3], "%d\n", &_pause);
+					_pause = atoi(&line[3]);
 					_pause *= 10;
 
 					/* wait until next room */
@@ -111,7 +111,7 @@
 					return;
 					
 				case 'i' :
-					sscanf(&line[3], "%d\n", &_color);
+					_color = atoi(&line[3]);
 					break;
 
 				case '1' :

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- graphics.cpp	23 Jan 2004 10:34:55 -0000	1.90
+++ graphics.cpp	23 Jan 2004 16:57:45 -0000	1.91
@@ -586,10 +586,13 @@
 
 void Graphics::fillAnimBuffer(const char *anim, AnimFrame *af) {
 	for (;;) {
-		sscanf(anim, "%3hu,%3hu", &af->frame, &af->speed);
+		// anim frame format is "%3hu,%3hu," (frame number, frame speed)
+		af->frame = atoi(anim);
+		anim += 4;
+		af->speed = atoi(anim);
+		anim += 4;
 		if (af->frame == 0)
 			break;
-		anim += 8;
 		++af;
 	}
 }

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- resource.cpp	19 Jan 2004 22:31:21 -0000	1.41
+++ resource.cpp	23 Jan 2004 16:57:52 -0000	1.42
@@ -80,7 +80,7 @@
 	
 
 	//Use simple binary search to locate file
-	for(;;) {
+	for (;;) {
 		uint32 cur = (low + high) / 2;
 		int32 diff = strcmp(entryName, _resourceTable[cur].filename);
 

Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- talk.cpp	22 Jan 2004 22:28:57 -0000	1.86
+++ talk.cpp	23 Jan 2004 16:58:13 -0000	1.87
@@ -725,7 +725,7 @@
 		for (;;) {
 			uint16 frame;
 
-			sscanf(parameters->animation + offset, "%3hu", &frame);
+			frame = atoi(parameters->animation + offset);
 			if (!frame)
 				break;
 
@@ -772,7 +772,7 @@
 	for (;;) {
 		uint16 frame;
 
-		sscanf(parameters->animation + offset, "%3hu", &frame);
+		frame = atoi(parameters->animation + offset);
 		if (!frame)
 			break;
 





More information about the Scummvm-git-logs mailing list