Merge pull request #134 from OpenMW/master

Add OpenMW commits up to 28 Jan
pull/163/head
David Cernat 8 years ago committed by GitHub
commit 08faad9f32

@ -155,7 +155,7 @@ namespace ESMTerrain
osg::ref_ptr<osg::Vec4Array> colours)
{
// LOD level n means every 2^n-th vertex is kept
size_t increment = 1 << lodLevel;
size_t increment = static_cast<size_t>(1) << lodLevel;
osg::Vec2f origin = center - osg::Vec2f(size/2.f, size/2.f);

@ -23,7 +23,7 @@ osg::ref_ptr<IndexArrayType> createIndexBuffer(unsigned int flags, unsigned int
bool anyDeltas = (lodDeltas[Terrain::North] || lodDeltas[Terrain::South] || lodDeltas[Terrain::West] || lodDeltas[Terrain::East]);
size_t increment = 1 << lodLevel;
size_t increment = static_cast<size_t>(1) << lodLevel;
assert(increment < verts);
osg::ref_ptr<IndexArrayType> indices (new IndexArrayType(osg::PrimitiveSet::TRIANGLES));
@ -75,7 +75,7 @@ osg::ref_ptr<IndexArrayType> createIndexBuffer(unsigned int flags, unsigned int
// South
size_t row = 0;
size_t outerStep = 1 << (lodDeltas[Terrain::South] + lodLevel);
size_t outerStep = static_cast<size_t>(1) << (lodDeltas[Terrain::South] + lodLevel);
for (size_t col = 0; col < verts-1; col += outerStep)
{
indices->push_back(verts*col+row);

@ -1 +0,0 @@
#include "storage.hpp"

@ -48,7 +48,7 @@ FILE* TiXmlFOpen( const char* filename, const char* mode )
memset(wname, 0, sizeof(*wname) * (len + 1));
wchar_t wmode[32] = { 0 };
MultiByteToWideChar(CP_UTF8, 0, filename, len, wname, len);
MultiByteToWideChar(CP_UTF8, 0, filename, static_cast<int>(len), wname, static_cast<int>(len));
MultiByteToWideChar(CP_UTF8, 0, mode, -1, wmode, sizeof(wmode) / sizeof(*wmode));
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )

Loading…
Cancel
Save