src/graph_gui.cpp
branchgamebalance
changeset 9910 0b2aebc8283e
parent 9909 dce9a6923bb7
equal deleted inserted replaced
9909:dce9a6923bb7 9910:0b2aebc8283e
   220 					/* XXX: This can overflow if x_axis_offset * datapoint is
   220 					/* XXX: This can overflow if x_axis_offset * datapoint is
   221 					 * too big to fit in an int64. */
   221 					 * too big to fit in an int64. */
   222 					y = gw->top + x_axis_offset - (x_axis_offset * datapoint) / highest_value;
   222 					y = gw->top + x_axis_offset - (x_axis_offset * datapoint) / highest_value;
   223 
   223 
   224 					/* Draw the point. */
   224 					/* Draw the point. */
   225 					GfxFillRect(x-1, y-1, x+1, y+1, color);
   225 					GfxFillRect(x - 1, y - 1, x + 1, y + 1, color);
   226 
   226 
   227 					/* Draw the line connected to the previous point. */
   227 					/* Draw the line connected to the previous point. */
   228 					if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, color);
   228 					if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, color);
   229 
   229 
   230 					prev_x = x;
   230 					prev_x = x;
   266 			DrawWindowWidgets(w);
   266 			DrawWindowWidgets(w);
   267 
   267 
   268 			FOR_ALL_PLAYERS(p) {
   268 			FOR_ALL_PLAYERS(p) {
   269 				if (!p->is_active) continue;
   269 				if (!p->is_active) continue;
   270 
   270 
   271 				DrawPlayerIcon(p->index, 4, 18+p->index*12);
   271 				DrawPlayerIcon(p->index, 4, 18 + p->index * 12);
   272 
   272 
   273 				SetDParam(0, p->name_1);
   273 				SetDParam(0, p->name_1);
   274 				SetDParam(1, p->name_2);
   274 				SetDParam(1, p->name_2);
   275 				SetDParam(2, GetPlayerNameString(p->index, 3));
   275 				SetDParam(2, GetPlayerNameString(p->index, 3));
   276 				DrawString(21, 17 + p->index * 12, STR_7021, HASBIT(_legend_excluded_players, p->index) ? 0x10 : 0xC);
   276 				DrawString(21, 17 + p->index * 12, STR_7021, HASBIT(_legend_excluded_players, p->index) ? 0x10 : 0xC);
   328 static void SetupGraphDrawerForPlayers(GraphDrawer *gd)
   328 static void SetupGraphDrawerForPlayers(GraphDrawer *gd)
   329 {
   329 {
   330 	const Player* p;
   330 	const Player* p;
   331 	uint excluded_players = _legend_excluded_players;
   331 	uint excluded_players = _legend_excluded_players;
   332 	byte nums;
   332 	byte nums;
   333 	int mo,yr;
   333 	int mo, yr;
   334 
   334 
   335 	/* Exclude the players which aren't valid */
   335 	/* Exclude the players which aren't valid */
   336 	FOR_ALL_PLAYERS(p) {
   336 	FOR_ALL_PLAYERS(p) {
   337 		if (!p->is_active) SETBIT(excluded_players, p->index);
   337 		if (!p->is_active) SETBIT(excluded_players, p->index);
   338 	}
   338 	}
   906 	CompanyLeagueWndProc
   906 	CompanyLeagueWndProc
   907 };
   907 };
   908 
   908 
   909 void ShowCompanyLeagueTable()
   909 void ShowCompanyLeagueTable()
   910 {
   910 {
   911 	AllocateWindowDescFront(&_company_league_desc,0);
   911 	AllocateWindowDescFront(&_company_league_desc, 0);
   912 }
   912 }
   913 
   913 
   914 /*****************************/
   914 /*****************************/
   915 /* PERFORMANCE RATING DETAIL */
   915 /* PERFORMANCE RATING DETAIL */
   916 /*****************************/
   916 /*****************************/