Changeset - r9434:b67220235a78
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2008-06-01 10:11:31
rubidium@openttd.org
(svn r13349) -Codechange: remove a pointless flag; the flag is set before calling a function and is then reset in the function without ever reading it. Patch by Cirdan.
2 files changed with 3 insertions and 11 deletions:
0 comments (0 inline, 0 general)
src/news_gui.cpp
Show inline comments
 
@@ -364,8 +364,6 @@ static WindowDesc _news_type0_desc = {
 
/** Open up an own newspaper window for the news item */
 
static void ShowNewspaper(NewsItem *ni)
 
{
 
	ni->flags &= ~NF_FORCE_BIG;
 

	
 
	SoundFx sound = _news_type_data[_news_subtype_data[ni->subtype].type].sound;
 
	if (sound != 0) SndPlayFx(sound);
 

	
 
@@ -468,12 +466,9 @@ static void MoveToNextItem()
 
				InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SHOW_REMINDER);
 
				break;
 

	
 
			case ND_SUMMARY: // Summary - show ticker, but if forced big, cascade to full
 
				if (!(ni->flags & NF_FORCE_BIG)) {
 
					ShowTicker(ni);
 
					break;
 
				}
 
				/* Fallthrough */
 
			case ND_SUMMARY: // Summary - show ticker
 
				ShowTicker(ni);
 
				break;
 

	
 
			case ND_FULL: // Full - show newspaper
 
				ShowNewspaper(ni);
 
@@ -616,8 +611,6 @@ static void ShowNewsMessage(NewsItem *ni
 
	_forced_news = ni;
 

	
 
	if (_forced_news != NULL) {
 
		NewsWindow::duration = 555;
 
		ni->flags |= NF_FORCE_BIG;
 
		DeleteWindowById(WC_NEWS_WINDOW, 0);
 
		ShowNewspaper(ni);
 
	}
src/news_type.h
Show inline comments
 
@@ -74,7 +74,6 @@ enum NewsFlag {
 
	NF_VIEWPORT  = (1 << 1), ///< Does the news message have a viewport? (ingame picture of happening)
 
	NF_TILE      = (1 << 2), ///< When clicked on the news message scroll to a given tile? Tile 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_INCOLOR   = (1 << 5), ///< Show the newsmessage in colour, otherwise it defaults to black & white
 
	NF_TILE2     = (1 << 6), ///< There is a second tile to scroll to; tile is in data_b
 
};
0 comments (0 inline, 0 general)