1
0

Added new statistics module to AnvilStats - cHeightMap.

This paints the heightmap of each region file into a separate BMP file.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1163 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-01-22 06:49:14 +00:00
parent 6c97763b2f
commit 14763ed3c6
6 changed files with 382 additions and 2 deletions

View File

@@ -326,10 +326,18 @@ bool cProcessor::cThread::ProcessChunkSections(int a_ChunkX, int a_ChunkZ, cPars
{
if (!SectionProcessed[y])
{
m_Callback.OnEmptySection(y);
if (m_Callback.OnEmptySection(y))
{
return true;
}
}
}
if (m_Callback.OnSectionsFinished())
{
return true;
}
return false;
}
@@ -498,6 +506,14 @@ void cProcessor::ProcessWorld(const AString & a_WorldFolder, cCallbackFactory &
// Start as many threads as there are cores, plus one:
// (One more thread can be in the file-read IO block while all other threads crunch the numbers)
int NumThreads = GetNumCores() + 1;
/*
// Limit the number of threads in DEBUG mode to 1 for easier debugging
#ifdef _DEBUG
NumThreads = 1;
#endif // _DEBUG
*/
for (int i = 0; i < NumThreads; i++)
{
cCallback * Callback = a_CallbackFactory.GetNewCallback();