File diff r17628:416ab6bada3d → r17629:21e9dfd343cd
src/news_type.h
Show inline comments
 
@@ -116,22 +116,30 @@ struct NewsTypeData {
 
	const char * const name;    ///< Name
 
	const byte age;             ///< Maximum age of news items (in days)
 
	const SoundFx sound;        ///< Sound
 
	NewsDisplay display;        ///< Display mode (off, summary, full)
 
	const StringID description; ///< Description of the news type in news settings window
 

	
 
	/**
 
	 * Construct this entry.
 
	 * @param name The name of the type.
 
	 * @param age The maximum age for these messages.
 
	 * @param sound The sound to play.
 
	 * @param description The description for this type of messages.
 
	 */
 
	NewsTypeData(const char *name, byte age, SoundFx sound, StringID description) :
 
		name(name),
 
		age(age),
 
		sound(sound),
 
		display(ND_FULL),
 
		description(description)
 
	{
 
	}
 
};
 

	
 
/** Information about a single item of news. */
 
struct NewsItem {
 
	NewsItem *prev;              ///< Previous news item
 
	NewsItem *next;              ///< Next news item
 
	StringID string_id;          ///< Message text
 
	Date date;                   ///< Date of the news
 
	NewsSubtype subtype;         ///< News subtype @see NewsSubtype
 
@@ -146,13 +154,13 @@ struct NewsItem {
 

	
 
	~NewsItem()
 
	{
 
		free(this->free_data);
 
	}
 

	
 
	uint64 params[10];
 
	uint64 params[10]; ///< Parameters for string resolving.
 
};
 

	
 
/**
 
 * Data that needs to be stored for company news messages.
 
 * The problem with company news messages are the custom name
 
 * of the companies and the fact that the company data is reset,