summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-05 20:22:06 +0000
committertron <tron@openttd.org>2005-08-05 20:22:06 +0000
commit747a0f6a55cfb40cdf6e66ca8ae29bc0d4517274 (patch)
treec5f649a6512bc30ababdfe82ad3934f7684636ed
parenta8e53be6b9a063cbce7525001f134277da7cffb6 (diff)
downloadopenttd-747a0f6a55cfb40cdf6e66ca8ae29bc0d4517274.tar.xz
(svn r2812) Move variables, which only vehicle_gui.c needs to know about, there
-rw-r--r--misc.c2
-rw-r--r--variables.h2
-rw-r--r--vehicle_gui.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/misc.c b/misc.c
index 6e275f451..5e4b7ff46 100644
--- a/misc.c
+++ b/misc.c
@@ -130,8 +130,6 @@ void InitializeGame(uint size_x, uint size_y)
for (i = 0; i < lengthof(_autoreplace_array); i++)
_autoreplace_array[i] = i;
- _railtype_selected_in_replace_gui = 0;
-
AddTypeToEngines(); // make sure all engines have a type
SetObjectToPlace(SPR_CURSOR_ZZZ, 0, 0, 0);
diff --git a/variables.h b/variables.h
index e2c06af39..492d55457 100644
--- a/variables.h
+++ b/variables.h
@@ -451,8 +451,6 @@ VARDEF byte _vehicle_design_names;
/* Autoreplace vehicle stuff*/
VARDEF byte _autoreplace_array[256];
-VARDEF uint16 _player_num_engines[256];
-VARDEF byte _railtype_selected_in_replace_gui;
/* Forking stuff */
VARDEF bool _dedicated_forks;
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 2ca8b54ed..375c32db5 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -23,6 +23,9 @@ static uint32 _internal_name_sorter_id; // internal StringID for default vehicle
static uint32 _last_vehicle_idx; // cached index to hopefully speed up name-sorting
static bool _internal_sort_order; // descending/ascending
+static uint16 _player_num_engines[256];
+static byte _railtype_selected_in_replace_gui;
+
VehicleSortListingTypeFunctions * const _vehicle_sorter[] = {
&VehicleUnsortedSorter,
&VehicleNumberSorter,
@@ -158,6 +161,7 @@ void SortVehicleList(vehiclelist_d *vl)
/* General Vehicle GUI based procedures that are independent of vehicle types */
void InitializeVehiclesGuiList(void)
{
+ _railtype_selected_in_replace_gui = 0;
}
// draw the vehicle profit button in the vehicle list window.