diff options
author | sfan5 <sfan5@live.de> | 2021-03-31 13:15:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 13:15:47 +0200 |
commit | 1e4913cd76f5d31456d04a5ce23e66d5c60060de (patch) | |
tree | b97fe77b159d158d88ff87df59effd821c0b2e1d /src/irrlicht_changes | |
parent | 0d90ed6d921baefbb1a969df69f7b86e702e962f (diff) | |
download | minetest-1e4913cd76f5d31456d04a5ce23e66d5c60060de.tar.gz minetest-1e4913cd76f5d31456d04a5ce23e66d5c60060de.tar.bz2 minetest-1e4913cd76f5d31456d04a5ce23e66d5c60060de.zip |
Irrlicht support code maintenance
Diffstat (limited to 'src/irrlicht_changes')
-rw-r--r-- | src/irrlicht_changes/CGUITTFont.cpp | 8 | ||||
-rw-r--r-- | src/irrlicht_changes/CGUITTFont.h | 2 | ||||
-rw-r--r-- | src/irrlicht_changes/static_text.cpp | 4 | ||||
-rw-r--r-- | src/irrlicht_changes/static_text.h | 4 |
4 files changed, 1 insertions, 17 deletions
diff --git a/src/irrlicht_changes/CGUITTFont.cpp b/src/irrlicht_changes/CGUITTFont.cpp index 8b01e88ae..05a1ae43e 100644 --- a/src/irrlicht_changes/CGUITTFont.cpp +++ b/src/irrlicht_changes/CGUITTFont.cpp @@ -1021,11 +1021,7 @@ video::IImage* CGUITTFont::createTextureFromChar(const uchar32_t& ch) video::ITexture* tex = page->texture; // Acquire a read-only lock of the corresponding page texture. - #if IRRLICHT_VERSION_MAJOR==1 && IRRLICHT_VERSION_MINOR>=8 void* ptr = tex->lock(video::ETLM_READ_ONLY); - #else - void* ptr = tex->lock(true); - #endif video::ECOLOR_FORMAT format = tex->getColorFormat(); core::dimension2du tex_size = tex->getOriginalSize(); @@ -1182,11 +1178,7 @@ core::array<scene::ISceneNode*> CGUITTFont::addTextSceneNode(const wchar_t* text // Now we copy planes corresponding to the letter size. IMeshManipulator* mani = smgr->getMeshManipulator(); IMesh* meshcopy = mani->createMeshCopy(shared_plane_ptr_); - #if IRRLICHT_VERSION_MAJOR==1 && IRRLICHT_VERSION_MINOR>=8 mani->scale(meshcopy, vector3df((f32)letter_size.Width, (f32)letter_size.Height, 1)); - #else - mani->scaleMesh(meshcopy, vector3df((f32)letter_size.Width, (f32)letter_size.Height, 1)); - #endif ISceneNode* current_node = smgr->addMeshSceneNode(meshcopy, parent, -1, current_pos); meshcopy->drop(); diff --git a/src/irrlicht_changes/CGUITTFont.h b/src/irrlicht_changes/CGUITTFont.h index a26a1db76..141ea3931 100644 --- a/src/irrlicht_changes/CGUITTFont.h +++ b/src/irrlicht_changes/CGUITTFont.h @@ -34,7 +34,7 @@ #include <irrlicht.h> #include <ft2build.h> #include <vector> -#include "irrUString.h" +#include <irrUString.h> #include "util/enriched_string.h" #include FT_FREETYPE_H diff --git a/src/irrlicht_changes/static_text.cpp b/src/irrlicht_changes/static_text.cpp index a8cc33352..b20707bbd 100644 --- a/src/irrlicht_changes/static_text.cpp +++ b/src/irrlicht_changes/static_text.cpp @@ -246,11 +246,7 @@ void StaticText::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vert } -#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 7 -const video::SColor& StaticText::getOverrideColor() const -#else video::SColor StaticText::getOverrideColor() const -#endif { return ColoredText.getDefaultColor(); } diff --git a/src/irrlicht_changes/static_text.h b/src/irrlicht_changes/static_text.h index 786129d57..83bbf4c3d 100644 --- a/src/irrlicht_changes/static_text.h +++ b/src/irrlicht_changes/static_text.h @@ -134,11 +134,7 @@ namespace gui virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical); //! Gets the override color - #if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 7 - virtual const video::SColor& getOverrideColor() const; - #else virtual video::SColor getOverrideColor() const; - #endif #if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8 //! Gets the currently used text color |