From: <hik...@us...> - 2007-12-12 13:34:37
|
Revision: 1343 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=1343&view=rev Author: hikerstk Date: 2007-12-12 05:34:35 -0800 (Wed, 12 Dec 2007) Log Message: ----------- 1) Fixed location of laps display (lower left corner, i.e. "1/3 laps"), which wasn't fully visible anymore 2) Removed several warning for Visual Studio compiler. Modified Paths: -------------- trunk/supertuxkart/src/gui/race_gui.cpp Modified: trunk/supertuxkart/src/gui/race_gui.cpp =================================================================== --- trunk/supertuxkart/src/gui/race_gui.cpp 2007-12-12 05:16:50 UTC (rev 1342) +++ trunk/supertuxkart/src/gui/race_gui.cpp 2007-12-12 13:34:35 UTC (rev 1343) @@ -229,7 +229,7 @@ int xLeft = 10; int yTop = 10; - world -> m_track -> draw2Dview ( xLeft, yTop ); + world -> m_track -> draw2Dview ( (float)xLeft, (float)yTop ); glBegin ( GL_QUADS ) ; @@ -244,10 +244,10 @@ /* If it's a player, draw a bigger sign */ if (kart -> isPlayerKart ()) { - world -> m_track->glVtx ( c->xyz, xLeft+3, yTop+3); - world -> m_track->glVtx ( c->xyz, xLeft-2, yTop+3); - world -> m_track->glVtx ( c->xyz, xLeft-2, yTop-2); - world -> m_track->glVtx ( c->xyz, xLeft+3, yTop-2); + world -> m_track->glVtx ( c->xyz, (float)xLeft+3, (float)yTop+3); + world -> m_track->glVtx ( c->xyz, (float)xLeft-2, (float)yTop+3); + world -> m_track->glVtx ( c->xyz, (float)xLeft-2, (float)yTop-2); + world -> m_track->glVtx ( c->xyz, (float)xLeft+3, (float)yTop-2); /* world -> m_track->glVtx ( c->xyz, xLeft , yTop-4); world -> m_track->glVtx ( c->xyz, xLeft+4, yTop ); world -> m_track->glVtx ( c->xyz, xLeft , yTop+4); @@ -255,10 +255,10 @@ } else { - world -> m_track->glVtx ( c->xyz, xLeft+2, yTop+2); - world -> m_track->glVtx ( c->xyz, xLeft-1, yTop+2); - world -> m_track->glVtx ( c->xyz, xLeft-1, yTop-1); - world -> m_track->glVtx ( c->xyz, xLeft+2, yTop-1); + world -> m_track->glVtx ( c->xyz, (float)xLeft+2, (float)yTop+2); + world -> m_track->glVtx ( c->xyz, (float)xLeft-1, (float)yTop+2); + world -> m_track->glVtx ( c->xyz, (float)xLeft-1, (float)yTop-1); + world -> m_track->glVtx ( c->xyz, (float)xLeft+2, (float)yTop-1); } } @@ -609,9 +609,9 @@ float displayedAngle = 45.0f * kart->getSteerPercent(); int tw = width/2; int th = height/2; - glTranslatef( offset_x+tw, offset_y+th, 0.0f); + glTranslatef( (float)(offset_x+tw), (float)(offset_y+th), 0.0f); glRotatef(displayedAngle, 0.0f, 0.0f, 1.0f); - glTranslatef(-offset_x-tw, -offset_y-th, 0.0f); + glTranslatef((float)(-offset_x-tw), (float)(-offset_y-th), 0.0f); m_steering_wheel_icon->getState()->force(); glBegin ( GL_QUADS ) ; @@ -729,7 +729,7 @@ float maxRatio = std::max(ratio_x, ratio_y); char str[256]; offset_x += (int)(120*ratio_x); - offset_y += (int)(50*maxRatio); + offset_y += (int)(70*maxRatio); if ( kart->getLap() >= world->m_race_setup.m_num_laps ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |