(svn r11643) -Codechange: conform with the coding style for the WP macro uses.
This commit is contained in:
@@ -48,7 +48,7 @@ static inline void SetTimetableParams(int param1, int param2, uint32 time)
|
||||
static void DrawTimetableWindow(Window *w)
|
||||
{
|
||||
const Vehicle *v = GetVehicle(w->window_number);
|
||||
int selected = WP(w,order_d).sel;
|
||||
int selected = WP(w, order_d).sel;
|
||||
|
||||
SetVScrollCount(w, v->num_orders * 2);
|
||||
|
||||
@@ -221,17 +221,17 @@ static void TimetableWndProc(Window *w, WindowEvent *we)
|
||||
case 3: { /* Main panel. */
|
||||
int selected = GetOrderFromTimetableWndPt(w, we->we.click.pt.y, v);
|
||||
|
||||
if (selected == INVALID_ORDER || selected == WP(w,order_d).sel) {
|
||||
if (selected == INVALID_ORDER || selected == 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 = selected;
|
||||
WP(w, order_d).sel = selected;
|
||||
}
|
||||
} break;
|
||||
|
||||
case 6: { /* "Wait For" button. */
|
||||
int selected = WP(w,order_d).sel;
|
||||
int selected = WP(w, order_d).sel;
|
||||
VehicleOrderID real = (selected + 1) / 2;
|
||||
|
||||
if (real >= v->num_orders) real = 0;
|
||||
@@ -253,7 +253,7 @@ static void TimetableWndProc(Window *w, WindowEvent *we)
|
||||
} break;
|
||||
|
||||
case 7: { /* Clear waiting time button. */
|
||||
uint32 p1 = PackTimetableArgs(v, WP(w,order_d).sel);
|
||||
uint32 p1 = PackTimetableArgs(v, WP(w, order_d).sel);
|
||||
DoCommandP(0, p1, 0, NULL, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_CAN_T_TIMETABLE_VEHICLE));
|
||||
} break;
|
||||
|
||||
@@ -272,7 +272,7 @@ static void TimetableWndProc(Window *w, WindowEvent *we)
|
||||
case WE_ON_EDIT_TEXT: {
|
||||
const Vehicle *v = GetVehicle(w->window_number);
|
||||
|
||||
uint32 p1 = PackTimetableArgs(v, WP(w,order_d).sel);
|
||||
uint32 p1 = PackTimetableArgs(v, WP(w, order_d).sel);
|
||||
|
||||
uint64 time = StrEmpty(we->we.edittext.str) ? 0 : strtoul(we->we.edittext.str, NULL, 10);
|
||||
if (!_patches.timetable_in_ticks) time *= DAY_TICKS;
|
||||
@@ -327,6 +327,6 @@ void ShowTimetableWindow(const Vehicle *v)
|
||||
w->caption_color = v->owner;
|
||||
w->vscroll.cap = 8;
|
||||
w->resize.step_height = 10;
|
||||
WP(w,order_d).sel = -1;
|
||||
WP(w, order_d).sel = -1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user