Changeset - r1875:9ffff2a5d1a2
[Not reviewed]
master
0 2 0
Darkvater - 19 years ago 2005-05-30 13:06:15
darkvater@openttd.org
(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen.
2 files changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
player_gui.c
Show inline comments
 
@@ -856,21 +856,21 @@ static const Widget _highscore_widgets[]
 
{      WWT_PANEL, RESIZE_NONE, 16, 0, 640, 0, 480, 0x0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _highscore_desc = {
 
	0, 0, 641, 481,
 
	WC_HIGHSCORE_ENDSCREEN,0,
 
	WC_HIGHSCORE,0,
 
	0,
 
	_highscore_widgets,
 
	HighScoreWndProc
 
};
 

	
 
static const WindowDesc _endgame_desc = {
 
	0, 0, 641, 481,
 
	WC_HIGHSCORE_ENDSCREEN,0,
 
	WC_ENDSCREEN,0,
 
	0,
 
	_highscore_widgets,
 
	EndGameWndProc
 
};
 

	
 
/* Show the highscore table for a given difficulty. When called from
 
@@ -883,13 +883,13 @@ void ShowHighscoreTable(int difficulty, 
 
	// pause game to show the chart
 
	if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
 

	
 
	/* Close all always on-top windows to get a clean screen */
 
	if (_game_mode != GM_MENU) 	HideVitalWindows();
 

	
 
	DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
 
	DeleteWindowByClass(WC_HIGHSCORE);
 
	w = AllocateWindowDesc(&_highscore_desc);
 

	
 
	if (w != NULL) {
 
		MarkWholeScreenDirty();
 
		w->window_number = difficulty; // show highscore chart for difficulty...
 
		WP(w, highscore_d).background_img = SPR_HIGHSCORE_CHART_BEGIN; // which background to show
 
@@ -906,13 +906,13 @@ void ShowEndGameChart(void)
 
	/* Dedicated server doesn't need the highscore window */
 
	if (_network_dedicated) return;
 
	/* Pause in single-player to have a look at the highscore at your own leisure */
 
	if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
 

	
 
	HideVitalWindows();
 
	DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
 
	DeleteWindowByClass(WC_ENDSCREEN);
 
	w = AllocateWindowDesc(&_endgame_desc);
 

	
 
	if (w != NULL) {
 
		MarkWholeScreenDirty();
 

	
 
		WP(w, highscore_d).background_img = SPR_TYCOON_IMG1_BEGIN;
ttd.h
Show inline comments
 
@@ -433,14 +433,15 @@ enum {
 
	WC_CONSOLE = 0x47,
 
	WC_EXTRA_VIEW_PORT = 0x48,
 
	WC_CLIENT_LIST = 0x49,
 
	WC_NETWORK_STATUS_WINDOW = 0x4A,
 
	WC_CUSTOM_CURRENCY = 0x4B,
 
	WC_REPLACE_VEHICLE = 0x4C,
 
	WC_HIGHSCORE_ENDSCREEN = 0x4D,
 
	WC_SIGN_LIST = 0x4E,
 
	WC_HIGHSCORE = 0x4D,
 
	WC_ENDSCREEN = 0x4E,
 
	WC_SIGN_LIST = 0x4F,
 
};
 

	
 

	
 
enum {
 
	EXPENSES_CONSTRUCTION = 0,
 
	EXPENSES_NEW_VEHICLES = 1,
0 comments (0 inline, 0 general)