Changeset - r13211:4ba95564ba64
[Not reviewed]
master
0 9 0
frosch - 15 years ago 2009-10-06 19:52:38
frosch@openttd.org
(svn r17728) -Cleanup: Remove some more unneeded/unused parameters.
9 files changed with 48 insertions and 47 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_engine.cpp
Show inline comments
 
@@ -72,13 +72,13 @@
 
	if (!IsValidEngine(engine_id)) return -1;
 

	
 
	const Engine *e = ::Engine::Get(engine_id);
 
	switch (e->type) {
 
		case VEH_ROAD:
 
		case VEH_TRAIN: {
 
			CargoArray capacities = GetCapacityOfArticulatedParts(engine_id, e->type);
 
			CargoArray capacities = GetCapacityOfArticulatedParts(engine_id);
 
			for (CargoID c = 0; c < NUM_CARGO; c++) {
 
				if (capacities[c] == 0) continue;
 
				return capacities[c];
 
			}
 
			return -1;
 
		} break;
src/ai/api/ai_event_types.cpp
Show inline comments
 
@@ -38,13 +38,13 @@ CargoID AIEventEnginePreview::GetCargoTy
 
int32 AIEventEnginePreview::GetCapacity()
 
{
 
	const Engine *e = ::Engine::Get(this->engine);
 
	switch (e->type) {
 
		case VEH_ROAD:
 
		case VEH_TRAIN: {
 
			CargoArray capacities = GetCapacityOfArticulatedParts(this->engine, e->type);
 
			CargoArray capacities = GetCapacityOfArticulatedParts(this->engine);
 
			for (CargoID c = 0; c < NUM_CARGO; c++) {
 
				if (capacities[c] == 0) continue;
 
				return capacities[c];
 
			}
 
			return -1;
 
		} break;
src/articulated_vehicles.cpp
Show inline comments
 
@@ -78,29 +78,30 @@ static inline uint32 GetAvailableVehicle
 
		if (include_initial_cargo_type && initial_cargo_type < NUM_CARGO) SetBit(cargos, initial_cargo_type);
 
	}
 

	
 
	return cargos;
 
}
 

	
 
CargoArray GetCapacityOfArticulatedParts(EngineID engine, VehicleType type)
 
CargoArray GetCapacityOfArticulatedParts(EngineID engine)
 
{
 
	CargoArray capacity;
 
	const Engine *e = Engine::Get(engine);
 

	
 
	CargoID cargo_type;
 
	uint16 cargo_capacity = GetVehicleDefaultCapacity(engine, &cargo_type);
 
	if (cargo_type < NUM_CARGO) capacity[cargo_type] = cargo_capacity;
 

	
 
	if (type != VEH_TRAIN && type != VEH_ROAD) return capacity;
 
	if (e->type != VEH_TRAIN && e->type != VEH_ROAD) return capacity;
 

	
 
	if (!HasBit(EngInfo(engine)->callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return capacity;
 
	if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return capacity;
 

	
 
	for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
 
		uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine, NULL);
 
		if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) break;
 

	
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), type, GB(callback, 0, 7));
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), e->type, GB(callback, 0, 7));
 

	
 
		cargo_capacity = GetVehicleDefaultCapacity(artic_engine, &cargo_type);
 
		if (cargo_type < NUM_CARGO) capacity[cargo_type] += cargo_capacity;
 
	}
 

	
 
	return capacity;
 
@@ -131,58 +132,58 @@ bool IsArticulatedVehicleRefittable(Engi
 
	return false;
 
}
 

	
 
/**
 
 * Ors the refit_masks of all articulated parts.
 
 * @param engine the first part
 
 * @param type the vehicle type
 
 * @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask
 
 * @return bit mask of CargoIDs which are a refit option for at least one articulated part
 
 */
 
uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, VehicleType type, bool include_initial_cargo_type)
 
uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type)
 
{
 
	const Engine *e = Engine::Get(engine);
 
	uint32 cargos = GetAvailableVehicleCargoTypes(engine, include_initial_cargo_type);
 

	
 
	if (type != VEH_TRAIN && type != VEH_ROAD) return cargos;
 
	if (e->type != VEH_TRAIN && e->type != VEH_ROAD) return cargos;
 

	
 
	if (!HasBit(EngInfo(engine)->callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return cargos;
 
	if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return cargos;
 

	
 
	for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
 
		uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine, NULL);
 
		if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) break;
 

	
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), type, GB(callback, 0, 7));
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), e->type, GB(callback, 0, 7));
 
		cargos |= GetAvailableVehicleCargoTypes(artic_engine, include_initial_cargo_type);
 
	}
 

	
 
	return cargos;
 
}
 

	
 
