From 68b1cd8d1bda704dc174c2e39a03276f68984164 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Tue, 10 May 2016 13:35:39 -0400 Subject: Cavegen: Merge instances of repetitive surface level-finding code --- src/cavegen.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cavegen.h') diff --git a/src/cavegen.h b/src/cavegen.h index 74cd0b416..5a41966fe 100644 --- a/src/cavegen.h +++ b/src/cavegen.h @@ -71,6 +71,9 @@ public: void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height); void makeTunnel(bool dirswitch); void carveRoute(v3f vec, float f, bool randomize_xz); + +private: + inline bool isPosAboveSurface(v3s16 p); }; /* @@ -140,6 +143,8 @@ public: private: void makeTunnel(bool dirswitch); void carveRoute(v3f vec, float f, bool randomize_xz, bool tunnel_above_ground); + + inline s16 getSurfaceFromHeightmap(v3s16 p); }; #endif -- cgit v1.2.3