mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 06:59:55 +00:00
Remove unnecessary myguicompat
This commit is contained in:
parent
2bc81e47a6
commit
3f52ede9cb
6 changed files with 13 additions and 32 deletions
|
@ -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
|
|
|
@ -15,7 +15,7 @@ void DataManager::setResourcePath(const std::string &path)
|
||||||
mResourcePath = 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::string fullpath = getDataPath(name);
|
||||||
std::unique_ptr<boost::filesystem::ifstream> stream;
|
std::unique_ptr<boost::filesystem::ifstream> stream;
|
||||||
|
@ -34,13 +34,13 @@ void DataManager::freeData(MyGUI::IDataStream *data)
|
||||||
delete 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;
|
std::string fullpath = mResourcePath + "/" + name;
|
||||||
return boost::filesystem::exists(fullpath);
|
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?)
|
// TODO: pattern matching (unused?)
|
||||||
static MyGUI::VectorString strings;
|
static MyGUI::VectorString strings;
|
||||||
|
@ -49,7 +49,7 @@ const MyGUI::VectorString &DataManager::getDataListNames(const std::string &patt
|
||||||
return strings;
|
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;
|
static std::string result;
|
||||||
result.clear();
|
result.clear();
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include <MyGUI_DataManager.h>
|
#include <MyGUI_DataManager.h>
|
||||||
|
|
||||||
#include "myguicompat.h"
|
|
||||||
|
|
||||||
namespace osgMyGUI
|
namespace osgMyGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -19,7 +17,7 @@ public:
|
||||||
/** Get data stream from specified resource name.
|
/** Get data stream from specified resource name.
|
||||||
@param _name Resource name (usually file 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.
|
/** Free data stream.
|
||||||
@param _data Data stream.
|
@param _data Data stream.
|
||||||
|
@ -29,18 +27,18 @@ public:
|
||||||
/** Is data with specified name exist.
|
/** Is data with specified name exist.
|
||||||
@param _name Resource name.
|
@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.
|
/** Get all data names with names that matches pattern.
|
||||||
@param _pattern Pattern to match (for example "*.layout").
|
@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.
|
/** Get full path to data.
|
||||||
@param _name Resource name.
|
@param _name Resource name.
|
||||||
@return Return full path to specified data.
|
@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:
|
private:
|
||||||
std::string mResourcePath;
|
std::string mResourcePath;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <components/shader/shadermanager.hpp>
|
#include <components/shader/shadermanager.hpp>
|
||||||
#include <components/sceneutil/nodecallback.hpp>
|
#include <components/sceneutil/nodecallback.hpp>
|
||||||
|
|
||||||
#include "myguicompat.h"
|
|
||||||
#include "myguitexture.hpp"
|
#include "myguitexture.hpp"
|
||||||
|
|
||||||
#define MYGUI_PLATFORM_LOG_SECTION "Platform"
|
#define MYGUI_PLATFORM_LOG_SECTION "Platform"
|
||||||
|
@ -276,7 +275,7 @@ public:
|
||||||
osg::VertexBufferObject* getVertexBuffer();
|
osg::VertexBufferObject* getVertexBuffer();
|
||||||
|
|
||||||
void setVertexCount(size_t count) override;
|
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;
|
MyGUI::Vertex *lock() override;
|
||||||
void unlock() override;
|
void unlock() override;
|
||||||
|
@ -303,7 +302,7 @@ void OSGVertexBuffer::setVertexCount(size_t count)
|
||||||
mNeedVertexCount = count;
|
mNeedVertexCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t OSGVertexBuffer::getVertexCount() OPENMW_MYGUI_CONST_GETTER_3_4_1
|
size_t OSGVertexBuffer::getVertexCount() const
|
||||||
{
|
{
|
||||||
return mNeedVertexCount;
|
return mNeedVertexCount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
#include "myguicompat.h"
|
|
||||||
|
|
||||||
namespace Resource
|
namespace Resource
|
||||||
{
|
{
|
||||||
class ImageManager;
|
class ImageManager;
|
||||||
|
@ -79,7 +77,7 @@ public:
|
||||||
const MyGUI::IntSize& getViewSize() const override { return mViewSize; }
|
const MyGUI::IntSize& getViewSize() const override { return mViewSize; }
|
||||||
|
|
||||||
/** @see RenderManager::getVertexFormat */
|
/** @see RenderManager::getVertexFormat */
|
||||||
MyGUI::VertexColourType getVertexFormat() OPENMW_MYGUI_CONST_GETTER_3_4_1 override
|
MyGUI::VertexColourType getVertexFormat() const override
|
||||||
{ return mVertexFormat; }
|
{ return mVertexFormat; }
|
||||||
|
|
||||||
/** @see RenderManager::isFormatSupported */
|
/** @see RenderManager::isFormatSupported */
|
||||||
|
@ -112,7 +110,7 @@ public:
|
||||||
void setInjectState(osg::StateSet* stateSet);
|
void setInjectState(osg::StateSet* stateSet);
|
||||||
|
|
||||||
/** @see IRenderTarget::getInfo */
|
/** @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);
|
bool checkTexture(MyGUI::ITexture* _texture);
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "myguicompat.h"
|
|
||||||
|
|
||||||
namespace osgMyGUI
|
namespace osgMyGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -39,7 +37,7 @@ namespace osgMyGUI
|
||||||
mTarget->doRender(_buffer, _texture, _count);
|
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 = mTarget->getInfo();
|
||||||
mInfo.hOffset = mHOffset;
|
mInfo.hOffset = mHOffset;
|
||||||
|
|
Loading…
Reference in a new issue