summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 8af59b741..f5a07f20e 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1101,7 +1101,7 @@ static void NormaliseTrainHead(Train *head)
/* Update the refit button and window */
InvalidateWindowData(WC_VEHICLE_REFIT, head->index);
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, VVW_WIDGET_REFIT_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, WID_VV_REFIT);
/* If we don't have a unit number yet, set one. */
if (head->unitnumber != 0) return;
@@ -1458,7 +1458,7 @@ static void MarkTrainAsStuck(Train *v)
v->subspeed = 0;
v->SetLastSpeed();
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
}
@@ -1787,7 +1787,7 @@ void ReverseTrainDirection(Train *v)
/* If we are inside a depot after reversing, don't bother with path reserving. */
if (v->track == TRACK_BIT_DEPOT) {
/* Can't be stuck here as inside a depot is always a safe tile. */
- if (HasBit(v->flags, VRF_TRAIN_STUCK)) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ if (HasBit(v->flags, VRF_TRAIN_STUCK)) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
ClrBit(v->flags, VRF_TRAIN_STUCK);
return;
}
@@ -2595,7 +2595,7 @@ bool TryPathReserve(Train *v, bool mark_as_stuck, bool first_tile_okay)
/* If we have a reserved path and the path ends at a safe tile, we are finished already. */
if (origin.okay && (v->tile != origin.tile || first_tile_okay)) {
/* Can't be stuck then. */
- if (HasBit(v->flags, VRF_TRAIN_STUCK)) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ if (HasBit(v->flags, VRF_TRAIN_STUCK)) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
ClrBit(v->flags, VRF_TRAIN_STUCK);
return true;
}
@@ -2623,7 +2623,7 @@ bool TryPathReserve(Train *v, bool mark_as_stuck, bool first_tile_okay)
if (HasBit(v->flags, VRF_TRAIN_STUCK)) {
v->wait_counter = 0;
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
ClrBit(v->flags, VRF_TRAIN_STUCK);
return true;
@@ -3607,7 +3607,7 @@ static bool TrainLocoHandler(Train *v, bool mode)
if (v->force_proceed != TFP_NONE) {
ClrBit(v->flags, VRF_TRAIN_STUCK);
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
/* train is broken down? */
@@ -3682,13 +3682,13 @@ static bool TrainLocoHandler(Train *v, bool mode)
if (v->force_proceed == TFP_NONE) return true;
ClrBit(v->flags, VRF_TRAIN_STUCK);
v->wait_counter = 0;
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
}
if (v->current_order.IsType(OT_LEAVESTATION)) {
v->current_order.Free();
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
return true;
}
@@ -3812,7 +3812,7 @@ static void CheckIfTrainNeedsService(Train *v)
* suddenly moved farther away, we continue our normal
* schedule? */
v->current_order.MakeDummy();
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
return;
}
@@ -3828,7 +3828,7 @@ static void CheckIfTrainNeedsService(Train *v)
SetBit(v->gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS);
v->current_order.MakeGoToDepot(depot, ODTFB_SERVICE);
v->dest_tile = tfdd.tile;
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
}
void Train::OnNewDay()