3 Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef CAVEGEN_HEADER
21 #define CAVEGEN_HEADER
23 #define VMANIP_FLAG_CAVE VOXELFLAG_CHECKED1
24 #define MGV7_LAVA_DEPTH -256
25 #define MGFRACTAL_LAVA_DEPTH -256
36 INodeDefManager *ndef;
38 NoiseParams *np_caveliquids;
40 s16 min_tunnel_diameter;
41 s16 max_tunnel_diameter;
42 u16 tunnel_routepoints;
44 int part_max_length_rs;
46 bool large_cave_is_flat;
53 v3f orp; // starting point, relative to caved space
54 v3s16 of; // absolute coordinates of caved space
55 v3s16 ar; // allowed route area
56 s16 rs; // tunnel radius size
64 content_t c_water_source;
65 content_t c_lava_source;
71 CaveV5(MapgenV5 *mg, PseudoRandom *ps);
72 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
73 void makeTunnel(bool dirswitch);
74 void carveRoute(v3f vec, float f, bool randomize_xz);
81 INodeDefManager *ndef;
83 s16 min_tunnel_diameter;
84 s16 max_tunnel_diameter;
85 u16 tunnel_routepoints;
87 int part_max_length_rs;
90 bool large_cave_is_flat;
97 v3f orp; // starting point, relative to caved space
98 v3s16 of; // absolute coordinates of caved space
99 v3s16 ar; // allowed route area
100 s16 rs; // tunnel radius size
109 content_t c_water_source;
110 content_t c_lava_source;
115 CaveV6(MapgenV6 *mg, PseudoRandom *ps, PseudoRandom *ps2, bool large_cave);
116 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
117 void makeTunnel(bool dirswitch);
118 void carveRoute(v3f vec, float f, bool randomize_xz, bool tunnel_above_ground);
125 INodeDefManager *ndef;
127 NoiseParams *np_caveliquids;
129 s16 min_tunnel_diameter;
130 s16 max_tunnel_diameter;
131 u16 tunnel_routepoints;
133 int part_max_length_rs;
135 bool large_cave_is_flat;
142 v3f orp; // starting point, relative to caved space
143 v3s16 of; // absolute coordinates of caved space
144 v3s16 ar; // allowed route area
145 s16 rs; // tunnel radius size
153 content_t c_water_source;
154 content_t c_lava_source;
160 CaveV7(MapgenV7 *mg, PseudoRandom *ps);
161 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
162 void makeTunnel(bool dirswitch);
163 void carveRoute(v3f vec, float f, bool randomize_xz);
170 INodeDefManager *ndef;
172 NoiseParams *np_caveliquids;
174 s16 min_tunnel_diameter;
175 s16 max_tunnel_diameter;
176 u16 tunnel_routepoints;
178 int part_max_length_rs;
180 bool large_cave_is_flat;
187 v3f orp; // starting point, relative to caved space
188 v3s16 of; // absolute coordinates of caved space
189 v3s16 ar; // allowed route area
190 s16 rs; // tunnel radius size
198 content_t c_water_source;
199 content_t c_lava_source;
205 CaveFractal(MapgenFractal *mg, PseudoRandom *ps);
206 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
207 void makeTunnel(bool dirswitch);
208 void carveRoute(v3f vec, float f, bool randomize_xz);