Remove Utility module and move its content to Core and TextRenderer modules

This commit is contained in:
SirLynix
2024-02-10 22:46:53 +01:00
committed by Jérôme Leclercq
parent 965a00182c
commit e64c2b036e
364 changed files with 2336 additions and 2516 deletions

View File

@@ -6,7 +6,7 @@
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Core/File.hpp>
#include <Nazara/Utility/Mesh.hpp>
#include <Nazara/Core/Mesh.hpp>
#include <assimp/cfileio.h>
#include <assimp/cimport.h>
#include <cstring>

View File

@@ -27,21 +27,21 @@ SOFTWARE.
#include <NazaraUtils/CallOnExit.hpp>
#include <NazaraUtils/StringHash.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Utility/Animation.hpp>
#include <Nazara/Utility/Mesh.hpp>
#include <Nazara/Utility/Image.hpp>
#include <Nazara/Utility/IndexIterator.hpp>
#include <Nazara/Utility/IndexMapper.hpp>
#include <Nazara/Utility/Joint.hpp>
#include <Nazara/Utility/MaterialData.hpp>
#include <Nazara/Utility/PixelFormat.hpp>
#include <Nazara/Utility/Sequence.hpp>
#include <Nazara/Utility/SkeletalMesh.hpp>
#include <Nazara/Utility/Skeleton.hpp>
#include <Nazara/Utility/StaticMesh.hpp>
#include <Nazara/Utility/VertexMapper.hpp>
#include <Nazara/Utility/Utility.hpp>
#include <Nazara/Utility/Plugins/AssimpPlugin.hpp>
#include <Nazara/Core/Animation.hpp>
#include <Nazara/Core/Mesh.hpp>
#include <Nazara/Core/Image.hpp>
#include <Nazara/Core/IndexIterator.hpp>
#include <Nazara/Core/IndexMapper.hpp>
#include <Nazara/Core/Joint.hpp>
#include <Nazara/Core/MaterialData.hpp>
#include <Nazara/Core/PixelFormat.hpp>
#include <Nazara/Core/Sequence.hpp>
#include <Nazara/Core/SkeletalMesh.hpp>
#include <Nazara/Core/Skeleton.hpp>
#include <Nazara/Core/StaticMesh.hpp>
#include <Nazara/Core/VertexMapper.hpp>
#include <Nazara/Core/Core.hpp>
#include <Nazara/Core/Plugins/AssimpPlugin.hpp>
#include <assimp/cfileio.h>
#include <assimp/cimport.h>
#include <assimp/config.h>
@@ -896,8 +896,8 @@ namespace
public:
bool Activate() override
{
Nz::Utility* utility = Nz::Utility::Instance();
NazaraAssert(utility, "utility module is not instancied");
Nz::Core* core = Nz::Core::Instance();
NazaraAssert(core, "core module is not instancied");
Nz::AnimationLoader::Entry animationLoaderEntry;
animationLoaderEntry.extensionSupport = IsSupported;
@@ -910,7 +910,7 @@ namespace
return true;
};
Nz::AnimationLoader& animationLoader = utility->GetAnimationLoader();
Nz::AnimationLoader& animationLoader = core->GetAnimationLoader();
m_animationLoaderEntry = animationLoader.RegisterLoader(std::move(animationLoaderEntry));
Nz::MeshLoader::Entry meshLoaderEntry;
@@ -924,7 +924,7 @@ namespace
return true;
};
Nz::MeshLoader& meshLoader = utility->GetMeshLoader();
Nz::MeshLoader& meshLoader = core->GetMeshLoader();
m_meshLoaderEntry = meshLoader.RegisterLoader(std::move(meshLoaderEntry));
return true;
@@ -932,13 +932,13 @@ namespace
void Deactivate() override
{
Nz::Utility* utility = Nz::Utility::Instance();
NazaraAssert(utility, "utility module is not instanced");
Nz::Core* core = Nz::Core::Instance();
NazaraAssert(core, "core module is not instanced");
Nz::AnimationLoader& animationLoader = utility->GetAnimationLoader();
Nz::AnimationLoader& animationLoader = core->GetAnimationLoader();
animationLoader.UnregisterLoader(m_animationLoaderEntry);
Nz::MeshLoader& meshLoader = utility->GetMeshLoader();
Nz::MeshLoader& meshLoader = core->GetMeshLoader();
meshLoader.UnregisterLoader(m_meshLoaderEntry);
}
@@ -976,10 +976,10 @@ extern "C"
{
NAZARA_EXPORT Nz::PluginInterface* PluginLoad()
{
Nz::Utility* utility = Nz::Utility::Instance();
if (!utility)
Nz::Core* core = Nz::Core::Instance();
if (!core)
{
NazaraError("Utility module must be initialized");
NazaraError("Core module must be initialized");
return nullptr;
}

View File

@@ -7,7 +7,7 @@ if has_config("assimp") then
set_group("Plugins")
add_rpathdirs("$ORIGIN")
add_deps("NazaraUtility")
add_deps("NazaraCore")
add_packages("assimp")
add_headerfiles("**.hpp", "**.inl", { prefixdir = "private", install = false })

View File

@@ -10,11 +10,11 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>
*/
#include <Nazara/Core/Algorithm.hpp>
#include <NazaraUtils/Algorithm.hpp>
#include <Nazara/Core/ByteStream.hpp>
#include <Nazara/Utility/ImageStream.hpp>
#include <Nazara/Utility/Utility.hpp>
#include <Nazara/Utility/Plugins/FFmpegPlugin.hpp>
#include <Nazara/Core/ImageStream.hpp>
#include <Nazara/Core/Core.hpp>
#include <Nazara/Core/Plugins/FFmpegPlugin.hpp>
extern "C"
{
@@ -434,8 +434,8 @@ namespace
public:
bool Activate() override
{
Nz::Utility* utility = Nz::Utility::Instance();
NazaraAssert(utility, "utility module is not instancied");
Nz::Core* core = Nz::Core::Instance();
NazaraAssert(core, "core module is not instancied");
Nz::ImageStreamLoader::Entry loaderEntry;
loaderEntry.extensionSupport = CheckVideoExtension;
@@ -450,7 +450,7 @@ namespace
return true;
};
Nz::ImageStreamLoader& imageStreamLoader = utility->GetImageStreamLoader();
Nz::ImageStreamLoader& imageStreamLoader = core->GetImageStreamLoader();
m_ffmpegLoaderEntry = imageStreamLoader.RegisterLoader(loaderEntry);
return true;
@@ -458,10 +458,10 @@ namespace
void Deactivate() override
{
Nz::Utility* utility = Nz::Utility::Instance();
NazaraAssert(utility, "utility module is not instanced");
Nz::Core* core = Nz::Core::Instance();
NazaraAssert(core, "core module is not instanced");
Nz::ImageStreamLoader& imageStreamLoader = utility->GetImageStreamLoader();
Nz::ImageStreamLoader& imageStreamLoader = core->GetImageStreamLoader();
imageStreamLoader.UnregisterLoader(m_ffmpegLoaderEntry);
m_ffmpegLoaderEntry = nullptr;
@@ -491,10 +491,10 @@ extern "C"
{
NAZARA_EXPORT Nz::PluginInterface* PluginLoad()
{
Nz::Utility* utility = Nz::Utility::Instance();
if (!utility)
Nz::Core* core = Nz::Core::Instance();
if (!core)
{
NazaraError("Utility module must be initialized");
NazaraError("Core module must be initialized");
return nullptr;
}

View File

@@ -7,7 +7,7 @@ if has_config("ffmpeg") then
set_group("Plugins")
add_rpathdirs("$ORIGIN")
add_deps("NazaraUtility")
add_deps("NazaraCore")
add_packages("ffmpeg")
add_headerfiles("**.hpp", "**.inl", { prefixdir = "private", install = false })