summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-05-06 15:06:19 +0000
committerglx <glx@openttd.org>2008-05-06 15:06:19 +0000
commitfb938a2cb3fb7cfe6ca447dca5fc28bac78ed2e8 (patch)
treee0fa67ffb8edcd60ba0a747639df2a1df93f1d40 /src
parentfb1db90cc670bf09ad985a73eeefed50729d9752 (diff)
downloadopenttd-fb938a2cb3fb7cfe6ca447dca5fc28bac78ed2e8.tar.xz
(svn r12970) -Codechange: coding style for some function names
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 3fd63712f..34e989be1 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -399,12 +399,12 @@ void ShowBuildIndustryWindow()
static void UpdateIndustryProduction(Industry *i);
-static inline bool isProductionMinimum(const Industry *i, int pt)
+static inline bool IsProductionMinimum(const Industry *i, int pt)
{
return i->production_rate[pt] == 0;
}
-static inline bool isProductionMaximum(const Industry *i, int pt)
+static inline bool IsProductionMaximum(const Industry *i, int pt)
{
return i->production_rate[pt] >= 255;
}
@@ -501,7 +501,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
/* Let's put out those buttons.. */
if (IsProductionAlterable(i)) {
DrawArrowButtons(5, y, 3, (WP(w, indview_d).clicked_line == j + 1) ? WP(w, indview_d).clicked_button : 0,
- !isProductionMinimum(i, j), !isProductionMaximum(i, j));
+ !IsProductionMinimum(i, j), !IsProductionMaximum(i, j));
}
y += 10;
}
@@ -550,12 +550,12 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
if (IsInsideMM(x, 5, 25) ) {
/* Clicked buttons, decrease or increase production */
if (x < 15) {
- if (isProductionMinimum(i, line)) return;
+ if (IsProductionMinimum(i, line)) return;
i->production_rate[line] = max(i->production_rate[line] / 2, 0);
} else {
/* a zero production industry is unlikely to give anything but zero, so push it a little bit */
int new_prod = i->production_rate[line] == 0 ? 1 : i->production_rate[line] * 2;
- if (isProductionMaximum(i, line)) return;
+ if (IsProductionMaximum(i, line)) return;
i->production_rate[line] = minu(new_prod, 255);
}