(svn r1518) -Fix: server issue where some company names were wrong

-Fix: Highscore troubles; accessing members of deleted window
This commit is contained in:
darkvater 2005-01-15 01:52:23 +00:00
parent 75474e5bf1
commit f9b5f704b1
25 changed files with 36 additions and 29 deletions

View File

@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fund new industry
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar nova ind
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Investovat do prumyslu
############ 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

View File

@ -794,7 +794,7 @@ STR_0313_FUND_NEW_INDUSTRY :Opf
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Subsidieer nieuwe industrie
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fund new industry
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Rahoita uutta teollisuutta
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financer une nouvelle industrie
############ 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

View File

@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar unha nova industria
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Neue Industrie finanzieren
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :
############ 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õ

View File

@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fj
############ 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

View File

@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Finanzia nuove industrie
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Finansier ny industri
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Ufunduj nowe przedsieb.
############ 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

View File

@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financiar nova ind
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Obiectiv industrial nou
############ 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

View File

@ -824,7 +824,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financovat novy priemysel
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar nueva industria
############ 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

View File

@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Bekosta ny industri
############ 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

View File

@ -1189,7 +1189,9 @@ void NetworkPopulateCompanyInfo(void)
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)

View File

@ -793,11 +793,15 @@ static void EndGameWndProc(Window *w, WindowEvent *e)
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;
}
}

View File

@ -780,7 +780,7 @@ int8 SaveHighScoreValue(const Player *p)
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 @@ int8 SaveHighScoreValueNetwork(void)
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);

View File

@ -238,7 +238,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
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},

View File

@ -201,7 +201,7 @@ int CDECL VehicleNameSorter(const void *a, const void *b)
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 @@ int CDECL VehicleNameSorter(const void *a, const void *b)
_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);
}
}