summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-21 12:47:45 +0000
committerrubidium <rubidium@openttd.org>2011-08-21 12:47:45 +0000
commita67cf6bae1ffdea7d5451160c8cfa0df691eb963 (patch)
tree37c445a511c07c62d14d90291fff0e4181867f87
parent7b7869fba73a6f9923bb40ccbd7344255f890771 (diff)
downloadopenttd-a67cf6bae1ffdea7d5451160c8cfa0df691eb963.tar.xz
(svn r22787) -Codechange: rename genworld redraw constant
-rw-r--r--src/genworld.h4
-rw-r--r--src/genworld_gui.cpp2
-rw-r--r--src/gfx.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/genworld.h b/src/genworld.h
index 95de2f81b..ed57d103d 100644
--- a/src/genworld.h
+++ b/src/genworld.h
@@ -22,8 +22,8 @@ enum LandscapeGenerator {
LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator
};
-static const uint GENERATE_NEW_SEED = UINT_MAX; ///< Create a new random seed
-static const uint GENWORLD_REDRAW_TIMEOUT = 200; ///< Timeout between redraws
+static const uint GENERATE_NEW_SEED = UINT_MAX; ///< Create a new random seed
+static const uint MODAL_PROGRESS_REDRAW_TIMEOUT = 200; ///< Timeout between redraws
/** Modes for GenerateWorld */
enum GenWorldMode {
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 8f464ca11..07210de57 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -1365,7 +1365,7 @@ static void _SetGeneratingWorldProgress(GenWorldProgress cls, uint progress, uin
}
/* Don't update the screen too often. So update it once in every once in a while... */
- if (!_network_dedicated && _gws.timer != 0 && _realtime_tick - _gws.timer < GENWORLD_REDRAW_TIMEOUT) return;
+ if (!_network_dedicated && _gws.timer != 0 && _realtime_tick - _gws.timer < MODAL_PROGRESS_REDRAW_TIMEOUT) return;
/* Percentage is about the number of completed tasks, so 'current - 1' */
_gws.percent = percent_table[cls] + (percent_table[cls + 1] - percent_table[cls]) * (_gws.current == 0 ? 0 : _gws.current - 1) / _gws.total;
diff --git a/src/gfx.cpp b/src/gfx.cpp
index eb75ff91e..c08801467 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -1561,8 +1561,8 @@ void DrawDirtyBlocks()
_modal_progress_work_mutex->EndCritical();
/* Wait a while and update _realtime_tick so we are given the rights */
- CSleep(GENWORLD_REDRAW_TIMEOUT);
- _realtime_tick += GENWORLD_REDRAW_TIMEOUT;
+ CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT);
+ _realtime_tick += MODAL_PROGRESS_REDRAW_TIMEOUT;
_modal_progress_paint_mutex->BeginCritical();
_modal_progress_work_mutex->BeginCritical();
}