/**
 
 * Ands the refit_masks of all articulated parts.
 
 * @param engine the first part
 
 * @param type the vehicle type
 
 * @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask
 
 * @return bit mask of CargoIDs which are a refit option for every articulated part (with default capacity > 0)
 
 */
 
uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, VehicleType type, bool include_initial_cargo_type)
 
uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type)
 
{
 
	const Engine *e = Engine::Get(engine);
 
	uint32 cargos = UINT32_MAX;
 

	
 
	uint32 veh_cargos = GetAvailableVehicleCargoTypes(engine, include_initial_cargo_type);
 
	if (veh_cargos != 0) cargos &= veh_cargos;
 

	
 
	if (type != VEH_TRAIN && type != VEH_ROAD) return cargos;
 
	if (e->type != VEH_TRAIN && e->type != VEH_ROAD) return cargos;
 

	
 
	if (!HasBit(EngInfo(engine)->callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return cargos;
 
	if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return cargos;
 

	
 
	for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
 
		uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine, NULL);
 
		if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) break;
 

	
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), type, GB(callback, 0, 7));
 
		EngineID artic_engine = GetNewEngineID(GetEngineGRF(engine), e->type, GB(callback, 0, 7));
 
		veh_cargos = GetAvailableVehicleCargoTypes(artic_engine, include_initial_cargo_type);
 
		if (veh_cargos != 0) cargos &= veh_cargos;
 
	}
 

	
 
	return cargos;
 
}
 
@@ -236,15 +237,15 @@ bool IsArticulatedVehicleCarryingDiffere
 
 *    - intersection and union of refit masks.
 
 */
 
void CheckConsistencyOfArticulatedVehicle(const Vehicle *v)
 
{
 
	const Engine *engine = Engine::Get(v->engine_type);
 

	
 
	uint32 purchase_refit_union = GetUnionOfArticulatedRefitMasks(v->engine_type, v->type, true);
 
	uint32 purchase_refit_intersection = GetIntersectionOfArticulatedRefitMasks(v->engine_type, v->type, true);
 
	CargoArray purchase_default_capacity = GetCapacityOfArticulatedParts(v->engine_type, v->type);
 
	uint32 purchase_refit_union = GetUnionOfArticulatedRefitMasks(v->engine_type, true);
 
	uint32 purchase_refit_intersection = GetIntersectionOfArticulatedRefitMasks(v->engine_type, true);
 
	CargoArray purchase_default_capacity = GetCapacityOfArticulatedParts(v->engine_type);
 

	
 
	uint32 real_refit_union = 0;
 
	uint32 real_refit_intersection = UINT_MAX;
 
	CargoArray real_default_capacity;
 

	
 
	do {
src/articulated_vehicles.h
Show inline comments
 
@@ -13,16 +13,16 @@
 
#define ARTICULATED_VEHICLES_H
 

	
 
#include "vehicle_type.h"
 
#include "engine_type.h"
 

	
 
uint CountArticulatedParts(EngineID engine_type, bool purchase_window);
 
CargoArray GetCapacityOfArticulatedParts(EngineID engine, VehicleType type);
 
CargoArray GetCapacityOfArticulatedParts(EngineID engine);
 
void AddArticulatedParts(Vehicle *first);
 
uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, VehicleType type, bool include_initial_cargo_type);
 
uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, VehicleType type, bool include_initial_cargo_type);
 
uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
 
uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
 
bool IsArticulatedVehicleCarryingDifferentCargos(const Vehicle *v, CargoID *cargo_type);
 
bool IsArticulatedVehicleRefittable(EngineID engine);
 
void CheckConsistencyOfArticulatedVehicle(const Vehicle *v);
 

	
 

	
 
#endif /* ARTICULATED_VEHICLES_H */
src/autoreplace_cmd.cpp
Show inline comments
 
