Skip to content

Commit 2d849b0

Browse files
committedJan 5, 2015
Shorten ManualMapVoxelManipulator to MMVManip
1 parent 7289d61 commit 2d849b0

18 files changed

+103
-110
lines changed
 

‎src/cavegen.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MapgenV7;
2828
class CaveV6 {
2929
public:
3030
MapgenV6 *mg;
31-
ManualMapVoxelManipulator *vm;
31+
MMVManip *vm;
3232
INodeDefManager *ndef;
3333

3434
s16 min_tunnel_diameter;
@@ -44,22 +44,22 @@ class CaveV6 {
4444
s16 max_stone_y;
4545
v3s16 node_min;
4646
v3s16 node_max;
47-
47+
4848
v3f orp; // starting point, relative to caved space
4949
v3s16 of; // absolute coordinates of caved space
5050
v3s16 ar; // allowed route area
5151
s16 rs; // tunnel radius size
5252
v3f main_direction;
53-
53+
5454
s16 route_y_min;
5555
s16 route_y_max;
56-
56+
5757
PseudoRandom *ps;
5858
PseudoRandom *ps2;
59-
59+
6060
content_t c_water_source;
6161
content_t c_lava_source;
62-
62+
6363
int water_level;
6464

6565
CaveV6() {}
@@ -72,7 +72,7 @@ class CaveV6 {
7272
class CaveV7 {
7373
public:
7474
MapgenV7 *mg;
75-
ManualMapVoxelManipulator *vm;
75+
MMVManip *vm;
7676
INodeDefManager *ndef;
7777

7878
NoiseParams *np_caveliquids;
@@ -90,22 +90,22 @@ class CaveV7 {
9090
s16 max_stone_y;
9191
v3s16 node_min;
9292
v3s16 node_max;
93-
93+
9494
v3f orp; // starting point, relative to caved space
9595
v3s16 of; // absolute coordinates of caved space
9696
v3s16 ar; // allowed route area
9797
s16 rs; // tunnel radius size
9898
v3f main_direction;
99-
99+
100100
s16 route_y_min;
101101
s16 route_y_max;
102-
102+
103103
PseudoRandom *ps;
104-
104+
105105
content_t c_water_source;
106106
content_t c_lava_source;
107107
content_t c_ice;
108-
108+
109109
int water_level;
110110

111111
CaveV7() {}

‎src/dungeongen.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2929
#define VMANIP_FLAG_DUNGEON_UNTOUCHABLE (\
3030
VMANIP_FLAG_DUNGEON_INSIDE|VMANIP_FLAG_DUNGEON_PRESERVE)
3131

32-
class ManualMapVoxelManipulator;
32+
class MMVManip;
3333
class INodeDefManager;
3434

3535
v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs);
@@ -57,7 +57,7 @@ struct DungeonParams {
5757

5858
class DungeonGen {
5959
public:
60-
ManualMapVoxelManipulator *vm;
60+
MMVManip *vm;
6161
Mapgen *mg;
6262
u32 blockseed;
6363
PseudoRandom random;

‎src/emerge.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DecorationManager;
4444
class SchematicManager;
4545

4646
struct BlockMakeData {
47-
ManualMapVoxelManipulator *vmanip;
47+
MMVManip *vmanip;
4848
u64 seed;
4949
v3s16 blockpos_min;
5050
v3s16 blockpos_max;

‎src/map.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
23052305
v3s16 bigarea_blocks_min = blockpos_min - extra_borders;
23062306
v3s16 bigarea_blocks_max = blockpos_max + extra_borders;
23072307

2308-
data->vmanip = new ManualMapVoxelManipulator(this);
2308+
data->vmanip = new MMVManip(this);
23092309
//data->vmanip->setMap(this);
23102310

23112311
// Add the area
@@ -2823,7 +2823,7 @@ void ServerMap::updateVManip(v3s16 pos)
28232823
if (!mg)
28242824
return;
28252825

2826-
ManualMapVoxelManipulator *vm = mg->vm;
2826+
MMVManip *vm = mg->vm;
28272827
if (!vm)
28282828
return;
28292829

@@ -3589,20 +3589,20 @@ void ServerMap::PrintInfo(std::ostream &out)
35893589
out<<"ServerMap: ";
35903590
}
35913591

3592-
ManualMapVoxelManipulator::ManualMapVoxelManipulator(Map *map):
3592+
MMVManip::MMVManip(Map *map):
35933593
VoxelManipulator(),
35943594
m_is_dirty(false),
35953595
m_create_area(false),
35963596
m_map(map)
35973597
{
35983598
}
35993599

3600-
ManualMapVoxelManipulator::~ManualMapVoxelManipulator()
3600+
MMVManip::~MMVManip()
36013601
{
36023602
}
36033603

3604-
void ManualMapVoxelManipulator::initialEmerge(v3s16 blockpos_min,
3605-
v3s16 blockpos_max, bool load_if_inexistent)
3604+
void MMVManip::initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max,
3605+
bool load_if_inexistent)
36063606
{
36073607
TimeTaker timer1("initialEmerge", &emerge_time);
36083608

@@ -3690,9 +3690,8 @@ void ManualMapVoxelManipulator::initialEmerge(v3s16 blockpos_min,
36903690
m_is_dirty = false;
36913691
}
36923692

3693-
void ManualMapVoxelManipulator::blitBackAll(
3694-
std::map<v3s16, MapBlock*> *modified_blocks,
3695-
bool overwrite_generated)
3693+
void MMVManip::blitBackAll(std::map<v3s16, MapBlock*> *modified_blocks,
3694+
bool overwrite_generated)
36963695
{
36973696
if(m_area.getExtent() == v3s16(0,0,0))
36983697
return;

‎src/map.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ class ServerMap : public Map
535535
#define VMANIP_BLOCK_DATA_INEXIST 1
536536
#define VMANIP_BLOCK_CONTAINS_CIGNORE 2
537537

538-
class ManualMapVoxelManipulator : public VoxelManipulator
538+
class MMVManip : public VoxelManipulator
539539
{
540540
public:
541-
ManualMapVoxelManipulator(Map *map);
542-
virtual ~ManualMapVoxelManipulator();
541+
MMVManip(Map *map);
542+
virtual ~MMVManip();
543543

544544
virtual void clear()
545545
{

‎src/mapgen.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3636
#define MG_LIGHT 0x10
3737

3838
class Settings;
39-
class ManualMapVoxelManipulator;
39+
class MMVManip;
4040
class INodeDefManager;
4141

4242
extern FlagDesc flagdesc_mapgen[];
@@ -45,7 +45,6 @@ extern FlagDesc flagdesc_gennotify[];
4545
class Biome;
4646
class EmergeManager;
4747
class MapBlock;
48-
class ManualMapVoxelManipulator;
4948
class VoxelManipulator;
5049
struct BlockMakeData;
5150
class VoxelArea;
@@ -134,7 +133,7 @@ class Mapgen {
134133
bool generating;
135134
int id;
136135

137-
ManualMapVoxelManipulator *vm;
136+
MMVManip *vm;
138137
INodeDefManager *ndef;
139138

140139
u32 blockseed;

‎src/mg_biome.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2020
#include "mg_biome.h"
2121
#include "gamedef.h"
2222
#include "nodedef.h"
23-
#include "map.h" //for ManualMapVoxelManipulator
23+
#include "map.h" //for MMVManip
2424
#include "log.h"
2525
#include "util/numeric.h"
2626
#include "main.h"

‎src/mg_decoration.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void DecoSimple::resolveNodeNames(NodeResolveInfo *nri)
242242
}
243243

244244

245-
bool DecoSimple::canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p)
245+
bool DecoSimple::canPlaceDecoration(MMVManip *vm, v3s16 p)
246246
{
247247
// Don't bother if there aren't any decorations to place
248248
if (c_decos.size() == 0)
@@ -287,8 +287,7 @@ bool DecoSimple::canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p)
287287
}
288288

289289

290-
size_t DecoSimple::generate(ManualMapVoxelManipulator *vm, PseudoRandom *pr,
291-
s16 max_y, v3s16 p)
290+
size_t DecoSimple::generate(MMVManip *vm, PseudoRandom *pr, s16 max_y, v3s16 p)
292291
{
293292
if (!canPlaceDecoration(vm, p))
294293
return 0;
@@ -325,8 +324,7 @@ int DecoSimple::getHeight()
325324
///////////////////////////////////////////////////////////////////////////////
326325

327326

328-
size_t DecoSchematic::generate(ManualMapVoxelManipulator *vm, PseudoRandom *pr,
329-
s16 max_y, v3s16 p)
327+
size_t DecoSchematic::generate(MMVManip *vm, PseudoRandom *pr, s16 max_y, v3s16 p)
330328
{
331329
if (flags & DECO_PLACE_CENTER_X)
332330
p.X -= (schematic->size.X + 1) / 2;

‎src/mg_decoration.h

+5-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2525

2626
struct NoiseParams;
2727
class Mapgen;
28-
class ManualMapVoxelManipulator;
28+
class MMVManip;
2929
class PseudoRandom;
3030
class Schematic;
3131

@@ -83,8 +83,7 @@ class Decoration : public GenElement, public NodeResolver {
8383
size_t placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
8484
//size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
8585

86-
virtual size_t generate(ManualMapVoxelManipulator *vm, PseudoRandom *pr,
87-
s16 max_y, v3s16 p) = 0;
86+
virtual size_t generate(MMVManip *vm, PseudoRandom *pr, s16 max_y, v3s16 p) = 0;
8887
virtual int getHeight() = 0;
8988
};
9089

@@ -98,9 +97,8 @@ class DecoSimple : public Decoration {
9897

9998
virtual void resolveNodeNames(NodeResolveInfo *nri);
10099

101-
bool canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p);
102-
virtual size_t generate(ManualMapVoxelManipulator *vm, PseudoRandom *pr,
103-
s16 max_y, v3s16 p);
100+
bool canPlaceDecoration(MMVManip *vm, v3s16 p);
101+
virtual size_t generate(MMVManip *vm, PseudoRandom *pr, s16 max_y, v3s16 p);
104102
virtual int getHeight();
105103
};
106104

@@ -110,8 +108,7 @@ class DecoSchematic : public Decoration {
110108
Schematic *schematic;
111109
std::string filename;
112110

113-
virtual size_t generate(ManualMapVoxelManipulator *vm, PseudoRandom *pr,
114-
s16 max_y, v3s16 p);
111+
virtual size_t generate(MMVManip *vm, PseudoRandom *pr, s16 max_y, v3s16 p);
115112
virtual int getHeight();
116113
};
117114

‎src/mg_ore.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ size_t Ore::placeOre(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
123123
///////////////////////////////////////////////////////////////////////////////
124124

125125

126-
void OreScatter::generate(ManualMapVoxelManipulator *vm, int mapseed,
127-
u32 blockseed, v3s16 nmin, v3s16 nmax)
126+
void OreScatter::generate(MMVManip *vm, int mapseed, u32 blockseed,
127+
v3s16 nmin, v3s16 nmax)
128128
{
129129
PseudoRandom pr(blockseed);
130130
MapNode n_ore(c_ore, 0, ore_param2);
@@ -164,8 +164,8 @@ void OreScatter::generate(ManualMapVoxelManipulator *vm, int mapseed,
164164
///////////////////////////////////////////////////////////////////////////////
165165

166166

167-
void OreSheet::generate(ManualMapVoxelManipulator *vm, int mapseed,
168-
u32 blockseed, v3s16 nmin, v3s16 nmax)
167+
void OreSheet::generate(MMVManip *vm, int mapseed, u32 blockseed,
168+
v3s16 nmin, v3s16 nmax)
169169
{
170170
PseudoRandom pr(blockseed + 4234);
171171
MapNode n_ore(c_ore, 0, ore_param2);
@@ -206,8 +206,8 @@ void OreSheet::generate(ManualMapVoxelManipulator *vm, int mapseed,
206206

207207
///////////////////////////////////////////////////////////////////////////////
208208

209-
void OreBlob::generate(ManualMapVoxelManipulator *vm, int mapseed,
210-
u32 blockseed, v3s16 nmin, v3s16 nmax)
209+
void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
210+
v3s16 nmin, v3s16 nmax)
211211
{
212212
PseudoRandom pr(blockseed + 2404);
213213
MapNode n_ore(c_ore, 0, ore_param2);
@@ -269,8 +269,8 @@ OreVein::~OreVein()
269269
}
270270

271271

272-
void OreVein::generate(ManualMapVoxelManipulator *vm, int mapseed,
273-
u32 blockseed, v3s16 nmin, v3s16 nmax)
272+
void OreVein::generate(MMVManip *vm, int mapseed, u32 blockseed,
273+
v3s16 nmin, v3s16 nmax)
274274
{
275275
PseudoRandom pr(blockseed + 520);
276276
MapNode n_ore(c_ore, 0, ore_param2);

‎src/mg_ore.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2626
struct NoiseParams;
2727
class Noise;
2828
class Mapgen;
29-
class ManualMapVoxelManipulator;
29+
class MMVManip;
3030

3131
/////////////////// Ore generation flags
3232

@@ -70,32 +70,32 @@ class Ore : public GenElement, public NodeResolver {
7070
virtual void resolveNodeNames(NodeResolveInfo *nri);
7171

7272
size_t placeOre(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
73-
virtual void generate(ManualMapVoxelManipulator *vm, int mapseed,
74-
u32 blockseed, v3s16 nmin, v3s16 nmax) = 0;
73+
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
74+
v3s16 nmin, v3s16 nmax) = 0;
7575
};
7676

7777
class OreScatter : public Ore {
7878
public:
7979
static const bool NEEDS_NOISE = false;
8080

81-
virtual void generate(ManualMapVoxelManipulator *vm, int mapseed,
82-
u32 blockseed, v3s16 nmin, v3s16 nmax);
81+
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
82+
v3s16 nmin, v3s16 nmax);
8383
};
8484

8585
class OreSheet : public Ore {
8686
public:
8787
static const bool NEEDS_NOISE = true;
8888

89-
virtual void generate(ManualMapVoxelManipulator *vm, int mapseed,
90-
u32 blockseed, v3s16 nmin, v3s16 nmax);
89+
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
90+
v3s16 nmin, v3s16 nmax);
9191
};
9292

9393
class OreBlob : public Ore {
9494
public:
9595
static const bool NEEDS_NOISE = true;
9696

97-
virtual void generate(ManualMapVoxelManipulator *vm, int mapseed,
98-
u32 blockseed, v3s16 nmin, v3s16 nmax);
97+
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
98+
v3s16 nmin, v3s16 nmax);
9999
};
100100

101101
class OreVein : public Ore {
@@ -107,8 +107,8 @@ class OreVein : public Ore {
107107

108108
virtual ~OreVein();
109109

110-
virtual void generate(ManualMapVoxelManipulator *vm, int mapseed,
111-
u32 blockseed, v3s16 nmin, v3s16 nmax);
110+
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
111+
v3s16 nmin, v3s16 nmax);
112112
};
113113

114114
class OreManager : public GenElementManager {

0 commit comments

Comments
 (0)
Please sign in to comment.