]> git.lizzy.rs Git - dragonfireclient.git/blob - src/cavegen.h
Merge remote branch 'origin/master'
[dragonfireclient.git] / src / cavegen.h
1 /*
2 Minetest
3 Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
4
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.
9
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.
14
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.
18 */
19
20 #ifndef CAVEGEN_HEADER
21 #define CAVEGEN_HEADER
22
23 #define VMANIP_FLAG_CAVE VOXELFLAG_CHECKED1
24
25 class CaveV6 {
26 public:
27         ManualMapVoxelManipulator *vm;
28
29         s16 min_tunnel_diameter;
30         s16 max_tunnel_diameter;
31         u16 tunnel_routepoints;
32         int dswitchint;
33         int part_max_length_rs;
34
35         bool large_cave;
36         bool large_cave_is_flat;
37         bool flooded;
38
39         s16 max_stone_y;
40         v3s16 node_min;
41         v3s16 node_max;
42         
43         v3f orp;  //original point
44         v3s16 of;
45         v3s16 ar; // allowed route area
46         s16 rs;   // radius size
47         v3f main_direction;
48         
49         s16 route_y_min;
50         s16 route_y_max;
51         
52         PseudoRandom *ps;
53         PseudoRandom *ps2;
54         
55         content_t c_water_source;
56         content_t c_lava_source;
57         
58         int water_level;
59
60         CaveV6() {}
61         CaveV6(Mapgen *mg, PseudoRandom *ps, PseudoRandom *ps2, bool large_cave,
62                         content_t c_water, content_t c_lava);
63         void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
64         void makeTunnel(bool dirswitch);
65         void carveRoute(v3f vec, float f, bool randomize_xz);
66 };
67
68 #endif