@@ -30,16 +30,16 @@ extern void ChangeVehicleViewWindow(Vehi
 
/** Figure out if two engines got at least one type of cargo in common (refitting if needed)
 
 * @param engine_a one of the EngineIDs
 
 * @param engine_b the other EngineID
 
 * @param type the type of the engines
 
 * @return true if they can both carry the same type of cargo (or at least one of them got no capacity at all)
 
 */
 
static bool EnginesGotCargoInCommon(EngineID engine_a, EngineID engine_b, VehicleType type)
 
static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b)
 
{
 
	uint32 available_cargos_a = GetUnionOfArticulatedRefitMasks(engine_a, type, true);
 
	uint32 available_cargos_b = GetUnionOfArticulatedRefitMasks(engine_b, type, true);
 
	uint32 available_cargos_a = GetUnionOfArticulatedRefitMasks(engine_a, true);
 
	uint32 available_cargos_b = GetUnionOfArticulatedRefitMasks(engine_b, true);
 
	return (available_cargos_a == 0 || available_cargos_b == 0 || (available_cargos_a & available_cargos_b) != 0);
 
}
 

	
 
/**
 
 * Checks some basic properties whether autoreplace is allowed
 
 * @param from Origin engine
 
@@ -84,13 +84,13 @@ bool CheckAutoreplaceValidity(EngineID f
 
			break;
 

	
 
		default: break;
 
	}
 

	
 
	/* the engines needs to be able to carry the same cargo */
 
	return EnginesGotCargoInCommon(from, to, type);
 
	return EnginesHaveCargoInCommon(from, to);
 
}
 

	
 
/** Transfer cargo from a single (articulated )old vehicle to the new vehicle chain
 
 * @param old_veh Old vehicle that will be sold
 
 * @param new_head Head of the completely constructed new vehicle chain
 
 * @param part_of_chain The vehicle is part of a train
 
@@ -135,14 +135,14 @@ static void TransferCargo(Vehicle *old_v
 
 */
 
static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, EngineID engine_type)
 
{
 
	const Order *o;
 
	const Vehicle *u;
 

	
 
	uint32 union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, v->type, false);
 
	uint32 union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, v->type, false);
 
	uint32 union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false);
 
	uint32 union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false);
 

	
 
	if (v->type == VEH_TRAIN) {
 
		u = v->First();
 
	} else {
 
		u = v;
 
	}
 
@@ -168,17 +168,17 @@ static bool VerifyAutoreplaceRefitForOrd
 
 *    CT_INVALID is returned when both old and new vehicle got cargo capacity and refitting the new one to the old one's cargo type isn't possible
 
 */
 
static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool part_of_chain)
 
{
 
	CargoID cargo_type;
 

	
 
	if (GetUnionOfArticulatedRefitMasks(engine_type, v->type, true) == 0) return CT_NO_REFIT; // Don't try to refit an engine with no cargo capacity
 
	if (GetUnionOfArticulatedRefitMasks(engine_type, true) == 0) return CT_NO_REFIT; // Don't try to refit an engine with no cargo capacity
 

	
 
	if (IsArticulatedVehicleCarryingDifferentCargos(v, &cargo_type)) return CT_INVALID; // We cannot refit to mixed cargos in an automated way
 

	
 
	uint32 available_cargo_types = GetIntersectionOfArticulatedRefitMasks(engine_type, v->type, true);
 
	uint32 available_cargo_types = GetIntersectionOfArticulatedRefitMasks(engine_type, true);
 

	
 
	if (cargo_type == CT_INVALID) {
 
		if (v->type != VEH_TRAIN) return CT_NO_REFIT; // If the vehicle does not carry anything at all, every replacement is fine.
 

	
 
		if (!part_of_chain) return CT_NO_REFIT;
 

	
 
@@ -187,13 +187,13 @@ static CargoID GetNewCargoTypeForReplace
 

	
 
		for (v = v->First(); v != NULL; v = v->Next()) {
 
			if (v->cargo_cap == 0) continue;
 
			/* Now we found a cargo type being carried on the train and we will see if it is possible to carry to this one */
 
			if (HasBit(available_cargo_types, v->cargo_type)) {
 
				/* Do we have to refit the vehicle, or is it already carrying the right cargo? */
 
				CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type);
 
				CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type);
 
				for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
 
					if (cid != v->cargo_type && default_capacity[cid] > 0) return v->cargo_type;
 
				}
 

	
 
				return CT_NO_REFIT;
 
			}
 
