Display correct track name on loading.
Fixes #151. git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2753 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 403ded2fb6f0cd2426c5de9e24513716694d602b Former-commit-id: a367a5f9e3021841ff37700e14b1aa628b307d0b
This commit is contained in:
parent
025dea93c4
commit
4bbdb57275
1 changed files with 39 additions and 42 deletions
|
@ -949,61 +949,58 @@ reDumpTrack(const tTrack *track, int verbose)
|
||||||
int
|
int
|
||||||
ReInitTrack(void)
|
ReInitTrack(void)
|
||||||
{
|
{
|
||||||
const char *trackName;
|
const char *trackName;
|
||||||
const char *catName;
|
const char *catName;
|
||||||
const char *raceName;
|
const char *raceName;
|
||||||
|
|
||||||
int curTrkIdx;
|
//int rain;
|
||||||
int cloud;
|
|
||||||
int Timeday;
|
|
||||||
//int rain;
|
|
||||||
|
|
||||||
void *params = ReInfo->params;
|
void *params = ReInfo->params;
|
||||||
void *results = ReInfo->results;
|
void *results = ReInfo->results;
|
||||||
|
|
||||||
raceName = ReInfo->_reRaceName = ReGetCurrentRaceName();
|
raceName = ReInfo->_reRaceName = ReGetCurrentRaceName();
|
||||||
|
|
||||||
curTrkIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_TRACK, NULL, 1);
|
int curTrkIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_TRACK, NULL, 1);
|
||||||
sprintf(buf, "%s/%d", RM_SECT_TRACKS, curTrkIdx);
|
sprintf(buf, "%s/%d", RM_SECT_TRACKS, curTrkIdx);
|
||||||
trackName = GfParmGetStr(params, buf, RM_ATTR_NAME, 0);
|
trackName = GfParmGetStr(params, buf, RM_ATTR_NAME, 0);
|
||||||
if (!trackName)
|
if (!trackName)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
catName = GfParmGetStr(params, buf, RM_ATTR_CATEGORY, 0);
|
catName = GfParmGetStr(params, buf, RM_ATTR_CATEGORY, 0);
|
||||||
if (!catName)
|
if (!catName)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
sprintf(buf, "Loading track %s ...", trackName);
|
GfLogDebug("Race Name is '%s'\n", raceName);
|
||||||
RmLoadingScreenSetText(buf);
|
sprintf(buf, "tracks/%s/%s/%s.%s", catName, trackName, trackName, TRKEXT);
|
||||||
|
ReInfo->track = ReInfo->_reTrackItf.trkBuild(buf);
|
||||||
|
|
||||||
Timeday = GfParmGetNum(params, raceName, RM_ATTR_TIME, NULL, 0);
|
sprintf(buf, "Loading track %s", ReInfo->track->name);
|
||||||
cloud = GfParmGetNum(params, raceName, RM_ATTR_WEATHER, NULL, 0);
|
RmLoadingScreenSetText(buf);
|
||||||
|
|
||||||
GfLogDebug("Race Name is '%s'\n", raceName);
|
int Timeday = GfParmGetNum(params, raceName, RM_ATTR_TIME, NULL, 0);
|
||||||
sprintf(buf, "tracks/%s/%s/%s.%s", catName, trackName, trackName, TRKEXT);
|
int cloud = GfParmGetNum(params, raceName, RM_ATTR_WEATHER, NULL, 0);
|
||||||
ReInfo->track = ReInfo->_reTrackItf.trkBuild(buf);
|
|
||||||
|
|
||||||
ReInfo->track->weather = cloud;
|
ReInfo->track->Timeday = Timeday;
|
||||||
ReInfo->track->Timeday = Timeday;
|
ReInfo->track->weather = cloud;
|
||||||
|
|
||||||
reDumpTrack(ReInfo->track, 0.0);
|
|
||||||
|
|
||||||
ReStartWeather();
|
reDumpTrack(ReInfo->track, 0.0);
|
||||||
|
|
||||||
|
ReStartWeather();
|
||||||
|
|
||||||
|
//DEBUG WEATHER - Verification function update friction
|
||||||
|
#ifdef DEBUG
|
||||||
|
tTrack *track = ReInfo->track;
|
||||||
|
tTrackSurface *curSurf;
|
||||||
|
curSurf = track->surfaces;
|
||||||
|
do {
|
||||||
|
GfLogDebug("ReInitTrack: Friction = %f - RollRes = %f\n", curSurf->kFriction, curSurf->kRollRes);
|
||||||
|
curSurf = curSurf->next;
|
||||||
|
} while ( curSurf != 0);
|
||||||
|
#endif
|
||||||
|
// End Function DEBUG TRACE Variable kFriction
|
||||||
|
return 0;
|
||||||
|
}//ReInitTrack
|
||||||
|
|
||||||
//DEBUG WEATHER - Verification function update friction
|
|
||||||
#ifdef DEBUG
|
|
||||||
tTrack *track = ReInfo->track;
|
|
||||||
tTrackSurface *curSurf;
|
|
||||||
curSurf = track->surfaces;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
GfLogDebug("ReInitTrack: Friction = %f - RollRes = %f\n", curSurf->kFriction, curSurf->kRollRes);
|
|
||||||
curSurf = curSurf->next;
|
|
||||||
} while ( curSurf != 0);
|
|
||||||
#endif
|
|
||||||
// End Function DEBUG TRACE Variable kFriction
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This functions initialized the graphics.
|
* This functions initialized the graphics.
|
||||||
|
|
Loading…
Reference in a new issue