41 SetDParam(1, rvi->weight << multihead); |
41 SetDParam(1, rvi->weight << multihead); |
42 DrawString(x,y, STR_PURCHASE_INFO_COST_WEIGHT, 0); |
42 DrawString(x,y, STR_PURCHASE_INFO_COST_WEIGHT, 0); |
43 y += 10; |
43 y += 10; |
44 |
44 |
45 /* Max speed - Engine power */ |
45 /* Max speed - Engine power */ |
46 SetDParam(0, rvi->max_speed * 10 >> 4); |
46 SetDParam(0, rvi->max_speed); |
47 SetDParam(1, rvi->power << multihead); |
47 SetDParam(1, rvi->power << multihead); |
48 DrawString(x,y, STR_PURCHASE_INFO_SPEED_POWER, 0); |
48 DrawString(x,y, STR_PURCHASE_INFO_SPEED_POWER, 0); |
49 y += 10; |
49 y += 10; |
50 |
50 |
51 /* Running cost */ |
51 /* Running cost */ |
112 DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0); |
112 DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0); |
113 y += 10; |
113 y += 10; |
114 |
114 |
115 /* Wagon speed limit, displayed if above zero */ |
115 /* Wagon speed limit, displayed if above zero */ |
116 if (rvi->max_speed > 0 && _patches.wagon_speed_limits) { |
116 if (rvi->max_speed > 0 && _patches.wagon_speed_limits) { |
117 SetDParam(0, rvi->max_speed * 10 >> 4); |
117 SetDParam(0, rvi->max_speed); |
118 DrawString(x,y, STR_PURCHASE_INFO_SPEED, 0); |
118 DrawString(x,y, STR_PURCHASE_INFO_SPEED, 0); |
119 y += 10; |
119 y += 10; |
120 } |
120 } |
121 } |
121 } |
122 |
122 |
930 str = STR_885C_BROKEN_DOWN; |
930 str = STR_885C_BROKEN_DOWN; |
931 } else if (v->vehstatus & VS_STOPPED) { |
931 } else if (v->vehstatus & VS_STOPPED) { |
932 if (v->u.rail.last_speed == 0) { |
932 if (v->u.rail.last_speed == 0) { |
933 str = STR_8861_STOPPED; |
933 str = STR_8861_STOPPED; |
934 } else { |
934 } else { |
935 SetDParam(0, v->u.rail.last_speed * 10 >> 4); |
935 SetDParam(0, v->u.rail.last_speed); |
936 str = STR_TRAIN_STOPPING + _patches.vehicle_speed; |
936 str = STR_TRAIN_STOPPING + _patches.vehicle_speed; |
937 } |
937 } |
938 } else { |
938 } else { |
939 switch (v->current_order.type) { |
939 switch (v->current_order.type) { |
940 case OT_GOTO_STATION: { |
940 case OT_GOTO_STATION: { |
941 str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; |
941 str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; |
942 SetDParam(0, v->current_order.station); |
942 SetDParam(0, v->current_order.station); |
943 SetDParam(1, v->u.rail.last_speed * 10 >> 4); |
943 SetDParam(1, v->u.rail.last_speed); |
944 } break; |
944 } break; |
945 |
945 |
946 case OT_GOTO_DEPOT: { |
946 case OT_GOTO_DEPOT: { |
947 Depot *dep = GetDepot(v->current_order.station); |
947 Depot *dep = GetDepot(v->current_order.station); |
948 SetDParam(0, dep->town_index); |
948 SetDParam(0, dep->town_index); |
949 str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed; |
949 str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed; |
950 SetDParam(1, v->u.rail.last_speed * 10 >> 4); |
950 SetDParam(1, v->u.rail.last_speed); |
951 } break; |
951 } break; |
952 |
952 |
953 case OT_LOADING: |
953 case OT_LOADING: |
954 case OT_LEAVESTATION: |
954 case OT_LEAVESTATION: |
955 str = STR_882F_LOADING_UNLOADING; |
955 str = STR_882F_LOADING_UNLOADING; |
956 break; |
956 break; |
957 |
957 |
958 case OT_GOTO_WAYPOINT: { |
958 case OT_GOTO_WAYPOINT: { |
959 SetDParam(0, v->current_order.station); |
959 SetDParam(0, v->current_order.station); |
960 str = STR_HEADING_FOR_WAYPOINT + _patches.vehicle_speed; |
960 str = STR_HEADING_FOR_WAYPOINT + _patches.vehicle_speed; |
961 SetDParam(1, v->u.rail.last_speed * 10 >> 4); |
961 SetDParam(1, v->u.rail.last_speed); |
962 break; |
962 break; |
963 } |
963 } |
964 |
964 |
965 default: |
965 default: |
966 if (v->num_orders == 0) { |
966 if (v->num_orders == 0) { |
967 str = STR_NO_ORDERS + _patches.vehicle_speed; |
967 str = STR_NO_ORDERS + _patches.vehicle_speed; |
968 SetDParam(0, v->u.rail.last_speed * 10 >> 4); |
968 SetDParam(0, v->u.rail.last_speed); |
969 } else |
969 } else |
970 str = STR_EMPTY; |
970 str = STR_EMPTY; |
971 break; |
971 break; |
972 } |
972 } |
973 } |
973 } |
1169 SetDParam(0, (v->age + 365 < v->max_age) ? STR_AGE : STR_AGE_RED); |
1169 SetDParam(0, (v->age + 365 < v->max_age) ? STR_AGE : STR_AGE_RED); |
1170 SetDParam(2, v->max_age / 366); |
1170 SetDParam(2, v->max_age / 366); |
1171 SetDParam(3, GetTrainRunningCost(v) >> 8); |
1171 SetDParam(3, GetTrainRunningCost(v) >> 8); |
1172 DrawString(x, 15, STR_885D_AGE_RUNNING_COST_YR, 0); |
1172 DrawString(x, 15, STR_885D_AGE_RUNNING_COST_YR, 0); |
1173 |
1173 |
1174 SetDParam(2, v->u.rail.cached_max_speed * 10 >> 4); |
1174 SetDParam(2, v->u.rail.cached_max_speed); |
1175 SetDParam(1, v->u.rail.cached_power); |
1175 SetDParam(1, v->u.rail.cached_power); |
1176 SetDParam(0, v->u.rail.cached_weight); |
1176 SetDParam(0, v->u.rail.cached_weight); |
1177 DrawString(x, 25, STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED, 0); |
1177 DrawString(x, 25, STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED, 0); |
1178 |
1178 |
1179 SetDParam(0, v->profit_this_year); |
1179 SetDParam(0, v->profit_this_year); |