summaryrefslogtreecommitdiff
path: root/genworld.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-11-22 14:14:02 +0000
committerrubidium <rubidium@openttd.org>2006-11-22 14:14:02 +0000
commit3919198e4d58c79e63d77fad6758cd140b925c5c (patch)
treed4299b13a2cc853b6b7727f8018c72cebcced034 /genworld.h
parent62c13013a593d4b6b485b34c3bd39e19cd7666e0 (diff)
downloadopenttd-3919198e4d58c79e63d77fad6758cd140b925c5c.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.h3
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);