applied heightmap addition to map editor -> thanks muwum

This commit is contained in:
Mark Vejvoda
2013-06-21 18:21:07 +00:00
parent a9a0a94550
commit bd4e2c8724
7 changed files with 58 additions and 8 deletions

View File

@@ -147,6 +147,8 @@ MapPreview *Program::map = NULL;
Program::Program(int w, int h) {
cellSize = 6;
grid=false;
heightmap=false;
hideWater=false;
ofsetX = 0;
ofsetY = 0;
map = new MapPreview();
@@ -158,6 +160,8 @@ void Program::init() {
redoStack = ChangeStack();
cellSize = 6;
grid=false;
heightmap=false;
hideWater=false;
ofsetX = 0;
ofsetY = 0;
map = NULL;
@@ -250,7 +254,7 @@ bool Program::redo() {
}
void Program::renderMap(int w, int h) {
if(map) renderer.renderMap(map, ofsetX, ofsetY, w, h, cellSize, grid);
if(map) renderer.renderMap(map, ofsetX, ofsetY, w, h, cellSize, grid,heightmap,hideWater);
}
void Program::setRefAlt(int x, int y) {
@@ -629,6 +633,14 @@ bool Program::setGridOnOff() {
grid=!grid;
return grid;
}
bool Program::setHeightMapOnOff() {
heightmap=!heightmap;
return heightmap;
}
bool Program::setHideWaterOnOff() {
hideWater=!hideWater;
return hideWater;
}
void Program::setMapAdvanced(int altFactor, int waterLevel, int cliffLevel , int cameraHeight) {
if(map) map->setAdvanced(altFactor, waterLevel, cliffLevel, cameraHeight);