mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-10 03:55:20 +01:00
Irrlicht: remove some dead code
This commit is contained in:
@@ -11,9 +11,6 @@
|
||||
class IOSOperator : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! Get the current OS version as string.
|
||||
virtual const core::stringc &getOperatingSystemVersion() const = 0;
|
||||
|
||||
//! Copies text to the clipboard
|
||||
//! \param text: text in utf-8
|
||||
virtual void copyToClipboard(const c8 *text) const = 0;
|
||||
@@ -31,10 +28,4 @@ public:
|
||||
//! This is a no-op on some platforms.
|
||||
//! \return Returns 0 if no string is in there, otherwise an utf-8 string.
|
||||
virtual const c8 *getTextFromPrimarySelection() const = 0;
|
||||
|
||||
//! Get the total and available system RAM
|
||||
/** \param totalBytes: will contain the total system memory in Kilobytes (1024 B)
|
||||
\param availableBytes: will contain the available memory in Kilobytes (1024 B)
|
||||
\return True if successful, false if not */
|
||||
virtual bool getSystemMemory(u32 *totalBytes, u32 *availableBytes) const = 0;
|
||||
};
|
||||
|
||||
@@ -379,32 +379,6 @@ public:
|
||||
/** This is glBlitFramebuffer in OpenGL. */
|
||||
virtual void blitRenderTarget(IRenderTarget *from, IRenderTarget *to) = 0;
|
||||
|
||||
//! Sets a boolean alpha channel on the texture based on a color key.
|
||||
/** This makes the texture fully transparent at the texels where
|
||||
this color key can be found when using for example draw2DImage
|
||||
with useAlphachannel==true. The alpha of other texels is not modified.
|
||||
\param texture Texture whose alpha channel is modified.
|
||||
\param color Color key color. Every texel with this color will
|
||||
become fully transparent as described above. Please note that the
|
||||
colors of a texture may be converted when loading it, so the
|
||||
color values may not be exactly the same in the engine and for
|
||||
example in picture edit programs. To avoid this problem, you
|
||||
could use the makeColorKeyTexture method, which takes the
|
||||
position of a pixel instead a color value. */
|
||||
virtual void makeColorKeyTexture(video::ITexture *texture,
|
||||
video::SColor color) const = 0;
|
||||
|
||||
//! Sets a boolean alpha channel on the texture based on the color at a position.
|
||||
/** This makes the texture fully transparent at the texels where
|
||||
the color key can be found when using for example draw2DImage
|
||||
with useAlphachannel==true. The alpha of other texels is not modified.
|
||||
\param texture Texture whose alpha channel is modified.
|
||||
\param colorKeyPixelPos Position of a pixel with the color key
|
||||
color. Every texel with this color will become fully transparent as
|
||||
described above. */
|
||||
virtual void makeColorKeyTexture(video::ITexture *texture,
|
||||
core::position2d<s32> colorKeyPixelPos) const = 0;
|
||||
|
||||
//! Set a render target.
|
||||
/** This will only work if the driver supports the
|
||||
EVDF_RENDER_TO_TARGET feature, which can be queried with
|
||||
@@ -812,10 +786,6 @@ public:
|
||||
f32 &start, f32 &end, f32 &density,
|
||||
bool &pixelFog, bool &rangeFog) = 0;
|
||||
|
||||
//! Get the current color format of the color buffer
|
||||
/** \return Color format of the color buffer. */
|
||||
virtual ECOLOR_FORMAT getColorFormat() const = 0;
|
||||
|
||||
//! Get the size of the screen or render window.
|
||||
/** \return Size of screen or render window. */
|
||||
virtual const core::dimension2d<u32> &getScreenSize() const = 0;
|
||||
@@ -827,14 +797,6 @@ public:
|
||||
\return Size of render target or screen/window */
|
||||
virtual const core::dimension2d<u32> &getCurrentRenderTargetSize() const = 0;
|
||||
|
||||
//! Returns current frames per second value.
|
||||
/** This value is updated approximately every 1.5 seconds and
|
||||
is only intended to provide a rough guide to the average frame
|
||||
rate. It is not suitable for use in performing timing
|
||||
calculations or framerate independent movement.
|
||||
\return Approximate amount of frames per second drawn. */
|
||||
virtual s32 getFPS() const = 0;
|
||||
|
||||
//! Return some statistics about the last frame
|
||||
virtual SFrameStats getFrameStats() const = 0;
|
||||
|
||||
@@ -1006,26 +968,6 @@ public:
|
||||
/** \return Amount of currently available material renderers. */
|
||||
virtual u32 getMaterialRendererCount() const = 0;
|
||||
|
||||
//! Get name of a material renderer
|
||||
/** This string can, e.g., be used to test if a specific
|
||||
renderer already has been registered/created, or use this
|
||||
string to store data about materials: This returned name will
|
||||
be also used when serializing materials.
|
||||
\param idx Id of the material renderer. Can be a value of the
|
||||
E_MATERIAL_TYPE enum or a value which was returned by
|
||||
addMaterialRenderer().
|
||||
\return String with the name of the renderer, or 0 if not
|
||||
existing */
|
||||
virtual const c8 *getMaterialRendererName(u32 idx) const = 0;
|
||||
|
||||
//! Sets the name of a material renderer.
|
||||
/** Will have no effect on built-in material renderers.
|
||||
\param idx: Id of the material renderer. Can be a value of the
|
||||
E_MATERIAL_TYPE enum or a value which was returned by
|
||||
addMaterialRenderer().
|
||||
\param name: New name of the material renderer. */
|
||||
virtual void setMaterialRendererName(u32 idx, const c8 *name) = 0;
|
||||
|
||||
//! Swap the material renderers used for certain id's
|
||||
/** Swap the IMaterialRenderers responsible for rendering specific
|
||||
material-id's. This means every SMaterial using a MaterialType
|
||||
|
||||
@@ -196,10 +196,6 @@ public:
|
||||
or similar. */
|
||||
virtual bool supportsTouchEvents() const { return false; }
|
||||
|
||||
//! Get the current color format of the window
|
||||
/** \return Color format of the window. */
|
||||
virtual video::ECOLOR_FORMAT getColorFormat() const = 0;
|
||||
|
||||
//! Notifies the device that it should close itself.
|
||||
/** IrrlichtDevice::run() will always return false after closeDevice() was called. */
|
||||
virtual void closeDevice() = 0;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct SMesh final : public IAnimatedMesh
|
||||
}
|
||||
|
||||
//! clean mesh
|
||||
virtual void clear()
|
||||
void clear()
|
||||
{
|
||||
for (auto *buf : MeshBuffers)
|
||||
buf->drop();
|
||||
|
||||
@@ -90,7 +90,7 @@ struct SSkinMeshBuffer final : public IMeshBuffer
|
||||
}
|
||||
|
||||
//! Get standard vertex at given index
|
||||
virtual video::S3DVertex *getVertex(u32 index)
|
||||
video::S3DVertex *getVertex(u32 index)
|
||||
{
|
||||
switch (VertexType) {
|
||||
case video::EVT_2TCOORDS:
|
||||
|
||||
@@ -312,13 +312,6 @@ typedef union
|
||||
f32 f;
|
||||
} inttofloat;
|
||||
|
||||
#define F32_AS_S32(f) (*((s32 *)&(f)))
|
||||
#define F32_AS_U32(f) (*((u32 *)&(f)))
|
||||
#define F32_AS_U32_POINTER(f) (((u32 *)&(f)))
|
||||
|
||||
#define F32_VALUE_0 0x00000000
|
||||
#define F32_VALUE_1 0x3f800000
|
||||
|
||||
//! code is taken from IceFPU
|
||||
//! Integer representation of a floating-point value.
|
||||
inline u32 IR(f32 x)
|
||||
@@ -420,12 +413,6 @@ REALINLINE f64 reciprocal(const f64 f)
|
||||
return 1.0 / f;
|
||||
}
|
||||
|
||||
// calculate: 1 / x, low precision allowed
|
||||
REALINLINE f32 reciprocal_approxim(const f32 f)
|
||||
{
|
||||
return 1.f / f;
|
||||
}
|
||||
|
||||
REALINLINE s32 floor32(f32 x)
|
||||
{
|
||||
return (s32)floorf(x);
|
||||
@@ -442,16 +429,6 @@ REALINLINE s32 round32(f32 x)
|
||||
return (s32)round_(x);
|
||||
}
|
||||
|
||||
inline f32 f32_max3(const f32 a, const f32 b, const f32 c)
|
||||
{
|
||||
return a > b ? (a > c ? a : c) : (b > c ? b : c);
|
||||
}
|
||||
|
||||
inline f32 f32_min3(const f32 a, const f32 b, const f32 c)
|
||||
{
|
||||
return a < b ? (a < c ? a : c) : (b < c ? b : c);
|
||||
}
|
||||
|
||||
inline f32 fract(f32 x)
|
||||
{
|
||||
return x - floorf(x);
|
||||
|
||||
Reference in New Issue
Block a user