@@ -203,13 +203,13 @@ static CargoID GetNewCargoTypeForReplace
 
	} else {
 
		if (!HasBit(available_cargo_types, cargo_type)) return CT_INVALID; // We can't refit the vehicle to carry the cargo we want
 

	
 
		if (part_of_chain && !VerifyAutoreplaceRefitForOrders(v, engine_type)) return CT_INVALID; // Some refit orders lose their effect
 

	
 
		/* Do we have to refit the vehicle, or is it already carrying the right cargo? */
 
		CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type);
 
		CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type);
 
		for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
 
			if (cid != cargo_type && default_capacity[cid] > 0) return cargo_type;
 
		}
 

	
 
		return CT_NO_REFIT;
 
	}
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -236,14 +236,14 @@ static int CDECL TrainEnginePowerVsRunni
 

	
 
static int CDECL TrainEngineCapacitySorter(const EngineID *a, const EngineID *b)
 
{
 
	const RailVehicleInfo *rvi_a = RailVehInfo(*a);
 
	const RailVehicleInfo *rvi_b = RailVehInfo(*b);
 

	
 
	int va = GetTotalCapacityOfArticulatedParts(*a, VEH_TRAIN) * (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
 
	int vb = GetTotalCapacityOfArticulatedParts(*b, VEH_TRAIN) * (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
 
	int va = GetTotalCapacityOfArticulatedParts(*a) * (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
 
	int vb = GetTotalCapacityOfArticulatedParts(*b) * (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
 
	int r = va - vb;
 

	
 
	/* Use EngineID to sort instead since we want consistent sorting */
 
	if (r == 0) return EngineNumberSorter(a, b);
 
	return _internal_sort_order ? -r : r;
 
}
 
@@ -259,14 +259,14 @@ static int CDECL TrainEnginesThenWagonsS
 
	return _internal_sort_order ? -r : r;
 
}
 

	
 
/* Road vehicle sorting functions */
 
static int CDECL RoadVehEngineCapacitySorter(const EngineID *a, const EngineID *b)
 
{
 
	int va = GetTotalCapacityOfArticulatedParts(*a, VEH_ROAD);
 
	int vb = GetTotalCapacityOfArticulatedParts(*b, VEH_ROAD);
 
	int va = GetTotalCapacityOfArticulatedParts(*a);
 
	int vb = GetTotalCapacityOfArticulatedParts(*b);
 
	int r = va - vb;
 

	
 
	/* Use EngineID to sort instead since we want consistent sorting */
 
	if (r == 0) return EngineNumberSorter(a, b);
 
	return _internal_sort_order ? -r : r;
 
}
 
@@ -403,23 +403,23 @@ static const StringID _sort_listing[][11
 
}};
 

	
 
/** Cargo filter functions */
 
static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid)
 
{
 
	if (cid == CF_ANY) return true;
 
	uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, Engine::Get(*eid)->type, true);
 
	uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true);
 
	return (cid == CF_NONE ? refit_mask == 0 : HasBit(refit_mask, cid));
 
}
 

	
 
static GUIEngineList::FilterFunction * const _filter_funcs[] = {
 
	&CargoFilter,
 
};
 

	
 
static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine, VehicleType type, bool refittable)
 
static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine, bool refittable)
 
