Added Meshes and Animations (And many more)
Added NzTexture::IsMipmappingSupported Color::(FromTo)HSV now takes hue and saturation in degrees Fixed Context::EnsureContext Fixed COW thread-safety (String, Image, Matrix4) Fixed Quatenion<T>::operator*(const Vector3<T>&) Fixed ResourceLoader Fixed String::Resize with a size of 0 Fixed Texture mipmapping crash Fixed per-class thread-safety IndexBuffer and VertexBuffer are now resources It is now possible to use more than 8 texcoords per shader Moved all enumerations into separate files (Core/Enums.hpp, Utility/Enums.hpp, ..) Removed NzContextParameters::defaultWindow VertexDeclaration has been rewritten (New interface/COW)
This commit is contained in:
@@ -13,8 +13,6 @@
|
||||
#error OS not handled
|
||||
#endif
|
||||
|
||||
#define NAZARA_CLASS_CLOCK
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
NzClock::NzClock() :
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#error OS not handled
|
||||
#endif
|
||||
|
||||
#define NAZARA_CLASS_DIRECTORY
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#error No implementation for this platform
|
||||
#endif
|
||||
|
||||
#define NAZARA_CLASS_DYNLIB
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
NzDynLib::NzDynLib(const NzString& libraryPath) :
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#error OS not handled
|
||||
#endif
|
||||
|
||||
#define NAZARA_CLASS_FILE
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
NzFile::NzFile() :
|
||||
@@ -295,6 +293,7 @@ std::size_t NzFile::Read(void* buffer, std::size_t size)
|
||||
return m_impl->Read(buffer, size);
|
||||
else
|
||||
{
|
||||
// Si nous ne devons rien lire, nous avançons simplement
|
||||
nzUInt64 currentPos = m_impl->GetCursorPos();
|
||||
|
||||
m_impl->SetCursorPos(NzFile::AtCurrent, size);
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
#define NAZARA_CLASS_LOG
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <Utfcpp/utf8.h>
|
||||
|
||||
#define NAZARA_CLASS_STRING
|
||||
#include <Nazara/Core/ThreadSafety.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
inline unsigned int nzPow2(unsigned int n)
|
||||
@@ -2850,7 +2847,7 @@ unsigned int NzString::Replace(const char* oldString, const char* replaceString,
|
||||
else ///TODO: Algorithme de remplacement sans changement de buffer (si rSize < oSize)
|
||||
{
|
||||
unsigned int newSize = m_sharedString->size + Count(oldString)*(rSize - oSize);
|
||||
if (newSize == m_sharedString->size) // Count(oldString) == 0
|
||||
if (newSize == m_sharedString->size) // Alors c'est que Count(oldString) == 0
|
||||
return 0;
|
||||
|
||||
char* newString = new char[newSize+1];
|
||||
@@ -2920,7 +2917,7 @@ unsigned int NzString::Replace(const NzString& oldString, const NzString& replac
|
||||
else
|
||||
{
|
||||
unsigned int newSize = m_sharedString->size + Count(oldString)*(replaceString.m_sharedString->size - oldString.m_sharedString->size);
|
||||
if (newSize == m_sharedString->size) // Count(oldString) == 0
|
||||
if (newSize == m_sharedString->size) // Alors c'est que Count(oldString) == 0
|
||||
return 0;
|
||||
|
||||
char* newString = new char[newSize+1];
|
||||
@@ -3205,6 +3202,9 @@ void NzString::Reserve(unsigned int bufferSize)
|
||||
|
||||
NzString& NzString::Resize(int size, char character)
|
||||
{
|
||||
if (size == 0)
|
||||
Clear(true);
|
||||
|
||||
if (size < 0)
|
||||
size = std::max(static_cast<int>(m_sharedString->size + size), 0);
|
||||
|
||||
@@ -3249,6 +3249,9 @@ NzString& NzString::Resize(int size, char character)
|
||||
|
||||
NzString NzString::Resized(int size, char character) const
|
||||
{
|
||||
if (size == 0)
|
||||
return NzString();
|
||||
|
||||
if (size < 0)
|
||||
size = m_sharedString->size + size;
|
||||
|
||||
@@ -3499,8 +3502,9 @@ unsigned int NzString::SplitAny(std::vector<NzString>& result, const char* separ
|
||||
if (m_sharedString->size == 0)
|
||||
return 0;
|
||||
|
||||
unsigned int lastSep = FindAny(separations, start, flags);
|
||||
unsigned int oldSize = result.size();
|
||||
|
||||
unsigned int lastSep = FindAny(separations, start, flags);
|
||||
if (lastSep == npos)
|
||||
{
|
||||
result.push_back(*this);
|
||||
@@ -5098,11 +5102,12 @@ void NzString::ReleaseString()
|
||||
return;
|
||||
|
||||
NazaraMutexLock(m_sharedString->mutex);
|
||||
m_sharedString->refCount--;
|
||||
bool freeSharedString = (--m_sharedString->refCount == 0);
|
||||
NazaraMutexUnlock(m_sharedString->mutex);
|
||||
|
||||
if (m_sharedString->refCount == 0)
|
||||
if (freeSharedString)
|
||||
{
|
||||
NazaraMutexUnlock(m_sharedString->mutex);
|
||||
delete[] m_sharedString->string;
|
||||
delete m_sharedString;
|
||||
}
|
||||
|
||||
@@ -6,49 +6,46 @@
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace NzUnicode
|
||||
#if NAZARA_CORE_INCLUDE_UNICODEDATA
|
||||
struct Character
|
||||
{
|
||||
#if NAZARA_CORE_INCLUDE_UNICODEDATA
|
||||
struct Character
|
||||
{
|
||||
nzUInt16 category; // Le type du caractère
|
||||
nzUInt8 direction; // Le sens de lecure du caractère
|
||||
nzUInt32 lowerCase; // Le caractère correspondant en minuscule
|
||||
nzUInt32 titleCase; // Le caractère correspondant en titre
|
||||
nzUInt32 upperCase; // Le caractère correspondant en majuscule
|
||||
};
|
||||
nzUInt16 category; // Le type du caractère
|
||||
nzUInt8 direction; // Le sens de lecure du caractère
|
||||
nzUInt32 lowerCase; // Le caractère correspondant en minuscule
|
||||
nzUInt32 titleCase; // Le caractère correspondant en titre
|
||||
nzUInt32 upperCase; // Le caractère correspondant en majuscule
|
||||
};
|
||||
|
||||
#include <Nazara/Core/UnicodeData.hpp>
|
||||
#include <Nazara/Core/UnicodeData.hpp>
|
||||
|
||||
#else // Implémentation bidon
|
||||
#else // Implémentation bidon
|
||||
|
||||
Category GetCategory(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
NzUnicode::Category NzUnicode::GetCategory(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
|
||||
return Category_NoCategory;
|
||||
}
|
||||
|
||||
Direction GetDirection(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
|
||||
return Direction_Boundary_Neutral;
|
||||
}
|
||||
|
||||
char32_t GetLowercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t GetTitlecase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t GetUppercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
#endif
|
||||
return Category_NoCategory;
|
||||
}
|
||||
|
||||
NzUnicode::Direction NzUnicode::GetDirection(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
|
||||
return Direction_Boundary_Neutral;
|
||||
}
|
||||
|
||||
char32_t NzUnicode::GetLowercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t NzUnicode::GetTitlecase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t NzUnicode::GetUppercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// This file is part of the "Nazara Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_THREADCONDITIONIMPL_HPP
|
||||
#define NAZARA_THREADCONDITIONIMPL_HPP
|
||||
|
||||
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user