diff options
author | rubidium <rubidium@openttd.org> | 2009-05-03 15:44:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-03 15:44:05 +0000 |
commit | d685ca0619cdbaf61623b673d26a2c9aa8b5b85e (patch) | |
tree | fa050ce2c3ba55aadcc588d3e60293e710e6b886 /src/genworld.h | |
parent | c29f4fd738f65678356718b8487cf18e196a2dec (diff) | |
download | openttd-d685ca0619cdbaf61623b673d26a2c9aa8b5b85e.tar.xz |
(svn r16220) -Fix [FS#2862]: possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation
Diffstat (limited to 'src/genworld.h')
-rw-r--r-- | src/genworld.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/genworld.h b/src/genworld.h index d46ee731b..522d93f46 100644 --- a/src/genworld.h +++ b/src/genworld.h @@ -16,6 +16,8 @@ enum { LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator GENERATE_NEW_SEED = UINT_MAX, ///< Create a new random seed + + GENWORLD_REDRAW_TIMEOUT = 200, ///< Timeout between redraws }; /* Modes for GenerateWorld */ @@ -32,7 +34,6 @@ typedef void gw_abort_proc(); struct gw_info { bool active; ///< Is generating world active bool abort; ///< Whether to abort the thread ASAP - bool wait_for_draw; ///< Are we waiting on a draw event bool quit_thread; ///< Do we want to quit the active thread bool threaded; ///< Whether we run _GenerateWorld threaded GenerateWorldMode mode;///< What mode are we making a world in @@ -69,8 +70,6 @@ static inline bool IsGeneratingWorld() } /* genworld.cpp */ -void SetGeneratingWorldPaintStatus(bool status); -bool IsGeneratingWorldReadyForPaint(); bool IsGenerateWorldThreaded(); void GenerateWorldSetCallback(gw_done_proc *proc); void GenerateWorldSetAbortCallback(gw_abort_proc *proc); @@ -89,4 +88,7 @@ void StartNewGameWithoutGUI(uint seed); void ShowCreateScenario(); void StartScenarioEditor(); +extern class ThreadMutex *_genworld_mapgen_mutex; +extern class ThreadMutex *_genworld_paint_mutex; + #endif /* GENWORLD_H */ |