{
 
	CargoArray cap = GetCapacityOfArticulatedParts(engine, type);
 
	CargoArray cap = GetCapacityOfArticulatedParts(engine);
 

	
 
	for (CargoID c = 0; c < NUM_CARGO; c++) {
 
		if (cap[c] == 0) continue;
 

	
 
		SetDParam(0, c);
 
		SetDParam(1, cap[c]);
 
@@ -637,13 +637,13 @@ int DrawVehiclePurchaseInfo(int left, in
 
				y = DrawRailWagonPurchaseInfo(left, right, y, engine_number, &e->u.rail);
 
			} else {
 
				y = DrawRailEnginePurchaseInfo(left, right, y, engine_number, &e->u.rail);
 
			}
 

	
 
			/* Cargo type + capacity, or N/A */
 
			int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, VEH_TRAIN, refittable);
 
			int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, refittable);
 

	
 
			if (new_y == y) {
 
				SetDParam(0, CT_INVALID);
 
				SetDParam(2, STR_EMPTY);
 
				DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
 
				y += FONT_HEIGHT_NORMAL;
 
@@ -653,13 +653,13 @@ int DrawVehiclePurchaseInfo(int left, in
 
			break;
 
		}
 
		case VEH_ROAD: {
 
			y = DrawRoadVehPurchaseInfo(left, right, y, engine_number);
 

	
 
			/* Cargo type + capacity, or N/A */
 
			int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, VEH_ROAD, refittable);
 
			int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, refittable);
 

	
 
			if (new_y == y) {
 
				SetDParam(0, CT_INVALID);
 
				SetDParam(2, STR_EMPTY);
 
				DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
 
				y += FONT_HEIGHT_NORMAL;
src/engine_func.h
Show inline comments
 
@@ -29,9 +29,9 @@ void DrawAircraftEngine(int x, int y, En
 
bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
 
bool IsEngineRefittable(EngineID engine);
 
void SetCachedEngineCounts();
 
void SetYearEngineAgingStops();
 
void StartupOneEngine(Engine *e, Date aging_date);
 

	
 
uint GetTotalCapacityOfArticulatedParts(EngineID engine, VehicleType type);
 
uint GetTotalCapacityOfArticulatedParts(EngineID engine);
 

	
 
#endif /* ENGINE_H */
src/engine_gui.cpp
Show inline comments
 
@@ -119,17 +119,17 @@ static const WindowDesc _engine_preview_
 

	
 
void ShowEnginePreviewWindow(EngineID engine)
 
{
 
	AllocateWindowDescFront<EnginePreviewWindow>(&_engine_preview_desc, engine);
 
}
 

	
 
uint GetTotalCapacityOfArticulatedParts(EngineID engine, VehicleType type)
 
uint GetTotalCapacityOfArticulatedParts(EngineID engine)
 
{
 
	uint total = 0;
 

	
 
	CargoArray cap = GetCapacityOfArticulatedParts(engine, type);
 
	CargoArray cap = GetCapacityOfArticulatedParts(engine);
 
	for (CargoID c = 0; c < NUM_CARGO; c++) {
 
		total += cap[c];
 
	}
 

	
 
	return total;
 
}
 
@@ -140,13 +140,13 @@ static StringID GetTrainEngineInfoString
 
	SetDParam(2, e->GetDisplayMaxSpeed());
 
	SetDParam(3, e->GetPower());
 
	SetDParam(1, e->GetDisplayWeight());
 

	
 
	SetDParam(4, e->GetRunningCost());
 

	
 
	uint capacity = GetTotalCapacityOfArticulatedParts(e->index, VEH_TRAIN);
 
	uint capacity = GetTotalCapacityOfArticulatedParts(e->index);
 
	if (capacity != 0) {
 
		SetDParam(5, e->GetDefaultCargoType());
 
		SetDParam(6, capacity);
 
	} else {
 
		SetDParam(5, CT_INVALID);
 
	}
 
@@ -177,13 +177,13 @@ static StringID GetAircraftEngineInfoStr
 
}
 

	
 
static StringID GetRoadVehEngineInfoString(const Engine *e)
 
{
 
	SetDParam(0, e->GetCost());
 
	SetDParam(1, e->GetDisplayMaxSpeed());
 
	uint capacity = GetTotalCapacityOfArticulatedParts(e->index, VEH_ROAD);
 
	uint capacity = GetTotalCapacityOfArticulatedParts(e->index);
 
	if (capacity != 0) {
 
		SetDParam(2, e->GetDefaultCargoType());
 
		SetDParam(3, capacity);
 
	} else {
 
		SetDParam(2, CT_INVALID);
 
	}
src/vehicle_gui.cpp
Show inline comments
 
@@ -444,13 +444,13 @@ void ShowVehicleRefitWindow(const Vehicl
 
}
 

	
 
/** Display list of cargo types of the engine, for the purchase information window */
 
uint ShowRefitOptionsList(int left, int right, int y, EngineID engine)
 
{
 
	/* List of cargo types of this engine */
 
	uint32 cmask = GetUnionOfArticulatedRefitMasks(engine, Engine::Get(engine)->type, false);
 
	uint32 cmask = GetUnionOfArticulatedRefitMasks(engine, false);
 
	/* List of cargo types available in this climate */
 
	uint32 lmask = _cargo_mask;
 
	char string[512];
 
	char *b = string;
 

	
 
	/* Draw nothing if the engine is not refittable */
0 comments (0 inline, 0 general)