roadveh_cmd.c
changeset 755 823358e83abf
parent 679 e959706a3e4d
child 812 79c99885ad00
--- a/roadveh_cmd.c	Tue Dec 21 22:53:55 2004 +0000
+++ b/roadveh_cmd.c	Tue Dec 21 23:27:58 2004 +0000
@@ -204,7 +204,7 @@
 
 	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 @@
 				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 @@
 		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 @@
 	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 @@
 	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 @@
 				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 @@
 		*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 @@
 		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 @@
 	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)