trackgen: use std::string for search paths
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8500 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: adb2197efff2726f37955c21f67f0c11246b69a2 Former-commit-id: 433c61de7d21d195617cc8626d71fb639e88a96f
This commit is contained in:
parent
931b9116f2
commit
3dc3dd5972
1 changed files with 4 additions and 5 deletions
|
@ -136,12 +136,11 @@ InitObjects(tTrack *track, void *TrackHandle)
|
||||||
std::string inputPath(track->filename);
|
std::string inputPath(track->filename);
|
||||||
inputPath.resize(inputPath.find_last_of("/"));
|
inputPath.resize(inputPath.find_last_of("/"));
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s;%sdata/objects", inputPath.c_str(), GfDataDir());
|
std::string modelPath(inputPath + ";" + GfDataDir() + "data/objects");
|
||||||
std::string searchPaths(buf);
|
|
||||||
ssgModelPath(""); // using our own search
|
ssgModelPath(""); // using our own search
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s;%sdata/objects;%sdata/textures;.", inputPath.c_str(), GfDataDir(), GfDataDir());
|
std::string texturePath(modelPath + ";" + GfDataDir() + "data/textures");
|
||||||
ssgTexturePath(path);
|
ssgTexturePath(texturePath.c_str());
|
||||||
|
|
||||||
int objnb = GfParmGetEltNb(TrackHandle, TRK_SECT_OBJECTS);
|
int objnb = GfParmGetEltNb(TrackHandle, TRK_SECT_OBJECTS);
|
||||||
GfParmListSeekFirst(TrackHandle, TRK_SECT_OBJECTS);
|
GfParmListSeekFirst(TrackHandle, TRK_SECT_OBJECTS);
|
||||||
|
@ -159,7 +158,7 @@ InitObjects(tTrack *track, void *TrackHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
GetFilename(objName, searchPaths.c_str(), filename);
|
GetFilename(objName, modelPath.c_str(), filename);
|
||||||
curObj->obj = ssgLoadAC(filename);
|
curObj->obj = ssgLoadAC(filename);
|
||||||
|
|
||||||
if (!curObj->obj)
|
if (!curObj->obj)
|
||||||
|
|
Loading…
Reference in a new issue