mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Purge some dead code (mostly Irrlicht) (#16111)
* Remove obsolete Irrlicht attributes system
* Remove dead GUI element types
* Remove some obsolete Irrlicht headers
* Fix some oopsies from d96f5e1
This commit is contained in:
parent
377fa5bb14
commit
f4285a59ac
39 changed files with 24 additions and 831 deletions
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace io
|
||||
{
|
||||
|
||||
//! Types of attributes available for IAttributes
|
||||
enum E_ATTRIBUTE_TYPE
|
||||
{
|
||||
// integer attribute
|
||||
EAT_INT = 0,
|
||||
|
||||
// float attribute
|
||||
EAT_FLOAT,
|
||||
|
||||
// boolean attribute
|
||||
EAT_BOOL,
|
||||
|
||||
// known attribute type count
|
||||
EAT_COUNT,
|
||||
|
||||
// unknown attribute
|
||||
EAT_UNKNOWN
|
||||
};
|
||||
|
||||
} // end namespace io
|
||||
} // end namespace irr
|
|
@ -24,9 +24,6 @@ enum EGUI_ELEMENT_TYPE
|
|||
//! A combo box (IGUIComboBox)
|
||||
EGUIET_COMBO_BOX,
|
||||
|
||||
//! A context menu (IGUIContextMenu)
|
||||
EGUIET_CONTEXT_MENU,
|
||||
|
||||
//! A menu (IGUIMenu)
|
||||
EGUIET_MENU,
|
||||
|
||||
|
@ -36,54 +33,30 @@ enum EGUI_ELEMENT_TYPE
|
|||
//! A file open dialog (IGUIFileOpenDialog)
|
||||
EGUIET_FILE_OPEN_DIALOG,
|
||||
|
||||
//! A color select open dialog (IGUIColorSelectDialog)
|
||||
EGUIET_COLOR_SELECT_DIALOG,
|
||||
|
||||
//! A in/out fader (IGUIInOutFader)
|
||||
EGUIET_IN_OUT_FADER,
|
||||
|
||||
//! An image (IGUIImage)
|
||||
EGUIET_IMAGE,
|
||||
|
||||
//! A list box (IGUIListBox)
|
||||
EGUIET_LIST_BOX,
|
||||
|
||||
//! A mesh viewer (IGUIMeshViewer)
|
||||
EGUIET_MESH_VIEWER,
|
||||
|
||||
//! A message box (IGUIWindow)
|
||||
EGUIET_MESSAGE_BOX,
|
||||
|
||||
//! A modal screen
|
||||
EGUIET_MODAL_SCREEN,
|
||||
|
||||
//! A scroll bar (IGUIScrollBar)
|
||||
EGUIET_SCROLL_BAR,
|
||||
|
||||
//! A spin box (IGUISpinBox)
|
||||
EGUIET_SPIN_BOX,
|
||||
|
||||
//! A static text (IGUIStaticText)
|
||||
EGUIET_STATIC_TEXT,
|
||||
|
||||
//! A table (GUITable)
|
||||
EGUIET_TABLE,
|
||||
|
||||
//! A tab (IGUITab)
|
||||
EGUIET_TAB,
|
||||
|
||||
//! A tab control
|
||||
EGUIET_TAB_CONTROL,
|
||||
|
||||
//! A Table
|
||||
EGUIET_TABLE,
|
||||
|
||||
//! A tool bar (IGUIToolBar)
|
||||
EGUIET_TOOL_BAR,
|
||||
|
||||
//! A Tree View
|
||||
EGUIET_TREE_VIEW,
|
||||
|
||||
//! A window
|
||||
EGUIET_WINDOW,
|
||||
|
||||
//! Unknown type.
|
||||
EGUIET_ELEMENT,
|
||||
|
||||
|
@ -98,36 +71,5 @@ enum EGUI_ELEMENT_TYPE
|
|||
|
||||
};
|
||||
|
||||
//! Names for built-in element types
|
||||
const c8 *const GUIElementTypeNames[] = {
|
||||
"button",
|
||||
"checkBox",
|
||||
"comboBox",
|
||||
"contextMenu",
|
||||
"menu",
|
||||
"editBox",
|
||||
"fileOpenDialog",
|
||||
"colorSelectDialog",
|
||||
"inOutFader",
|
||||
"image",
|
||||
"listBox",
|
||||
"meshViewer",
|
||||
"messageBox",
|
||||
"modalScreen",
|
||||
"scrollBar",
|
||||
"spinBox",
|
||||
"staticText",
|
||||
"tab",
|
||||
"tabControl",
|
||||
"table",
|
||||
"toolBar",
|
||||
"treeview",
|
||||
"window",
|
||||
"element",
|
||||
"root",
|
||||
"profiler",
|
||||
0,
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "EAttributes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
class ITexture;
|
||||
} // end namespace video
|
||||
namespace io
|
||||
{
|
||||
|
||||
//! Provides a generic interface for attributes and their values and the possibility to serialize them
|
||||
class IAttributes : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! Returns the type of an attribute
|
||||
//! \param attributeName: Name for the attribute
|
||||
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8 *attributeName) const = 0;
|
||||
|
||||
//! Returns if an attribute with a name exists
|
||||
virtual bool existsAttribute(const c8 *attributeName) const = 0;
|
||||
|
||||
//! Removes all attributes
|
||||
virtual void clear() = 0;
|
||||
|
||||
/*
|
||||
|
||||
Integer Attribute
|
||||
|
||||
*/
|
||||
|
||||
//! Adds an attribute as integer
|
||||
virtual void addInt(const c8 *attributeName, s32 value) = 0;
|
||||
|
||||
//! Sets an attribute as integer value
|
||||
virtual void setAttribute(const c8 *attributeName, s32 value) = 0;
|
||||
|
||||
//! Gets an attribute as integer value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual s32 getAttributeAsInt(const c8 *attributeName, irr::s32 defaultNotFound = 0) const = 0;
|
||||
|
||||
/*
|
||||
|
||||
Float Attribute
|
||||
|
||||
*/
|
||||
|
||||
//! Adds an attribute as float
|
||||
virtual void addFloat(const c8 *attributeName, f32 value) = 0;
|
||||
|
||||
//! Sets a attribute as float value
|
||||
virtual void setAttribute(const c8 *attributeName, f32 value) = 0;
|
||||
|
||||
//! Gets an attribute as float value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual f32 getAttributeAsFloat(const c8 *attributeName, irr::f32 defaultNotFound = 0.f) const = 0;
|
||||
|
||||
/*
|
||||
Bool Attribute
|
||||
*/
|
||||
|
||||
//! Adds an attribute as bool
|
||||
virtual void addBool(const c8 *attributeName, bool value) = 0;
|
||||
|
||||
//! Sets an attribute as boolean value
|
||||
virtual void setAttribute(const c8 *attributeName, bool value) = 0;
|
||||
|
||||
//! Gets an attribute as boolean value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual bool getAttributeAsBool(const c8 *attributeName, bool defaultNotFound = false) const = 0;
|
||||
};
|
||||
|
||||
} // end namespace io
|
||||
} // end namespace irr
|
|
@ -19,7 +19,6 @@ namespace io
|
|||
class IReadFile;
|
||||
class IWriteFile;
|
||||
class IFileList;
|
||||
class IAttributes;
|
||||
|
||||
//! The FileSystem manages files and archives and provides access to them.
|
||||
/** It manages where files are, so that modules which use the the IO do not
|
||||
|
|
|
@ -662,13 +662,6 @@ public:
|
|||
return type == Type;
|
||||
}
|
||||
|
||||
//! Returns the type name of the gui element.
|
||||
/** This is needed serializing elements. */
|
||||
virtual const c8 *getTypeName() const
|
||||
{
|
||||
return GUIElementTypeNames[Type];
|
||||
}
|
||||
|
||||
//! Returns the name of the element.
|
||||
/** \return Name as character string. */
|
||||
virtual const c8 *getName() const
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "dimension2d.h"
|
||||
#include "SColor.h"
|
||||
#include "ESceneNodeTypes.h"
|
||||
#include "SceneParameters.h" // IWYU pragma: export
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -20,7 +19,6 @@ struct SEvent;
|
|||
namespace io
|
||||
{
|
||||
class IReadFile;
|
||||
class IAttributes;
|
||||
class IWriteFile;
|
||||
class IFileSystem;
|
||||
} // end namespace io
|
||||
|
@ -373,11 +371,6 @@ public:
|
|||
/** All scene nodes are removed. */
|
||||
virtual void clear() = 0;
|
||||
|
||||
//! Get interface to the parameters set in this scene.
|
||||
/** String parameters can be used by plugins and mesh loaders.
|
||||
See COLLADA_CREATE_SCENE_INSTANCES and DMF_USE_MATERIALS_DIRS */
|
||||
virtual io::IAttributes *getParameters() = 0;
|
||||
|
||||
//! Get current render pass.
|
||||
/** All scene nodes are being rendered in a specific order.
|
||||
First lights, cameras, sky boxes, solid geometry, and then transparent
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace irr
|
|||
{
|
||||
namespace io
|
||||
{
|
||||
class IAttributes;
|
||||
class IReadFile;
|
||||
class IWriteFile;
|
||||
} // end namespace io
|
||||
|
@ -127,23 +126,6 @@ public:
|
|||
\param flag When true the feature is disabled, otherwise it is enabled. */
|
||||
virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag = true) = 0;
|
||||
|
||||
//! Get attributes of the actual video driver
|
||||
/** The following names can be queried for the given types:
|
||||
MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number.
|
||||
MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower.
|
||||
MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32.
|
||||
MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL
|
||||
MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders.
|
||||
MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer).
|
||||
MaxTextureSize (int) Dimension that a texture may have, both in width and height.
|
||||
MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far.
|
||||
MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems.
|
||||
Version (int) Version of the driver. Should be Major*100+Minor
|
||||
ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor.
|
||||
AntiAlias (int) Number of Samples the driver uses for each pixel. 0 and 1 means anti aliasing is off, typical values are 2,4,8,16,32
|
||||
*/
|
||||
virtual const io::IAttributes &getDriverAttributes() const = 0;
|
||||
|
||||
//! Sets transformation matrices.
|
||||
/** \param state Transformation type to be set, e.g. view,
|
||||
world, or projection.
|
||||
|
@ -1132,7 +1114,6 @@ public:
|
|||
|
||||
//! Only used by the engine internally.
|
||||
/** Passes the global material flag AllowZWriteOnTransparent.
|
||||
Use the SceneManager attribute to set this value from your app.
|
||||
\param flag Default behavior is to disable ZWrite, i.e. false. */
|
||||
virtual void setAllowZWriteOnTransparent(bool flag) = 0;
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
// these are obsolete and never pre-defined
|
||||
|
||||
#define IRRCALLCONV
|
||||
|
||||
#define IRRLICHT_API
|
|
@ -13,7 +13,6 @@
|
|||
#include "ITimer.h"
|
||||
#include "IOSOperator.h"
|
||||
#include "irrArray.h"
|
||||
#include "IrrCompileConfig.h"
|
||||
#include "position2d.h"
|
||||
#include "SColor.h" // video::ECOLOR_FORMAT
|
||||
#include <string>
|
||||
|
@ -45,7 +44,7 @@ class IContextManager;
|
|||
class IImage;
|
||||
class ITexture;
|
||||
class IVideoDriver;
|
||||
extern "C" IRRLICHT_API bool IRRCALLCONV isDriverSupported(E_DRIVER_TYPE driver);
|
||||
extern "C" bool isDriverSupported(E_DRIVER_TYPE driver);
|
||||
} // end namespace video
|
||||
|
||||
//! The Irrlicht device. You can create it with createDevice() or createDeviceEx().
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "EMaterialTypes.h" // IWYU pragma: export
|
||||
#include "EMaterialProps.h" // IWYU pragma: export
|
||||
#include "SMaterialLayer.h"
|
||||
#include "IrrCompileConfig.h" // for IRRLICHT_API
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -472,7 +471,7 @@ public:
|
|||
};
|
||||
|
||||
//! global const identity Material
|
||||
IRRLICHT_API extern const SMaterial IdentityMaterial;
|
||||
extern const SMaterial IdentityMaterial;
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "irrTypes.h"
|
||||
|
||||
/*! \file SceneParameters.h
|
||||
\brief Header file containing all scene parameters for modifying mesh loading etc.
|
||||
|
||||
This file includes all parameter names which can be set using ISceneManager::getParameters()
|
||||
to modify the behavior of plugins and mesh loaders.
|
||||
*/
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
//! Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials
|
||||
/** The default behavior in Irrlicht is to disable writing to the
|
||||
z-buffer for all really transparent, i.e. blending materials. This
|
||||
avoids problems with intersecting faces, but can also break renderings.
|
||||
If transparent materials should use the SMaterial flag for ZWriteEnable
|
||||
just as other material types use this attribute.
|
||||
Use it like this:
|
||||
\code
|
||||
SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
|
||||
\endcode
|
||||
**/
|
||||
const c8 *const ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent";
|
||||
|
||||
//! Flag to avoid loading group structures in .obj files
|
||||
/** Use it like this:
|
||||
\code
|
||||
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
|
||||
\endcode
|
||||
**/
|
||||
const c8 *const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
|
||||
|
||||
//! Flag to avoid loading material .mtl file for .obj files
|
||||
/** Use it like this:
|
||||
\code
|
||||
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true);
|
||||
\endcode
|
||||
**/
|
||||
const c8 *const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles";
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (C) 2015 Patryk Nadrowski
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "path.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
static io::path getExampleMediaPath()
|
||||
{
|
||||
#ifdef IRR_MOBILE_PATHS
|
||||
return io::path("media/");
|
||||
#else
|
||||
return io::path("../../media/");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // end namespace irr
|
|
@ -34,7 +34,6 @@
|
|||
#include "IEventReceiver.h"
|
||||
#include "irrTypes.h"
|
||||
#include "SIrrCreationParameters.h"
|
||||
#include "IrrCompileConfig.h" // for IRRLICHT_API and IRRCALLCONV
|
||||
|
||||
//! Everything in the Irrlicht Engine can be found in this namespace.
|
||||
namespace irr
|
||||
|
@ -56,7 +55,7 @@ for the vertical retrace period, otherwise not.
|
|||
\return Returns pointer to the created IrrlichtDevice or null if the
|
||||
device could not be created.
|
||||
*/
|
||||
extern "C" IRRLICHT_API IrrlichtDevice *IRRCALLCONV createDevice(
|
||||
extern "C" IrrlichtDevice *createDevice(
|
||||
video::E_DRIVER_TYPE driverType = video::EDT_OPENGL,
|
||||
// parentheses are necessary for some compilers
|
||||
const core::dimension2d<u32> &windowSize = (core::dimension2d<u32>(640, 480)),
|
||||
|
@ -74,7 +73,7 @@ handle in which the device should be created.
|
|||
See irr::SIrrlichtCreationParameters for details.
|
||||
\return Returns pointer to the created IrrlichtDevice or null if the
|
||||
device could not be created. */
|
||||
extern "C" IRRLICHT_API IrrlichtDevice *IRRCALLCONV createDeviceEx(
|
||||
extern "C" IrrlichtDevice *createDeviceEx(
|
||||
const SIrrlichtCreationParameters ¶meters);
|
||||
|
||||
// THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "plane3d.h"
|
||||
#include "aabbox3d.h"
|
||||
#include "rect.h"
|
||||
#include "IrrCompileConfig.h" // for IRRLICHT_API
|
||||
#include <cassert>
|
||||
|
||||
namespace irr
|
||||
|
@ -1899,7 +1898,7 @@ inline CMatrix4<T> operator*(const T scalar, const CMatrix4<T> &mat)
|
|||
typedef CMatrix4<f32> matrix4;
|
||||
|
||||
//! global const identity matrix
|
||||
IRRLICHT_API extern const matrix4 IdentityMatrix;
|
||||
extern const matrix4 IdentityMatrix;
|
||||
|
||||
} // end namespace core
|
||||
} // end namespace irr
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include "IrrCompileConfig.h" // for IRRLICHT_API
|
||||
#include "IContextManager.h"
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
|
@ -3199,4 +3198,4 @@ public:
|
|||
};
|
||||
|
||||
// Global GL procedures object.
|
||||
IRRLICHT_API extern OpenGLProcedures GL;
|
||||
extern OpenGLProcedures GL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue