]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Models.cpp
Made filepaths use ConvertFileName(), so it works on Windows compiled with MinGW
[lugaru.git] / Source / Models.cpp
index 1eae46867c265e011890d9eef60c136ce571f0fc..5339b9b1f5e0afe86ba87aae9bb63a94bf7252b0 100644 (file)
@@ -436,7 +436,7 @@ bool Model::loadnotex(char *filename )
        type=notextype;
        color=0;
 
-       tfile=fopen( filename, "rb" );
+       tfile=fopen( ConvertFileName(filename), "rb" );
        // read model settings
 
        fseek(tfile, 0, SEEK_SET);
@@ -594,7 +594,10 @@ bool Model::loaddecal(char *filename,bool texture )
 
        LOGFUNC;
 
-       LOG(std::string("Loading decal...") + filename);
+       // Changing the filename so that its more os specific
+       char * FixedFN = ConvertFileName(filename);
+
+       LOG(std::string("Loading decal...") + FixedFN);
 
        int oldvertexNum,oldTriangleNum;
        oldvertexNum=vertexNum;
@@ -604,7 +607,7 @@ bool Model::loaddecal(char *filename,bool texture )
        numdecals=0;
        color=0;
 
-       tfile=fopen( filename, "rb" );
+       tfile=fopen( FixedFN, "rb" );
        // read model settings