Skip to content

Commit 5556ba1

Browse files
onkrotnerzhul
authored andcommittedAug 16, 2015
Remove unused functions.
1 parent ee6cad1 commit 5556ba1

File tree

5 files changed

+0
-44
lines changed

5 files changed

+0
-44
lines changed
 

Diff for: ‎src/content_mapnode.cpp

-13
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,3 @@ std::string content_mapnode_get_new_name(const std::string &oldname)
233233
{
234234
return newnamegetter.get(oldname);
235235
}
236-
237-
content_t legacy_get_id(const std::string &oldname, INodeDefManager *ndef)
238-
{
239-
std::string newname = content_mapnode_get_new_name(oldname);
240-
if(newname == "")
241-
return CONTENT_IGNORE;
242-
content_t id;
243-
bool found = ndef->getId(newname, id);
244-
if(!found)
245-
return CONTENT_IGNORE;
246-
return id;
247-
}
248-

Diff for: ‎src/content_mapnode.h

-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,5 @@ void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);
3737
// Convert "CONTENT_STONE"-style names to dynamic ids
3838
std::string content_mapnode_get_new_name(const std::string &oldname);
3939
class INodeDefManager;
40-
content_t legacy_get_id(const std::string &oldname, INodeDefManager *ndef);
41-
#define LEGN(ndef, oldname) legacy_get_id(oldname, ndef)
4240

4341
#endif
44-

Diff for: ‎src/mapgen.cpp

-24
Original file line numberDiff line numberDiff line change
@@ -342,30 +342,6 @@ void Mapgen::spreadLight(v3s16 nmin, v3s16 nmax)
342342

343343

344344

345-
void Mapgen::calcLightingOld(v3s16 nmin, v3s16 nmax)
346-
{
347-
enum LightBank banks[2] = {LIGHTBANK_DAY, LIGHTBANK_NIGHT};
348-
VoxelArea a(nmin, nmax);
349-
bool block_is_underground = (water_level > nmax.Y);
350-
bool sunlight = !block_is_underground;
351-
352-
ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG);
353-
354-
for (int i = 0; i < 2; i++) {
355-
enum LightBank bank = banks[i];
356-
std::set<v3s16> light_sources;
357-
std::map<v3s16, u8> unlight_from;
358-
359-
voxalgo::clearLightAndCollectSources(*vm, a, bank, ndef,
360-
light_sources, unlight_from);
361-
voxalgo::propagateSunlight(*vm, a, sunlight, light_sources, ndef);
362-
363-
vm->unspreadLight(bank, unlight_from, light_sources, ndef);
364-
vm->spreadLight(bank, light_sources, ndef);
365-
}
366-
}
367-
368-
369345
///////////////////////////////////////////////////////////////////////////////
370346

371347
GenerateNotifier::GenerateNotifier()

Diff for: ‎src/mapgen.h

-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ class Mapgen {
179179
void propagateSunlight(v3s16 nmin, v3s16 nmax);
180180
void spreadLight(v3s16 nmin, v3s16 nmax);
181181

182-
void calcLightingOld(v3s16 nmin, v3s16 nmax);
183-
184182
virtual void makeChunk(BlockMakeData *data) {}
185183
virtual int getGroundLevelAtPoint(v2s16 p) { return 0; }
186184
};

Diff for: ‎src/unittest/test_mapnode.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,4 @@ void TestMapNode::testNodeProperties(INodeDefManager *nodedef)
5353
// Transparency
5454
n.setContent(CONTENT_AIR);
5555
UASSERT(nodedef->get(n).light_propagates == true);
56-
n.setContent(LEGN(nodedef, "CONTENT_STONE"));
57-
UASSERT(nodedef->get(n).light_propagates == false);
5856
}

0 commit comments

Comments
 (0)
Please sign in to comment.