Minor fixes
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#define NAZARA_CORE_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Modules.hpp>
|
||||
#include <Nazara/Core/ModuleBase.hpp>
|
||||
#include <Nazara/Core/TypeList.hpp>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace Nz
|
||||
ModuleBase(std::string moduleName, T* pointer, NoLog);
|
||||
|
||||
void LogInit();
|
||||
void LogUninit();
|
||||
|
||||
std::string m_moduleName;
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Nz
|
||||
template<typename T>
|
||||
ModuleBase<T>::~ModuleBase()
|
||||
{
|
||||
NazaraNotice("Uninitializing " + m_moduleName + "...");
|
||||
LogUninit();
|
||||
T::s_instance = nullptr;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,12 @@ namespace Nz
|
||||
{
|
||||
NazaraNotice("Initializing " + m_moduleName + "...");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void ModuleBase<T>::LogUninit()
|
||||
{
|
||||
NazaraNotice("Uninitializing " + m_moduleName + "...");
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <Nazara/Core/Bitset.hpp>
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
||||
///TODO: Permettre la conversion automatique entre les formats via des renseignements de bits et de type pour chaque format.
|
||||
/// Ce serait plus lent que la conversion spécialisée (qui ne disparaîtra donc pas) mais ça permettrait au moteur de faire la conversion
|
||||
@@ -87,9 +87,9 @@ namespace Nz
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
static PixelFormatDescription s_pixelFormatInfos[PixelFormatCount];
|
||||
static ConvertFunction s_convertFunctions[PixelFormatCount][PixelFormatCount];
|
||||
static std::map<PixelFormat, FlipFunction> s_flipFunctions[PixelFlippingCount];
|
||||
static std::array<std::array<ConvertFunction, PixelFormatCount>, PixelFormatCount> s_convertFunctions;
|
||||
static std::array<std::array<PixelFormatInfo::FlipFunction, PixelFlippingCount>, PixelFormatCount> s_flipFunctions;
|
||||
static std::array<PixelFormatDescription, PixelFormatCount> s_pixelFormatInfos;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace Nz
|
||||
|
||||
inline void PixelFormatInfo::SetFlipFunction(PixelFlipping flipping, PixelFormat format, FlipFunction func)
|
||||
{
|
||||
s_flipFunctions[UnderlyingCast(flipping)][format] = func;
|
||||
s_flipFunctions[UnderlyingCast(flipping)][UnderlyingCast(format)] = func;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user