src/genworld.cpp
branchnoai
changeset 11110 8e553098ad05
parent 10867 5de2923d6e59
equal deleted inserted replaced
11108:fc7b43610af2 11110:8e553098ad05
    23 #include "core/random_func.hpp"
    23 #include "core/random_func.hpp"
    24 #include "engine_func.h"
    24 #include "engine_func.h"
    25 #include "settings_type.h"
    25 #include "settings_type.h"
    26 #include "newgrf_storage.h"
    26 #include "newgrf_storage.h"
    27 #include "water.h"
    27 #include "water.h"
       
    28 #include "blitter/factory.hpp"
    28 #include "tilehighlight_func.h"
    29 #include "tilehighlight_func.h"
    29 
    30 
    30 #include "table/sprites.h"
    31 #include "table/sprites.h"
    31 
    32 
    32 void GenerateClearTile();
    33 void GenerateClearTile();
   289 		_gw.thread->Join();
   290 		_gw.thread->Join();
   290 		delete _gw.thread;
   291 		delete _gw.thread;
   291 		_gw.thread = NULL;
   292 		_gw.thread = NULL;
   292 	}
   293 	}
   293 
   294 
   294 	if (_network_dedicated ||
   295 	if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0 ||
   295 	    (_gw.thread = ThreadObject::New(&_GenerateWorld, NULL)) == NULL) {
   296 	    (_gw.thread = ThreadObject::New(&_GenerateWorld, NULL)) == NULL) {
   296 		DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
   297 		DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
   297 		_gw.threaded = false;
   298 		_gw.threaded = false;
   298 		_GenerateWorld(NULL);
   299 		_GenerateWorld(NULL);
   299 		return;
   300 		return;