trackgen: don't output separate object files when outputting acc

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9458 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6a327f2dd5af7feb0adaa4121ec843f1c016a326
Former-commit-id: 254fbb42bcbd027c50190a5dad40db9f8fe7f4c4
This commit is contained in:
iobyte 2024-06-26 23:43:20 +00:00
parent a22c00e42a
commit 61eda576e1
3 changed files with 10 additions and 6 deletions

View file

@ -104,7 +104,7 @@ public:
//! Constructor.
Application::Application()
: GfApplication("TrackGen", "1.7.0.0", "Terrain generator for tracks")
: GfApplication("TrackGen", "1.7.0.1", "Terrain generator for tracks")
, HeightSteps(30)
, Bump(false)
, Raceline(false)
@ -484,7 +484,7 @@ int Application::generate()
if (useObjectMaterials == "yes")
MultipleMaterials = true;
GenerateObjects(Track, TrackHandle, CfgHandle, allAc3d, all, OutMeshName, OutTrackName, OutputFileName, MultipleMaterials);
GenerateObjects(Track, TrackHandle, CfgHandle, allAc3d, all, OutMeshName, OutTrackName, OutputFileName, MultipleMaterials, Acc);
if (!Acc)
allAc3d.writeFile(OutputFileName + ".ac", false);

View file

@ -426,7 +426,7 @@ Group(tTrack *track, void *TrackHandle, Ac3d::Object *Root, Ac3d::Object *GroupR
} // end anonymous namespace
void
GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d, bool all, const std::string &terrainFile, const std::string &trackFile, const std::string &outputFile, bool multipleMaterials)
GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d, bool all, const std::string &terrainFile, const std::string &trackFile, const std::string &outputFile, bool multipleMaterials, bool acc)
{
std::string inputPath(track->filename);
inputPath.resize(inputPath.find_last_of('/'));
@ -526,7 +526,9 @@ GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d
const std::string objectFile(outputFile + "-" + extName + "-" + std::to_string(index) + ".ac");
saveACInner(&GroupRoot.root.kids.front(), GroupRoot);
GroupRoot.flipAxes(false); // convert to track coordinate system
GroupRoot.writeFile(objectFile, false);
if (!acc)
GroupRoot.writeFile(objectFile, false);
if (all)
{
@ -565,7 +567,9 @@ GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d
const std::string objectFile(outputFile + "-" + extName + "-" + std::to_string(index) + ".ac");
saveACInner(&GroupRoot.root.kids.front(), GroupRoot);
GroupRoot.flipAxes(false); // convert to track coordinate system
GroupRoot.writeFile(objectFile, false);
if (!acc)
GroupRoot.writeFile(objectFile, false);
if (all)
{

View file

@ -26,7 +26,7 @@
#ifndef _OBJECTS_H_
#define _OBJECTS_H_
extern void GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d, bool all, const std::string &terrainFile, const std::string &trackFile, const std::string &outputFile, bool multipleMaterials);
extern void GenerateObjects(tTrack *track, void *TrackHandle, void *CfgHandle, Ac3d &allAc3d, bool all, const std::string &terrainFile, const std::string &trackFile, const std::string &outputFile, bool multipleMaterials, bool acc);
#endif /* _OBJECTS_H_ */