Changeset - r16:5ebcc2e55c9c
[Not reviewed]
master
0 4 0
darkvater - 20 years ago 2004-08-10 21:29:47
darkvater@openttd.org
(svn r17) -Fix Player window fixes, Getstring id0 fixes, Finances window is now ok
4 files changed with 17 insertions and 5 deletions:
0 comments (0 inline, 0 general)
graph_gui.c
Show inline comments
 
@@ -821,13 +821,19 @@ static void CompanyLeagueWndProc(Window 
 
			SET_DPARAM16(0, i + 1 + STR_01AB);
 
			p = plist[i];
 
			SET_DPARAM16(1, p->name_1);
 
			SET_DPARAM32(2, p->name_2);
 
			
 
			SET_DPARAM16(3, GetPlayerNameString(p->index, 4));
 
			SET_DPARAM16(5, GetPerformanceTitleFromValue(p->old_economy[1].performance_history));
 
			/*	WARNING ugly hack!
 
					GetPlayerNameString sets up (Player #) if the player is human in an extra DPARAM16
 
					It seems that if player is non-human, nothing is set up, so param is 0. GetString doesn't like
 
					that because there is another param after it. 
 
					So we'll just shift the rating one back if player is AI and all is fine
 
				*/
 
			SET_DPARAM16((IS_HUMAN_PLAYER(i) ? 5 : 4), GetPerformanceTitleFromValue(p->old_economy[1].performance_history));
 

	
 
			DrawString(2, 15 + i * 10, i == 0 ? STR_7054 : STR_7055, 0);
 
			DrawPlayerIcon(p->index, 27, 16 + i * 10);
 
		} while (++i != pl_num);
 

	
 
		break;
lang/english.txt
Show inline comments
 
@@ -1764,14 +1764,14 @@ STR_7022_INCOME_GRAPH					:{WHITE}Income
 
STR_7023								:{CURRCOMPACT}
 
STR_7024								:{COMMA32}
 
STR_7025_OPERATING_PROFIT_GRAPH			:{WHITE}Operating Profit Graph
 
STR_7026_BANK_BALANCE					:{WHITE}Bank Balance
 
STR_7027_LOAN							:{WHITE}Loan
 
STR_7028								:{BLACK}{CURRENCY64}
 
STR_7029_BORROW							:{BLACK}Borrow {SKIP}{SKIP}{SKIP}{CURRENCY}
 
STR_702A_REPAY							:{BLACK}Repay {SKIP}{SKIP}{SKIP}{CURRENCY}
 
STR_7029_BORROW							:{BLACK}Borrow {SKIP}{SKIP}{SKIP}{SKIP}{CURRENCY}
 
STR_702A_REPAY							:{BLACK}Repay {SKIP}{SKIP}{SKIP}{SKIP}{CURRENCY}
 
STR_702B_MAXIMUM_PERMITTED_LOAN			:{WHITE}...maximum permitted loan size is {CURRENCY}
 
STR_702C_CAN_T_BORROW_ANY_MORE_MONEY	:{WHITE}Can't borrow any more money...
 
STR_702D_LOAN_ALREADY_REPAYED			:{WHITE}...no loan to repay
 
STR_702E_REQUIRED						:{WHITE}...{CURRENCY} required
 
STR_702F_CAN_T_REPAY_LOAN				:{WHITE}Can't repay loan...
 
STR_7030_SELECT_NEW_FACE_FOR_PRESIDENT	:{BLACK}Select new face for president
player_gui.c
Show inline comments
 
@@ -132,13 +132,13 @@ static void PlayerFinancesWndProc(Window
 
		
 
		w->disabled_state = p->current_loan != 0 ? 0 : (1 << 6);
 

	
 
		SET_DPARAM16(0, p->name_1);
 
		SET_DPARAM32(1, p->name_2);
 
		SET_DPARAM16(2, GetPlayerNameString((byte)w->window_number, 3));
 
		SET_DPARAM32(3, 10000);
 
		SET_DPARAM32(4, 10000);
 
		DrawWindowWidgets(w);
 

	
 
		DrawPlayerEconomyStats(p, (byte)WP(w,def_d).data_1);
 
	} break;
 

	
 
	case WE_CLICK:
town_gui.c
Show inline comments
 
@@ -123,13 +123,19 @@ static void TownAuthorityWndProc(Window 
 
					(str++, r <= 200) ||											// Mediocore
 
					(str++, r <= 400) ||											// Good
 
					(str++, r <= 600) ||											// Very Good
 
					(str++, r <= 800) ||											// Excellent
 
					(str++, true);														// Outstanding
 

	
 
					SET_DPARAM16(4, str);
 
					/*	WARNING ugly hack!
 
							GetPlayerNameString sets up (Player #) if the player is human in an extra DPARAM16
 
							It seems that if player is non-human, nothing is set up, so param is 0. GetString doesn't like
 
							that because there is another param after it. 
 
							So we'll just shift the rating one back if player is AI and all is fine
 
						*/
 
					SET_DPARAM16((IS_HUMAN_PLAYER(p->index) ? 4 : 3), str);
 
					DrawString(19, y, STR_2024, 0);
 
					y+=10;
 
				}
 
			}
 
		}
 

	
0 comments (0 inline, 0 general)