Merge branch 'master' into physics3d-material
This commit is contained in:
commit
1e88e23854
|
|
@ -49,7 +49,7 @@ namespace Ndk
|
|||
inline void ParticleGroupComponent::AddEmitter(Entity* emitter)
|
||||
{
|
||||
NazaraAssert(emitter && emitter->IsValid(), "Invalid entity");
|
||||
NazaraAssert(emitter->HasComponent<ParticleEmitterComponent>(), "Entity must have a NodeComponent");
|
||||
NazaraAssert(emitter->HasComponent<ParticleEmitterComponent>(), "Entity must have a ParticleEmitterComponent");
|
||||
|
||||
auto& emitterComponent = emitter->GetComponent<ParticleEmitterComponent>();
|
||||
ParticleGroup::AddEmitter(&emitterComponent);
|
||||
|
|
@ -68,7 +68,7 @@ namespace Ndk
|
|||
inline void ParticleGroupComponent::RemoveEmitter(Entity* emitter)
|
||||
{
|
||||
NazaraAssert(emitter && emitter->IsValid(), "Invalid entity");
|
||||
NazaraAssert(emitter->HasComponent<ParticleEmitterComponent>(), "Entity must have a NodeComponent");
|
||||
NazaraAssert(emitter->HasComponent<ParticleEmitterComponent>(), "Entity must have a ParticleEmitterComponent");
|
||||
|
||||
auto& emitterComponent = emitter->GetComponent<ParticleEmitterComponent>();
|
||||
ParticleGroup::RemoveEmitter(&emitterComponent);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace Nz
|
||||
{
|
||||
#ifdef NAZARA_COMPILER_MSVC
|
||||
namespace
|
||||
{
|
||||
#pragma pack(push,8)
|
||||
|
|
@ -23,6 +24,7 @@ namespace Nz
|
|||
};
|
||||
#pragma pack(pop)
|
||||
}
|
||||
#endif
|
||||
|
||||
ThreadImpl::ThreadImpl(Functor* functor)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@
|
|||
#include <cstring>
|
||||
#include <Nazara/Network/Debug.hpp>
|
||||
|
||||
// some MinGW distributions seem to lack some defines
|
||||
#ifndef ERROR_NOT_ENOUGH_MEMORY
|
||||
#define ERROR_NOT_ENOUGH_MEMORY 8L
|
||||
#endif
|
||||
|
||||
#ifndef WSA_NOT_ENOUGH_MEMORY
|
||||
#define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
|
||||
#endif
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
namespace Detail
|
||||
|
|
|
|||
|
|
@ -8,8 +8,15 @@
|
|||
#include <Nazara/Core/MemoryHelper.hpp>
|
||||
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
||||
|
||||
#if defined(NAZARA_COMPILER_MINGW) && __GNUC__ < 5
|
||||
// Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define
|
||||
// Some compilers (older versions of MinGW) lack Mstcpip.h which defines some structs/defines
|
||||
#if defined(__has_include)
|
||||
#define NZ_HAS_MSTCPIP_HEADER __has_include(<Mstcpip.h>)
|
||||
#else
|
||||
// If this version of MinGW doesn't support __has_include, assume it hasn't Mstcpip.h
|
||||
#define NZ_HAS_MSTCPIP_HEADER !defined(NAZARA_COMPILER_MINGW)
|
||||
#endif
|
||||
|
||||
#if NZ_HAS_MSTCPIP_HEADER
|
||||
struct tcp_keepalive
|
||||
{
|
||||
u_long onoff;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace Nz
|
|||
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||
return m_readyToReadSockets.count(socket) != 0;
|
||||
#else
|
||||
return FD_ISSET(socket, &m_readyToReadSockets) != 0;
|
||||
return FD_ISSET(socket, const_cast<fd_set*>(&m_readyToReadSockets)) != 0; //< FD_ISSET is not const-correct
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ namespace Nz
|
|||
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||
return m_readyToWriteSockets.count(socket) != 0;
|
||||
#else
|
||||
return FD_ISSET(socket, &m_readyToWriteSockets) != 0;
|
||||
return FD_ISSET(socket, const_cast<fd_set*>(&m_readyToWriteSockets)) != 0; //< FD_ISSET is not const-correct
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -55,8 +55,9 @@ namespace Nz
|
|||
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||
return m_allSockets.count(socket) != 0;
|
||||
#else
|
||||
return FD_ISSET(socket, &m_readSockets) != 0 ||
|
||||
FD_ISSET(socket, &m_writeSockets) != 0;
|
||||
// FD_ISSET is not const-correct
|
||||
return FD_ISSET(socket, const_cast<fd_set*>(&m_readSockets)) != 0 ||
|
||||
FD_ISSET(socket, const_cast<fd_set*>(&m_writeSockets)) != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ namespace Nz
|
|||
{
|
||||
glyph.atlas = nullptr;
|
||||
|
||||
glyph.bounds.Set(float(m_drawPos.x), float(m_drawPos.y), float(advance), float(sizeInfo.lineHeight));
|
||||
glyph.bounds.Set(float(m_drawPos.x), float(0.f), float(advance), float(sizeInfo.lineHeight));
|
||||
|
||||
glyph.corners[0].Set(glyph.bounds.GetCorner(RectCorner_LeftTop));
|
||||
glyph.corners[1].Set(glyph.bounds.GetCorner(RectCorner_RightTop));
|
||||
|
|
|
|||
Loading…
Reference in New Issue