X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=src%2Fterrain.cc;h=89caa6ea92a0c0cb9fdebcda2acc51c505427127;hp=0f100742ea7f9045eb6adb9bea02aa5e42a79338;hb=1e8963fc3f8191e328bbecd04cfbcba31d7d0bdf;hpb=73b9db25a6deff93da45f3c45290ca8a56fefed3 diff --git a/src/terrain.cc b/src/terrain.cc index 0f10074..89caa6e 100644 --- a/src/terrain.cc +++ b/src/terrain.cc @@ -58,8 +58,8 @@ bool Terrain::generate(const TerrainParams ¶ms) data.yoffs = (float)i / (float)params.ytiles; gen_heightfield(tile.mesh, txsz, tysz, params.max_height, - params.tile_usub, params.tile_vsub, calc_height, - (void*)&data); + params.tile_usub, params.tile_vsub, calc_height, + (void *)&data); float xoffs = j * txsz - params.xsz / 2.0 + txsz / 2.0; float yoffs = i * tysz - params.ysz / 2.0 + tysz / 2.0; @@ -70,10 +70,10 @@ bool Terrain::generate(const TerrainParams ¶ms) tiles.push_back(tile); -/* - the terrain scene stores objects only - no need to fill the mat, mesh std::vectors -*/ + /* + the terrain scene stores objects only + no need to fill the mat, mesh std::vectors + */ Object *o = new Object; o->mesh = tile.mesh; o->material = &material; @@ -123,7 +123,7 @@ float Terrain::get_height(float u, float v) const static float calc_height(float u, float v, void *ptr) { - GenData *data = (GenData*)ptr; + GenData *data = (GenData *)ptr; const TerrainParams *tp = data->tp; u = u / tp->xtiles + data->xoffs;