1
This commit is contained in:
parent
e57d842cba
commit
1f57e552ff
@ -26,6 +26,7 @@ include_directories(
|
|||||||
../../third_party/recastnavigation/Recast/Include
|
../../third_party/recastnavigation/Recast/Include
|
||||||
../../third_party/recastnavigation/Detour/Include
|
../../third_party/recastnavigation/Detour/Include
|
||||||
../../third_party/recastnavigation/DetourTileCache/Include
|
../../third_party/recastnavigation/DetourTileCache/Include
|
||||||
|
../../third_party/recastnavigation/RecastDemo/Contrib/fastlz
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -47,6 +48,10 @@ aux_source_directory(../../third_party/recastnavigation/Recast/Source
|
|||||||
SRC_LIST
|
SRC_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
|
aux_source_directory(../../third_party/recastnavigation/RecastDemo/Contrib/fastlz
|
||||||
|
SRC_LIST
|
||||||
|
)
|
||||||
|
|
||||||
aux_source_directory(../../third_party/recastnavigation/Detour/Source
|
aux_source_directory(../../third_party/recastnavigation/Detour/Source
|
||||||
SRC_LIST
|
SRC_LIST
|
||||||
)
|
)
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "DetourNavMeshQuery.h"
|
#include "DetourNavMeshQuery.h"
|
||||||
#include "DetourCommon.h"
|
#include "DetourCommon.h"
|
||||||
#include "DetourNavMesh.h"
|
#include "DetourNavMesh.h"
|
||||||
|
#include "fastlz.h"
|
||||||
|
|
||||||
#include "navmeshbuilder.h"
|
#include "navmeshbuilder.h"
|
||||||
#include "mapinstance.h"
|
#include "mapinstance.h"
|
||||||
@ -105,18 +106,18 @@ struct FastLZCompressor : public dtTileCacheCompressor
|
|||||||
virtual dtStatus compress(const unsigned char* buffer, const int bufferSize,
|
virtual dtStatus compress(const unsigned char* buffer, const int bufferSize,
|
||||||
unsigned char* compressed, const int /*maxCompressedSize*/, int* compressedSize)
|
unsigned char* compressed, const int /*maxCompressedSize*/, int* compressedSize)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
*compressedSize = fastlz_compress((const void *const)buffer, bufferSize, compressed);
|
*compressedSize = fastlz_compress((const void *const)buffer, bufferSize, compressed);
|
||||||
#endif
|
#endif
|
||||||
return DT_SUCCESS;
|
return DT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual dtStatus decompress(const unsigned char* compressed, const int compressedSize,
|
virtual dtStatus decompress(const unsigned char* compressed, const int compressedSize,
|
||||||
unsigned char* buffer, const int maxBufferSize, int* bufferSize)
|
unsigned char* buffer, const int maxBufferSize, int* bufferSize)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
*bufferSize = fastlz_decompress(compressed, compressedSize, buffer, maxBufferSize);
|
*bufferSize = fastlz_decompress(compressed, compressedSize, buffer, maxBufferSize);
|
||||||
#endif
|
#endif
|
||||||
return *bufferSize < 0 ? DT_FAILURE : DT_SUCCESS;
|
return *bufferSize < 0 ? DT_FAILURE : DT_SUCCESS;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -128,9 +129,10 @@ struct MeshProcess : public dtTileCacheMeshProcess
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void process(struct dtNavMeshCreateParams* params,
|
virtual void process(struct dtNavMeshCreateParams* params,
|
||||||
unsigned char* polyAreas, unsigned short* polyFlags)
|
unsigned char* polyAreas,
|
||||||
|
unsigned short* polyFlags)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
// Update poly flags from areas.
|
// Update poly flags from areas.
|
||||||
for (int i = 0; i < params->polyCount; ++i)
|
for (int i = 0; i < params->polyCount; ++i)
|
||||||
{
|
{
|
||||||
@ -148,7 +150,7 @@ struct MeshProcess : public dtTileCacheMeshProcess
|
|||||||
params->offMeshConUserID = m_geom->getOffMeshConnectionId();
|
params->offMeshConUserID = m_geom->getOffMeshConnectionId();
|
||||||
params->offMeshConCount = m_geom->getOffMeshConnectionCount();
|
params->offMeshConCount = m_geom->getOffMeshConnectionCount();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user