NzNoise added
This commit is contained in:
57
src/Nazara/Noise/Noise.cpp
Normal file
57
src/Nazara/Noise/Noise.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2012 AUTHORS
|
||||
// This file is part of the "Nazara Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/Noise.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Noise/Config.hpp>
|
||||
#include <Nazara/Noise/Debug.hpp>
|
||||
|
||||
NzNoise::NzNoise()
|
||||
{
|
||||
}
|
||||
|
||||
NzNoise::~NzNoise()
|
||||
{
|
||||
if (s_initialized)
|
||||
Uninitialize();
|
||||
}
|
||||
|
||||
bool NzNoise::Initialize()
|
||||
{
|
||||
#if NAZARA_NOISE_SAFE
|
||||
if (s_initialized)
|
||||
{
|
||||
NazaraError("NzNoise already initialized");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialisation du module
|
||||
|
||||
s_initialized = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void NzNoise::Uninitialize()
|
||||
{
|
||||
#if NAZARA_NOISE_SAFE
|
||||
if (!s_initialized)
|
||||
{
|
||||
NazaraError("NzNoise not initialized");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Libération du module
|
||||
|
||||
s_initialized = false;
|
||||
}
|
||||
|
||||
bool NzNoise::IsInitialized()
|
||||
{
|
||||
return s_initialized;
|
||||
}
|
||||
|
||||
bool NzNoise::s_initialized = false;
|
||||
Reference in New Issue
Block a user