mirror of https://github.com/OpenTTD/OpenTTD
(svn r6804) -Codechange: Remove the unused NF_NOEXPIRE flag.
parent
fba7d2f7f3
commit
5ecd5eb4f4
3
news.h
3
news.h
|
@ -55,8 +55,7 @@ enum NewsFlags {
|
||||||
NF_TILE = (1 << 2), ///< When clicked on the news message scroll to a given tile? Tile is in data_a/data_b
|
NF_TILE = (1 << 2), ///< When clicked on the news message scroll to a given tile? Tile is in data_a/data_b
|
||||||
NF_VEHICLE = (1 << 3), ///< When clicked on the message scroll to the vehicle? VehicleID is in data_a
|
NF_VEHICLE = (1 << 3), ///< When clicked on the message scroll to the vehicle? VehicleID is in data_a
|
||||||
NF_FORCE_BIG = (1 << 4), ///< Force the appearance of a news message if it has already been shown (internal)
|
NF_FORCE_BIG = (1 << 4), ///< Force the appearance of a news message if it has already been shown (internal)
|
||||||
NF_NOEXPIRE = (1 << 5), ///< Some flag that I think is already deprecated
|
NF_INCOLOR = (1 << 5), ///< Show the newsmessage in colour, otherwise it defaults to black & white
|
||||||
NF_INCOLOR = (1 << 6), ///< Show the newsmessage in colour, otherwise it defaults to black & white
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NewsCallback {
|
enum NewsCallback {
|
||||||
|
|
|
@ -235,8 +235,7 @@ static byte increaseIndex(byte i)
|
||||||
* @param data_b news-specific value based on news type
|
* @param data_b news-specific value based on news type
|
||||||
* @note flags exists of 4 byte-sized extra parameters.<br/>
|
* @note flags exists of 4 byte-sized extra parameters.<br/>
|
||||||
* 1. 0 - 7 display_mode, any of the NewsMode enums (NM_)<br/>
|
* 1. 0 - 7 display_mode, any of the NewsMode enums (NM_)<br/>
|
||||||
* 2. 8 - 15 news flags, any of the NewsFlags enums (NF_) NF_NOEXPIRE and
|
* 2. 8 - 15 news flags, any of the NewsFlags enums (NF_) NF_INCOLOR are set automatically if needed<br/>
|
||||||
* NF_INCOLOR are set automatically if needed<br/>
|
|
||||||
* 3. 16 - 23 news category, any of the NewsType enums (NT_)<br/>
|
* 3. 16 - 23 news category, any of the NewsType enums (NT_)<br/>
|
||||||
* 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_)<br/>
|
* 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_)<br/>
|
||||||
* If the display mode is NM_CALLBACK special news is shown and parameter
|
* If the display mode is NM_CALLBACK special news is shown and parameter
|
||||||
|
@ -276,7 +275,7 @@ void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b)
|
||||||
|
|
||||||
ni->string_id = string;
|
ni->string_id = string;
|
||||||
ni->display_mode = (byte)flags;
|
ni->display_mode = (byte)flags;
|
||||||
ni->flags = (byte)(flags >> 8) | NF_NOEXPIRE;
|
ni->flags = (byte)(flags >> 8);
|
||||||
|
|
||||||
// show this news message in color?
|
// show this news message in color?
|
||||||
if (_cur_year >= _patches.colored_news_year)
|
if (_cur_year >= _patches.colored_news_year)
|
||||||
|
@ -384,7 +383,7 @@ static void ShowNewspaper(NewsItem *ni)
|
||||||
Window *w;
|
Window *w;
|
||||||
SoundFx sound;
|
SoundFx sound;
|
||||||
int top;
|
int top;
|
||||||
ni->flags &= ~(NF_NOEXPIRE | NF_FORCE_BIG);
|
ni->flags &= ~NF_FORCE_BIG;
|
||||||
ni->duration = 555;
|
ni->duration = 555;
|
||||||
|
|
||||||
sound = _news_sounds[ni->type];
|
sound = _news_sounds[ni->type];
|
||||||
|
@ -526,7 +525,7 @@ static void ShowNewsMessage(byte i)
|
||||||
if (_forced_news != INVALID_NEWS) {
|
if (_forced_news != INVALID_NEWS) {
|
||||||
NewsItem *ni = &_news_items[_forced_news];
|
NewsItem *ni = &_news_items[_forced_news];
|
||||||
ni->duration = 555;
|
ni->duration = 555;
|
||||||
ni->flags |= NF_NOEXPIRE | NF_FORCE_BIG;
|
ni->flags |= NF_FORCE_BIG;
|
||||||
DeleteWindowById(WC_NEWS_WINDOW, 0);
|
DeleteWindowById(WC_NEWS_WINDOW, 0);
|
||||||
ShowNewspaper(ni);
|
ShowNewspaper(ni);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue