Upgrade Utility

This commit is contained in:
Jérôme Leclercq
2021-05-24 19:10:53 +02:00
parent b936946154
commit cce32a64d4
120 changed files with 2328 additions and 2971 deletions

View File

@@ -11,7 +11,6 @@
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceParameters.hpp>
@@ -32,12 +31,10 @@ namespace Nz
struct FontGlyph;
using FontConstRef = ObjectRef<const Font>;
using FontLibrary = ObjectLibrary<Font>;
using FontLoader = ResourceLoader<Font, FontParams>;
using FontRef = ObjectRef<Font>;
class NAZARA_UTILITY_API Font : public RefCounted, public Resource
class NAZARA_UTILITY_API Font : public Resource
{
friend FontLibrary;
friend FontLoader;
@@ -85,15 +82,13 @@ namespace Nz
Font& operator=(Font&&) = delete;
static std::shared_ptr<AbstractAtlas> GetDefaultAtlas();
static const FontRef& GetDefault();
static const std::shared_ptr<Font>& GetDefault();
static unsigned int GetDefaultGlyphBorder();
static unsigned int GetDefaultMinimumStepSize();
static FontRef OpenFromFile(const std::filesystem::path& filePath, const FontParams& params = FontParams());
static FontRef OpenFromMemory(const void* data, std::size_t size, const FontParams& params = FontParams());
static FontRef OpenFromStream(Stream& stream, const FontParams& params = FontParams());
template<typename... Args> static FontRef New(Args&&... args);
static std::shared_ptr<Font> OpenFromFile(const std::filesystem::path& filePath, const FontParams& params = FontParams());
static std::shared_ptr<Font> OpenFromMemory(const void* data, std::size_t size, const FontParams& params = FontParams());
static std::shared_ptr<Font> OpenFromStream(Stream& stream, const FontParams& params = FontParams());
static void SetDefaultAtlas(const std::shared_ptr<AbstractAtlas>& atlas);
static void SetDefaultGlyphBorder(unsigned int borderSize);
@@ -154,9 +149,7 @@ namespace Nz
unsigned int m_minimumStepSize;
static std::shared_ptr<AbstractAtlas> s_defaultAtlas;
static FontRef s_defaultFont;
static FontLibrary::LibraryMap s_library;
static FontLoader::LoaderList s_loaders;
static std::shared_ptr<Font> s_defaultFont;
static unsigned int s_defaultGlyphBorder;
static unsigned int s_defaultMinimumStepSize;
};