summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-21 23:27:58 +0000
committerdarkvater <darkvater@openttd.org>2004-12-21 23:27:58 +0000
commit160a0a5ee1b539c71c35e0f4fdc84841a1d3be70 (patch)
treee7f0d0b320fd24814891039231dcd5eab36423f2 /ship_cmd.c
parent9a0c994fa89e14d2b77c83f39355b7de301fec1a (diff)
downloadopenttd-160a0a5ee1b539c71c35e0f4fdc84841a1d3be70.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 'ship_cmd.c')
-rw-r--r--ship_cmd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index 201ccadac..a75074d1a 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -109,7 +109,7 @@ static void CheckIfShipNeedsService(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;
}
@@ -118,7 +118,7 @@ static void CheckIfShipNeedsService(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_Ship(Vehicle *v)
@@ -367,7 +367,7 @@ static bool ShipAccelerate(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
@@ -692,7 +692,7 @@ static void ShipController(Vehicle *v)
InvalidateWindow(WC_SHIPS_LIST, v->owner);
MarkShipDirty(v);
}
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
} else { /* leave buoys right aways */
v->current_order.type = OT_LEAVESTATION;
v->current_order.flags = 0;
@@ -706,7 +706,7 @@ static void ShipController(Vehicle *v)
if (v->current_order.type == OT_LEAVESTATION) {
v->current_order.type = OT_NOTHING;
v->current_order.flags = 0;
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
}
} else {
@@ -915,7 +915,7 @@ int32 CmdStartStopShip(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);
}
@@ -937,7 +937,7 @@ int32 CmdSendShipToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (v->current_order.flags & OF_UNLOAD) 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);
}
} else {
depot = FindClosestShipDepot(v);
@@ -949,7 +949,7 @@ int32 CmdSendShipToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP | OF_FULL_LOAD;
v->current_order.station = depot;
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
}