mirror of
https://github.com/DarkPlacesEngine/dpmodel.git
synced 2025-02-23 11:30:52 +00:00
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:
parent
96d66f5f0f
commit
386b72165c
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue