Added ResourceListenerWrapper
This class wraps the call to Resource::AddResourceListener/RemoveResourceListener using RAII and help a lot with some of the dependencies. Thanks to this, the render queues now handle their resources listening properly. Former-commit-id: 7f215ffa4ccadcc4f44f777656970e92ce01087a
This commit is contained in:
@@ -9,16 +9,18 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Resource.hpp>
|
||||
#include <Nazara/Core/ResourceListenerWrapper.hpp>
|
||||
#include <Nazara/Core/ResourceLoader.hpp>
|
||||
#include <Nazara/Core/ResourceRef.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <Nazara/Utility/Sequence.hpp>
|
||||
#include <limits>
|
||||
|
||||
struct NAZARA_API NzAnimationParams
|
||||
{
|
||||
// La frame de fin à charger
|
||||
unsigned int endFrame = static_cast<unsigned int>(-1);
|
||||
unsigned int endFrame = std::numeric_limits<unsigned int>::max();
|
||||
// La frame de début à charger
|
||||
unsigned int startFrame = 0;
|
||||
|
||||
@@ -28,7 +30,9 @@ struct NAZARA_API NzAnimationParams
|
||||
class NzAnimation;
|
||||
class NzSkeleton;
|
||||
|
||||
using NzAnimationConstListener = NzResourceListenerWrapper<const NzAnimation>;
|
||||
using NzAnimationConstRef = NzResourceRef<const NzAnimation>;
|
||||
using NzAnimationListener = NzResourceListenerWrapper<NzAnimation>;
|
||||
using NzAnimationLoader = NzResourceLoader<NzAnimation, NzAnimationParams>;
|
||||
using NzAnimationRef = NzResourceRef<NzAnimation>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user