Changeset - r5253:14f4af756155
[Not reviewed]
master
0 1 0
Darkvater - 17 years ago 2006-12-05 22:31:10
darkvater@openttd.org
(svn r7383) -Codechange: fix up typo in news-gui s/MoveToNexItem/MoveToNextItem/.
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
news_gui.c
Show inline comments
 
@@ -49,13 +49,13 @@ static byte _total_news = 0; // total ne
 

	
 
void DrawNewsNewTrainAvail(Window *w);
 
void DrawNewsNewRoadVehAvail(Window *w);
 
void DrawNewsNewShipAvail(Window *w);
 
void DrawNewsNewAircraftAvail(Window *w);
 
void DrawNewsBankrupcy(Window *w);
 
static void MoveToNexItem(void);
 
static void MoveToNextItem(void);
 

	
 
StringID GetNewsStringNewTrainAvail(const NewsItem *ni);
 
StringID GetNewsStringNewRoadVehAvail(const NewsItem *ni);
 
StringID GetNewsStringNewShipAvail(const NewsItem *ni);
 
StringID GetNewsStringNewAircraftAvail(const NewsItem *ni);
 
StringID GetNewsStringBankrupcy(const NewsItem *ni);
 
@@ -261,13 +261,13 @@ void AddNewsItem(StringID string, uint32
 
	NewsID l_news;
 

	
 
	if (_game_mode == GM_MENU) return;
 

	
 
	// check the rare case that the oldest (to be overwritten) news item is open
 
	if (_total_news == MAX_NEWS && (_oldest_news == _current_news || _oldest_news == _forced_news))
 
		MoveToNexItem();
 
		MoveToNextItem();
 

	
 
	_forced_news = INVALID_NEWS;
 
	if (_total_news < MAX_NEWS) _total_news++;
 

	
 
	// make sure our pointer isn't overflowing
 
	l_news = _latest_news;
 
@@ -471,13 +471,13 @@ static bool ReadyForNextItem(void)
 
	}
 

	
 
	// neither newsticker nor newspaper are running
 
	return true;
 
}
 

	
 
static void MoveToNexItem(void)
 
static void MoveToNextItem(void)
 
{
 
	DeleteWindowById(WC_NEWS_WINDOW, 0);
 
	_forced_news = INVALID_NEWS;
 

	
 
	// if we're not at the last item, then move on
 
	if (_current_news != _latest_news) {
 
@@ -516,13 +516,13 @@ static void MoveToNexItem(void)
 

	
 
void NewsLoop(void)
 
{
 
	// no news item yet
 
	if (_total_news == 0) return;
 

	
 
	if (ReadyForNextItem()) MoveToNexItem();
 
	if (ReadyForNextItem()) MoveToNextItem();
 
}
 

	
 
/* Do a forced show of a specific message */
 
static void ShowNewsMessage(NewsID i)
 
{
 
	if (_total_news == 0) return;
 
@@ -875,13 +875,13 @@ void DeleteVehicleNews(VehicleID vid, St
 

	
 
		if (ni->flags & NF_VEHICLE &&
 
				ni->data_a == vid &&
 
				(news == INVALID_STRING_ID || ni->string_id == news)) {
 
			Window *w;
 

	
 
			if (_forced_news == n || _current_news == n) MoveToNexItem();
 
			if (_forced_news == n || _current_news == n) MoveToNextItem();
 

	
 
			// If this is the last news item, invalidate _latest_news
 
			if (_latest_news == _oldest_news) _latest_news = INVALID_NEWS;
 

	
 
			if (n != _oldest_news) {
 
				NewsID i;
0 comments (0 inline, 0 general)