2 Commits b1186d1e93 ... fa6993f046

Autor SHA1 Nachricht Datum
  Pieter fa6993f046 Merge branch 'master' of https://notabug.org/raatmarien/pws-procedural-island-generator vor 9 Jahren
  Pieter 2415be4ad9 Remove debug output vor 9 Jahren

+ 1 - 0
doc/.~lock.Biomen.odt#

@@ -0,0 +1 @@
+,pieter,Pieter-Linux,08.01.2016 17:00,file:///home/pieter/.config/libreoffice/4;

+ 1 - 0
doc/.~lock.PIG.odt#

@@ -0,0 +1 @@
+,pieter,Pieter-Linux,08.01.2016 16:50,file:///home/pieter/.config/libreoffice/4;

+ 1 - 1
doc/.~lock.Warmte.odt#

@@ -1 +1 @@
-,pieter,Pieter-Linux,06.01.2016 21:01,file:///home/pieter/.config/libreoffice/4;
+,pieter,Pieter-Linux,08.01.2016 17:00,file:///home/pieter/.config/libreoffice/4;

BIN
doc/Biomen.odt


BIN
doc/PIG.odt


BIN
doc/images/menu-new.png


+ 2 - 15
src/biomeGenerator.cpp

@@ -31,32 +31,19 @@ BiomeGenerator::BiomeGenerator(BiomeSettings settings)
     windmap = settings.windmap;
     waterLevel = settings.waterLevel;
     this->settings = settings;
-    std::cout << settings.size << " size \n";
+    //std::cout << settings.size << " size \n";
 
     biomemap = new Biome[settings.size * settings.size];
 }
 
 void BiomeGenerator::generateBiomes()
 {
-    std::cout << settings.size << " size \n";
+    //std::cout << settings.size << " size \n";
     for(int x = 0; x < settings.size; x++)
     {
         for(int y = 0; y < settings.size; y++)
         {
             int index = y * settings.size + x;
-            /*if (landmap[index] == false)
-                biomemap[index] = OCEAN;
-            else if (heightmap[index] < seaLevel)
-            {
-                biomemap[index] = LAKE;
-                std::cout << "lake" << "\n";
-            }
-            else if (watermap[index] > 0)
-                biomemap[index] = RIVER;
-            else
-            {
-                biomemap[index] = getBiomeForPosition(x, y);
-            }*/
             biomemap[index] = getBiomeForPosition(x, y);
         }
     }

+ 8 - 13
src/guiFrontend.cpp

@@ -128,31 +128,31 @@ GUIFrontend::GUIFrontend()
          &buttonTexture, &clickedButtonTexture, buttonSize);
     heightmapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset), &buttonFont,
-         "View\nheightmap",
+         "Height",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     riverMapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + buttonSize.y),
-         &buttonFont, "View\nriver map",
+         &buttonFont, "Rivers",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     windMapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + 2 * buttonSize.y),
-         &buttonFont, "View\nwind map",
+         &buttonFont, "Wind",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     heatMapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + 3 * buttonSize.y),
-         &buttonFont, "View\nheat map",
+         &buttonFont, "Heat",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     groundWaterMapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + 4 * buttonSize.y),
-         &buttonFont, "View grou-\nnd water",
+         &buttonFont, "Ground\nwater",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     biomeButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + 5 * buttonSize.y),
-         &buttonFont, "View\nbiomes",
+         &buttonFont, "Biomes",
          &buttonTexture, &clickedButtonTexture, buttonSize);
     renderedMapButton = new Button
         (Vector2f(buttonSize.x, buttonOffset + 6 * buttonSize.y),
-         &buttonFont, "View\nrender",
+         &buttonFont, "Render",
          &buttonTexture, &clickedButtonTexture, buttonSize);
 
 
@@ -542,8 +542,6 @@ void GUIFrontend::generateWithSeed(unsigned seed)
     double waterLevel =
         islandHeightmapGenerator->modifiedHeightValue(0.5);
 
-    std::cout << waterLevel << " water level\n";
-
     // LandMapGenerator
     drawProgress("Generating island land map...", 0.15);
 
@@ -689,8 +687,6 @@ void GUIFrontend::save()
     std::string directory = "saves" + DIRSEP + nameWithoutSpaces +
         "-" + std::to_string(currentSeed) + DIRSEP;
 
-    std::cout << "Saving island to " << directory << "\n";
-
 #ifdef OS_WIN
     TCHAR path[MAX_PATH];
     GetCurrentDirectory(MAX_PATH, path);
@@ -713,8 +709,6 @@ void GUIFrontend::save()
     biomeMapImage.saveToFile(directory + "biomemap.png");
     biomeGenerator->getRawImage().saveToFile(directory + "raw-biomemap.png");
     renderedMapImage.saveToFile(directory + "renderedmap.png");
-
-    std::cout << "Done saving\n";
 }
 
 void GUIFrontend::fillImage(double *values, Image *image)
@@ -728,6 +722,7 @@ void GUIFrontend::fillImage(double *values, Image *image)
     return;
 }
 
+// More accurate saving method
 /*void GUIFrontend::fillImage(double *values, Image *image)
 {
     for (int i = 0; i < islandSize.x * islandSize.y; i++) {

+ 1 - 1
src/markovNames.cpp

@@ -36,7 +36,7 @@ MarkovNames::MarkovNames(std::string trainingFileName,
                          std::mt19937 *mt)
 {
     this->trainingFileName = trainingFileName;
-    this->groupSize = groupSize;
+    this->groupSize = 3;//groupSize;
     this->mt = mt;
 
     this->markovData.beginnings.frequency = 0;