#include #include #include #include // g++ -shared anselme.cpp -o anselme.dll -I../src extern "C" void generate(Map *mapPtr) { Map &map = *mapPtr; int w = map.getWidth(); int h = map.getHeight(); int n = map.getNbTeams(); int i, j, k; for(i=0; i r+15) // mountain map[i][j].type = rand()%8 ? ROCK : IRON_ORE; else if(l < r-15) // plains map[i][j].type = rand()%15 ? GRASS : BERRIES; else // forest { l = rand()%10; map[i][j].type = l > 5 ? TREE : l ? GRASS : BERRIES; } } } } }