(svn r13317) -Codechange: make news messages use a linked list instead of a moving circular buffer. This makes it possible to store more news messages in the history. Based on a patch by Cirdan.

-Codechange: the number of news messages is reduced by removing every news message that is a configurable amount older than when it would not be shown in the newspaper popup/ticker, which is e.g. a month for industry production changes and half a year for subsidy offers. As a result the more important messages will stay longer in the message history (if longer than 30 messages).
This commit is contained in:
rubidium
2008-05-28 21:36:16 +00:00
parent b4e431bf7c
commit 7f8f5fa52c
4 changed files with 171 additions and 227 deletions

View File

@@ -101,6 +101,8 @@ struct NewsTypeData {
};
struct NewsItem {
NewsItem *prev; ///< Previous news item
NewsItem *next; ///< Next news item
StringID string_id; ///< Message text
uint16 duration; ///< Remaining time for showing this news message
Date date; ///< Date of the news