(svn r4612) - NewStations: add random bits (for graphic variation) to stations
authorpeter1138
Fri, 28 Apr 2006 20:48:45 +0000
changeset 3687 109ec5cdb932
parent 3686 55efe6da4dfb
child 3688 c3bc748056d0
(svn r4612) - NewStations: add random bits (for graphic variation) to stations
station.h
station_cmd.c
--- a/station.h	Fri Apr 28 20:04:57 2006 +0000
+++ b/station.h	Fri Apr 28 20:48:45 2006 +0000
@@ -84,6 +84,9 @@
 	byte last_vehicle_type;
 	GoodsEntry goods[NUM_CARGO];
 
+	uint16 random_bits;
+	byte waiting_triggers;
+
 	/* Stuff that is no longer used, but needed for conversion */
 	TileIndex bus_tile_obsolete;
 	TileIndex lorry_tile_obsolete;
--- a/station_cmd.c	Fri Apr 28 20:04:57 2006 +0000
+++ b/station_cmd.c	Fri Apr 28 20:48:45 2006 +0000
@@ -490,6 +490,9 @@
 		ge->feeder_profit = 0;
 	}
 
+	st->random_bits = Random();
+	st->waiting_triggers = 0;
+
 	_global_station_sort_dirty = true; // build a new station
 }
 
@@ -2851,6 +2854,10 @@
 	SLE_CONDREF(Station,bus_stops,         REF_ROADSTOPS, 6, SL_MAX_VERSION),
 	SLE_CONDREF(Station,truck_stops,       REF_ROADSTOPS, 6, SL_MAX_VERSION),
 
+	/* Used by newstations for graphic variations */
+	SLE_CONDVAR(Station,random_bits,       SLE_UINT16, 27, SL_MAX_VERSION),
+	SLE_CONDVAR(Station,waiting_triggers,  SLE_UINT8,  27, SL_MAX_VERSION),
+
 	// reserve extra space in savegame here. (currently 32 bytes)
 	SLE_CONDNULL(32, 2, SL_MAX_VERSION),