1
0

API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.

C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter.
We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well.
As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h
Including that allows to continue using old defines for a while - or make it easier to have code which compiles 
with old and new Irrlicht library versions.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-08-27 12:55:10 +00:00
parent ee180dbd24
commit ffd7b63af0
289 changed files with 3401 additions and 3379 deletions

View File

@@ -36,19 +36,19 @@ namespace scene
}
//! returns the material of this meshbuffer
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
virtual const video::SMaterial& getMaterial() const IRR_OVERRIDE
{
return Material;
}
//! returns the material of this meshbuffer
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
virtual video::SMaterial& getMaterial() IRR_OVERRIDE
{
return Material;
}
//! returns pointer to vertices
virtual const void* getVertices() const _IRR_OVERRIDE_
virtual const void* getVertices() const IRR_OVERRIDE
{
if (Vertices)
return Vertices->const_pointer();
@@ -57,7 +57,7 @@ namespace scene
}
//! returns pointer to vertices
virtual void* getVertices() _IRR_OVERRIDE_
virtual void* getVertices() IRR_OVERRIDE
{
if (Vertices)
return Vertices->pointer();
@@ -66,7 +66,7 @@ namespace scene
}
//! returns amount of vertices
virtual u32 getVertexCount() const _IRR_OVERRIDE_
virtual u32 getVertexCount() const IRR_OVERRIDE
{
if (Vertices)
return Vertices->size();
@@ -75,49 +75,49 @@ namespace scene
}
//! returns pointer to indices
virtual const u16* getIndices() const _IRR_OVERRIDE_
virtual const u16* getIndices() const IRR_OVERRIDE
{
return Indices.const_pointer();
}
//! returns pointer to indices
virtual u16* getIndices() _IRR_OVERRIDE_
virtual u16* getIndices() IRR_OVERRIDE
{
return Indices.pointer();
}
//! returns amount of indices
virtual u32 getIndexCount() const _IRR_OVERRIDE_
virtual u32 getIndexCount() const IRR_OVERRIDE
{
return Indices.size();
}
//! Get type of index data which is stored in this meshbuffer.
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
virtual video::E_INDEX_TYPE getIndexType() const IRR_OVERRIDE
{
return video::EIT_16BIT;
}
//! returns an axis aligned bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
virtual const core::aabbox3d<f32>& getBoundingBox() const IRR_OVERRIDE
{
return BoundingBox;
}
//! set user axis aligned bounding box
virtual void setBoundingBox( const core::aabbox3df& box) _IRR_OVERRIDE_
virtual void setBoundingBox( const core::aabbox3df& box) IRR_OVERRIDE
{
BoundingBox = box;
}
//! returns which type of vertex data is stored.
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
virtual video::E_VERTEX_TYPE getVertexType() const IRR_OVERRIDE
{
return video::EVT_STANDARD;
}
//! recalculates the bounding box. should be called if the mesh changed.
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
virtual void recalculateBoundingBox() IRR_OVERRIDE
{
if (!Vertices || Vertices->empty() || Indices.empty())
BoundingBox.reset(0,0,0);
@@ -130,66 +130,66 @@ namespace scene
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
virtual const core::vector3df& getPosition(u32 i) const IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
virtual core::vector3df& getPosition(u32 i) IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
virtual const core::vector3df& getNormal(u32 i) const IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
virtual core::vector3df& getNormal(u32 i) IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
virtual const core::vector2df& getTCoords(u32 i) const IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
virtual core::vector2df& getTCoords(u32 i) IRR_OVERRIDE
{
_IRR_DEBUG_BREAK_IF(!Vertices);
IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].TCoords;
}
//! append the vertices and indices to the current buffer
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_ {}
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) IRR_OVERRIDE {}
//! append the meshbuffer to the current buffer
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_ {}
virtual void append(const IMeshBuffer* const other) IRR_OVERRIDE {}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const IRR_OVERRIDE
{
return MappingHintVertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const IRR_OVERRIDE
{
return MappingHintIndex;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) IRR_OVERRIDE
{
if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
MappingHintVertex=NewMappingHint;
@@ -198,19 +198,19 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) IRR_OVERRIDE
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
virtual E_PRIMITIVE_TYPE getPrimitiveType() const IRR_OVERRIDE
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) IRR_OVERRIDE
{
if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
++ChangedID_Vertex;
@@ -220,11 +220,11 @@ namespace scene
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_ {return ChangedID_Vertex;}
virtual u32 getChangedID_Vertex() const IRR_OVERRIDE {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_ {return ChangedID_Index;}
virtual u32 getChangedID_Index() const IRR_OVERRIDE {return ChangedID_Index;}
//! Material of this meshBuffer
video::SMaterial Material;