Core/AppFilesystemComponent: Add support for default resource parameters

This commit is contained in:
SirLynix
2023-01-28 11:27:49 +01:00
parent 60c00068ca
commit d27ca55943
24 changed files with 364 additions and 85 deletions

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/ResourceRegistry.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
namespace Detail
{
inline std::size_t ResourceTypeIndexCounter()
{
static std::size_t counter = 0;
return counter++;
}
}
template<typename T>
std::size_t ResourceRegistry<T>::GetResourceId()
{
static std::size_t typeId = Detail::ResourceTypeIndexCounter();
return typeId;
}
}
#include <Nazara/Core/DebugOff.hpp>