--- a/src/Terrain.cc Thu Jan 22 00:28:26 2009 +0200
+++ b/src/Terrain.cc Thu Jan 22 01:53:05 2009 +0200
@@ -101,6 +101,8 @@
}
void Terrain::generatePixelBuffer (void) {
+
+#if GRAPHICS_ENABLED
// initialize textures
generateTexture();
@@ -114,6 +116,12 @@
pixbuf.draw_pixel(x, y, getTexturePixel(x, y));
}
}
+
+#else
+ // no-op
+
+#endif
+
}
/*
@@ -410,6 +418,7 @@
return normal;
}
+#if GRAPHICS_ENABLED
void Terrain::draw (graphics::Display &display, PixelCoordinate camera) {
// XXX: can we optimize this somehow?
@@ -419,4 +428,5 @@
// draw it onto the graphics, offset by camera position
surf.draw(-camera.x, -camera.y, display.get_gc());
}
+#endif