1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 03:59:56 +00:00

Remove unnecessary myguicompat

This commit is contained in:
uramer 2021-12-16 19:48:10 +01:00
parent 2bc81e47a6
commit 3f52ede9cb
6 changed files with 13 additions and 32 deletions

View file

@ -1,12 +0,0 @@
#ifndef OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H
#define OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H
#include <MyGUI_Prerequest.h>
#if MYGUI_VERSION > MYGUI_DEFINE_VERSION(3, 4, 0)
#define OPENMW_MYGUI_CONST_GETTER_3_4_1 const
#else
#define OPENMW_MYGUI_CONST_GETTER_3_4_1
#endif
#endif // OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H

View file

@ -15,7 +15,7 @@ void DataManager::setResourcePath(const std::string &path)
mResourcePath = path;
}
MyGUI::IDataStream *DataManager::getData(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1
MyGUI::IDataStream *DataManager::getData(const std::string &name) const
{
std::string fullpath = getDataPath(name);
std::unique_ptr<boost::filesystem::ifstream> stream;
@ -34,13 +34,13 @@ void DataManager::freeData(MyGUI::IDataStream *data)
delete data;
}
bool DataManager::isDataExist(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1
bool DataManager::isDataExist(const std::string &name) const
{
std::string fullpath = mResourcePath + "/" + name;
return boost::filesystem::exists(fullpath);
}
const MyGUI::VectorString &DataManager::getDataListNames(const std::string &pattern) OPENMW_MYGUI_CONST_GETTER_3_4_1
const MyGUI::VectorString &DataManager::getDataListNames(const std::string &pattern) const
{
// TODO: pattern matching (unused?)
static MyGUI::VectorString strings;
@ -49,7 +49,7 @@ const MyGUI::VectorString &DataManager::getDataListNames(const std::string &patt
return strings;
}
const std::string &DataManager::getDataPath(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1
const std::string &DataManager::getDataPath(const std::string &name) const
{
static std::string result;
result.clear();

View file

@ -3,8 +3,6 @@
#include <MyGUI_DataManager.h>
#include "myguicompat.h"
namespace osgMyGUI
{
@ -19,7 +17,7 @@ public:
/** Get data stream from specified resource name.
@param _name Resource name (usually file name).
*/
MyGUI::IDataStream* getData(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override;
MyGUI::IDataStream* getData(const std::string& _name) const override;
/** Free data stream.
@param _data Data stream.
@ -29,18 +27,18 @@ public:
/** Is data with specified name exist.
@param _name Resource name.
*/
bool isDataExist(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override;
bool isDataExist(const std::string& _name) const override;
/** Get all data names with names that matches pattern.
@param _pattern Pattern to match (for example "*.layout").
*/
const MyGUI::VectorString& getDataListNames(const std::string& _pattern) OPENMW_MYGUI_CONST_GETTER_3_4_1 override;
const MyGUI::VectorString& getDataListNames(const std::string& _pattern) const override;
/** Get full path to data.
@param _name Resource name.
@return Return full path to specified data.
*/
const std::string& getDataPath(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override;
const std::string& getDataPath(const std::string& _name) const override;
private:
std::string mResourcePath;

View file

@ -15,7 +15,6 @@
#include <components/shader/shadermanager.hpp>
#include <components/sceneutil/nodecallback.hpp>
#include "myguicompat.h"
#include "myguitexture.hpp"
#define MYGUI_PLATFORM_LOG_SECTION "Platform"
@ -276,7 +275,7 @@ public:
osg::VertexBufferObject* getVertexBuffer();
void setVertexCount(size_t count) override;
size_t getVertexCount() OPENMW_MYGUI_CONST_GETTER_3_4_1 override;
size_t getVertexCount() const override;
MyGUI::Vertex *lock() override;
void unlock() override;
@ -303,7 +302,7 @@ void OSGVertexBuffer::setVertexCount(size_t count)
mNeedVertexCount = count;
}
size_t OSGVertexBuffer::getVertexCount() OPENMW_MYGUI_CONST_GETTER_3_4_1
size_t OSGVertexBuffer::getVertexCount() const
{
return mNeedVertexCount;
}

View file

@ -5,8 +5,6 @@
#include <osg/ref_ptr>
#include "myguicompat.h"
namespace Resource
{
class ImageManager;
@ -79,7 +77,7 @@ public:
const MyGUI::IntSize& getViewSize() const override { return mViewSize; }
/** @see RenderManager::getVertexFormat */
MyGUI::VertexColourType getVertexFormat() OPENMW_MYGUI_CONST_GETTER_3_4_1 override
MyGUI::VertexColourType getVertexFormat() const override
{ return mVertexFormat; }
/** @see RenderManager::isFormatSupported */
@ -112,7 +110,7 @@ public:
void setInjectState(osg::StateSet* stateSet);
/** @see IRenderTarget::getInfo */
const MyGUI::RenderTargetInfo& getInfo() OPENMW_MYGUI_CONST_GETTER_3_4_1 override { return mInfo; }
const MyGUI::RenderTargetInfo& getInfo() const override { return mInfo; }
bool checkTexture(MyGUI::ITexture* _texture);

View file

@ -3,8 +3,6 @@
#include <MyGUI_RenderManager.h>
#include <algorithm>
#include "myguicompat.h"
namespace osgMyGUI
{
@ -39,7 +37,7 @@ namespace osgMyGUI
mTarget->doRender(_buffer, _texture, _count);
}
const MyGUI::RenderTargetInfo& getInfo() OPENMW_MYGUI_CONST_GETTER_3_4_1 override
const MyGUI::RenderTargetInfo& getInfo() const override
{
mInfo = mTarget->getInfo();
mInfo.hOffset = mHOffset;