diff options
author | darkvater <darkvater@openttd.org> | 2004-12-21 23:27:58 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-12-21 23:27:58 +0000 |
commit | 452db59121462bd0c1e36e9da179316dcd0e47df (patch) | |
tree | e7f0d0b320fd24814891039231dcd5eab36423f2 /roadveh_cmd.c | |
parent | 6e1353ed985442462374b8cc4027d8677932138d (diff) | |
download | openttd-452db59121462bd0c1e36e9da179316dcd0e47df.tar.xz |
(svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just make sure you do not sticky more than 23 at a time. Also a lot of places in the code invalidated the 'status bar' of the vehicle, referring to it as widget 4. This is now widget 5 and has been #definitized
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index c051039c0..38c6583b8 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -204,7 +204,7 @@ int32 CmdStartStopRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { v->vehstatus ^= VS_STOPPED; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); } @@ -307,7 +307,7 @@ int32 CmdSendRoadVehToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) v->cur_order_index++; v->current_order.type = OT_DUMMY; v->current_order.flags = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } return 0; } @@ -321,7 +321,7 @@ int32 CmdSendRoadVehToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) v->current_order.flags = OF_NON_STOP | OF_FULL_LOAD; v->current_order.station = (byte)depot; v->dest_tile = _depots[depot].xy; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } return 0; @@ -491,7 +491,7 @@ static void RoadVehCrash(Vehicle *v) v->u.road.crashed_ctr++; v->vehstatus |= VS_CRASHED; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); pass = 1; if (v->cargo_type == 0) @@ -753,7 +753,7 @@ static bool RoadVehAccelerate(Vehicle *v) if (spd != v->cur_speed) { v->cur_speed = spd; if (_patches.vehicle_speed) - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } // Decrease somewhat when turning @@ -1339,7 +1339,7 @@ again: InvalidateWindow(WC_ROADVEH_LIST, v->owner); MarkRoadVehDirty(v); } - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); return; } @@ -1354,7 +1354,7 @@ again: *b |= 0x80; StartRoadVehSound(v); - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } r = VehicleEnterTile(v, v->tile, x, y); @@ -1455,7 +1455,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v) if (v->current_order.type == OT_GOTO_DEPOT) { v->current_order.type = OT_DUMMY; v->current_order.flags = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } return; } @@ -1469,7 +1469,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v) v->current_order.flags = OF_NON_STOP; v->current_order.station = (byte)i; v->dest_tile = (&_depots[i])->xy; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } void OnNewDay_RoadVeh(Vehicle *v) |