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

@@ -32,34 +32,34 @@ namespace scene
//! destructor
virtual ~CTextSceneNode();
virtual void OnRegisterSceneNode() _IRR_OVERRIDE_;
virtual void OnRegisterSceneNode() IRR_OVERRIDE;
//! renders the node.
virtual void render() _IRR_OVERRIDE_;
virtual void render() IRR_OVERRIDE;
//! returns the axis aligned bounding box of this node
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_;
virtual const core::aabbox3d<f32>& getBoundingBox() const IRR_OVERRIDE;
//! sets the text string
virtual void setText(const wchar_t* text) _IRR_OVERRIDE_;
virtual void setText(const wchar_t* text) IRR_OVERRIDE;
//! get the text string
virtual const wchar_t* getText() const _IRR_OVERRIDE_;
virtual const wchar_t* getText() const IRR_OVERRIDE;
//! sets the color of the text
virtual void setTextColor(video::SColor color) _IRR_OVERRIDE_;
virtual void setTextColor(video::SColor color) IRR_OVERRIDE;
//! get the color of the text
virtual video::SColor getTextColor() const _IRR_OVERRIDE_;
virtual video::SColor getTextColor() const IRR_OVERRIDE;
//! set the font used to draw the text
virtual void setFont(gui::IGUIFont* font) _IRR_OVERRIDE_;
virtual void setFont(gui::IGUIFont* font) IRR_OVERRIDE;
//! Get the font used to draw the text
virtual gui::IGUIFont* getFont() const _IRR_OVERRIDE_;
virtual gui::IGUIFont* getFont() const IRR_OVERRIDE;
//! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_TEXT; }
virtual ESCENE_NODE_TYPE getType() const IRR_OVERRIDE { return ESNT_TEXT; }
private:
@@ -83,67 +83,67 @@ namespace scene
virtual ~CBillboardTextSceneNode();
//! sets the vertex positions etc
virtual void OnAnimate(u32 timeMs) _IRR_OVERRIDE_;
virtual void OnAnimate(u32 timeMs) IRR_OVERRIDE;
//! registers the node into the transparent pass
virtual void OnRegisterSceneNode() _IRR_OVERRIDE_;
virtual void OnRegisterSceneNode() IRR_OVERRIDE;
//! renders the node.
virtual void render() _IRR_OVERRIDE_;
virtual void render() IRR_OVERRIDE;
//! returns the axis aligned bounding box of this node
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_;
virtual const core::aabbox3d<f32>& getBoundingBox() const IRR_OVERRIDE;
//! sets the text string
virtual void setText(const wchar_t* text) _IRR_OVERRIDE_;
virtual void setText(const wchar_t* text) IRR_OVERRIDE;
//! get the text string
virtual const wchar_t* getText() const _IRR_OVERRIDE_;
virtual const wchar_t* getText() const IRR_OVERRIDE;
//! Get the font used to draw the text
virtual gui::IGUIFont* getFont() const _IRR_OVERRIDE_;
virtual gui::IGUIFont* getFont() const IRR_OVERRIDE;
//! sets the size of the billboard
virtual void setSize(const core::dimension2d<f32>& size) _IRR_OVERRIDE_;
virtual void setSize(const core::dimension2d<f32>& size) IRR_OVERRIDE;
//! gets the size of the billboard
virtual const core::dimension2d<f32>& getSize() const _IRR_OVERRIDE_;
virtual const core::dimension2d<f32>& getSize() const IRR_OVERRIDE;
virtual video::SMaterial& getMaterial(u32 i) _IRR_OVERRIDE_;
virtual video::SMaterial& getMaterial(u32 i) IRR_OVERRIDE;
//! returns amount of materials used by this scene node.
virtual u32 getMaterialCount() const _IRR_OVERRIDE_;
virtual u32 getMaterialCount() const IRR_OVERRIDE;
//! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_BILLBOARD_TEXT; }
virtual ESCENE_NODE_TYPE getType() const IRR_OVERRIDE { return ESNT_BILLBOARD_TEXT; }
//! Set the color of all vertices of the billboard
//! \param overallColor: the color to set
virtual void setColor(const video::SColor & overallColor) _IRR_OVERRIDE_;
virtual void setColor(const video::SColor & overallColor) IRR_OVERRIDE;
//! Set the color of the top and bottom vertices of the billboard
//! \param topColor: the color to set the top vertices
//! \param bottomColor: the color to set the bottom vertices
virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) _IRR_OVERRIDE_;
virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) IRR_OVERRIDE;
//! Gets the color of the top and bottom vertices of the billboard
//! \param topColor: stores the color of the top vertices
//! \param bottomColor: stores the color of the bottom vertices
virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const _IRR_OVERRIDE_;
virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const IRR_OVERRIDE;
virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) _IRR_OVERRIDE_
virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) IRR_OVERRIDE
{
setSize(core::dimension2df(bottomEdgeWidth, height));
}
virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const _IRR_OVERRIDE_
virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const IRR_OVERRIDE
{
height = Size.Height;
bottomEdgeWidth = Size.Width;
topEdgeWidth = Size.Width;
}
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) _IRR_OVERRIDE_;
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) IRR_OVERRIDE;
protected:
void updateMesh(const irr::scene::ICameraSceneNode* camera);