From f253ff9f1ab246c67ee5d3fb520c584b384ee708 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Wed, 10 Feb 2016 04:27:45 +0100 Subject: Dump shader programs on compile errors --- src/shader.cpp | 23 +++++++++++++++++++++++ src/shader.h | 3 +++ 2 files changed, 26 insertions(+) (limited to 'src') diff --git a/src/shader.cpp b/src/shader.cpp index d39a8307c..1d990eafe 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -808,6 +808,9 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype, "failed to generate \""<root/src/dungeongen.h
blob: 4e1201d82df6df757269ec8c61ee145d6da1abd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DUNGEONGEN_HEADER
#define DUNGEONGEN_HEADER

#include "voxel.h"
#include "noise.h"
#include "mapgen.h"

#define VMANIP_FLAG_DUNGEON_INSIDE VOXELFLAG_CHECKED1
#define VMANIP_FLAG_DUNGEON_PRESERVE VOXELFLAG_CHECKED2
#define VMANIP_FLAG_DUNGEON_UNTOUCHABLE (\
		VMANIP_FLAG_DUNGEON_INSIDE|VMANIP_FLAG_DUNGEON_PRESERVE)

class MMVManip;
class INodeDefManager;

v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs);
v3s16 turn_xz(v3s16 olddir, int t);
v3s16 random_turn(PseudoRandom &random, v3s16 olddir);
int dir_to_facedir(v3s16 d);


struct DungeonParams {
	content_t c_water;
	content_t c_cobble;
	content_t c_moss;
	content_t c_stair;

	GenNotifyType notifytype;
	bool diagonal_dirs;
	float mossratio;
	v3s16 holesize;
	v3s16 roomsize;

	NoiseParams np_rarity;
	NoiseParams np_wetness;
	NoiseParams np_density;
};

class DungeonGen {
public:
	MMVManip *vm;
	Mapgen *mg;
	u32 blockseed;
	PseudoRandom random;
	v3s16 csize;

	content_t c_torch;
	DungeonParams dp;

	//RoomWalker
	v3s16 m_pos;
	v3s16 m_dir;

	DungeonGen(Mapgen *mg, DungeonParams *dparams);
	void generate(u32 bseed, v3s16 full_node_min, v3s16 full_node_max);