Another batch of conversion to draw2DImage

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15064 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
vincentlj 2014-01-13 23:19:47 +00:00
parent c283f82729
commit 6697a2d7af
5 changed files with 13 additions and 10 deletions

View File

@ -9,6 +9,7 @@
#include "IVideoDriver.h"
#include "ITexture.h"
#include <cassert>
#include "graphics/glwrap.hpp"
namespace irr
{
@ -217,7 +218,7 @@ void STKModifiedSpriteBank::draw2DSprite(u32 index,
const video::SColor *const colors=0,
bool useAlphaChannelOfTexture=false)=0
*/
Driver->draw2DImage(tex, dest, r /* source rect */, clip,
draw2DImage(tex, dest, r /* source rect */, clip,
NULL /* colors */, true);
} // draw2DSprite

View File

@ -1237,7 +1237,7 @@ namespace GUIEngine
core::dimension2d<s32>(screen_size.Width,
text_height) );
Private::g_driver->draw2DRectangle(SColor(255,252,248,230),
GL32_draw2DRectangle(SColor(255,252,248,230),
msgRect);
Private::g_font->draw((*it).m_message.c_str(),
msgRect,

View File

@ -795,7 +795,7 @@ void Skin::drawProgress(Widget* w, const core::recti &rect,
SkinConfig::m_render_params["progress::fill"],
w->m_deactivated);
#if 0
GUIEngine::getDriver()->draw2DImage(
draw2DImage(
SkinConfig::m_render_params["progress::fill"].getImage(),
sized_rect, core::recti(0,0,progress->m_w, progress->m_h),
0 /* no clipping */, colors, true);

View File

@ -12,6 +12,7 @@
//#include "os.h"
#include "Keycodes.h"
#include "graphics/glwrap.hpp"
#include "graphics/irr_driver.hpp"
#include "utils/translation.hpp"
#include "utils/time.hpp"
@ -937,7 +938,7 @@ void CGUIEditBox::draw()
core::rect< s32 > caret_rect = CurrentTextRect;
caret_rect.UpperLeftCorner.X += charcursorpos - 1;
caret_rect.LowerRightCorner.X = caret_rect.UpperLeftCorner.X + 2;
irr_driver->getVideoDriver()->draw2DRectangle( video::SColor(255,0,0,0), caret_rect );
GL32_draw2DRectangle( video::SColor(255,0,0,0), caret_rect );
/*
font->draw(L"_", CurrentTextRect,

View File

@ -21,6 +21,7 @@
#include "audio/music_manager.hpp"
#include "audio/sfx_base.hpp"
#include "challenges/unlock_manager.hpp"
#include "graphics/glwrap.hpp"
#include "graphics/material.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/modaldialog.hpp"
@ -813,7 +814,7 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
ri->m_kart_icon->getSize());
core::recti dest_rect(current_x, y,
current_x+m_width_icon, y+m_width_icon);
irr_driver->getVideoDriver()->draw2DImage(ri->m_kart_icon, dest_rect,
draw2DImage(ri->m_kart_icon, dest_rect,
source_rect, NULL, NULL,
true);
}
@ -921,12 +922,12 @@ void RaceResultGUI::displaySoccerResults()
core::recti sourceRect(core::vector2di(0,0), redTeamIcon->getSize());
core::recti destRect(currX, currY, currX+redTeamIcon->getSize().Width/2,
currY+redTeamIcon->getSize().Height/2);
irr_driver->getVideoDriver()->draw2DImage(redTeamIcon, destRect,sourceRect,
draw2DImage(redTeamIcon, destRect,sourceRect,
NULL,NULL, true);
currX += UserConfigParams::m_width/2 - redTeamIcon->getSize().Width/2;
destRect = core::recti(currX, currY, currX+redTeamIcon->getSize().Width/2,
currY+redTeamIcon->getSize().Height/2);
irr_driver->getVideoDriver()->draw2DImage(blueTeamIcon,destRect,sourceRect,
draw2DImage(blueTeamIcon,destRect,sourceRect,
NULL, NULL, true);
resultText = StringUtils::toWString(teamScore[1]);
@ -977,7 +978,7 @@ void RaceResultGUI::displaySoccerResults()
sourceRect = core::recti(core::vector2di(0,0), scorerIcon->getSize());
irr::u32 offsetX = GUIEngine::getFont()->getDimension(resultText.c_str()).Width/2;
destRect = core::recti(currX-offsetX-30, currY, currX-offsetX, currY+ 30);
irr_driver->getVideoDriver()->draw2DImage(scorerIcon, destRect, sourceRect,
draw2DImage(scorerIcon, destRect, sourceRect,
NULL, NULL, true);
}
@ -1009,7 +1010,7 @@ void RaceResultGUI::displaySoccerResults()
irr::u32 offsetX = GUIEngine::getFont()->getDimension(resultText.c_str()).Width/2;
destRect = core::recti(currX-offsetX-30, currY, currX-offsetX, currY+ 30);
irr_driver->getVideoDriver()->draw2DImage(scorerIcon, destRect, sourceRect,
draw2DImage(scorerIcon, destRect, sourceRect,
NULL, NULL, true);
}
}
@ -1180,7 +1181,7 @@ void RaceResultGUI::displayHighScores()
core::recti dest_rect(current_x, current_y,
current_x+m_width_icon, current_y+m_width_icon);
irr_driver->getVideoDriver()->draw2DImage(
draw2DImage(
kart_icon_texture, dest_rect,
source_rect, NULL, NULL,
true);