station_cmd.c
changeset 500 ef288590e096
parent 497 2d6d31173813
child 507 8aa8100b0b22
equal deleted inserted replaced
499:509765981930 500:ef288590e096
  2117 	} else {
  2117 	} else {
  2118 		ShowStationViewWindow(_map2[tile]);
  2118 		ShowStationViewWindow(_map2[tile]);
  2119 	}
  2119 	}
  2120 }
  2120 }
  2121 
  2121 
  2122 static INLINE bool IsTrainStationTile(uint tile) {
  2122 static inline bool IsTrainStationTile(uint tile) {
  2123 	return IS_TILETYPE(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8);
  2123 	return IS_TILETYPE(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8);
  2124 }
  2124 }
  2125 
  2125 
  2126 static const byte _enter_station_speedtable[12] = {
  2126 static const byte _enter_station_speedtable[12] = {
  2127 	215, 195, 175, 155, 135, 115, 95, 75, 55, 35, 15, 0
  2127 	215, 195, 175, 155, 135, 115, 95, 75, 55, 35, 15, 0
  2231 		if (++st->delete_ctr >= 8)
  2231 		if (++st->delete_ctr >= 8)
  2232 			DeleteStation(st);
  2232 			DeleteStation(st);
  2233 	}
  2233 	}
  2234 }
  2234 }
  2235 
  2235 
  2236 static INLINE void byte_inc_sat(byte *p) { byte b = *p + 1; if (b != 0) *p = b; }
  2236 static inline void byte_inc_sat(byte *p) { byte b = *p + 1; if (b != 0) *p = b; }
  2237 
  2237 
  2238 static byte _rating_boost[3] = { 0, 31, 63};
  2238 static byte _rating_boost[3] = { 0, 31, 63};
  2239 
  2239 
  2240 static void UpdateStationRating(Station *st)
  2240 static void UpdateStationRating(Station *st)
  2241 {
  2241 {