summaryrefslogtreecommitdiff
path: root/src/genworld.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-29 09:54:47 +0000
committerrubidium <rubidium@openttd.org>2008-05-29 09:54:47 +0000
commit34e2d8f1e14c4204b299b78623d9935c7b07b4e3 (patch)
treecccf15d8a59031edb6cb85fccdfdf7895b781b06 /src/genworld.h
parent8ea996e246ab1d38e14d5b8d80ff7f2ac9aee24f (diff)
downloadopenttd-34e2d8f1e14c4204b299b78623d9935c7b07b4e3.tar.xz
(svn r13320) -Codechange: move some enums from openttd.h to more logical locations.
Diffstat (limited to 'src/genworld.h')
-rw-r--r--src/genworld.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/genworld.h b/src/genworld.h
index 9cd09a701..c0a192333 100644
--- a/src/genworld.h
+++ b/src/genworld.h
@@ -18,6 +18,14 @@ enum {
GENERATE_NEW_SEED = (uint)-1, ///< Create a new random seed
};
+/* Modes for GenerateWorld */
+enum GenerateWorldMode {
+ GW_NEWGAME = 0, /* Generate a map for a new game */
+ GW_EMPTY = 1, /* Generate an empty map (sea-level) */
+ GW_RANDOM = 2, /* Generate a random map for SE */
+ GW_HEIGHTMAP = 3, /* Generate a newgame from a heightmap */
+};
+
typedef void gw_done_proc();
typedef void gw_abort_proc();
@@ -27,7 +35,7 @@ struct gw_info {
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
- int mode; ///< What mode are we making a world in
+ GenerateWorldMode mode;///< What mode are we making a world in
PlayerID lp; ///< The local_player before generating
uint size_x; ///< X-size of the map
uint size_y; ///< Y-size of the map
@@ -67,7 +75,7 @@ bool IsGenerateWorldThreaded();
void GenerateWorldSetCallback(gw_done_proc *proc);
void GenerateWorldSetAbortCallback(gw_abort_proc *proc);
void WaitTillGeneratedWorld();
-void GenerateWorld(int mode, uint size_x, uint size_y);
+void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y);
void AbortGeneratingWorld();
bool IsGeneratingWorldAborted();
void HandleGeneratingWorldAbortion();