mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Remove deprecated methods from IVideoDriver
This commit is contained in:
@ -869,8 +869,7 @@ const wchar_t* CNullDriver::getName() const
|
||||
|
||||
//! Creates a boolean alpha channel of the texture based of an color key.
|
||||
void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
video::SColor color,
|
||||
bool zeroTexels) const
|
||||
video::SColor color) const
|
||||
{
|
||||
if (!texture)
|
||||
return;
|
||||
@ -905,12 +904,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
// If the color matches the reference color, ignoring alphas,
|
||||
// set the alpha to zero.
|
||||
if(((*p) & 0x7fff) == refZeroAlpha)
|
||||
{
|
||||
if(zeroTexels)
|
||||
(*p) = 0;
|
||||
else
|
||||
(*p) = refZeroAlpha;
|
||||
}
|
||||
(*p) = refZeroAlpha;
|
||||
|
||||
++p;
|
||||
}
|
||||
@ -939,12 +933,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
// If the color matches the reference color, ignoring alphas,
|
||||
// set the alpha to zero.
|
||||
if(((*p) & 0x00ffffff) == refZeroAlpha)
|
||||
{
|
||||
if(zeroTexels)
|
||||
(*p) = 0;
|
||||
else
|
||||
(*p) = refZeroAlpha;
|
||||
}
|
||||
|
||||
++p;
|
||||
}
|
||||
@ -958,8 +947,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
|
||||
//! Creates an boolean alpha channel of the texture based of an color key position.
|
||||
void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
core::position2d<s32> colorKeyPixelPos,
|
||||
bool zeroTexels) const
|
||||
core::position2d<s32> colorKeyPixelPos) const
|
||||
{
|
||||
if (!texture)
|
||||
return;
|
||||
@ -1004,7 +992,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
|
||||
}
|
||||
|
||||
texture->unlock();
|
||||
makeColorKeyTexture(texture, colorKey, zeroTexels);
|
||||
makeColorKeyTexture(texture, colorKey);
|
||||
}
|
||||
|
||||
|
||||
@ -1242,27 +1230,6 @@ IImage* CNullDriver::createImage(ECOLOR_FORMAT format, const core::dimension2d<u
|
||||
}
|
||||
|
||||
|
||||
//! Creates a software image from another image.
|
||||
IImage* CNullDriver::createImage(ECOLOR_FORMAT format, IImage *imageToCopy)
|
||||
{
|
||||
os::Printer::log("Deprecated method, please create an empty image instead and use copyTo().", ELL_WARNING);
|
||||
|
||||
CImage* tmp = new CImage(format, imageToCopy->getDimension());
|
||||
imageToCopy->copyTo(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
//! Creates a software image from part of another image.
|
||||
IImage* CNullDriver::createImage(IImage* imageToCopy, const core::position2d<s32>& pos, const core::dimension2d<u32>& size)
|
||||
{
|
||||
os::Printer::log("Deprecated method, please create an empty image instead and use copyTo().", ELL_WARNING);
|
||||
CImage* tmp = new CImage(imageToCopy->getColorFormat(), imageToCopy->getDimension());
|
||||
imageToCopy->copyTo(tmp, core::position2di(0,0), core::recti(pos,size));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
//! Creates a software image from part of a texture.
|
||||
IImage* CNullDriver::createImage(ITexture* texture, const core::position2d<s32>& pos, const core::dimension2d<u32>& size)
|
||||
{
|
||||
|
@ -296,11 +296,11 @@ namespace video
|
||||
const io::path& name, const ECOLOR_FORMAT format) override;
|
||||
|
||||
//! Creates an 1bit alpha channel of the texture based of an color key.
|
||||
void makeColorKeyTexture(video::ITexture* texture, video::SColor color, bool zeroTexels) const override;
|
||||
void makeColorKeyTexture(video::ITexture* texture, video::SColor color) const override;
|
||||
|
||||
//! Creates an 1bit alpha channel of the texture based of an color key position.
|
||||
virtual void makeColorKeyTexture(video::ITexture* texture, core::position2d<s32> colorKeyPixelPos,
|
||||
bool zeroTexels) const override;
|
||||
virtual void makeColorKeyTexture(video::ITexture* texture,
|
||||
core::position2d<s32> colorKeyPixelPos) const override;
|
||||
|
||||
//! Returns the maximum amount of primitives (mostly vertices) which
|
||||
//! the device is able to render with one drawIndexedTriangleList
|
||||
@ -328,14 +328,6 @@ namespace video
|
||||
//! Creates an empty software image.
|
||||
IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) override;
|
||||
|
||||
//! Creates a software image from another image.
|
||||
IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) override;
|
||||
|
||||
//! Creates a software image from part of another image.
|
||||
virtual IImage* createImage(IImage* imageToCopy,
|
||||
const core::position2d<s32>& pos,
|
||||
const core::dimension2d<u32>& size) override;
|
||||
|
||||
//! Creates a software image from part of a texture.
|
||||
virtual IImage* createImage(ITexture* texture,
|
||||
const core::position2d<s32>& pos,
|
||||
|
Reference in New Issue
Block a user