X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkeleton.cpp;h=9bdd4cea0dcf6ac3bbbb0643395c0d4a272d83a1;hb=decb00e82a2e65e25dbcdd8f16fff5a6a07d31d6;hp=cd4e79192c67e2dcd08525d81150bc09aaf1ef38;hpb=612415ff494c29cf2fc7ea560da9908eaff7d847;p=lugaru.git diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index cd4e791..9bdd4ce 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -1017,7 +1017,10 @@ void Animation::Load(char *filename, int aheight, int aattack) LOGFUNC; - LOG(std::string("Loading animation...") + filename); + // Changing the filename into something the OS can understand + char *fixedFN = ConvertFileName(filename); + + LOG(std::string("Loading animation...") + fixedFN); deallocate(); @@ -1026,7 +1029,7 @@ void Animation::Load(char *filename, int aheight, int aattack) if(visibleloading)pgame->LoadingScreen(); - tfile=fopen( filename, "rb" ); + tfile=fopen( fixedFN, "rb" ); if(tfile){ funpackf(tfile, "Bi Bi", &numframes, &joints); /* @@ -1133,7 +1136,12 @@ void Animation::Move(XYZ how) } } -void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char *modelfilename, char *model2filename, char *model3filename, char *model4filename, char *model5filename, char *model6filename, char *model7filename, char *modellowfilename, char *modelclothesfilename, bool aclothes) +void Skeleton::Load(const char *filename, const char *lowfilename, const char *clothesfilename, + const char *modelfilename, const char *model2filename, + const char *model3filename, const char *model4filename, + const char *model5filename, const char *model6filename, + const char *model7filename, const char *modellowfilename, + const char *modelclothesfilename, bool aclothes) { static GLfloat M[16]; static int parentID; @@ -1145,6 +1153,7 @@ void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char LOGFUNC; + newload=0; num_models=7; @@ -1198,7 +1207,7 @@ void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char drawmodelclothes.CalculateNormals(0); } - tfile=fopen( filename, "rb" ); + tfile=fopen( ConvertFileName(filename), "rb" ); if(1){ funpackf(tfile, "Bi", &num_joints); //joints.resize(num_joints); @@ -1285,7 +1294,7 @@ void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char } fclose(tfile); - tfile=fopen( lowfilename, "rb" ); + tfile=fopen( ConvertFileName(lowfilename), "rb" ); if(1){ lSize=sizeof(num_joints); fseek ( tfile, lSize, SEEK_CUR); @@ -1391,7 +1400,7 @@ void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char } if(clothes){ - tfile=fopen( clothesfilename, "rb" ); + tfile=fopen( ConvertFileName(clothesfilename), "rb" ); lSize=sizeof(num_joints); fseek ( tfile, lSize, SEEK_CUR); //joints = new Joint[num_joints];