LOG(std::string("Loading texture...") + fileName);
+ // Fix filename so that is os appropreate
+ char * fixedFN = ConvertFileName(fileName);
+
unsigned char fileNamep[256];
- CopyCStringToPascal(fileName,fileNamep);
+ CopyCStringToPascal(fixedFN, fileNamep);
//Load Image
upload_image( fileNamep ,hasalpha);
//Load Image
unsigned char fileNamep[256];
- CopyCStringToPascal(fileName,fileNamep);
+ CopyCStringToPascal(ConvertFileName(fileName), fileNamep);
//Load Image
upload_image( fileNamep ,0);
//LoadTGA( fileName );
texdetail=1;
//upload_image( fileName );
//LoadTGA( fileName );
+
+ // Converting file to something os specific
+ char * fixedFN = ConvertFileName(fileName);
+
//Load Image
unsigned char fileNamep[256];
- CopyCStringToPascal(fileName,fileNamep);
+ CopyCStringToPascal(fixedFN, fileNamep);
//Load Image
upload_image( fileNamep ,0);
texdetail=temptexdetail;
OPENAL_SetPaused(channels[whooshsound], true);
OPENAL_SetPaused(channels[stream_firesound], true);
+ // Change the map filename into something that is os specific
+ char *FixedFN = ConvertFileName(name);
+
int mapvers;
FILE *tfile;
- tfile=fopen( name, "rb" );
+ tfile=fopen( FixedFN, "rb" );
if(tfile)
{
OPENAL_SetPaused(channels[stream_firesound], true);
type=notextype;
color=0;
- tfile=fopen( filename, "rb" );
+ tfile=fopen( ConvertFileName(filename), "rb" );
// read model settings
fseek(tfile, 0, SEEK_SET);
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;
numdecals=0;
color=0;
- tfile=fopen( filename, "rb" );
+ tfile=fopen( FixedFN, "rb" );
// read model settings
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#ifdef WIN32
#define UINT8 WIN32API_UINT8
#define UINT16 WIN32API_UINT16
extern "C" {
#include "zlib.h"
#include "png.h"
- #include "jpeglib.h"
+ #ifdef WIN32
+ #define INT32 INT32_jpeg
+ #include "jpeglib.h"
+ #undef INT32
+ #else
+ #include "jpeglib.h"
+ #endif
}
static bool load_image(const char * fname, TGAImageRec & tex);
#include "gamegl.h"
#include "MacCompatibility.h"
+
#ifdef WIN32
#include <shellapi.h>
#endif
}
}
+
bool LoadImage(const char * fname, TGAImageRec & tex)
{
bool res = true;
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();
if(visibleloading)pgame->LoadingScreen();
- tfile=fopen( filename, "rb" );
+ tfile=fopen( fixedFN, "rb" );
if(tfile){
funpackf(tfile, "Bi Bi", &numframes, &joints);
/*
}
}
-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(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)
{
static GLfloat M[16];
static int parentID;
LOGFUNC;
+
newload=0;
num_models=7;
drawmodelclothes.CalculateNormals(0);
}
- tfile=fopen( filename, "rb" );
+ tfile=fopen( ConvertFileName(filename), "rb" );
if(1){
funpackf(tfile, "Bi", &num_joints);
//joints.resize(num_joints);
}
fclose(tfile);
- tfile=fopen( lowfilename, "rb" );
+ tfile=fopen( ConvertFileName(lowfilename), "rb" );
if(1){
lSize=sizeof(num_joints);
fseek ( tfile, lSize, SEEK_CUR);
}
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];
float temptexdetail=texdetail;
texdetail=terraindetail;
//LoadTGA( fileName );
+
+ // Fixing filename so that it works with its own os
+ char * FixedFN = ConvertFileName(fileName);
+
unsigned char fileNamep[256];
- CopyCStringToPascal(fileName,fileNamep);
+ CopyCStringToPascal(FixedFN, fileNamep);
//Load Image
upload_image( fileNamep ,0);