(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
-Added endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while -These values are saved in hs.dat; added read/write functions for it -Added code to delete all windows to show charts. There is one issue left: somehow a news-gui pops up in front of the the chart at the end of the game.
This commit is contained in:
44
main_gui.c
44
main_gui.c
@@ -2402,24 +2402,7 @@ void SetupColorsAndInitialWindow()
|
||||
w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL);
|
||||
AssignWindowViewport(w, 0, 0, width, height, 0x8080, 0);
|
||||
|
||||
w = AllocateWindowDesc(&_toolb_normal_desc);
|
||||
w->disabled_state = 1 << 17; // disable zoon-in button (by default game is zoomed in)
|
||||
|
||||
if (_networking) { // if networking, disable fast-forward button
|
||||
w->disabled_state |= (1 << 1);
|
||||
if (!_network_server) // if not server, disable pause button
|
||||
w->disabled_state |= (1 << 0);
|
||||
}
|
||||
|
||||
w->flags4 &= ~WF_WHITE_BORDER_MASK;
|
||||
|
||||
PositionMainToolbar(w); // already WC_MAIN_TOOLBAR passed (&_toolb_normal_desc)
|
||||
|
||||
_main_status_desc.top = height - 12;
|
||||
w = AllocateWindowDesc(&_main_status_desc);
|
||||
w->flags4 &= ~WF_WHITE_BORDER_MASK;
|
||||
|
||||
WP(w,def_d).data_1 = -1280;
|
||||
ShowVitalWindows();
|
||||
|
||||
/* Bring joining GUI to front till the client is really joined */
|
||||
if (_networking && !_network_server)
|
||||
@@ -2432,7 +2415,7 @@ void SetupColorsAndInitialWindow()
|
||||
|
||||
w = AllocateWindowDesc(&_toolb_scen_desc);
|
||||
w->disabled_state = 1 << 9;
|
||||
w->flags4 &= ~WF_WHITE_BORDER_MASK;
|
||||
CLRBITS(w->flags4, WF_WHITE_BORDER_MASK);
|
||||
|
||||
PositionMainToolbar(w); // already WC_MAIN_TOOLBAR passed (&_toolb_scen_desc)
|
||||
break;
|
||||
@@ -2441,6 +2424,29 @@ void SetupColorsAndInitialWindow()
|
||||
}
|
||||
}
|
||||
|
||||
void ShowVitalWindows(void)
|
||||
{
|
||||
Window *w;
|
||||
|
||||
w = AllocateWindowDesc(&_toolb_normal_desc);
|
||||
w->disabled_state = 1 << 17; // disable zoom-in button (by default game is zoomed in)
|
||||
CLRBITS(w->flags4, WF_WHITE_BORDER_MASK);
|
||||
|
||||
if (_networking) { // if networking, disable fast-forward button
|
||||
SETBIT(w->disabled_state, 1);
|
||||
if (!_network_server) // if not server, disable pause button
|
||||
SETBIT(w->disabled_state, 0);
|
||||
}
|
||||
|
||||
PositionMainToolbar(w); // already WC_MAIN_TOOLBAR passed (&_toolb_normal_desc)
|
||||
|
||||
_main_status_desc.top = _screen.height - 12;
|
||||
w = AllocateWindowDesc(&_main_status_desc);
|
||||
CLRBITS(w->flags4, WF_WHITE_BORDER_MASK);
|
||||
|
||||
WP(w,def_d).data_1 = -1280;
|
||||
}
|
||||
|
||||
void GameSizeChanged()
|
||||
{
|
||||
RelocateAllWindows(_screen.width, _screen.height);
|
||||
|
Reference in New Issue
Block a user