From af9673796d353d5719a735d44e9f4c55ebbbb135 Mon Sep 17 00:00:00 2001 From: pouillot Date: Sun, 7 Oct 2012 16:15:40 +0000 Subject: [PATCH] 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 --- src/modules/graphic/ssggraph/grbackground.cpp | 7 ------- src/modules/graphic/ssggraph/grscene.cpp | 20 +++++++++---------- src/modules/simu/simuv2.1/car.cpp | 7 ------- src/modules/simu/simuv2.1/transmission.cpp | 13 ++++++------ src/modules/simu/simuv2/car.cpp | 7 ------- src/modules/simu/simuv2/transmission.cpp | 13 ++++++------ src/modules/simu/simuv3/car.cpp | 7 ++++--- src/modules/simu/simuv3/collide.cpp | 2 ++ src/modules/simu/simuv3/transmission.cpp | 13 ++++++------ .../sound/snddefault/OpenalSoundInterface.cpp | 4 ++++ .../confscreens/advancedgraphconfig.cpp | 6 +++--- .../legacymenu/confscreens/controlconfig.cpp | 2 +- .../legacymenu/confscreens/playerconfig.cpp | 2 +- .../legacymenu/mainscreens/optionsmenu.cpp | 10 +++++++++- .../legacymenu/racescreens/networkingmenu.cpp | 2 -- src/tools/trackgen/easymesh.cpp | 15 +++++++------- src/tools/trackgen/track.cpp | 16 +++++++++------ 17 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/modules/graphic/ssggraph/grbackground.cpp b/src/modules/graphic/ssggraph/grbackground.cpp index 410f19b3f..48bbf33cd 100644 --- a/src/modules/graphic/ssggraph/grbackground.cpp +++ b/src/modules/graphic/ssggraph/grbackground.cpp @@ -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]; diff --git a/src/modules/graphic/ssggraph/grscene.cpp b/src/modules/graphic/ssggraph/grscene.cpp index 027f29a3d..2f4bbe2fc 100644 --- a/src/modules/graphic/ssggraph/grscene.cpp +++ b/src/modules/graphic/ssggraph/grscene.cpp @@ -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); } diff --git a/src/modules/simu/simuv2.1/car.cpp b/src/modules/simu/simuv2.1/car.cpp index 195423550..5c3a625db 100644 --- a/src/modules/simu/simuv2.1/car.cpp +++ b/src/modules/simu/simuv2.1/car.cpp @@ -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; diff --git a/src/modules/simu/simuv2.1/transmission.cpp b/src/modules/simu/simuv2.1/transmission.cpp index 2943b63f5..d39b94337 100644 --- a/src/modules/simu/simuv2.1/transmission.cpp +++ b/src/modules/simu/simuv2.1/transmission.cpp @@ -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; diff --git a/src/modules/simu/simuv2/car.cpp b/src/modules/simu/simuv2/car.cpp index 0679dad1c..dcd2175da 100644 --- a/src/modules/simu/simuv2/car.cpp +++ b/src/modules/simu/simuv2/car.cpp @@ -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; diff --git a/src/modules/simu/simuv2/transmission.cpp b/src/modules/simu/simuv2/transmission.cpp index 0a262333b..7f657a15c 100644 --- a/src/modules/simu/simuv2/transmission.cpp +++ b/src/modules/simu/simuv2/transmission.cpp @@ -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; diff --git a/src/modules/simu/simuv3/car.cpp b/src/modules/simu/simuv3/car.cpp index 38e620a00..59dc637d2 100644 --- a/src/modules/simu/simuv3/car.cpp +++ b/src/modules/simu/simuv3/car.cpp @@ -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 = diff --git a/src/modules/simu/simuv3/collide.cpp b/src/modules/simu/simuv3/collide.cpp index 5d6d0f5c2..dd0ae4036 100644 --- a/src/modules/simu/simuv3/collide.cpp +++ b/src/modules/simu/simuv3/collide.cpp @@ -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() diff --git a/src/modules/simu/simuv3/transmission.cpp b/src/modules/simu/simuv3/transmission.cpp index 2cd265228..ccc7997e0 100644 --- a/src/modules/simu/simuv3/transmission.cpp +++ b/src/modules/simu/simuv3/transmission.cpp @@ -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; diff --git a/src/modules/sound/snddefault/OpenalSoundInterface.cpp b/src/modules/sound/snddefault/OpenalSoundInterface.cpp index cbc65813a..289bd66c0 100644 --- a/src/modules/sound/snddefault/OpenalSoundInterface.cpp +++ b/src/modules/sound/snddefault/OpenalSoundInterface.cpp @@ -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]; } diff --git a/src/modules/userinterface/legacymenu/confscreens/advancedgraphconfig.cpp b/src/modules/userinterface/legacymenu/confscreens/advancedgraphconfig.cpp index 6d96e0ff9..58ba44c6a 100644 --- a/src/modules/userinterface/legacymenu/confscreens/advancedgraphconfig.cpp +++ b/src/modules/userinterface/legacymenu/confscreens/advancedgraphconfig.cpp @@ -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; diff --git a/src/modules/userinterface/legacymenu/confscreens/controlconfig.cpp b/src/modules/userinterface/legacymenu/confscreens/controlconfig.cpp index 5a10a55a8..1a79c84b5 100644 --- a/src/modules/userinterface/legacymenu/confscreens/controlconfig.cpp +++ b/src/modules/userinterface/legacymenu/confscreens/controlconfig.cpp @@ -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 */ diff --git a/src/modules/userinterface/legacymenu/confscreens/playerconfig.cpp b/src/modules/userinterface/legacymenu/confscreens/playerconfig.cpp index 087302d4b..70e43f6fa 100644 --- a/src/modules/userinterface/legacymenu/confscreens/playerconfig.cpp +++ b/src/modules/userinterface/legacymenu/confscreens/playerconfig.cpp @@ -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()) { diff --git a/src/modules/userinterface/legacymenu/mainscreens/optionsmenu.cpp b/src/modules/userinterface/legacymenu/mainscreens/optionsmenu.cpp index 850b40837..e9f57d296 100644 --- a/src/modules/userinterface/legacymenu/mainscreens/optionsmenu.cpp +++ b/src/modules/userinterface/legacymenu/mainscreens/optionsmenu.cpp @@ -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); diff --git a/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp b/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp index cfdcf18ec..9472da9b4 100644 --- a/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp +++ b/src/modules/userinterface/legacymenu/racescreens/networkingmenu.cpp @@ -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 diff --git a/src/tools/trackgen/easymesh.cpp b/src/tools/trackgen/easymesh.cpp index 9b5e845bc..11aaf057b 100644 --- a/src/tools/trackgen/easymesh.cpp +++ b/src/tools/trackgen/easymesh.cpp @@ -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; diff --git a/src/tools/trackgen/track.cpp b/src/tools/trackgen/track.cpp index 04a441608..b1cf1eafd 100644 --- a/src/tools/trackgen/track.cpp +++ b/src/tools/trackgen/track.cpp @@ -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,7 +332,8 @@ InitScene(tTrack *Track, void *TrackHandle, int bump) texList = curTexElt; \ curTexElt->name = strdup(texname); \ curTexElt->namebump = strdup(texnamebump); \ - curTexElt->texid = GenTexId++; \ + curTexElt->mipmap = _mipmap; \ + curTexElt->texid = GenTexId++; \ } else { \ do { \ curTexElt = curTexElt->next; \ @@ -345,8 +348,9 @@ InitScene(tTrack *Track, void *TrackHandle, int bump) texList->next = curTexElt; \ texList = curTexElt; \ curTexElt->name = strdup(texname); \ - curTexElt->namebump = strdup(texnamebump); \ - curTexElt->texid = GenTexId++; \ + curTexElt->namebump = strdup(texnamebump); \ + curTexElt->mipmap = _mipmap; \ + curTexElt->texid = GenTexId++; \ } \ } \ curTexId = curTexElt->texid; \