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
34 INodeDefManager *ndef;
36 NoiseParams *np_caveliquids;
38 s16 min_tunnel_diameter;
39 s16 max_tunnel_diameter;
40 u16 tunnel_routepoints;
42 int part_max_length_rs;
44 bool large_cave_is_flat;
51 v3f orp; // starting point, relative to caved space
52 v3s16 of; // absolute coordinates of caved space
53 v3s16 ar; // allowed route area
54 s16 rs; // tunnel radius size
62 content_t c_water_source;
63 content_t c_lava_source;
69 CaveV5(MapgenV5 *mg, PseudoRandom *ps);
70 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
71 void makeTunnel(bool dirswitch);
72 void carveRoute(v3f vec, float f, bool randomize_xz);
79 INodeDefManager *ndef;
81 s16 min_tunnel_diameter;
82 s16 max_tunnel_diameter;
83 u16 tunnel_routepoints;
85 int part_max_length_rs;
88 bool large_cave_is_flat;
95 v3f orp; // starting point, relative to caved space
96 v3s16 of; // absolute coordinates of caved space
97 v3s16 ar; // allowed route area
98 s16 rs; // tunnel radius size
107 content_t c_water_source;
108 content_t c_lava_source;
113 CaveV6(MapgenV6 *mg, PseudoRandom *ps, PseudoRandom *ps2, bool large_cave);
114 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
115 void makeTunnel(bool dirswitch);
116 void carveRoute(v3f vec, float f, bool randomize_xz, bool tunnel_above_ground);
123 INodeDefManager *ndef;
125 NoiseParams *np_caveliquids;
127 s16 min_tunnel_diameter;
128 s16 max_tunnel_diameter;
129 u16 tunnel_routepoints;
131 int part_max_length_rs;
133 bool large_cave_is_flat;
140 v3f orp; // starting point, relative to caved space
141 v3s16 of; // absolute coordinates of caved space
142 v3s16 ar; // allowed route area
143 s16 rs; // tunnel radius size
151 content_t c_water_source;
152 content_t c_lava_source;
158 CaveV7(MapgenV7 *mg, PseudoRandom *ps);
159 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
160 void makeTunnel(bool dirswitch);
161 void carveRoute(v3f vec, float f, bool randomize_xz);