1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:29:55 +00:00
openmw/components/fallback/fallback.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.2 KiB
C++
Raw Normal View History

2016-01-06 11:46:06 +00:00
#ifndef OPENMW_COMPONENTS_FALLBACK_H
#define OPENMW_COMPONENTS_FALLBACK_H
2013-03-15 09:26:04 +00:00
#include <map>
#include <string>
2022-08-28 15:20:49 +00:00
#include <string_view>
2013-03-15 09:26:04 +00:00
#include <osg/Vec4f>
2013-03-15 09:26:04 +00:00
2016-01-06 11:46:06 +00:00
namespace Fallback
{
2016-01-06 11:46:06 +00:00
/// @brief contains settings imported from the Morrowind INI file.
class Map
{
static std::map<std::string, int, std::less<>> mIntFallbackMap;
static std::map<std::string, float, std::less<>> mFloatFallbackMap;
static std::map<std::string, std::string, std::less<>> mNonNumericFallbackMap;
2016-01-06 11:58:36 +00:00
2022-09-22 18:26:05 +00:00
public:
static void init(const std::map<std::string, std::string>& fallback);
2022-09-22 18:26:05 +00:00
static const std::map<std::string, int, std::less<>>& getIntFallbackMap() { return mIntFallbackMap; }
static const std::map<std::string, float, std::less<>>& getFloatFallbackMap() { return mFloatFallbackMap; }
static const std::map<std::string, std::string, std::less<>>& getNonNumericFallbackMap()
{
return mNonNumericFallbackMap;
}
2022-08-28 15:20:49 +00:00
static std::string_view getString(std::string_view fall);
static float getFloat(std::string_view fall);
static int getInt(std::string_view fall);
static bool getBool(std::string_view fall);
static osg::Vec4f getColour(std::string_view fall);
};
}
#endif