Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -14,50 +14,53 @@
#include <Nazara/Utility/Debug.hpp>
NzCursor::NzCursor() :
m_impl(nullptr)
namespace Nz
{
}
NzCursor::~NzCursor()
{
Destroy();
}
bool NzCursor::Create(const NzImage& cursor, int hotSpotX, int hotSpotY)
{
Destroy();
m_impl = new NzCursorImpl;
if (!m_impl->Create(cursor, hotSpotX, hotSpotY))
Cursor::Cursor() :
m_impl(nullptr)
{
NazaraError("Failed to create cursor implementation");
delete m_impl;
m_impl = nullptr;
return false;
}
return true;
}
bool NzCursor::Create(const NzImage& cursor, const NzVector2i& hotSpot)
{
return Create(cursor, hotSpot.x, hotSpot.y);
}
void NzCursor::Destroy()
{
if (m_impl)
Cursor::~Cursor()
{
m_impl->Destroy();
Destroy();
}
delete m_impl;
m_impl = nullptr;
bool Cursor::Create(const Image& cursor, int hotSpotX, int hotSpotY)
{
Destroy();
m_impl = new CursorImpl;
if (!m_impl->Create(cursor, hotSpotX, hotSpotY))
{
NazaraError("Failed to create cursor implementation");
delete m_impl;
m_impl = nullptr;
return false;
}
return true;
}
bool Cursor::Create(const Image& cursor, const Vector2i& hotSpot)
{
return Create(cursor, hotSpot.x, hotSpot.y);
}
void Cursor::Destroy()
{
if (m_impl)
{
m_impl->Destroy();
delete m_impl;
m_impl = nullptr;
}
}
bool Cursor::IsValid() const
{
return m_impl != nullptr;
}
}
bool NzCursor::IsValid() const
{
return m_impl != nullptr;
}