Mercurial > hg > openttd
changeset 1017:a7041c84ff54 draft
(svn r1518) -Fix: server issue where some company names were wrong
-Fix: Highscore troubles; accessing members of deleted window
author | darkvater <darkvater@openttd.org> |
---|---|
date | Sat, 15 Jan 2005 01:52:23 +0000 |
parents | a39b3d97ab6a |
children | abc77854cc00 |
files | lang/american.txt lang/catalan.txt lang/czech.txt lang/danish.txt lang/dutch.txt lang/english.txt lang/finnish.txt lang/french.txt lang/galician.txt lang/german.txt lang/hungarian.txt lang/icelandic.txt lang/italian.txt lang/norwegian.txt lang/polish.txt lang/portuguese.txt lang/romanian.txt lang/slovak.txt lang/spanish.txt lang/swedish.txt network_server.c player_gui.c players.c train_gui.c vehicle_gui.c |
diffstat | 25 files changed, 36 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/lang/american.txt +++ b/lang/american.txt @@ -823,7 +823,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fund new industry -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...can only be built in towns STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...can only be built in rainforest areas STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...can only be built in desert areas
--- a/lang/catalan.txt +++ b/lang/catalan.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar nova indústria -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...només es pot construir en poblacions STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...només es pot construir en ŕrees de selva tropical STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...només es pot construir en ŕrees de desert
--- a/lang/czech.txt +++ b/lang/czech.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Investovat do prumyslu -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...muze být budováno jen ve mestech STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...muze být budováno jen v pralesech STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...muze být budováno jen v poustich
--- a/lang/danish.txt +++ b/lang/danish.txt @@ -794,7 +794,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Opfřr ny industri -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan kun bygges i byer STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan kun bygges i regnskovsomrĺder STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan kun bygges i řrkenomrĺder
--- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Betaal nieuwe industrie -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan alleen in steden gebouwd worden STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan alleen in het regenwoud gebouwd worden STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan alleen in woestijngebieden gebouwd worden
--- a/lang/english.txt +++ b/lang/english.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fund new industry -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...can only be built in towns STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...can only be built in rainforest areas STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...can only be built in desert areas
--- a/lang/finnish.txt +++ b/lang/finnish.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Rahoita uutta teollisuutta -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...voidaan rakentaa vian kaupunkeihin STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...voidaan rakentaa vain sademetsäalueisiin STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...voidaan rakentaa vain aavikkoalueisiin
--- a/lang/french.txt +++ b/lang/french.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financer une nouvelle industrie -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...peut seulement ętre construit en ville STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...peut seulement ętre construit en foręt tropicale STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...peut seulement ętre construit dans les endroits désertiques
--- a/lang/galician.txt +++ b/lang/galician.txt @@ -823,7 +823,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar unha nova industria -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...só se pode construír en cidades STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...só se pode construír en zonas de selva tropical STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...só se pode construír en zonas desérticas
--- a/lang/german.txt +++ b/lang/german.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Neue Industrie finanzieren -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kann nur in Städten errichtet werden STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kann nur im Regenwaldgebiet errichtet werden STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kann nur im Wüstengebiet errichtet werden
--- a/lang/hungarian.txt +++ b/lang/hungarian.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Új gazdasági épület -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...csak városban építhető STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...csak esőerdőben építhető STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...csak sivatagban építhető
--- a/lang/icelandic.txt +++ b/lang/icelandic.txt @@ -823,7 +823,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fjármagna nýjan iđnađ -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...ađeins hćgt ađ byggja í bćjum STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...ađeins hćgt ađ byggja á regnskógasvćđum STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...ađeins hćgt ađ byggja í eyđimörk
--- a/lang/italian.txt +++ b/lang/italian.txt @@ -823,7 +823,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Finanzia nuove industrie -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...puň essere costruito solo in cittŕ STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...puň essere costruito solo nella foresta pluviale STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...puň essere costruito solo in aree desertiche
--- a/lang/norwegian.txt +++ b/lang/norwegian.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Finansier ny industri -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan bare bygges i byer STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan bare bygges i regnskogomrĺder STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan bare bygges i řrkenomrĺder
--- a/lang/polish.txt +++ b/lang/polish.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Ufundowanie nowego przedsieb. -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...moze byc wybudowane tylko w miescie STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...moze byc wybudowane tylko w lasach deszczowych STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...moze byc wybudowane tylko na pustyni
--- a/lang/portuguese.txt +++ b/lang/portuguese.txt @@ -823,7 +823,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financiar nova indústria -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...só se pode construir em cidades STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...só se pode construir em zonas de floresta STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...só se pode construir em zonas de deserto
--- a/lang/romanian.txt +++ b/lang/romanian.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Construieste un nou obiectiv ind. -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...se poate construi doar in orase STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...se poate construi doar in padurile ecuatoriale STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...se poate construi doar in zonele de desert
--- a/lang/slovak.txt +++ b/lang/slovak.txt @@ -824,7 +824,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financovat novy priemysel -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...moze byt postavene len v meste STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...moze byt postavene len v dazdovom pralese STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...moze byt postavene len v pusti
--- a/lang/spanish.txt +++ b/lang/spanish.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar nueva industria -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...sólo se puede construir en poblaciones STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...sólo se puede construir en áreas de selva STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...sólo se puede construir en áreas desérticas
--- a/lang/swedish.txt +++ b/lang/swedish.txt @@ -826,7 +826,7 @@ ############ range ends here STR_0314_FUND_NEW_INDUSTRY :{WHITE}Bekosta ny industri -STR_0315 :{STRING} +STR_JUST_STRING :{STRING} STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan bara byggas i städer STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan bara byggas i regnskog STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan bara byggas pĺ öken
--- a/network_server.c +++ b/network_server.c @@ -1189,7 +1189,9 @@ ttd_strlcpy(_network_player_info[p->index].password, password, sizeof(_network_player_info[p->index].password)); // Grap the company name - GetString(_network_player_info[p->index].company_name, p->name_1); + SetDParam(0, p->name_1); + SetDParam(1, p->name_2); + GetString(_network_player_info[p->index].company_name, STR_JUST_STRING); // Check the income if (_cur_year - 1 == p->inaugurated_year)
--- a/player_gui.c +++ b/player_gui.c @@ -793,11 +793,15 @@ SetDParam(2, EndGameGetPerformanceTitleFromValue(p->old_economy[0].performance_history)); DrawStringMultiCenter(x + (640 / 2), y + 157, STR_021B_ACHIEVES_STATUS, 640); } - } break; - case WE_CLICK: /* OnClick show the highscore chart */ + } break; + case WE_CLICK: { /* OnClick show the highscore chart */ + int diff = w->window_number; // save values because deletewindow is called + int8 rank = WP(w, highscore_d).rank; DoCommandP(0, 0, 0, NULL, CMD_PAUSE); DeleteWindow(w); - ShowHighscoreTable(w->window_number, WP(w, highscore_d).rank); + + ShowHighscoreTable(diff, rank); + } break; } }
--- a/players.c +++ b/players.c @@ -780,7 +780,7 @@ SetDParam(0, p->president_name_1); SetDParam(1, p->president_name_2); SetDParam(2, p->name_1); - SetDParam(3, p->name_1); + SetDParam(3, p->name_2); GetString(buf, STR_HIGHSCORE_NAME); // get manager/company name string ttd_strlcpy(hs[i].company, buf, sizeof(buf)); hs[i].score = score; @@ -830,8 +830,9 @@ SetDParam(0, (*p_cur)->president_name_1); SetDParam(1, (*p_cur)->president_name_2); SetDParam(2, (*p_cur)->name_1); - SetDParam(3, (*p_cur)->name_1); + SetDParam(3, (*p_cur)->name_2); GetString(buf, STR_HIGHSCORE_NAME); // get manager/company name string + ttd_strlcpy(hs->company, buf, sizeof(buf)); hs->score = (*p_cur)->old_economy[0].performance_history; hs->title = EndGameGetPerformanceTitleFromValue(hs->score);
--- a/train_gui.c +++ b/train_gui.c @@ -238,7 +238,7 @@ static const Widget _new_rail_vehicle_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_0315, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_JUST_STRING, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_8843_TRAIN_VEHICLE_SELECTION}, { WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 187, 0x0, STR_NULL},
--- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -201,7 +201,7 @@ if (va->string_id != _internal_name_sorter_id) { SetDParam(0, va->string_id); - GetString(buf1, STR_0315); + GetString(buf1, STR_JUST_STRING); } if ( cmp2->index != _last_vehicle_idx) { @@ -209,7 +209,7 @@ _bufcache[0] = '\0'; if (vb->string_id != _internal_name_sorter_id) { SetDParam(0, vb->string_id); - GetString(_bufcache, STR_0315); + GetString(_bufcache, STR_JUST_STRING); } }