92 |
92 |
93 ConvertDateToYMD(_date, &ymd); |
93 ConvertDateToYMD(_date, &ymd); |
94 |
94 |
95 y = 15; |
95 y = 15; |
96 x = 1; |
96 x = 1; |
97 DrawString(x, y, STR_2026_SUBSIDIES_ON_OFFER_FOR, 0); |
97 DrawString(x, y, STR_2026_SUBSIDIES_ON_OFFER_FOR, TC_FROMSTRING); |
98 y += 10; |
98 y += 10; |
99 num = 0; |
99 num = 0; |
100 |
100 |
101 for (s = _subsidies; s != endof(_subsidies); s++) { |
101 for (s = _subsidies; s != endof(_subsidies); s++) { |
102 if (s->cargo_type != CT_INVALID && s->age < 12) { |
102 if (s->cargo_type != CT_INVALID && s->age < 12) { |
103 int x2; |
103 int x2; |
104 |
104 |
105 SetupSubsidyDecodeParam(s, 1); |
105 SetupSubsidyDecodeParam(s, 1); |
106 x2 = DrawString(x + 2, y, STR_2027_FROM_TO, 0); |
106 x2 = DrawString(x + 2, y, STR_2027_FROM_TO, TC_FROMSTRING); |
107 |
107 |
108 SetDParam(0, _date - ymd.day + 384 - s->age * 32); |
108 SetDParam(0, _date - ymd.day + 384 - s->age * 32); |
109 DrawString(x2, y, STR_2028_BY, 0); |
109 DrawString(x2, y, STR_2028_BY, TC_FROMSTRING); |
110 y += 10; |
110 y += 10; |
111 num++; |
111 num++; |
112 } |
112 } |
113 } |
113 } |
114 |
114 |
115 if (num == 0) { |
115 if (num == 0) { |
116 DrawString(x + 2, y, STR_202A_NONE, 0); |
116 DrawString(x + 2, y, STR_202A_NONE, TC_FROMSTRING); |
117 y += 10; |
117 y += 10; |
118 } |
118 } |
119 |
119 |
120 DrawString(x, y + 1, STR_202B_SERVICES_ALREADY_SUBSIDISED, 0); |
120 DrawString(x, y + 1, STR_202B_SERVICES_ALREADY_SUBSIDISED, TC_FROMSTRING); |
121 y += 10; |
121 y += 10; |
122 num = 0; |
122 num = 0; |
123 |
123 |
124 for (s = _subsidies; s != endof(_subsidies); s++) { |
124 for (s = _subsidies; s != endof(_subsidies); s++) { |
125 if (s->cargo_type != CT_INVALID && s->age >= 12) { |
125 if (s->cargo_type != CT_INVALID && s->age >= 12) { |
128 SetupSubsidyDecodeParam(s, 1); |
128 SetupSubsidyDecodeParam(s, 1); |
129 |
129 |
130 PlayerID player = GetStation(s->to)->owner; |
130 PlayerID player = GetStation(s->to)->owner; |
131 SetDParam(3, player); |
131 SetDParam(3, player); |
132 |
132 |
133 xt = DrawString(x + 2, y, STR_202C_FROM_TO, 0); |
133 xt = DrawString(x + 2, y, STR_202C_FROM_TO, TC_FROMSTRING); |
134 |
134 |
135 SetDParam(0, _date - ymd.day + 768 - s->age * 32); |
135 SetDParam(0, _date - ymd.day + 768 - s->age * 32); |
136 DrawString(xt, y, STR_202D_UNTIL, 0); |
136 DrawString(xt, y, STR_202D_UNTIL, TC_FROMSTRING); |
137 y += 10; |
137 y += 10; |
138 num++; |
138 num++; |
139 } |
139 } |
140 } |
140 } |
141 |
141 |
142 if (num == 0) DrawString(x + 2, y, STR_202A_NONE, 0); |
142 if (num == 0) DrawString(x + 2, y, STR_202A_NONE, TC_FROMSTRING); |
143 } |
143 } |
144 |
144 |
145 static void SubsidiesListWndProc(Window *w, WindowEvent *e) |
145 static void SubsidiesListWndProc(Window *w, WindowEvent *e) |
146 { |
146 { |
147 switch (e->event) { |
147 switch (e->event) { |