Changeset - r3801:be92f06ae224
[Not reviewed]
master
0 1 0
belugas - 18 years ago 2006-05-09 17:10:26
belugas@openttd.org
(svn r4809) Codechange : Merged two loops in only one.
1 file changed with 6 insertions and 9 deletions:
0 comments (0 inline, 0 general)
graph_gui.c
Show inline comments
 
@@ -701,20 +701,12 @@ static void CargoPaymentRatesWndProc(Win
 
		w->click_state = (~_legend_cargobits) << 3;
 
		DrawWindowWidgets(w);
 

	
 
		x = 495;
 
		y = 25;
 

	
 
		for (i = 0; i != NUM_CARGO; i++) {
 
			GfxFillRect(x, y, x+8, y+5, 0);
 
			GfxFillRect(x+1, y+1, x+7, y+4, _cargo_legend_colors[i]);
 
			SetDParam(0, _cargoc.names_s[i]);
 
			DrawString(x+14, y, STR_7065, 0);
 
			y += 8;
 
		}
 

	
 
		gd.left = 2;
 
		gd.top = 24;
 
		gd.height = 104;
 
		gd.include_neg = false;
 
		gd.format_str_y_axis = STR_CURRCOMPACT;
 
		gd.color_3 = 16;
 
@@ -725,12 +717,17 @@ static void CargoPaymentRatesWndProc(Win
 
		gd.num_vert_lines = 20;
 
		gd.month = 0xFF;
 
		gd.unk61A = 10;
 
		gd.unk61C = 10;
 

	
 
		for (i = 0; i != NUM_CARGO; i++) {
 
			GfxFillRect(x, y, x+8, y+5, 0);
 
			GfxFillRect(x+1, y+1, x+7, y+4, _cargo_legend_colors[i]);
 
			SetDParam(0, _cargoc.names_s[i]);
 
			DrawString(x+14, y, STR_7065, 0);
 
			y += 8;
 
			gd.colors[i] = _cargo_legend_colors[i];
 
			for (j = 0; j != 20; j++) {
 
				gd.cost[i][j] = (uint64)GetTransportedGoodsIncome(10, 20, j * 6 + 6, i);
 
			}
 
		}
 

	
 
@@ -1115,13 +1112,13 @@ static int CDECL SignNameSorter(const vo
 
	if (cmp2 != _last_sign_idx) {
 
		_last_sign_idx = cmp2;
 
		ss = GetSign(cmp2);
 
		GetString(_bufcache, ss->str);
 
	}
 

	
 
	return strcmp(buf1, _bufcache);	// sort by name
 
	return strcmp(buf1, _bufcache); // sort by name
 
}
 

	
 
static void GlobalSortSignList(void)
 
{
 
	const SignStruct *ss;
 
	uint32 n = 0;
0 comments (0 inline, 0 general)