mirror of https://github.com/OpenTTD/OpenTTD
(svn r813) Push two tables from vehicle_gui.h into vehicle_gui.c - they were in the binary 48 (!) times.
While here change the type for one table from uint16 to StringID.release/0.4.5
parent
e35a0b1c44
commit
b07357373f
|
@ -3,6 +3,31 @@
|
||||||
|
|
||||||
#include "vehicle.h"
|
#include "vehicle.h"
|
||||||
|
|
||||||
|
VehicleSortListingTypeFunctions * const _vehicle_sorter[] = {
|
||||||
|
&VehicleUnsortedSorter,
|
||||||
|
&VehicleNumberSorter,
|
||||||
|
&VehicleNameSorter,
|
||||||
|
&VehicleAgeSorter,
|
||||||
|
&VehicleProfitThisYearSorter,
|
||||||
|
&VehicleProfitLastYearSorter,
|
||||||
|
&VehicleCargoSorter,
|
||||||
|
&VehicleReliabilitySorter,
|
||||||
|
&VehicleMaxSpeedSorter
|
||||||
|
};
|
||||||
|
|
||||||
|
const StringID _vehicle_sort_listing[] = {
|
||||||
|
STR_SORT_BY_UNSORTED,
|
||||||
|
STR_SORT_BY_NUMBER,
|
||||||
|
STR_SORT_BY_DROPDOWN_NAME,
|
||||||
|
STR_SORT_BY_AGE,
|
||||||
|
STR_SORT_BY_PROFIT_THIS_YEAR,
|
||||||
|
STR_SORT_BY_PROFIT_LAST_YEAR,
|
||||||
|
STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE,
|
||||||
|
STR_SORT_BY_RELIABILITY,
|
||||||
|
STR_SORT_BY_MAX_SPEED,
|
||||||
|
INVALID_STRING_ID
|
||||||
|
};
|
||||||
|
|
||||||
/* General Vehicle GUI based procedures that are independent of vehicle types */
|
/* General Vehicle GUI based procedures that are independent of vehicle types */
|
||||||
void InitializeVehiclesGuiList()
|
void InitializeVehiclesGuiList()
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,32 +31,9 @@ DEF_SORTER(VehicleMaxSpeedSorter);
|
||||||
|
|
||||||
typedef DEF_SORTER(VehicleSortListingTypeFunctions);
|
typedef DEF_SORTER(VehicleSortListingTypeFunctions);
|
||||||
|
|
||||||
static VehicleSortListingTypeFunctions * const _vehicle_sorter[] = {
|
|
||||||
&VehicleUnsortedSorter,
|
|
||||||
&VehicleNumberSorter,
|
|
||||||
&VehicleNameSorter,
|
|
||||||
&VehicleAgeSorter,
|
|
||||||
&VehicleProfitThisYearSorter,
|
|
||||||
&VehicleProfitLastYearSorter,
|
|
||||||
&VehicleCargoSorter,
|
|
||||||
&VehicleReliabilitySorter,
|
|
||||||
&VehicleMaxSpeedSorter
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SORT_BY_UNSORTED 0
|
#define SORT_BY_UNSORTED 0
|
||||||
|
extern VehicleSortListingTypeFunctions * const _vehicle_sorter[];
|
||||||
static const uint16 _vehicle_sort_listing[] = {
|
extern const StringID _vehicle_sort_listing[];
|
||||||
STR_SORT_BY_UNSORTED,
|
|
||||||
STR_SORT_BY_NUMBER,
|
|
||||||
STR_SORT_BY_DROPDOWN_NAME,
|
|
||||||
STR_SORT_BY_AGE,
|
|
||||||
STR_SORT_BY_PROFIT_THIS_YEAR,
|
|
||||||
STR_SORT_BY_PROFIT_LAST_YEAR,
|
|
||||||
STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE,
|
|
||||||
STR_SORT_BY_RELIABILITY,
|
|
||||||
STR_SORT_BY_MAX_SPEED,
|
|
||||||
INVALID_STRING_ID
|
|
||||||
};
|
|
||||||
|
|
||||||
enum VehicleSortTypes {
|
enum VehicleSortTypes {
|
||||||
VEHTRAIN = 0,
|
VEHTRAIN = 0,
|
||||||
|
|
Loading…
Reference in New Issue