summaryrefslogtreecommitdiff
path: root/src/genworld.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-01-17 22:59:24 +0000
committersmatz <smatz@openttd.org>2010-01-17 22:59:24 +0000
commit11e3a00a23148c96c497c8ba28e1f2c0583e966c (patch)
tree2b41dd3a0508339757a37cd68e4bb86083b10d40 /src/genworld.cpp
parenta271ef214bec3bcbd93f102359569c21505d220a (diff)
downloadopenttd-11e3a00a23148c96c497c8ba28e1f2c0583e966c.tar.xz
(svn r18853) -Codechange: apply coding style to GenWorld's enums, structs and typedefs
Diffstat (limited to 'src/genworld.cpp')
-rw-r--r--src/genworld.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index f6f33d3da..9f479210b 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -48,11 +48,11 @@ void StartupDisasters();
void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settings);
-/* Please only use this variable in genworld.h and genworld.c and
+/* Please only use this variable in genworld.h and genworld.cpp and
* nowhere else. For speed improvements we need it to be global, but
* in no way the meaning of it is to use it anywhere else besides
- * in the genworld.h and genworld.c! -- TrueLight */
-gw_info _gw;
+ * in the genworld.h and genworld.cpp! -- TrueLight */
+GenWorldInfo _gw;
/** Rights for the map generation */
ThreadMutex *_genworld_mapgen_mutex = ThreadMutex::New();
@@ -108,7 +108,7 @@ static void _GenerateWorld(void *arg)
StartupEconomy();
/* Don't generate landscape items when in the scenario editor. */
- if (_gw.mode == GW_EMPTY) {
+ if (_gw.mode == GWM_EMPTY) {
SetGeneratingWorldProgress(GWP_UNMOVABLE, 1);
/* Make sure the tiles at the north border are void tiles if needed. */
@@ -150,7 +150,7 @@ static void _GenerateWorld(void *arg)
_generating_world = false;
/* No need to run the tile loop in the scenario editor. */
- if (_gw.mode != GW_EMPTY) {
+ if (_gw.mode != GWM_EMPTY) {
uint i;
SetGeneratingWorldProgress(GWP_RUNTILELOOP, 0x500);
@@ -192,7 +192,7 @@ static void _GenerateWorld(void *arg)
* Set here the function, if any, that you want to be called when landscape
* generation is done.
*/
-void GenerateWorldSetCallback(gw_done_proc *proc)
+void GenerateWorldSetCallback(GWDoneProc *proc)
{
_gw.proc = proc;
}
@@ -201,7 +201,7 @@ void GenerateWorldSetCallback(gw_done_proc *proc)
* Set here the function, if any, that you want to be called when landscape
* generation is aborted.
*/
-void GenerateWorldSetAbortCallback(gw_abort_proc *proc)
+void GenerateWorldSetAbortCallback(GWAbortProc *proc)
{
_gw.abortp = proc;
}
@@ -266,7 +266,7 @@ void HandleGeneratingWorldAbortion()
* @param size_y The Y-size of the map.
* @param reset_settings Whether to reset the game configuration (used for restart)
*/
-void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_settings)
+void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_settings)
{
if (_gw.active) return;
_gw.mode = mode;
@@ -308,7 +308,7 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_
}
if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0 ||
- !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) {
+ !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) {
DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
_gw.threaded = false;
_genworld_mapgen_mutex->EndCritical();