added #ifdef WIN32 to use stricmp instead of strcasecmp on WIN32 in shader name comparison, and a couple little things

git-svn-id: svn://svn.icculus.org/twilight/trunk/dpmodel@5112 d7cf8633-e32d-0410-b094-e92efae38249
This commit is contained in:
havoc 2005-03-21 07:18:57 +00:00
parent 96d66f5f0f
commit 386b72165c

View file

@ -175,6 +175,7 @@ void *readfile(char *filename, int *filesize)
fclose(file);
if (filesize) // can be passed NULL...
*filesize = size;
printf( "READ: %s of size %i\n", filename, size );
return mem;
}
@ -650,7 +651,11 @@ int parsetriangles(void)
{
found = 0;
for (i = 0;i < numshaders;i++) {
#ifdef WIN32
if (!stricmp(shaders[i], line)) {
#else
if (!strcasecmp(shaders[i], line)) {
#endif
found = 1;
break;
}
@ -691,6 +696,7 @@ int parsetriangles(void)
vnormal[0] *= d;
vnormal[1] *= d;
vnormal[2] *= d;
// round off minor errors in the normal
if (fabs(vnormal[0]) < 0.001)
vnormal[0] = 0;