#include #include #include "image.h" // windows MinGW // g++ -shared realWorld.cpp -o realWorld.dll -I../src -funsigned-char -std=c++11 // linux gcc // g++ -shared realWorld.cpp -o realWorld.so -I../src -fPIC -funsigned-char -std=c++11 extern "C" void generate(Map *mapPtr) { Map &map = *mapPtr; int w = map.getWidth(); int h = map.getHeight(); int n = map.getNbTeams(); for(int i = 0 ; i < h ; i++){ for(int j = 0 ; j < w ; j++){ int ti = i*height/h; int tj = j*width/w; int to = ti*width+tj; unsigned char * pix = (unsigned char*)header_data_cmap[(unsigned char)header_data[to]]; map[j][i].type = pix[0]?BERRIES:GRASS; } } for(int i=0; i