update of editor and g3dviewer

This commit is contained in:
nosogo
2010-12-03 05:07:42 +00:00
parent 0537903a7d
commit 04aee1098d
18 changed files with 732 additions and 328 deletions

View File

@@ -150,6 +150,7 @@ public:
void flipX();
void flipY();
void copyXY(int x, int y, int sx, int sy); // destination x,y = source sx,sy
void reset(int w, int h, float alt, MapSurfaceType surf);
void resize(int w, int h, float alt, MapSurfaceType surf);
void resetFactions(int maxFactions);

View File

@@ -344,6 +344,14 @@ void MapPreview::flipY() {
//delete [] oldCells;
}
// Copy a cell in the map from one cell to another, used by MirrorXY etc
void MapPreview::copyXY(int x, int y, int sx, int sy) {
cells[x][y].height = cells[sx][sy].height;
cells[x][y].object = cells[sx][sy].object;
cells[x][y].resource = cells[sx][sy].resource;
cells[x][y].surface = cells[sx][sy].surface;
}
void MapPreview::changeSurface(int x, int y, MapSurfaceType surface, int radius) {
int i, j;
int dist;