diff options
author | rubidium <rubidium@openttd.org> | 2006-11-22 14:14:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-11-22 14:14:02 +0000 |
commit | 204d64b23888732693f545c4539d90b8fd1fc6dc (patch) | |
tree | d4299b13a2cc853b6b7727f8018c72cebcced034 /genworld.h | |
parent | 77c564bd862d9e3a26d4fd4d82c3ab754b0e598d (diff) | |
download | openttd-204d64b23888732693f545c4539d90b8fd1fc6dc.tar.xz |
(svn r7237) -Fix: TGP landscape generation could leak memory if aborted during the generation of the heightmap.
Diffstat (limited to 'genworld.h')
-rw-r--r-- | genworld.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/genworld.h b/genworld.h index bb882b1c1..0cf67cbe6 100644 --- a/genworld.h +++ b/genworld.h @@ -25,6 +25,7 @@ enum { }; typedef void gw_done_proc(void); +typedef void gw_abort_proc(void); typedef struct gw_info { bool active; //! Is generating world active @@ -37,6 +38,7 @@ typedef struct gw_info { uint size_x; //! X-size of the map uint size_y; //! Y-size of the map gw_done_proc *proc; //! Proc that is called when done (can be NULL) + gw_abort_proc *abortp; //! Proc that is called when aborting (can be NULL) OTTDThread *thread; //! The thread we are in (can be NULL) } gw_info; @@ -74,6 +76,7 @@ void SetGeneratingWorldPaintStatus(bool status); bool IsGeneratingWorldReadyForPaint(void); bool IsGenerateWorldThreaded(void); void GenerateWorldSetCallback(gw_done_proc *proc); +void GenerateWorldSetAbortCallback(gw_abort_proc *proc); void WaitTillGeneratedWorld(void); void GenerateWorld(int mode, uint size_x, uint size_y); void AbortGeneratingWorld(void); |