Commit f45b37fb authored by hybrid's avatar hybrid

Remove some casts.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2510 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3ca38ba7
......@@ -803,10 +803,10 @@ void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::po
if (useAlphaChannelOfTexture)
((CSoftwareTexture*)texture)->getImage()->copyToWithAlpha(
((CImage*)RenderTargetSurface), destPos, sourceRect, color, clipRect);
RenderTargetSurface, destPos, sourceRect, color, clipRect);
else
((CSoftwareTexture*)texture)->getImage()->copyTo(
((CImage*)RenderTargetSurface), destPos, sourceRect, clipRect);
RenderTargetSurface, destPos, sourceRect, clipRect);
}
}
......@@ -814,16 +814,17 @@ void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::po
//! Draws a 2d line.
void CSoftwareDriver::draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end,
SColor color)
const core::position2d<s32>& end,
SColor color)
{
((CImage*)RenderTargetSurface)->drawLine(start, end, color );
RenderTargetSurface->drawLine(start, end, color );
}
//! Draws a pixel
void CSoftwareDriver::drawPixel(u32 x, u32 y, const SColor & color)
{
((CImage*)BackBuffer)->setPixel(x, y, color, true);
BackBuffer->setPixel(x, y, color, true);
}
......@@ -840,14 +841,14 @@ void CSoftwareDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos,
if(!p.isValid())
return;
((CImage*)RenderTargetSurface)->drawRectangle(p, color);
RenderTargetSurface->drawRectangle(p, color);
}
else
{
if(!pos.isValid())
return;
((CImage*)RenderTargetSurface)->drawRectangle(pos, color);
RenderTargetSurface->drawRectangle(pos, color);
}
}
......
......@@ -154,7 +154,7 @@ namespace video
core::array<S2DVertex> TransformedPoints;
video::ITexture* RenderTargetTexture;
video::IImage* RenderTargetSurface;
video::CImage* RenderTargetSurface;
core::position2d<s32> Render2DTranslation;
core::dimension2d<u32> RenderTargetSize;
core::dimension2d<u32> ViewPortSize;
......
......@@ -400,7 +400,7 @@ bool CBurningVideoDriver::setRenderTarget(video::ITexture* texture, bool clearBa
DepthBuffer->clear();
if (clearBackBuffer)
((video::CImage*)RenderTargetSurface)->fill( color );
RenderTargetSurface->fill( color );
}
return true;
......@@ -1669,13 +1669,13 @@ void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end,
SColor color)
{
((CImage*)BackBuffer)->drawLine(start, end, color );
BackBuffer->drawLine(start, end, color );
}
//! Draws a pixel
void CBurningVideoDriver::drawPixel(u32 x, u32 y, const SColor & color)
{
((CImage*)BackBuffer)->setPixel(x, y, color, true);
BackBuffer->setPixel(x, y, color, true);
}
//! draw an 2d rectangle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment