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
31 ManualMapVoxelManipulator *vm;
32 INodeDefManager *ndef;
34 s16 min_tunnel_diameter;
35 s16 max_tunnel_diameter;
36 u16 tunnel_routepoints;
38 int part_max_length_rs;
41 bool large_cave_is_flat;
48 v3f orp; // starting point, relative to caved space
49 v3s16 of; // absolute coordinates of caved space
50 v3s16 ar; // allowed route area
51 s16 rs; // tunnel radius size
60 content_t c_water_source;
61 content_t c_lava_source;
66 CaveV6(MapgenV6 *mg, PseudoRandom *ps, PseudoRandom *ps2, bool large_cave);
67 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
68 void makeTunnel(bool dirswitch);
69 void carveRoute(v3f vec, float f, bool randomize_xz);
75 ManualMapVoxelManipulator *vm;
76 INodeDefManager *ndef;
78 s16 min_tunnel_diameter;
79 s16 max_tunnel_diameter;
80 u16 tunnel_routepoints;
82 int part_max_length_rs;
85 bool large_cave_is_flat;
92 v3f orp; // starting point, relative to caved space
93 v3s16 of; // absolute coordinates of caved space
94 v3s16 ar; // allowed route area
95 s16 rs; // tunnel radius size
103 content_t c_water_source;
104 content_t c_lava_source;
109 CaveV7(MapgenV7 *mg, PseudoRandom *ps, bool large_cave);
110 void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
111 void makeTunnel(bool dirswitch);
112 void carveRoute(v3f vec, float f, bool randomize_xz, bool is_ravine);