]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Terrain.cpp
Mention devtools option in man page
[lugaru.git] / Source / Terrain.cpp
index c395ebf0b03113e54324005b566ca3b7139ac08e..34da00ea94b2fd1d3071e1f755dee31de2fc2b3c 100644 (file)
@@ -398,7 +398,7 @@ void Terrain::UpdateVertexArray(int whichx, int whichy)
 }
 
 
-bool Terrain::load(const char *fileName)
+bool Terrain::load(const std::string& fileName)
 {
     static long i, j;
     static long x, y;
@@ -409,7 +409,9 @@ bool Terrain::load(const char *fileName)
     ImageRec texture;
 
     //Load Image
-    load_image(Folders::getResourcePath(fileName).c_str(), texture);
+    if (!load_image(Folders::getResourcePath(fileName).c_str(), texture)) {
+        return false;
+    }
 
     //Is it valid?
     if (texture.bpp > 24) {
@@ -643,7 +645,7 @@ bool Terrain::load(const char *fileName)
     patch_elements = (patch_size) * (patch_size) * 54;
     CalculateNormals();
 
-    return 1;
+    return true;
 }
 
 void Terrain::CalculateNormals()