mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Merge
This commit is contained in:
commit
4ddd501f1d
33 changed files with 68 additions and 63 deletions
|
@ -298,7 +298,7 @@ void nlSleep( uint32 ms );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
/// Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
||||||
uint getThreadId();
|
size_t getThreadId();
|
||||||
|
|
||||||
/// Returns a readable string from a vector of bytes. unprintable char are replaced by '?'
|
/// Returns a readable string from a vector of bytes. unprintable char are replaced by '?'
|
||||||
std::string stringFromVector( const std::vector<uint8>& v, bool limited = true );
|
std::string stringFromVector( const std::vector<uint8>& v, bool limited = true );
|
||||||
|
|
|
@ -374,19 +374,19 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
// Linux set of asserts is reduced due to that there is no message box displayer
|
// Linux set of asserts is reduced due to that there is no message box displayer
|
||||||
|
|
||||||
#define nlassert(exp) \
|
#define nlassert(exp) \
|
||||||
{ \
|
do { \
|
||||||
if (!(exp)) { \
|
if (!(exp)) { \
|
||||||
NLMISC::createDebug (); \
|
NLMISC::createDebug (); \
|
||||||
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
||||||
NLMISC::INelContext::getInstance().getAssertLog()->displayNL ("\"%s\" ", #exp); \
|
NLMISC::INelContext::getInstance().getAssertLog()->displayNL ("\"%s\" ", #exp); \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlassertonce(exp) nlassert(exp)
|
#define nlassertonce(exp) nlassert(exp)
|
||||||
|
|
||||||
#define nlassertex(exp, str) \
|
#define nlassertex(exp, str) \
|
||||||
{ \
|
do { \
|
||||||
if (!(exp)) { \
|
if (!(exp)) { \
|
||||||
NLMISC::createDebug (); \
|
NLMISC::createDebug (); \
|
||||||
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
||||||
|
@ -394,7 +394,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
NLMISC::INelContext::getInstance().getAssertLog()->displayRawNL str; \
|
NLMISC::INelContext::getInstance().getAssertLog()->displayRawNL str; \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlverify(exp) nlassert(exp)
|
#define nlverify(exp) nlassert(exp)
|
||||||
#define nlverifyonce(exp) nlassert(exp)
|
#define nlverifyonce(exp) nlassert(exp)
|
||||||
|
@ -403,7 +403,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
# else // NL_OS_UNIX
|
# else // NL_OS_UNIX
|
||||||
|
|
||||||
#define nlassert(exp) \
|
#define nlassert(exp) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
bool _expResult_ = (exp) ? true : false; \
|
bool _expResult_ = (exp) ? true : false; \
|
||||||
if (!ignoreNextTime && !_expResult_) { \
|
if (!ignoreNextTime && !_expResult_) { \
|
||||||
|
@ -411,20 +411,20 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlassertonce(exp) \
|
#define nlassertonce(exp) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
if (!ignoreNextTime && !(exp)) { \
|
if (!ignoreNextTime && !(exp)) { \
|
||||||
ignoreNextTime = true; \
|
ignoreNextTime = true; \
|
||||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlassertex(exp, str) \
|
#define nlassertex(exp, str) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
bool _expResult_ = (exp) ? true : false; \
|
bool _expResult_ = (exp) ? true : false; \
|
||||||
if (!ignoreNextTime && !_expResult_) { \
|
if (!ignoreNextTime && !_expResult_) { \
|
||||||
|
@ -434,10 +434,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlverify(exp) \
|
#define nlverify(exp) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
bool _expResult_ = (exp) ? true : false; \
|
bool _expResult_ = (exp) ? true : false; \
|
||||||
if (!_expResult_ && !ignoreNextTime) { \
|
if (!_expResult_ && !ignoreNextTime) { \
|
||||||
|
@ -445,10 +445,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlverifyonce(exp) \
|
#define nlverifyonce(exp) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
bool _expResult_ = (exp) ? true : false; \
|
bool _expResult_ = (exp) ? true : false; \
|
||||||
if (!_expResult_ && !ignoreNextTime) { \
|
if (!_expResult_ && !ignoreNextTime) { \
|
||||||
|
@ -456,10 +456,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlverifyex(exp, str) \
|
#define nlverifyex(exp, str) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
bool _expResult_ = (exp) ? true : false; \
|
bool _expResult_ = (exp) ? true : false; \
|
||||||
if (!_expResult_ && !ignoreNextTime) { \
|
if (!_expResult_ && !ignoreNextTime) { \
|
||||||
|
@ -469,7 +469,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
# endif // NL_OS_UNIX
|
# endif // NL_OS_UNIX
|
||||||
|
|
||||||
|
@ -478,28 +478,28 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
#define nlunreferenced(identifier) (identifier)
|
#define nlunreferenced(identifier) (identifier)
|
||||||
|
|
||||||
#define nlstop \
|
#define nlstop \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
if (!ignoreNextTime) { \
|
if (!ignoreNextTime) { \
|
||||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
ASSERT_THROW_EXCEPTION_CODE(false) \
|
ASSERT_THROW_EXCEPTION_CODE(false) \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
#define nlstoponce \
|
#define nlstoponce \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
if (!ignoreNextTime) { \
|
if (!ignoreNextTime) { \
|
||||||
ignoreNextTime = true; \
|
ignoreNextTime = true; \
|
||||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
#define nlstopex(str) \
|
#define nlstopex(str) \
|
||||||
{ \
|
do { \
|
||||||
static bool ignoreNextTime = false; \
|
static bool ignoreNextTime = false; \
|
||||||
if (!ignoreNextTime) { \
|
if (!ignoreNextTime) { \
|
||||||
NLMISC::_assertex_stop_0(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL); \
|
NLMISC::_assertex_stop_0(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL); \
|
||||||
|
@ -507,7 +507,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
||||||
if(NLMISC::_assertex_stop_1(ignoreNextTime)) \
|
if(NLMISC::_assertex_stop_1(ignoreNextTime)) \
|
||||||
NLMISC_BREAKPOINT; \
|
NLMISC_BREAKPOINT; \
|
||||||
} \
|
} \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
struct EFatalError : public Exception
|
struct EFatalError : public Exception
|
||||||
|
|
|
@ -3187,7 +3187,7 @@ IOcclusionQuery::TOcclusionType COcclusionQueryD3D::getOcclusionType()
|
||||||
H_AUTO_D3D(COcclusionQueryD3D_getOcclusionType);
|
H_AUTO_D3D(COcclusionQueryD3D_getOcclusionType);
|
||||||
nlassert(Driver);
|
nlassert(Driver);
|
||||||
nlassert(Query);
|
nlassert(Query);
|
||||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||||
if (OcclusionType == NotAvailable)
|
if (OcclusionType == NotAvailable)
|
||||||
{
|
{
|
||||||
DWORD numPix;
|
DWORD numPix;
|
||||||
|
@ -3207,7 +3207,7 @@ uint COcclusionQueryD3D::getVisibleCount()
|
||||||
H_AUTO_D3D(COcclusionQueryD3D_getVisibleCount);
|
H_AUTO_D3D(COcclusionQueryD3D_getVisibleCount);
|
||||||
nlassert(Driver);
|
nlassert(Driver);
|
||||||
nlassert(Query);
|
nlassert(Query);
|
||||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||||
if (getOcclusionType() == NotAvailable) return 0;
|
if (getOcclusionType() == NotAvailable) return 0;
|
||||||
return VisibleCount;
|
return VisibleCount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4231,7 +4231,7 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
|
||||||
H_AUTO_OGL(COcclusionQueryGL_getOcclusionType)
|
H_AUTO_OGL(COcclusionQueryGL_getOcclusionType)
|
||||||
nlassert(Driver);
|
nlassert(Driver);
|
||||||
nlassert(ID);
|
nlassert(ID);
|
||||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||||
if (OcclusionType == NotAvailable)
|
if (OcclusionType == NotAvailable)
|
||||||
{
|
{
|
||||||
GLuint result;
|
GLuint result;
|
||||||
|
@ -4254,7 +4254,7 @@ uint COcclusionQueryGL::getVisibleCount()
|
||||||
H_AUTO_OGL(COcclusionQueryGL_getVisibleCount)
|
H_AUTO_OGL(COcclusionQueryGL_getVisibleCount)
|
||||||
nlassert(Driver);
|
nlassert(Driver);
|
||||||
nlassert(ID);
|
nlassert(ID);
|
||||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||||
if (getOcclusionType() == NotAvailable) return 0;
|
if (getOcclusionType() == NotAvailable) return 0;
|
||||||
return VisibleCount;
|
return VisibleCount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -923,7 +923,7 @@ void CDriverGLStates::enableVertexAttribArrayForEXTVertexShader(uint glIndex, bo
|
||||||
nglDisableVariantClientStateEXT(variants[CDriverGL::EVSPaletteSkinVariant]);
|
nglDisableVariantClientStateEXT(variants[CDriverGL::EVSPaletteSkinVariant]);
|
||||||
break;
|
break;
|
||||||
case 7: // empty
|
case 7: // empty
|
||||||
nlstop
|
nlstop;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
case 9:
|
case 9:
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ void CDriverGL::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CVertexBuffer::Empty: // empty
|
case CVertexBuffer::Empty: // empty
|
||||||
nlstop
|
nlstop;
|
||||||
break;
|
break;
|
||||||
case CVertexBuffer::TexCoord0:
|
case CVertexBuffer::TexCoord0:
|
||||||
case CVertexBuffer::TexCoord1:
|
case CVertexBuffer::TexCoord1:
|
||||||
|
@ -1483,7 +1483,7 @@ void CDriverGL::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CVertexBuffer::Empty: // empty
|
case CVertexBuffer::Empty: // empty
|
||||||
nlstop
|
nlstop;
|
||||||
break;
|
break;
|
||||||
case CVertexBuffer::TexCoord0:
|
case CVertexBuffer::TexCoord0:
|
||||||
case CVertexBuffer::TexCoord1:
|
case CVertexBuffer::TexCoord1:
|
||||||
|
|
|
@ -1400,7 +1400,7 @@ bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgra
|
||||||
{
|
{
|
||||||
GLint position;
|
GLint position;
|
||||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &position);
|
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &position);
|
||||||
nlassert(position != -1) // there was an error..
|
nlassert(position != -1); // there was an error..
|
||||||
nlassert(position < (GLint) code.size());
|
nlassert(position < (GLint) code.size());
|
||||||
uint line = 0;
|
uint line = 0;
|
||||||
const char *lineStart = code.c_str();
|
const char *lineStart = code.c_str();
|
||||||
|
|
|
@ -34,7 +34,7 @@ void CPackedWorld::build(std::vector<TPackedZoneBaseSPtr> &packedZones)
|
||||||
_Zones.clear();
|
_Zones.clear();
|
||||||
if (packedZones.empty()) return;
|
if (packedZones.empty()) return;
|
||||||
CAABBox box;
|
CAABBox box;
|
||||||
nlassert(packedZones[0])
|
nlassert(packedZones[0]);
|
||||||
box = packedZones[0]->Box;
|
box = packedZones[0]->Box;
|
||||||
for(uint k = 1; k < packedZones.size(); ++k)
|
for(uint k = 1; k < packedZones.size(); ++k)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2127,7 +2127,7 @@ void CParticleSystem::addRefForUserSysCoordInfo(uint numRefs)
|
||||||
{
|
{
|
||||||
_UserCoordSystemInfo = new CUserCoordSystemInfo;
|
_UserCoordSystemInfo = new CUserCoordSystemInfo;
|
||||||
}
|
}
|
||||||
nlassert(_UserCoordSystemInfo)
|
nlassert(_UserCoordSystemInfo);
|
||||||
_UserCoordSystemInfo->NumRef += numRefs;
|
_UserCoordSystemInfo->NumRef += numRefs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2138,7 +2138,7 @@ void CParticleSystem::releaseRefForUserSysCoordInfo(uint numRefs)
|
||||||
NL_PS_FUNC_MAIN(CParticleSystem_releaseRefForUserSysCoordInfo)
|
NL_PS_FUNC_MAIN(CParticleSystem_releaseRefForUserSysCoordInfo)
|
||||||
if (!numRefs) return;
|
if (!numRefs) return;
|
||||||
nlassert(_UserCoordSystemInfo);
|
nlassert(_UserCoordSystemInfo);
|
||||||
nlassert(numRefs <= _UserCoordSystemInfo->NumRef)
|
nlassert(numRefs <= _UserCoordSystemInfo->NumRef);
|
||||||
_UserCoordSystemInfo->NumRef -= numRefs;
|
_UserCoordSystemInfo->NumRef -= numRefs;
|
||||||
if (_UserCoordSystemInfo->NumRef == 0)
|
if (_UserCoordSystemInfo->NumRef == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -107,12 +107,12 @@ void nlSleep( uint32 ms )
|
||||||
/*
|
/*
|
||||||
* Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
* Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
||||||
*/
|
*/
|
||||||
uint getThreadId()
|
size_t getThreadId()
|
||||||
{
|
{
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
#elif defined NL_OS_UNIX
|
#elif defined NL_OS_UNIX
|
||||||
return uint(pthread_self());
|
return size_t(pthread_self());
|
||||||
// doesnt work on linux kernel 2.6 return getpid();
|
// doesnt work on linux kernel 2.6 return getpid();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2161,7 +2161,7 @@ CPolygon2D::CPolygon2D(const CTriangle &tri, const CMatrix &projMat)
|
||||||
// *******************************************************************************
|
// *******************************************************************************
|
||||||
void CPolygon2D::getBoundingRect(CVector2f &minCorner, CVector2f &maxCorner) const
|
void CPolygon2D::getBoundingRect(CVector2f &minCorner, CVector2f &maxCorner) const
|
||||||
{
|
{
|
||||||
nlassert(!Vertices.empty())
|
nlassert(!Vertices.empty());
|
||||||
minCorner = maxCorner = Vertices[0];
|
minCorner = maxCorner = Vertices[0];
|
||||||
uint numVertices = Vertices.size();
|
uint numVertices = Vertices.size();
|
||||||
for(uint k = 0; k < numVertices; ++k)
|
for(uint k = 0; k < numVertices; ++k)
|
||||||
|
|
|
@ -34,7 +34,7 @@ using namespace NLMISC;
|
||||||
|
|
||||||
namespace NLNET {
|
namespace NLNET {
|
||||||
|
|
||||||
static uint ThreadCreator = 0;
|
static size_t ThreadCreator = 0;
|
||||||
|
|
||||||
static const uint64 AppIdDeadConnection = 0xDEAD;
|
static const uint64 AppIdDeadConnection = 0xDEAD;
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,13 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include <AL/al.h>
|
#ifdef NL_OS_MAC
|
||||||
#include <AL/alc.h>
|
# include <al.h>
|
||||||
|
# include <alc.h>
|
||||||
|
#else
|
||||||
|
# include <AL/al.h>
|
||||||
|
# include <AL/alc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <nel/misc/common.h>
|
#include <nel/misc/common.h>
|
||||||
#include <nel/misc/debug.h>
|
#include <nel/misc/debug.h>
|
||||||
|
|
|
@ -132,7 +132,7 @@ void CFogMap::getFogParams(float startDist, float endDist, float x, float y, flo
|
||||||
NLMISC::CRGBAF CFogMap::getMapValue(TMapType type, float x, float y, NLMISC::CRGBAF defaultValue) const
|
NLMISC::CRGBAF CFogMap::getMapValue(TMapType type, float x, float y, NLMISC::CRGBAF defaultValue) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_FogMap)
|
H_AUTO_USE(RZ_FogMap)
|
||||||
nlassert(type < CFogMapBuild::NumMap)
|
nlassert(type < CFogMapBuild::NumMap);
|
||||||
if (_Map[type].getWidth() == 0) return defaultValue;
|
if (_Map[type].getWidth() == 0) return defaultValue;
|
||||||
float mx, my;
|
float mx, my;
|
||||||
worldPosToMapPos(x, y, mx, my);
|
worldPosToMapPos(x, y, mx, my);
|
||||||
|
@ -143,7 +143,7 @@ NLMISC::CRGBAF CFogMap::getMapValue(TMapType type, float x, float y, NLMISC::CRG
|
||||||
NLMISC::CRGBAF CFogMap::getMapValueFromMapCoord(TMapType type, float x, float y, NLMISC::CRGBAF defaultValue) const
|
NLMISC::CRGBAF CFogMap::getMapValueFromMapCoord(TMapType type, float x, float y, NLMISC::CRGBAF defaultValue) const
|
||||||
{
|
{
|
||||||
H_AUTO_USE(RZ_FogMap)
|
H_AUTO_USE(RZ_FogMap)
|
||||||
nlassert(type < CFogMapBuild::NumMap)
|
nlassert(type < CFogMapBuild::NumMap);
|
||||||
if (_Map[type].getWidth() == 0) return defaultValue;
|
if (_Map[type].getWidth() == 0) return defaultValue;
|
||||||
return _Map[type].getColor(x, y);
|
return _Map[type].getColor(x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -900,7 +900,7 @@ bool CGroupList::addChildAtIndex(CViewBase *child, uint index, bool deleteOn
|
||||||
addView (pVB, (sint) index);
|
addView (pVB, (sint) index);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
nlstop
|
nlstop;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1074,7 +1074,7 @@ bool CGroupParagraph::addChildAtIndex(CViewBase *child, uint index, bool deleteO
|
||||||
addView (pVB, (sint) index);
|
addView (pVB, (sint) index);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
nlstop
|
nlstop;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -626,7 +626,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch,
|
||||||
if (_Ctrl.SourceInfo.size() == 2)
|
if (_Ctrl.SourceInfo.size() == 2)
|
||||||
{
|
{
|
||||||
// _Ctrl.SourceInfo[0].IsData must be true
|
// _Ctrl.SourceInfo[0].IsData must be true
|
||||||
nlassert(_Ctrl.SourceInfo[0].IsData)
|
nlassert(_Ctrl.SourceInfo[0].IsData);
|
||||||
// index 0 == Data from patch file
|
// index 0 == Data from patch file
|
||||||
if (!XDFR[0].init(_FileName, _HeaderOffset, _CtrlOffset, isPatchCompressed()))
|
if (!XDFR[0].init(_FileName, _HeaderOffset, _CtrlOffset, isPatchCompressed()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1762,7 +1762,7 @@ uint32 CClientEditionModule::getCurrentMaxId()
|
||||||
return 1000;
|
return 1000;
|
||||||
std::string eid = getEid();
|
std::string eid = getEid();
|
||||||
sint32 currentId = _Factory->getMaxId(eid);
|
sint32 currentId = _Factory->getMaxId(eid);
|
||||||
nlassert(currentId >= -1)
|
nlassert(currentId >= -1);
|
||||||
|
|
||||||
return static_cast<uint32>(currentId + 1);
|
return static_cast<uint32>(currentId + 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5599,7 +5599,7 @@ void CEditor::onAttrModified(const CObject *value)
|
||||||
{
|
{
|
||||||
CInstance *parentInstance = getInstanceFromObject(parent);
|
CInstance *parentInstance = getInstanceFromObject(parent);
|
||||||
sint32 indexInParent = parent->findIndex(son);
|
sint32 indexInParent = parent->findIndex(son);
|
||||||
nlassert(indexInParent != -1)
|
nlassert(indexInParent != -1);
|
||||||
if (parentInstance)
|
if (parentInstance)
|
||||||
{
|
{
|
||||||
// we are in an instance (a CObjectTable with an instance id)
|
// we are in an instance (a CObjectTable with an instance id)
|
||||||
|
|
|
@ -55,7 +55,7 @@ CToolChoosePosLua::CToolChoosePosLua(uint ghostSlot,
|
||||||
void CToolChoosePosLua::commit(const NLMISC::CVector &createPosition, float /* createAngle */)
|
void CToolChoosePosLua::commit(const NLMISC::CVector &createPosition, float /* createAngle */)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CToolChoosePosLua_commit)
|
//H_AUTO(R2_CToolChoosePosLua_commit)
|
||||||
nlassert(!_Commited)
|
nlassert(!_Commited);
|
||||||
if (_ValidFunc.isFunction())
|
if (_ValidFunc.isFunction())
|
||||||
{
|
{
|
||||||
CLuaState &lua = *_ValidFunc.getLuaState();
|
CLuaState &lua = *_ValidFunc.getLuaState();
|
||||||
|
|
|
@ -1168,7 +1168,7 @@ void CServerEditionModule::init(NLNET::IModuleSocket* gateway, CDynamicMapServic
|
||||||
|
|
||||||
void CServerEditionModule::updateRSMGR()
|
void CServerEditionModule::updateRSMGR()
|
||||||
{
|
{
|
||||||
nlassert(!_SessionManager.isNull())
|
nlassert(!_SessionManager.isNull());
|
||||||
nlassert(!_WaitingForBS);
|
nlassert(!_WaitingForBS);
|
||||||
|
|
||||||
RSMGR::CRingSessionManagerProxy rsm(_SessionManager);
|
RSMGR::CRingSessionManagerProxy rsm(_SessionManager);
|
||||||
|
@ -5131,7 +5131,7 @@ void CServerEditionModule::wakeUpSessionImpl(CEditionSession* session)
|
||||||
{
|
{
|
||||||
|
|
||||||
CEditionSession* previous = found->second ;
|
CEditionSession* previous = found->second ;
|
||||||
nlassert( session != previous)
|
nlassert( session != previous);
|
||||||
sessionPtr->swap( *previous);
|
sessionPtr->swap( *previous);
|
||||||
session = previous;
|
session = previous;
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,7 +418,7 @@ void CAIS::update()
|
||||||
// send agglomerated hp changes
|
// send agglomerated hp changes
|
||||||
if (!_CreatureChangeHPList.Entities.empty())
|
if (!_CreatureChangeHPList.Entities.empty())
|
||||||
{
|
{
|
||||||
nlassert(_CreatureChangeHPList.Entities.size()==_CreatureChangeHPList.DeltaHp.size())
|
nlassert(_CreatureChangeHPList.Entities.size()==_CreatureChangeHPList.DeltaHp.size());
|
||||||
_CreatureChangeHPList.send("EGS");
|
_CreatureChangeHPList.send("EGS");
|
||||||
_CreatureChangeHPList.Entities.clear();
|
_CreatureChangeHPList.Entities.clear();
|
||||||
_CreatureChangeHPList.DeltaHp.clear();
|
_CreatureChangeHPList.DeltaHp.clear();
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// attach a group family to the action if it supports it (assert otherwise)
|
// attach a group family to the action if it supports it (assert otherwise)
|
||||||
virtual void addGroupFamily(CGroupFamily *gf) { nlassert(0) }
|
virtual void addGroupFamily(CGroupFamily *gf) { nlassert(0); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Code use by native functions and LogicAction
|
// Code use by native functions and LogicAction
|
||||||
|
|
|
@ -74,7 +74,7 @@ void CGrpProfileDynFollowPath::calcPath()
|
||||||
_FollowRoute.setAIProfile(new CGrpProfileFollowRoute(_Grp, _CurrentRoad->coords(), _CurrentRoad->verticalPos(), true));
|
_FollowRoute.setAIProfile(new CGrpProfileFollowRoute(_Grp, _CurrentRoad->coords(), _CurrentRoad->verticalPos(), true));
|
||||||
CGrpProfileFollowRoute*const fr = static_cast<CGrpProfileFollowRoute*>(_FollowRoute.getAIProfile());
|
CGrpProfileFollowRoute*const fr = static_cast<CGrpProfileFollowRoute*>(_FollowRoute.getAIProfile());
|
||||||
|
|
||||||
nlassert(_CurrentZone==_CurrentRoad->startZone() || _CurrentZone==_CurrentRoad->endZone())
|
nlassert(_CurrentZone==_CurrentRoad->startZone() || _CurrentZone==_CurrentRoad->endZone());
|
||||||
fr->setDirection(_CurrentRoad->startZone()==_CurrentZone);
|
fr->setDirection(_CurrentRoad->startZone()==_CurrentZone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1146,7 +1146,7 @@ void CCompiler::dumpByteCode (const string &sourceCode, const string &fullName,
|
||||||
fclose (file);
|
fclose (file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlstop ("can't open %s for writing", tmp.c_str ());
|
nlstopex(("can't open %s for writing", tmp.c_str ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
CSmartPtr<const AIVM::CByteCode> CCompiler::compileCodeOld (const string &sourceCode, const string &fullName, bool debug) const
|
CSmartPtr<const AIVM::CByteCode> CCompiler::compileCodeOld (const string &sourceCode, const string &fullName, bool debug) const
|
||||||
|
|
|
@ -864,7 +864,7 @@ class CMissionStepKillByName : public IMissionStepTemplate
|
||||||
retParams[0].Type = STRING_MANAGER::bot_name;
|
retParams[0].Type = STRING_MANAGER::bot_name;
|
||||||
retParams[0].Identifier = TargetName;
|
retParams[0].Identifier = TargetName;
|
||||||
retParams[1].Type = STRING_MANAGER::integer;
|
retParams[1].Type = STRING_MANAGER::integer;
|
||||||
nlassert( subStepStates.size() == 1 )
|
nlassert( subStepStates.size() == 1 );
|
||||||
retParams[1].Int = subStepStates[0];
|
retParams[1].Int = subStepStates[0];
|
||||||
if ( Place != 0xFFFF )
|
if ( Place != 0xFFFF )
|
||||||
{
|
{
|
||||||
|
|
|
@ -278,7 +278,7 @@ void CCombatAttackerAI::initFromRowId( const TDataSetRow &rowId )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
nlassert(entity->getId().getType() == RYZOMID::creature)
|
nlassert(entity->getId().getType() == RYZOMID::creature);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const CStaticCreatures * form = entity->getForm();
|
const CStaticCreatures * form = entity->getForm();
|
||||||
|
@ -400,7 +400,7 @@ void CCombatAttackerNpc::initFromRowId( const TDataSetRow &rowId )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
nlassert(entity->getId().getType() == RYZOMID::npc)
|
nlassert(entity->getId().getType() == RYZOMID::npc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const CStaticCreatures * form = entity->getForm();
|
const CStaticCreatures * form = entity->getForm();
|
||||||
|
|
|
@ -212,7 +212,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
nlassert(character->getId().getType() == RYZOMID::player)
|
nlassert(character->getId().getType() == RYZOMID::player);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Character = character;
|
_Character = character;
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
if ( !TheDataset.isAccessible(rowId))
|
if ( !TheDataset.isAccessible(rowId))
|
||||||
{
|
{
|
||||||
nlwarning("<CCombatDefender> ERROR Get an invalid row id as param for the constructor, should never happens");
|
nlwarning("<CCombatDefender> ERROR Get an invalid row id as param for the constructor, should never happens");
|
||||||
nlstop("");
|
nlstop;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ void CPVPFactionRewardManager::init()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlstop("Pointer null in map of totem base found !!!!");
|
nlstopex(("Pointer null in map of totem base found !!!!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -846,7 +846,7 @@ struct TPredicateNode : public TQueryNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlstop
|
nlstop;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -653,7 +653,7 @@ struct COutpostCreateSquadMsg
|
||||||
static uint32 const s_version = 1;
|
static uint32 const s_version = 1;
|
||||||
uint32 version = s_version;
|
uint32 version = s_version;
|
||||||
s.serial(version);
|
s.serial(version);
|
||||||
nlassert(version==s_version)
|
nlassert(version==s_version);
|
||||||
s.serial(Outpost);
|
s.serial(Outpost);
|
||||||
s.serial(Group);
|
s.serial(Group);
|
||||||
s.serial(Zone);
|
s.serial(Zone);
|
||||||
|
|
|
@ -3910,7 +3910,7 @@ endOfWelcomeUserResult:
|
||||||
{
|
{
|
||||||
nldebug("RSM : setScenarioInfo char %u set scenario info for session %u", charId, sessionId.asInt());
|
nldebug("RSM : setScenarioInfo char %u set scenario info for session %u", charId, sessionId.asInt());
|
||||||
|
|
||||||
nlstop("Deprecated");
|
nlstopex(("Deprecated"));
|
||||||
|
|
||||||
// // load the user
|
// // load the user
|
||||||
// CCharacterPtr character = CCharacter::load(_RingDb, charId, __FILE__, __LINE__);
|
// CCharacterPtr character = CCharacter::load(_RingDb, charId, __FILE__, __LINE__);
|
||||||
|
|
Loading…
Reference in a new issue