trackgen: show segment material in dump file
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8463 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: d226e937ba03b5162ab8c611cdc4435682db27c9 Former-commit-id: aaeb6cbb919ab033da17c28b7a79e05d33702874
This commit is contained in:
parent
f4ed59e038
commit
d68341f5cb
4 changed files with 9 additions and 8 deletions
|
@ -43,15 +43,11 @@ Ac3dOpen(const std::string &filename, int nbObjects)
|
|||
{
|
||||
FILE *save_fd = fopen(filename.c_str(), "w");
|
||||
|
||||
if (save_fd == nullptr) {
|
||||
if (save_fd == NULL) {
|
||||
GfOut("Failed to open '%s' for writing (%s)", filename.c_str(), strerror(errno));
|
||||
return nullptr;
|
||||
}
|
||||
/*
|
||||
/Users/joe/source/sd-head/src/tools/trackgen/ac3d.cpp:46:82: error: use of
|
||||
undeclared identifier 'errno'
|
||||
...to open '%s' for writing (%s)", filename.c_str(), strerror(errno));
|
||||
*/
|
||||
|
||||
fprintf(save_fd, "AC3Db\n");
|
||||
fprintf(save_fd, "MATERIAL \"\" rgb 0.4 0.4 0.4 amb 0.8 0.8 0.8 emis 0.4 0.4 0.4 spec 0.5 0.5 0.5 shi 50 trans 0\n");
|
||||
|
||||
|
|
|
@ -2427,7 +2427,7 @@ void GenerateTerrain(tTrack *track, void *TrackHandle, const std::string &outfil
|
|||
bool useBorder)
|
||||
{
|
||||
const char *mat;
|
||||
FILE *curFd = nullptr;
|
||||
FILE *curFd = NULL;
|
||||
|
||||
TrackStep = GfParmGetNum(TrackHandle, TRK_SECT_TERRAIN, TRK_ATT_TSTEP, nullptr, 10.0);
|
||||
GfOut("Track step: %.2f\n", TrackStep);
|
||||
|
|
|
@ -322,7 +322,7 @@ int Application::generate()
|
|||
std::string OutputFileName(buf2);
|
||||
|
||||
// Number of groups for the complete track.
|
||||
FILE *outfd = nullptr;
|
||||
FILE *outfd = NULL;
|
||||
if (TrackOnly) {
|
||||
// Track.
|
||||
if (!Bump && !Raceline)
|
||||
|
|
|
@ -513,6 +513,11 @@ void dumpSeg(std::ofstream &ofs,const tTrackSeg *seg, const std::string & indent
|
|||
ofs << seg->ext->marks[i] << " ";
|
||||
ofs << std::endl;
|
||||
}
|
||||
if (seg->surface)
|
||||
{
|
||||
ofs << indent << "surface" << std::endl;
|
||||
ofs << indent << " material " << (seg->surface->material ? seg->surface->material : "none") << std::endl;
|
||||
}
|
||||
// if (seg->next)
|
||||
// ofs << indent << "next " << std::hex << seg->next << std::dec << std::endl;
|
||||
// if (seg->prev)
|
||||
|
|
Loading…
Reference in a new issue