diff options
-rw-r--r-- | src/tools/mesh_extractor/ContinentBuilder.cpp | 2 | ||||
-rw-r--r-- | src/tools/mesh_extractor/DoodadHandler.cpp | 2 | ||||
-rw-r--r-- | src/tools/mesh_extractor/DoodadHandler.h | 2 | ||||
-rw-r--r-- | src/tools/mesh_extractor/TileBuilder.cpp | 20 | ||||
-rw-r--r-- | src/tools/mesh_extractor/Utils.h | 2 |
5 files changed, 16 insertions, 12 deletions
diff --git a/src/tools/mesh_extractor/ContinentBuilder.cpp b/src/tools/mesh_extractor/ContinentBuilder.cpp index f861dff1648..c63445b2287 100644 --- a/src/tools/mesh_extractor/ContinentBuilder.cpp +++ b/src/tools/mesh_extractor/ContinentBuilder.cpp @@ -29,7 +29,7 @@ void ContinentBuilder::Build() MmapTileHeader header; header.size = builder.DataSize; fwrite(&header, sizeof(MmapTileHeader), 1, f); - fwrite(nav, sizeof(uint8), builder.DataSize, f); + fwrite(nav, sizeof(unsigned char), builder.DataSize, f); } fclose(f); dtFree(nav); diff --git a/src/tools/mesh_extractor/DoodadHandler.cpp b/src/tools/mesh_extractor/DoodadHandler.cpp index 89fcaba5601..aa298cea698 100644 --- a/src/tools/mesh_extractor/DoodadHandler.cpp +++ b/src/tools/mesh_extractor/DoodadHandler.cpp @@ -88,7 +88,7 @@ void DoodadHandler::ReadDoodadPaths( Chunk* id, Chunk* data ) } } -void DoodadHandler::InsertModelGeometry(const DoodadDefinition def, Model* model) +void DoodadHandler::InsertModelGeometry(const DoodadDefinition& def, Model* model) { G3D::Matrix4 transformation = Utils::GetTransformation(def); uint32 vertOffset = Vertices.size(); diff --git a/src/tools/mesh_extractor/DoodadHandler.h b/src/tools/mesh_extractor/DoodadHandler.h index c426504da32..aa7e3cac20d 100644 --- a/src/tools/mesh_extractor/DoodadHandler.h +++ b/src/tools/mesh_extractor/DoodadHandler.h @@ -43,7 +43,7 @@ protected: private: void ReadDoodadDefinitions(Chunk* chunk); void ReadDoodadPaths(Chunk* id, Chunk* data); - void InsertModelGeometry(const DoodadDefinition def, Model* model); + void InsertModelGeometry(const DoodadDefinition& def, Model* model); std::set<uint32> _drawn; std::vector<DoodadDefinition>* _definitions; std::vector<std::string>* _paths; diff --git a/src/tools/mesh_extractor/TileBuilder.cpp b/src/tools/mesh_extractor/TileBuilder.cpp index 4736274706d..445641fc009 100644 --- a/src/tools/mesh_extractor/TileBuilder.cpp +++ b/src/tools/mesh_extractor/TileBuilder.cpp @@ -111,7 +111,7 @@ uint8* TileBuilder::Build() rcClearUnwalkableTriangles(Context, Config.walkableSlopeAngle, vertices, numVerts, triangles, numTris, areas); rcRasterizeTriangles(Context, vertices, numVerts, triangles, areas, numTris, *hf, Config.walkableClimb); - printf("[%02u,%02u] Triangles rasterized!\n", X, Y); + printf("[%02i,%02i] Triangles rasterized!\n", X, Y); // Once all geometry is rasterized, we do initial pass of filtering to // remove unwanted overhangs caused by the conservative rasterization @@ -120,7 +120,7 @@ uint8* TileBuilder::Build() rcFilterLedgeSpans(Context, Config.walkableHeight, Config.walkableClimb, *hf); rcFilterWalkableLowHeightSpans(Context, Config.walkableHeight, *hf); - printf("[%02u,%02u] Filtering done!\n", X, Y); + printf("[%02i,%02i] Filtering done!\n", X, Y); // Compact the heightfield so that it is faster to handle from now on. // This will result in more cache coherent data as well as the neighbours @@ -130,7 +130,7 @@ uint8* TileBuilder::Build() rcFreeHeightField(hf); - printf("[%02u,%02u] Heightfield compressed!\n", X, Y); + printf("[%02i,%02i] Heightfield compressed!\n", X, Y); // Erode the walkable area by agent radius. rcErodeWalkableArea(Context, Config.walkableRadius, *chf); @@ -139,7 +139,7 @@ uint8* TileBuilder::Build() // Partition the walkable surface into simple regions without holes. rcBuildRegions(Context, *chf, Config.borderSize, Config.minRegionArea, Config.mergeRegionArea); - printf("[%02u,%02u] Regions built!\n", X, Y); + printf("[%02i,%02i] Regions built!\n", X, Y); // Create contours. rcContourSet* cset = rcAllocContourSet(); @@ -149,13 +149,13 @@ uint8* TileBuilder::Build() rcPolyMesh* pmesh = rcAllocPolyMesh(); rcBuildPolyMesh(Context, *cset, Config.maxVertsPerPoly, *pmesh); - printf("[%02u,%02u] Polymesh built!\n", X, Y); + printf("[%02i,%02i] Polymesh built!\n", X, Y); // Build detail mesh. rcPolyMeshDetail* dmesh = rcAllocPolyMeshDetail(); rcBuildPolyMeshDetail(Context, *pmesh, *chf, Config.detailSampleDist, Config.detailSampleMaxError, *dmesh); - printf("[%02u,%02u] Polymesh detail built!\n", X, Y); + printf("[%02i,%02i] Polymesh detail built!\n", X, Y); rcFreeCompactHeightfield(chf); rcFreeContourSet(cset); @@ -215,13 +215,17 @@ uint8* TileBuilder::Build() params.tileX = X; params.tileY = Y; params.tileSize = Config.width; + + // Offmesh-connection settings + params.offMeshConCount = 0; // none for now + int navDataSize; uint8* navData; - printf("[%02u,%02u] Creating the navmesh!\n", X, Y); + printf("[%02i,%02i] Creating the navmesh!\n", X, Y); bool result = dtCreateNavMeshData(¶ms, &navData, &navDataSize); if (result) { - printf("[%02u,%02u] NavMesh created, size %u!\n", X, Y, navDataSize); + printf("[%02i,%02i] NavMesh created, size %i!\n", X, Y, navDataSize); DataSize = navDataSize; rcFreePolyMesh(pmesh); rcFreePolyMeshDetail(dmesh); diff --git a/src/tools/mesh_extractor/Utils.h b/src/tools/mesh_extractor/Utils.h index 4cf20a4cf9d..188d47a88ce 100644 --- a/src/tools/mesh_extractor/Utils.h +++ b/src/tools/mesh_extractor/Utils.h @@ -533,7 +533,7 @@ struct MmapTileHeader uint32 dtVersion; uint32 mmapVersion; uint32 size; - bool usesLiquids : 1; + bool usesLiquids; MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION), mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) {} |