From c283f82729fb9cdb0578d533d544796bdca8ef47 Mon Sep 17 00:00:00 2001 From: vincentlj Date: Mon, 13 Jan 2014 23:07:29 +0000 Subject: [PATCH] Use draw2DImage for other components in race gui git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15063 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/race_gui_base.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/states_screens/race_gui_base.cpp b/src/states_screens/race_gui_base.cpp index 7a085f2f9..04a7d9702 100644 --- a/src/states_screens/race_gui_base.cpp +++ b/src/states_screens/race_gui_base.cpp @@ -219,7 +219,7 @@ void RaceGUIBase::createMarkerTexture() (i+1)*m_marker_rendered_size, m_marker_rendered_size); core::recti source_rect(core::vector2di(0,0), t->getSize()); - irr_driver->getVideoDriver()->draw2DImage(t, dest_rect, + draw2DImage(t, dest_rect, source_rect, /*clipRect*/0, /*color*/ 0, @@ -412,7 +412,7 @@ void RaceGUIBase::drawPowerupIcons(const AbstractKart* kart, { int x2 = (int)(x1+i*itemSpacing); core::rect pos(x2, y1, x2+nSize, y1+nSize); - irr_driver->getVideoDriver()->draw2DImage(t, pos, rect, NULL, + draw2DImage(t, pos, rect, NULL, NULL, true); } // for i } // drawPowerupIcons @@ -669,7 +669,7 @@ void RaceGUIBase::drawGlobalMusicDescription() const core::rect source(core::position2d(0,0), t->getOriginalSize()); - irr_driver->getVideoDriver()->draw2DImage(t, dest, source, + draw2DImage(t, dest, source, NULL, NULL, true); } // drawGlobalMusicDescription @@ -936,7 +936,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) } const core::rect rect(core::position2d(0,0), m_icons_frame->getTexture()->getOriginalSize()); - irr_driver->getVideoDriver()->draw2DImage( + draw2DImage( m_icons_frame->getTexture(), pos, rect,NULL, colors, true); } @@ -945,7 +945,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) { const core::rect rect(core::position2d(0,0), icon->getOriginalSize()); - irr_driver->getVideoDriver()->draw2DImage(icon, pos, rect, + draw2DImage(icon, pos, rect, NULL, NULL, true); } @@ -960,7 +960,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) icon->getOriginalSize()); const core::rect pos1((int)(x-t_anim), y, (int)(x+w-t_anim), y+w); - irr_driver->getVideoDriver()->draw2DImage(icon, pos1, rect1, + draw2DImage(icon, pos1, rect1, NULL, NULL, true); } @@ -971,7 +971,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) core::position2d(x+w,y+w*3/4)); const core::rect sourceRect(core::position2d(0,0), icon->getOriginalSize()); - irr_driver->getVideoDriver()->draw2DImage(icon, destRect, + draw2DImage(icon, destRect, sourceRect, NULL, NULL, true); } @@ -989,7 +989,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) const core::rect pos1((int)(x-t_anim), (int)(y-t_anim), (int)(x+w/2-t_anim), (int)(y+w/2-t_anim)); - irr_driver->getVideoDriver()->draw2DImage(icon, pos1, rect1, + draw2DImage(icon, pos1, rect1, NULL, NULL, true); const core::rect rect2(icon_size_x/2,0, @@ -998,18 +998,18 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) (int)(y-t_anim), (int)(x+w+t_anim), (int)(y+w/2-t_anim)); - irr_driver->getVideoDriver()->draw2DImage(icon, pos2, rect2, + draw2DImage(icon, pos2, rect2, NULL, NULL, true); const core::rect rect3(0, icon_size_y/2, icon_size_x/2,icon_size_y); const core::rect pos3((int)(x-t_anim), (int)(y+w/2+t_anim), (int)(x+w/2-t_anim), (int)(y+w+t_anim)); - irr_driver->getVideoDriver()->draw2DImage(icon, pos3, rect3, NULL, NULL, true); + draw2DImage(icon, pos3, rect3, NULL, NULL, true); const core::rect rect4(icon_size_x/2,icon_size_y/2,icon_size_x,icon_size_y); const core::rect pos4((int)(x+w/2+t_anim), (int)(y+w/2+t_anim), (int)(x+w+t_anim), (int)(y+w+t_anim)); - irr_driver->getVideoDriver()->draw2DImage(icon, pos4, rect4, NULL, NULL, true); + draw2DImage(icon, pos4, rect4, NULL, NULL, true); } //Plunger @@ -1022,7 +1022,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) const core::rect rect(core::position2d(0,0), icon_plunger->getOriginalSize()); const core::rect pos1(x+10, y-10, x+w+10, y+w-10); - irr_driver->getVideoDriver()->draw2DImage(icon_plunger, pos1, + draw2DImage(icon_plunger, pos1, rect, NULL, NULL, true); } @@ -1038,7 +1038,7 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin) const core::rect rect(core::position2d(0,0), icon_attachment->getOriginalSize()); const core::rect pos1(x-20, y-10, x+w-20, y+w-10); - irr_driver->getVideoDriver()->draw2DImage(icon_attachment, + draw2DImage(icon_attachment, pos1, rect, NULL, NULL, true); } @@ -1136,7 +1136,7 @@ void RaceGUIBase::drawPlungerInFace(const Camera *camera, float dt) const core::rect source(core::position2d(0,0), t->getOriginalSize()); - irr_driver->getVideoDriver()->draw2DImage(t, dest, source, + draw2DImage(t, dest, source, &viewport /* clip */, NULL /* color */, true /* alpha */ );