diff options
| -rw-r--r-- | src/tools/mmaps_generator/TerrainBuilder.cpp | 6 | ||||
| -rw-r--r-- | src/tools/vmap4_extractor/wmo.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp index 3a87da3d4f1..5c76161c0d6 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.cpp +++ b/src/tools/mmaps_generator/TerrainBuilder.cpp @@ -260,7 +260,8 @@ namespace MMAP meshData.solidVerts.append(coord[1]); } - int indices[3], loopStart = 0, loopEnd = 0, loopInc = 0; + int indices[] = { 0, 0, 0 }; + int loopStart = 0, loopEnd = 0, loopInc = 0; getLoopVars(portion, loopStart, loopEnd, loopInc); for (int i = loopStart; i < loopEnd; i+=loopInc) for (int j = TOP; j <= BOTTOM; j+=1) @@ -340,7 +341,8 @@ namespace MMAP delete [] liquid_map; - int indices[3], loopStart = 0, loopEnd = 0, loopInc = 0, triInc = BOTTOM-TOP; + int indices[] = { 0, 0, 0 }; + int loopStart = 0, loopEnd = 0, loopInc = 0, triInc = BOTTOM-TOP; getLoopVars(portion, loopStart, loopEnd, loopInc); // generate triangles diff --git a/src/tools/vmap4_extractor/wmo.cpp b/src/tools/vmap4_extractor/wmo.cpp index 7c9f23c5a95..d7bd9ecd2f9 100644 --- a/src/tools/vmap4_extractor/wmo.cpp +++ b/src/tools/vmap4_extractor/wmo.cpp @@ -388,7 +388,7 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool precise fwrite(MoviEx,2,nColTriangles*3,output); // write vertices - int VERT[] = {0x54524556, nColVertices*3*sizeof(float)+4, nColVertices};// "VERT" + int VERT[] = {0x54524556, nColVertices*3*static_cast<int>(sizeof(float))+4, nColVertices};// "VERT" int check = 3*nColVertices; fwrite(VERT,4,3,output); for (uint32 i=0; i<nVertices; ++i) @@ -402,9 +402,9 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool precise } //------LIQU------------------------ - if(LiquEx_size != 0) + if (LiquEx_size != 0) { - int LIQU_h[] = {0x5551494C, sizeof(WMOLiquidHeader) + LiquEx_size + hlq->xtiles*hlq->ytiles};// "LIQU" + int LIQU_h[] = {0x5551494C, static_cast<int>(sizeof(WMOLiquidHeader) + LiquEx_size) + hlq->xtiles*hlq->ytiles};// "LIQU" fwrite(LIQU_h, 4, 2, output); // according to WoW.Dev Wiki: |
