summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-16 10:54:08 +0000
committerrubidium <rubidium@openttd.org>2007-12-16 10:54:08 +0000
commitec90ce7e98b29371b0fb139256065ac9991ca289 (patch)
tree267e33cbd909ce3837ebac7aca128ba8b4e40d0f /src/order_gui.cpp
parentacf6e08f7840c9b6b89bd6e758972bf2bea29c5f (diff)
downloadopenttd-ec90ce7e98b29371b0fb139256065ac9991ca289.tar.xz
(svn r11643) -Codechange: conform with the coding style for the WP macro uses.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index efb29fb9f..105ee842d 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -58,7 +58,7 @@ enum OrderWindowWidgets {
static int OrderGetSel(const Window *w)
{
const Vehicle *v = GetVehicle(w->window_number);
- int num = WP(w,order_d).sel;
+ int num = WP(w, order_d).sel;
return (num >= 0 && num < v->num_orders) ? num : v->num_orders;
}
@@ -242,7 +242,7 @@ static void DrawOrdersWindow(Window *w)
}
SetDParam(0, i + 1);
- DrawString(2, y, str, (i == WP(w,order_d).sel) ? TC_WHITE : TC_BLACK);
+ DrawString(2, y, str, (i == WP(w, order_d).sel) ? TC_WHITE : TC_BLACK);
y += 10;
}
@@ -253,7 +253,7 @@ static void DrawOrdersWindow(Window *w)
if (i - w->vscroll.pos < w->vscroll.cap) {
str = shared_orders ? STR_END_OF_SHARED_ORDERS : STR_882A_END_OF_ORDERS;
- DrawString(2, y, str, (i == WP(w,order_d).sel) ? TC_WHITE : TC_BLACK);
+ DrawString(2, y, str, (i == WP(w, order_d).sel) ? TC_WHITE : TC_BLACK);
}
}
@@ -367,7 +367,7 @@ static bool HandleOrderVehClick(const Vehicle *v, const Vehicle *u, Window *w)
if (DoCommandP(v->tile, v->index | (u->index << 16), _ctrl_pressed ? CO_SHARE : CO_COPY, NULL,
_ctrl_pressed ? CMD_CLONE_ORDER | CMD_MSG(STR_CANT_SHARE_ORDER_LIST) : CMD_CLONE_ORDER | CMD_MSG(STR_CANT_COPY_ORDER_LIST))) {
- WP(w,order_d).sel = -1;
+ WP(w, order_d).sel = -1;
ResetObjectToPlace();
}
@@ -387,7 +387,7 @@ static void OrdersPlaceObj(const Vehicle *v, TileIndex tile, Window *w)
if (!cmd.IsValid()) return;
if (DoCommandP(v->tile, v->index + (OrderGetSel(w) << 16), PackOrder(&cmd), NULL, CMD_INSERT_ORDER | CMD_MSG(STR_8833_CAN_T_INSERT_NEW_ORDER))) {
- if (WP(w,order_d).sel != -1) WP(w,order_d).sel++;
+ if (WP(w, order_d).sel != -1) WP(w,order_d).sel++;
ResetObjectToPlace();
}
}
@@ -494,9 +494,9 @@ static void OrderClick_Refit(Window *w, const Vehicle *v)
{
if (_ctrl_pressed) {
/* Cancel refitting */
- DoCommandP(v->tile, v->index, (WP(w,order_d).sel << 16) | (CT_NO_REFIT << 8) | CT_NO_REFIT, NULL, CMD_ORDER_REFIT);
+ DoCommandP(v->tile, v->index, (WP(w, order_d).sel << 16) | (CT_NO_REFIT << 8) | CT_NO_REFIT, NULL, CMD_ORDER_REFIT);
} else {
- ShowVehicleRefitWindow(v, WP(w,order_d).sel);
+ ShowVehicleRefitWindow(v, WP(w, order_d).sel);
}
}
@@ -566,7 +566,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
if (sel == INVALID_ORDER) {
/* This was a click on an empty part of the orders window, so
* deselect the currently selected order. */
- WP(w,order_d).sel = -1;
+ WP(w, order_d).sel = -1;
SetWindowDirty(w);
return;
}
@@ -585,12 +585,12 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
if (xy != 0) ScrollMainWindowToTile(xy);
return;
} else {
- if (sel == WP(w,order_d).sel) {
+ if (sel == WP(w, order_d).sel) {
/* Deselect clicked order */
- WP(w,order_d).sel = -1;
+ WP(w, order_d).sel = -1;
} else {
/* Select clicked order */
- WP(w,order_d).sel = sel;
+ WP(w, order_d).sel = sel;
if (v->owner == _local_player) {
/* Activate drag and drop */
@@ -870,6 +870,6 @@ void ShowOrdersWindow(const Vehicle *v)
w->caption_color = v->owner;
w->vscroll.cap = 6;
w->resize.step_height = 10;
- WP(w,order_d).sel = -1;
+ WP(w, order_d).sel = -1;
}
}