(svn r24283) -Codechange: Add AddTileNewsItem function to preemptively deduplicate code.

This commit is contained in:
frosch
2012-05-26 14:15:57 +00:00
parent 00b3ff80bb
commit a0be398da9
4 changed files with 13 additions and 11 deletions

View File

@@ -44,6 +44,11 @@ static inline void AddVehicleAdviceNewsItem(StringID string, VehicleID vehicle)
AddNewsItem(string, NS_ADVICE, NR_VEHICLE, vehicle);
}
static inline void AddTileNewsItem(StringID string, NewsSubtype subtype, TileIndex tile, void *free_data = NULL)
{
AddNewsItem(string, subtype, NR_TILE, tile, NR_NONE, UINT32_MAX, free_data);
}
static inline void AddIndustryNewsItem(StringID string, NewsSubtype subtype, IndustryID industry)
{
AddNewsItem(string, subtype, NR_INDUSTRY, industry);