summaryrefslogtreecommitdiffstats
path: root/Tools/AnvilStats/Processor.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-30 20:49:33 +0200
committermadmaxoft <github@xoft.cz>2013-08-30 20:49:33 +0200
commit105251a986d741e34561df588582de3ef882d183 (patch)
tree8f414b24316af0fcfd3174e6c2e825ac53465362 /Tools/AnvilStats/Processor.cpp
parentProtoProxy: Log individual chunks in MapChunkBulk packet. (diff)
parentAnvilStats: Implemented a cImageComposingCallback class. (diff)
downloadcuberite-105251a986d741e34561df588582de3ef882d183.tar
cuberite-105251a986d741e34561df588582de3ef882d183.tar.gz
cuberite-105251a986d741e34561df588582de3ef882d183.tar.bz2
cuberite-105251a986d741e34561df588582de3ef882d183.tar.lz
cuberite-105251a986d741e34561df588582de3ef882d183.tar.xz
cuberite-105251a986d741e34561df588582de3ef882d183.tar.zst
cuberite-105251a986d741e34561df588582de3ef882d183.zip
Diffstat (limited to 'Tools/AnvilStats/Processor.cpp')
-rw-r--r--Tools/AnvilStats/Processor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tools/AnvilStats/Processor.cpp b/Tools/AnvilStats/Processor.cpp
index e7f7eb21d..8e1cc4c4b 100644
--- a/Tools/AnvilStats/Processor.cpp
+++ b/Tools/AnvilStats/Processor.cpp
@@ -76,6 +76,12 @@ void cProcessor::cThread::ProcessFile(const AString & a_FileName)
return;
}
+ if (m_Callback.OnNewRegion(RegionX, RegionZ))
+ {
+ // Callback doesn't want the region file processed
+ return;
+ }
+
cFile f;
if (!f.Open(a_FileName, cFile::fmRead))
{
@@ -92,6 +98,8 @@ void cProcessor::cThread::ProcessFile(const AString & a_FileName)
}
ProcessFileData(FileContents.data(), FileContents.size(), RegionX * 32, RegionZ * 32);
+
+ m_Callback.OnRegionFinished(RegionX, RegionZ);
}