예제 #1
0
/*=============================================================================
 *
 */
static void mohoGenerateHeights(mapC* map, long seed)
{
 int w = map->W*2;	// must wrap around
 int h = map->H*2 + 1;	// must NOT wrap around

 mohoC moho(w, h, seed);

 // generate vertexes
 double t = w*h * DENSITY;
 int nodes = (int)(t + t*moho.Rnd()*.1);

 for(int i = 0; i < nodes; i++) moho.SpawnNode();
 for(int i = 0; i < ITERATIONS; i++) moho.Iterate();
 moho.CopyMap(map);
}
예제 #2
0
std::vector<Command> doIt(Simulation s) {
    return moho(s);
}