vehicle_gui.h
changeset 588 03521b270f62
parent 505 1d5e770d2ce4
child 842 efc3546bc313
equal deleted inserted replaced
587:ea2a8bd38f41 588:03521b270f62
     1 #ifndef VEHICLE_GUI_H
     1 #ifndef VEHICLE_GUI_H
     2 #define VEHICLE_GUI_H
     2 #define VEHICLE_GUI_H
       
     3 
       
     4 struct vehiclelist_d;
     3 
     5 
     4 void DrawVehicleProfitButton(Vehicle *v, int x, int y);
     6 void DrawVehicleProfitButton(Vehicle *v, int x, int y);
     5 void InitializeVehiclesGuiList();
     7 void InitializeVehiclesGuiList();
     6 
     8 
     7 /* sorter stuff */
     9 /* sorter stuff */
       
    10 void RebuildVehicleLists(void);
       
    11 void ResortVehicleLists(void);
       
    12 
       
    13 void BuildVehicleList(struct vehiclelist_d *vl, int type, int owner, int station);
       
    14 void SortVehicleList(struct vehiclelist_d *vl);
       
    15 
     8 typedef struct SortStruct { // store owner through sorting process
    16 typedef struct SortStruct { // store owner through sorting process
     9 	uint32	index;
    17 	uint32	index;
    10 	byte		owner;
    18 	byte		owner;
    11 } SortStruct;
    19 } SortStruct;
    12 
    20 
    40 	VEHROAD			= 1,
    48 	VEHROAD			= 1,
    41 	VEHSHIP			= 2,
    49 	VEHSHIP			= 2,
    42 	VEHAIRCRAFT	= 3
    50 	VEHAIRCRAFT	= 3
    43 };
    51 };
    44 
    52 
    45 VARDEF bool _vehicle_sort_dirty[4];	// global sort, vehicles added/removed (4 types of vehicles)
       
    46 
       
    47 VARDEF bool _train_sort_dirty[MAX_PLAYERS];			// vehicles for a given player needs to be resorted (new criteria)
       
    48 VARDEF byte _train_sort_type[MAX_PLAYERS];			// different criteria for sorting
       
    49 VARDEF bool _train_sort_order[MAX_PLAYERS];			// sort descending/ascending
       
    50 
       
    51 VARDEF bool _aircraft_sort_dirty[MAX_PLAYERS];	// vehicles for a given player needs to be resorted (new criteria)
       
    52 VARDEF byte _aircraft_sort_type[MAX_PLAYERS];		// different criteria for sorting
       
    53 VARDEF bool _aircraft_sort_order[MAX_PLAYERS];	// sort descending/ascending
       
    54 
       
    55 VARDEF bool _ship_sort_dirty[MAX_PLAYERS];			// vehicles for a given player needs to be resorted (new criteria)
       
    56 VARDEF byte _ship_sort_type[MAX_PLAYERS];				// different criteria for sorting
       
    57 VARDEF bool _ship_sort_order[MAX_PLAYERS];			// sort descending/ascending
       
    58 
       
    59 VARDEF bool _road_sort_dirty[MAX_PLAYERS];			// vehicles for a given player needs to be resorted (new criteria)
       
    60 VARDEF byte _road_sort_type[MAX_PLAYERS];				// different criteria for sorting
       
    61 VARDEF bool _road_sort_order[MAX_PLAYERS];			// sort descending/ascending
       
    62 
       
    63 enum {
    53 enum {
    64   PLY_WND_PRC__OFFSET_TOP_WIDGET	= 26,
    54   PLY_WND_PRC__OFFSET_TOP_WIDGET	= 26,
    65 	PLY_WND_PRC__SIZE_OF_ROW_SMALL	= 26,
    55 	PLY_WND_PRC__SIZE_OF_ROW_SMALL	= 26,
    66   PLY_WND_PRC__SIZE_OF_ROW_BIG		= 36,
    56   PLY_WND_PRC__SIZE_OF_ROW_BIG		= 36,
    67 };
    57 };