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 ...@@ -803,10 +803,10 @@ void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::po
if (useAlphaChannelOfTexture) if (useAlphaChannelOfTexture)
((CSoftwareTexture*)texture)->getImage()->copyToWithAlpha( ((CSoftwareTexture*)texture)->getImage()->copyToWithAlpha(
((CImage*)RenderTargetSurface), destPos, sourceRect, color, clipRect); RenderTargetSurface, destPos, sourceRect, color, clipRect);
else else
((CSoftwareTexture*)texture)->getImage()->copyTo( ((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 ...@@ -814,16 +814,17 @@ void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::po
//! Draws a 2d line. //! Draws a 2d line.
void CSoftwareDriver::draw2DLine(const core::position2d<s32>& start, void CSoftwareDriver::draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end, const core::position2d<s32>& end,
SColor color) SColor color)
{ {
((CImage*)RenderTargetSurface)->drawLine(start, end, color ); RenderTargetSurface->drawLine(start, end, color );
} }
//! Draws a pixel //! Draws a pixel
void CSoftwareDriver::drawPixel(u32 x, u32 y, const SColor & color) 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, ...@@ -840,14 +841,14 @@ void CSoftwareDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos,
if(!p.isValid()) if(!p.isValid())
return; return;
((CImage*)RenderTargetSurface)->drawRectangle(p, color); RenderTargetSurface->drawRectangle(p, color);
} }
else else
{ {
if(!pos.isValid()) if(!pos.isValid())
return; return;
((CImage*)RenderTargetSurface)->drawRectangle(pos, color); RenderTargetSurface->drawRectangle(pos, color);
} }
} }
......
...@@ -154,7 +154,7 @@ namespace video ...@@ -154,7 +154,7 @@ namespace video
core::array<S2DVertex> TransformedPoints; core::array<S2DVertex> TransformedPoints;
video::ITexture* RenderTargetTexture; video::ITexture* RenderTargetTexture;
video::IImage* RenderTargetSurface; video::CImage* RenderTargetSurface;
core::position2d<s32> Render2DTranslation; core::position2d<s32> Render2DTranslation;
core::dimension2d<u32> RenderTargetSize; core::dimension2d<u32> RenderTargetSize;
core::dimension2d<u32> ViewPortSize; core::dimension2d<u32> ViewPortSize;
......
...@@ -400,7 +400,7 @@ bool CBurningVideoDriver::setRenderTarget(video::ITexture* texture, bool clearBa ...@@ -400,7 +400,7 @@ bool CBurningVideoDriver::setRenderTarget(video::ITexture* texture, bool clearBa
DepthBuffer->clear(); DepthBuffer->clear();
if (clearBackBuffer) if (clearBackBuffer)
((video::CImage*)RenderTargetSurface)->fill( color ); RenderTargetSurface->fill( color );
} }
return true; return true;
...@@ -1669,13 +1669,13 @@ void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start, ...@@ -1669,13 +1669,13 @@ void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end, const core::position2d<s32>& end,
SColor color) SColor color)
{ {
((CImage*)BackBuffer)->drawLine(start, end, color ); BackBuffer->drawLine(start, end, color );
} }
//! Draws a pixel //! Draws a pixel
void CBurningVideoDriver::drawPixel(u32 x, u32 y, const SColor & color) 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 //! 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