diff --git a/terrain/archive.d b/terrain/archive.d index 9ccf1b4c7..5f5d5fd80 100644 --- a/terrain/archive.d +++ b/terrain/archive.d @@ -108,6 +108,7 @@ struct AlphaInfo static assert(AlphaInfo.sizeof == 6*4); // Info about each submesh +// If you change this struct please check whether align(1) still fits. align(1) struct MeshInfo { @@ -124,13 +125,13 @@ struct MeshInfo // Size and offset of the vertex buffer ulong vertBufSize, vertBufOffset; + // Texture name. Index to the string table. + int texName = -1; + // Number and offset of AlphaInfo blocks int alphaNum; ulong alphaOffset; - // Texture name. Index to the string table. - int texName = -1; - // Fill the given vertex buffer void fillVertexBuffer(float vdest[]) { diff --git a/terrain/cpp_terrain.cpp b/terrain/cpp_terrain.cpp index 2b40b602a..ad2711036 100644 --- a/terrain/cpp_terrain.cpp +++ b/terrain/cpp_terrain.cpp @@ -63,13 +63,13 @@ struct MeshInfo // Size and offset of the vertex buffer int64_t vertBufSize, vertBufOffset; + // Texture name. Index to the string table. + int32_t texName; + // Number and offset of AlphaInfo blocks int32_t alphaNum; uint64_t alphaOffset; - // Texture name. Index to the string table. - int32_t texName; - inline void fillVertexBuffer(float *buffer, uint64_t size) const { d_terr_fillVertexBuffer(this, buffer, size); @@ -309,7 +309,7 @@ extern "C" Ogre::Pass* np = mat->getTechnique(0)->getPass(0); np->setLightingEnabled(false); np->createTextureUnitState("_land_default.dds") - ->setTextureScale(scale,scale); + ->setTextureScale(scale,scale); } uint8_t *terr_makeAlphaLayer(const char* name, int32_t width)