Re #720 Fixed more Gcc 4.6/7 warnings (only Simplix and Simu V3 left)

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

Former-commit-id: a07b5aed70cffbf1eed4d7897c3f37a18b4639f9
Former-commit-id: af736bceb35162f0ef7762d7904435382a787f89
This commit is contained in:
pouillot 2012-10-07 16:15:40 +00:00
parent f782a2b1e4
commit af9673796d
17 changed files with 73 additions and 73 deletions

View file

@ -368,11 +368,7 @@ grInitBackground()
//TheSky->modifyVisibility( visibility, 0);
TheSky->setVisibility( grVisibility ); // Visibility in meters
const GLfloat fog_exp_density = m_log01 / grVisibility;
const GLfloat fog_exp2_density = sqrt_m_log01 / grVisibility;
//Setup overall light level according to rain if any
grUpdateLight();
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, Black);
@ -865,8 +861,6 @@ grPreDrawSky(tSituation* s, float fogStart, float fogEnd)
if (grSkyDomeDistance && grTrack->skyversion > 0)
{
//const GLfloat fog_exp2_density = (float)sqrt_m_log01 / TheSky->getVisibility();
const GLfloat fog_exp_density = m_log01 / TheSky->getVisibility();
const GLfloat fog_exp2_density = sqrt_m_log01 / TheSky->getVisibility();
glEnable(GL_FOG);
//glFogf(GL_FOG_START, fogStart);
@ -1059,7 +1053,6 @@ void grUpdateLight( void )
if (sol_angle > 1.0)
{
float sun2 = sqrt(sol_angle);
if (grVisibility > 1000 && cloudsTextureIndex < 8)
{
CloudsColor[0] = CloudsColor[0] * sun_color[0];

View file

@ -376,7 +376,7 @@ void grCustomizePits(void)
// First, top vertex of the triangle strip
{
sgVec2 tex = { -0.7, 1.1 };
sgVec3 vtx = { x2, y2, z2 + 4.8 };
sgVec3 vtx = { x2, y2, z2 + 4.8f };
pit_tex->add(tex);
pit_vtx->add(vtx);
}
@ -397,7 +397,7 @@ void grCustomizePits(void)
// Second, top vertex of the triangle strip
{
sgVec2 tex = { -0.7 + 2.0, 1.1 };
sgVec3 vtx = { x2, y2, z2 + 4.8 };
sgVec3 vtx = { x2, y2, z2 + 4.8f };
pit_tex->add(tex);
pit_vtx->add(vtx);
}
@ -527,7 +527,7 @@ void grCustomizePits(void)
// First, top vertex
{
sgVec2 tex = { 0.0, 0.25 };
sgVec3 vtx = { x1, y1, z1 + 0.9 };
sgVec3 vtx = { x1, y1, z1 + 0.9f };
pit_tex1->add(tex);
pit_vtx1->add(vtx);
}
@ -543,7 +543,7 @@ void grCustomizePits(void)
// Second, top vertex
{
sgVec2 tex = { 1.0, 0.25 };
sgVec3 vtx = { x2, y2, z2 + 0.9 };
sgVec3 vtx = { x2, y2, z2 + 0.9f };
pit_tex1->add(tex);
pit_vtx1->add(vtx);
}
@ -590,8 +590,8 @@ void grCustomizePits(void)
// First, top vertex
{
sgVec2 tex = { 0.0, (bHasLogo ? 0.33 : 0.25) };
sgVec3 vtx = { x2, y2, z2 + 0.9 };
sgVec2 tex = { 0.0, (bHasLogo ? 0.33f : 0.25f) };
sgVec3 vtx = { x2, y2, z2 + 0.9f };
pit_tex2->add(tex);
pit_vtx2->add(vtx);
}
@ -606,8 +606,8 @@ void grCustomizePits(void)
// Second, top vertex
{
sgVec2 tex = { 1.0, (bHasLogo ? 0.33 : 0.25) };
sgVec3 vtx = { x3, y3, z3 + 0.9 };
sgVec2 tex = { 1.0, (bHasLogo ? 0.33f : 0.25f) };
sgVec3 vtx = { x3, y3, z3 + 0.9f };
pit_tex2->add(tex);
pit_vtx2->add(vtx);
}
@ -638,7 +638,7 @@ void grCustomizePits(void)
// First, top vertex
{
sgVec2 tex = { 0.0, 0.25 };
sgVec3 vtx = { x3, y3, z3 + 0.9 };
sgVec3 vtx = { x3, y3, z3 + 0.9f };
pit_tex3->add(tex);
pit_vtx3->add(vtx);
}
@ -654,7 +654,7 @@ void grCustomizePits(void)
// Second, top vertex
{
sgVec2 tex = { 1.0, 0.25 };
sgVec3 vtx = { x4, y4, z4 + 0.9 };
sgVec3 vtx = { x4, y4, z4 + 0.9f };
pit_tex3->add(tex);
pit_vtx3->add(vtx);
}

View file

@ -246,9 +246,6 @@ static void
SimCarUpdateSpeed(tCar *car)
{
tdble Cosz, Sinz;
tdble mass;
mass = car->mass + car->fuel;
Cosz = car->Cosz;
Sinz = car->Sinz;
@ -312,14 +309,10 @@ static void
SimCarUpdatePos(tCar *car)
{
tdble vx, vy;
tdble accx, accy;
vx = car->DynGCg.vel.x;
vy = car->DynGCg.vel.y;
accx = car->DynGCg.acc.x;
accy = car->DynGCg.acc.y;
car->DynGCg.pos.x += vx * SimDeltaTime;
car->DynGCg.pos.y += vy * SimDeltaTime;
car->DynGCg.pos.z += car->DynGCg.vel.z * SimDeltaTime;

View file

@ -25,17 +25,18 @@ SimTransmissionConfig(tCar *car)
{
void *hdle = car->params;
tCarElt *carElt = car->carElt;
tdble clutchI;
//tdble clutchI; // Never used
tTransmission *trans = &(car->transmission);
tClutch *clutch = &(trans->clutch);
tDifferential *differential;
const char *transType;
int i, j;
tdble gRatio, fRatio, gEff, fEff;
tdble gRatio, fRatio, gEff;
//tdble fEff; // Never used
tdble gearI;
char path[256];
clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
//clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
transType = GfParmGetStr(hdle, SECT_DRIVETRAIN, PRM_TYPE, VAL_TRANS_RWD);
clutch->releaseTime = GfParmGetNum(hdle, SECT_GEARBOX, PRM_SHIFTTIME, (char*)NULL, 0.2f);
@ -61,19 +62,19 @@ SimTransmissionConfig(tCar *car)
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
trans->type = TRANS_RWD;
fRatio = trans->differential[TRANS_REAR_DIFF].ratio;
fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_FWD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
trans->type = TRANS_FWD;
fRatio = trans->differential[TRANS_FRONT_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_4WD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
SimDifferentialConfig(hdle, SECT_CENTRALDIFFERENTIAL, &(trans->differential[TRANS_CENTRAL_DIFF]));
trans->type = TRANS_4WD;
fRatio = trans->differential[TRANS_CENTRAL_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
}
trans->gearbox.gearMax = 0;

View file

@ -239,9 +239,6 @@ static void
SimCarUpdateSpeed(tCar *car)
{
tdble Cosz, Sinz;
tdble mass;
mass = car->mass + car->fuel;
Cosz = car->Cosz;
Sinz = car->Sinz;
@ -305,14 +302,10 @@ static void
SimCarUpdatePos(tCar *car)
{
tdble vx, vy;
tdble accx, accy;
vx = car->DynGCg.vel.x;
vy = car->DynGCg.vel.y;
accx = car->DynGCg.acc.x;
accy = car->DynGCg.acc.y;
car->DynGCg.pos.x += vx * SimDeltaTime;
car->DynGCg.pos.y += vy * SimDeltaTime;
car->DynGCg.pos.z += car->DynGCg.vel.z * SimDeltaTime;

View file

@ -25,17 +25,18 @@ SimTransmissionConfig(tCar *car)
{
void *hdle = car->params;
tCarElt *carElt = car->carElt;
tdble clutchI;
//tdble clutchI; // Never used
tTransmission *trans = &(car->transmission);
tClutch *clutch = &(trans->clutch);
tDifferential *differential;
const char *transType;
int i, j;
tdble gRatio, fRatio, gEff, fEff;
tdble gRatio, fRatio, gEff;
//tdble fEff; // Never used
tdble gearI;
char path[256];
clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
//clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
transType = GfParmGetStr(hdle, SECT_DRIVETRAIN, PRM_TYPE, VAL_TRANS_RWD);
clutch->releaseTime = GfParmGetNum(hdle, SECT_GEARBOX, PRM_SHIFTTIME, (char*)NULL, 0.2f);
@ -61,19 +62,19 @@ SimTransmissionConfig(tCar *car)
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
trans->type = TRANS_RWD;
fRatio = trans->differential[TRANS_REAR_DIFF].ratio;
fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_FWD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
trans->type = TRANS_FWD;
fRatio = trans->differential[TRANS_FRONT_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_4WD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
SimDifferentialConfig(hdle, SECT_CENTRALDIFFERENTIAL, &(trans->differential[TRANS_CENTRAL_DIFF]));
trans->type = TRANS_4WD;
fRatio = trans->differential[TRANS_CENTRAL_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
}
trans->gearbox.gearMax = 0;

View file

@ -343,9 +343,6 @@ SimCarUpdateSpeed(tCar *car)
t3Dd original;
t3Dd updated;
//t3Dd angles;
tdble mass;
mass = car->mass + car->fuel;
{
// fuel consumption
@ -524,7 +521,9 @@ SimCarUpdatePos(tCar *car)
if (gc_height_difference < 0) {
car->DynGCg.pos.z = RtTrackHeightL(&(car->trkPos)) + 1;
// FIXME: Wasn't car->DynGCg.vel.z intended the 2nd time ?
car->DynGCg.vel.x = car->DynGCg.vel.y = car->DynGCg.vel.y =
// FIXME: Wasn't car->DynGC.vel.z intended the 2nd time ?
car->DynGC.vel.x = car->DynGC.vel.y = car->DynGC.vel.y = 0.0;
car->DynGCg.vel.ax = car->DynGC.vel.ax =
car->DynGCg.vel.ay = car->DynGC.vel.ay =
@ -532,7 +531,9 @@ SimCarUpdatePos(tCar *car)
car->rot_mom[0] = car->rot_mom[1] = car->rot_mom[2] = 0.0;
} else if (gc_height_difference > 100) {
car->DynGCg.pos.z = RtTrackHeightL(&(car->trkPos)) + 50;
// FIXME: Wasn't car->DynGCg.vel.z intended the 2nd time ?
car->DynGCg.vel.x = car->DynGCg.vel.y = car->DynGCg.vel.y =
// FIXME: Wasn't car->DynGC.vel.z intended the 2nd time ?
car->DynGC.vel.x = car->DynGC.vel.y = car->DynGC.vel.y = 0.0;
car->DynGCg.vel.ax = car->DynGC.vel.ax =
car->DynGCg.vel.ay = car->DynGC.vel.ay =

View file

@ -405,7 +405,9 @@ SimCarCollideZ(tCar *car)
car->DynGCg.pos.z -= gc_height_difference;
} else if (gc_height_difference > 100) {
car->DynGCg.pos.z = RtTrackHeightL(&(car->trkPos)) + 100;
// FIXME: Wasn't car->DynGCg.vel.z intended the 2nd time ?
car->DynGCg.vel.x = car->DynGCg.vel.y = car->DynGCg.vel.y =
// FIXME: Wasn't car->DynGC.vel.z intended the 2nd time ?
car->DynGC.vel.x = car->DynGC.vel.y = car->DynGC.vel.y = 0.0;
// Translate angular momentum to angular velocity
// NOTE: This translation is done again in SimCarAddAngularVelocity()

View file

@ -26,17 +26,18 @@ SimTransmissionConfig(tCar *car)
{
void *hdle = car->params;
tCarElt *carElt = car->carElt;
tdble clutchI;
//tdble clutchI; // Never used
tTransmission *trans = &(car->transmission);
tClutch *clutch = &(trans->clutch);
tDifferential *differential;
const char *transType;
int i, j;
tdble gRatio, fRatio, gEff, fEff;
tdble gRatio, fRatio, gEff;
//tdble fEff; // Never used
tdble gearI;
char path[256];
clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
//clutchI = GfParmGetNum(hdle, SECT_CLUTCH, PRM_INERTIA, (char*)NULL, 0.12f);
transType = GfParmGetStr(hdle, SECT_DRIVETRAIN, PRM_TYPE, VAL_TRANS_RWD);
clutch->releaseTime = GfParmGetNum(hdle, SECT_GEARBOX, PRM_SHIFTTIME, (char*)NULL, 0.2f);
@ -62,19 +63,19 @@ SimTransmissionConfig(tCar *car)
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
trans->type = TRANS_RWD;
fRatio = trans->differential[TRANS_REAR_DIFF].ratio;
fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_REAR_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_FWD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
trans->type = TRANS_FWD;
fRatio = trans->differential[TRANS_FRONT_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency;
} else if (strcmp(VAL_TRANS_4WD, transType) == 0) {
SimDifferentialConfig(hdle, SECT_FRNTDIFFERENTIAL, &(trans->differential[TRANS_FRONT_DIFF]));
SimDifferentialConfig(hdle, SECT_REARDIFFERENTIAL, &(trans->differential[TRANS_REAR_DIFF]));
SimDifferentialConfig(hdle, SECT_CENTRALDIFFERENTIAL, &(trans->differential[TRANS_CENTRAL_DIFF]));
trans->type = TRANS_4WD;
fRatio = trans->differential[TRANS_CENTRAL_DIFF].ratio;
fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
//fEff = trans->differential[TRANS_FRONT_DIFF].efficiency * trans->differential[TRANS_CENTRAL_DIFF].efficiency * trans->differential[TRANS_REAR_DIFF].efficiency;
}
trans->gearbox.gearMax = 0;

View file

@ -196,14 +196,18 @@ void OpenalSoundInterface::update(CarSoundData** car_sound_data, int n_cars, sgV
{
ALfloat listener_pos[3];
#ifdef USE_OPENAL_DOPPLER
ALfloat listener_speed[3];
#endif
ALfloat listener_orientation[6];
static const ALfloat zeros[] = {0.0f, 0.0f, 0.0f};
int i;
for (i = 0; i<3; i++) {
listener_pos[i] = p_obs[i];
#ifdef USE_OPENAL_DOPPLER
listener_speed[i] = 0;// u_obs[i]; // TODO: Try restoring this, needed !
#endif
listener_orientation[i] = c_obs[i];
listener_orientation[i+3] = a_obs[i];
}

View file

@ -35,8 +35,8 @@
static const char* BackgroundTypeValues[] = { GR_ATT_BGSKY_RING, GR_ATT_BGSKY_LAND };
static const int NbBackgroundTypeValues = sizeof(BackgroundTypeValues) / sizeof(BackgroundTypeValues[0]);
static const char* SpectatorValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_ATT_AGR_MEDIUM, GR_ATT_AGR_FULL, GR_ATT_AGR_HIGH };
static const int NbSpectatorValues = sizeof(SpectatorValues) / sizeof(SpectatorValues[0]);
//static const char* SpectatorValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_ATT_AGR_MEDIUM, GR_ATT_AGR_FULL, GR_ATT_AGR_HIGH };
//static const int NbSpectatorValues = sizeof(SpectatorValues) / sizeof(SpectatorValues[0]);
static const char* ForestValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_ATT_AGR_MEDIUM, GR_ATT_AGR_FULL, GR_ATT_AGR_HIGH };
static const int NbForestValues = sizeof(ForestValues) / sizeof(ForestValues[0]);
static const char* TreeValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_ATT_AGR_MEDIUM, GR_ATT_AGR_FULL, GR_ATT_AGR_HIGH };
@ -52,7 +52,7 @@ static int TreeLabelId, TreeLeftButtonId, TreeRightButtonId;
static int ParkingLabelId, ParkingLeftButtonId, ParkingRightButtonId;
static int BackgroundTypeIndex = 0;
static int SpectatorIndex = 0;
//static int SpectatorsIndex = 0;
static int ForestIndex = 0;
static int TreeIndex = 0;
static int ParkingIndex = 0;

View file

@ -645,7 +645,7 @@ ControlMenuInit(void *prevMenu, void *prefHdle, unsigned index, tGearChangeMode
Cmd[i].labelId = GfuiMenuCreateLabelControl(ScrHandle,param,Cmd[i].name);
std::string strCmdEdit(Cmd[i].name);
strCmdEdit += " button";
Cmd[i].Id = GfuiMenuCreateButtonControl(ScrHandle,param,strCmdEdit.c_str(),(void*)i,onPush,NULL,(tfuiCallback)NULL,onFocusLost);
Cmd[i].Id = GfuiMenuCreateButtonControl(ScrHandle,param,strCmdEdit.c_str(),(void*)(long)i,onPush,NULL,(tfuiCallback)NULL,onFocusLost);
}
/* Steer Sensibility label and associated editbox */

View file

@ -305,7 +305,7 @@ UpdtScrollList(void)
while((str = GfuiScrollListExtractElement(ScrHandle, ScrollList, 0, (void**)&tmp)) != NULL) {
}
for (i = 0; i < (int)PlayersInfo.size(); i++) {
GfuiScrollListInsertElement(ScrHandle, ScrollList, PlayersInfo[i]->dispName(), i, (void*)i);
GfuiScrollListInsertElement(ScrHandle, ScrollList, PlayersInfo[i]->dispName(), i, (void*)(long)i);
}
if (CurrPlayer != PlayersInfo.end()) {

View file

@ -33,6 +33,10 @@
static void *MenuHandle = NULL;
// Select Monitor (true) or Display (false) menu.
#define MonitorMenu false
#if (!MonitorMenu)
static void
onDisplayMenuActivate(void * /* dummy */)
@ -40,12 +44,16 @@ onDisplayMenuActivate(void * /* dummy */)
GfuiScreenActivate(DisplayMenuInit(MenuHandle));
}
#else
static void
onMonitorMenuActivate(void * /* dummy */)
{
GfuiScreenActivate(MonitorMenuInit(MenuHandle));
}
#endif
static void
onGraphMenuActivate(void * /* dummy */)
{
@ -94,7 +102,7 @@ OptionsMenuInit(void *prevMenu)
GfuiMenuCreateStaticControls(MenuHandle, param);
#if 0 // SDW hack to get access to Monitor menu, doesn't have a defined position yet
#if (MonitorMenu) // SDW hack to get access to Monitor menu, doesn't have a defined position yet
GfuiMenuCreateButtonControl(MenuHandle, param, "display", NULL, onMonitorMenuActivate);
#else
GfuiMenuCreateButtonControl(MenuHandle, param, "display", NULL, onDisplayMenuActivate);

View file

@ -290,10 +290,8 @@ UpdateNetworkPlayers()
else
bEveryoneReadyToRace = false;
bool bLocalPlayer = false;
if (strcmp(NetGetNetwork()->GetDriverName(),name)==0)
{
bLocalPlayer = true;
pColor = &green[0];
g_strCar = strRealCar;
//Make sure checkbox matches ready state

View file

@ -317,7 +317,8 @@ void spacing(int e, int n)
int insert_node(double x, double y, double z, int spac,
int prev_n, int prev_s_mark, int mark, int next_s_mark, int next_n)
{
int i,j,k,e,ei,ej,ek, s,si,sj,sk;
int i,j,k,e,ej,ek, s,si,sj,sk;
//int ei;
double sx, sy;
Nn++; /* one new node */
@ -356,7 +357,7 @@ int insert_node(double x, double y, double z, int spac,
i = elem[e].i;
j = elem[e].j;
k = elem[e].k;
ei = elem[e].ei;
//ei = elem[e].ei; // Never used
ej = elem[e].ej;
ek = elem[e].ek;
si = elem[e].si;
@ -1948,7 +1949,7 @@ GenerateMesh(tTrack *Track, int rightside, int reverse, int exterior)
tTrackSeg *mseg;
tTrkLocPos trkpos;
tdble x, y;
tdble radiusr, radiusl;
//tdble radiusr, radiusl; // Never used
struct nod *point2;
int nb_relief_vtx, nb_relief_seg;
@ -2017,7 +2018,7 @@ GenerateMesh(tTrack *Track, int rightside, int reverse, int exterior)
step = TrackStep / (mseg->radiusr);
anz = seg->angle[TR_ZS] + step;
ts = step;
radiusr = seg->radiusr;
//radiusr = seg->radiusr; // Never used
trkpos.seg = seg;
trkpos.toRight = 0;
while (anz < seg->angle[TR_ZE]) {
@ -2033,7 +2034,7 @@ GenerateMesh(tTrack *Track, int rightside, int reverse, int exterior)
step = TrackStep / (mseg->radiusl);
anz = seg->angle[TR_ZS] - step;
ts = step;
radiusr = seg->radiusr;
// radiusr = seg->radiusr; // Never used
trkpos.seg = seg;
trkpos.toRight = 0;
while (anz > seg->angle[TR_ZE]) {
@ -2100,7 +2101,7 @@ GenerateMesh(tTrack *Track, int rightside, int reverse, int exterior)
step = TrackStep / (mseg->radiusr);
anz = seg->angle[TR_ZS] + step;
ts = step;
radiusl = seg->radiusl;
//radiusl = seg->radiusl; // Never used
trkpos.seg = seg;
while (anz < seg->angle[TR_ZE]) {
trkpos.toStart = ts;
@ -2116,7 +2117,7 @@ GenerateMesh(tTrack *Track, int rightside, int reverse, int exterior)
step = TrackStep / (mseg->radiusl);
anz = seg->angle[TR_ZS] - step;
ts = step;
radiusl = seg->radiusl;
//radiusl = seg->radiusl; // Never used
trkpos.seg = seg;
while (anz > seg->angle[TR_ZE]) {
trkpos.toStart = ts;

View file

@ -45,6 +45,7 @@ typedef struct texElt
{
char *name;
char *namebump;
int mipmap; // Not yet used.
unsigned int texid;
struct texElt *next;
} tTexElt;
@ -242,7 +243,8 @@ InitScene(tTrack *Track, void *TrackHandle, int bump)
tTrackSeg *lastSeg = NULL;
tTrackSeg *mseg;
int nbvert;
tdble width, wi2;
tdble width;
//tdble wi2; // Never used.
tdble anz, ts = 0;
tdble radiusr, radiusl;
tdble step;
@ -317,11 +319,11 @@ InitScene(tTrack *Track, void *TrackHandle, int bump)
GroupNb = Track->nseg;
width = Track->width;
wi2 = width / 2.0;
//wi2 = width / 2.0; // Never used.
trkpos.type = TR_LPOS_MAIN;
#define SETTEXTURE(texname, texnamebump, mipmap) do { \
#define SETTEXTURE(texname, texnamebump, _mipmap) do { \
int found = 0; \
curTexElt = texList; \
if (curTexElt == NULL) { \
@ -330,6 +332,7 @@ InitScene(tTrack *Track, void *TrackHandle, int bump)
texList = curTexElt; \
curTexElt->name = strdup(texname); \
curTexElt->namebump = strdup(texnamebump); \
curTexElt->mipmap = _mipmap; \
curTexElt->texid = GenTexId++; \
} else { \
do { \
@ -346,6 +349,7 @@ InitScene(tTrack *Track, void *TrackHandle, int bump)
texList = curTexElt; \
curTexElt->name = strdup(texname); \
curTexElt->namebump = strdup(texnamebump); \
curTexElt->mipmap = _mipmap; \
curTexElt->texid = GenTexId++; \
} \
} \