[Scummvm-cvs-logs] CVS: scummvm Makefile,1.50,1.51 Makefile.common,1.8,1.9 resource.cpp,1.96,1.97

James Brown ender at users.sourceforge.net
Tue Jul 9 07:32:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv29071

Modified Files:
	Makefile Makefile.common resource.cpp 
Log Message:
Dumb up filename case insensitivity



Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- Makefile	17 Jun 2002 13:16:50 -0000	1.50
+++ Makefile	9 Jul 2002 14:30:59 -0000	1.51
@@ -8,8 +8,8 @@
 LIBS	 = -lncurses
 
 # Uncomment this to activate the MAD lib for compressed sound files
-DEFINES += -DCOMPRESSED_SOUND_FILE
-LIBS    += -lmad
+#DEFINES += -DCOMPRESSED_SOUND_FILE
+#LIBS    += -lmad
 
 # Uncomment this to activate the ALSA lib for midi
 # DEFINES += -DUSE_ALSA

Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile.common,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.common	6 Jul 2002 13:05:42 -0000	1.8
+++ Makefile.common	9 Jul 2002 14:31:00 -0000	1.9
@@ -32,20 +32,19 @@
 .PHONY: all clean dist
 
 # Default (dumb) compile & dependcy rules
-.cpp.o:
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-$(OBJS): $(INCS)
+#.cpp.o:
+#	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+#$(OBJS): $(INCS)
 
 
 # If you use GCC, disable the above and enable this for intelligent
 # dependency tracking. 
-#DEPDIR := .deps
-#.cpp.o:
-#	mkdir -p $(DEPDIR)
-#	$(CC) -Wp,-MMD,"$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-#	echo -n "$(*D)/" > $(DEPDIR)/$(*F).d
-#	cat "$(DEPDIR)/$(*F).d2" >> "$(DEPDIR)/$(*F).d"
-#	rm -f "$(DEPDIR)/$(*F).d2"
-#
-#-include $(DEPDIR)/*.d
+DEPDIR := .deps
+.cpp.o:
+	mkdir -p $(DEPDIR)
+	$(CC) -Wp,-MMD,"$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+	echo -n "$(*D)/" > $(DEPDIR)/$(*F).d
+	cat "$(DEPDIR)/$(*F).d2" >> "$(DEPDIR)/$(*F).d"
+	rm -f "$(DEPDIR)/$(*F).d2"
 
+-include $(DEPDIR)/*.d

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- resource.cpp	7 Jul 2002 20:32:26 -0000	1.96
+++ resource.cpp	9 Jul 2002 14:31:00 -0000	1.97
@@ -22,6 +22,7 @@
 
 #include "stdafx.h"
 #include "scumm.h"
+#include <stdio.h>
 
 /* Open a room */
 void Scumm::openRoom(int room)
@@ -174,7 +175,7 @@
 
 	debug(9, "openResourceFile(%s)", filename);
 	strcpy(buf, filename);
-
+        printf("asked to open %s\n", filename);
 	if (_fileHandle != NULL) {
 		fileClose(_fileHandle);
 		_fileHandle = NULL;
@@ -182,9 +183,19 @@
 
 	_fileHandle = fileOpen(buf, 1);
 	if (!_fileHandle) {
-		char *e = buf;
+                char *e=strrchr(buf, '/');
+		if (!e) e=buf; 
 		do
 			*e = tolower(*e);
+		while (*e++);
+		_fileHandle = fileOpen(buf, 1);
+	}
+
+	if (!_fileHandle) {
+                char *e=strrchr(buf, '/');
+		if (!e) e=buf;
+		do
+			*e = toupper(*e);
 		while (*e++);
 		_fileHandle = fileOpen(buf, 1);
 	}





More information about the Scummvm-git-logs mailing list