summaryrefslogtreecommitdiff
path: root/MapLoading.cpp
diff options
context:
space:
mode:
authorJapa2011-07-20 17:37:38 +0000
committerJapa2011-07-20 17:37:38 +0000
commit650c5593bfd90afc93720b06fe74ee4ec7abf73e (patch)
treeb1f1e8ce928d0dd5e7d9e1d62425e6e7ab3fdd40 /MapLoading.cpp
parentd73d5fe58beefb57c8301f934ea01e868a9c10d3 (diff)
downloadstonesense-650c5593bfd90afc93720b06fe74ee4ec7abf73e.tar.gz
stonesense-650c5593bfd90afc93720b06fe74ee4ec7abf73e.tar.bz2
stonesense-650c5593bfd90afc93720b06fe74ee4ec7abf73e.tar.xz
brought back suspending and resuming.
Diffstat (limited to 'MapLoading.cpp')
-rw-r--r--MapLoading.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/MapLoading.cpp b/MapLoading.cpp
index 24695c4..714b092 100644
--- a/MapLoading.cpp
+++ b/MapLoading.cpp
@@ -215,8 +215,6 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C
{
if(config.skipMaps)
return;
- if(!Maps->Start())
- return;
//boundry check
int cellDimX, cellDimY, cellDimZ;
Maps->getSize((unsigned int &)cellDimX, (unsigned int &)cellDimY, (unsigned int &)cellDimZ);
@@ -1198,6 +1196,9 @@ void FollowCurrentDFCenter()
void read_segment( void *arg)
{
+ DFHack::Maps * maps = pDFApiHandle->getMaps();
+ if(!maps->Start())
+ return;
static bool firstLoad = 1;
//al_lock_mutex(readMutex);
//al_wait_cond(readCond, readMutex);
@@ -1209,7 +1210,8 @@ void read_segment( void *arg)
altSegment->Dispose();
delete(altSegment);
}
- //pDFApiHandle->Suspend();
+
+ pDFApiHandle->Suspend();
if (firstLoad || config.follow_DFscreen)
{
firstLoad = 0;
@@ -1225,7 +1227,7 @@ void read_segment( void *arg)
altSegment = ReadMapSegment(*pDFApiHandle, parms.x, parms.y, parms.z,
parms.sizex, parms.sizey, parms.sizez);
config.threadstarted = 0;
- //pDFApiHandle->Resume();
+ pDFApiHandle->Resume();
beautify_Segment(altSegment);
if(viewedSegment)
al_lock_mutex(viewedSegment->mutie);