(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)

This commit is contained in:
smatz 2008-10-07 20:57:41 +00:00
parent b3726f4c7c
commit 1906aa2bbb
7 changed files with 14 additions and 14 deletions

View File

@ -293,7 +293,7 @@ static EngineID AiChooseTrainToReplaceWith(const Company *c, const Vehicle *v)
return AiChooseTrainToBuild(v->u.rail.railtype, avail_money, 0, v->tile); return AiChooseTrainToBuild(v->u.rail.railtype, avail_money, 0, v->tile);
} }
static EngineID AiChooseShipToReplaceWith(const Company *p, const Vehicle *v) static EngineID AiChooseShipToReplaceWith(const Company *c, const Vehicle *v)
{ {
/* Ships are not implemented in this (broken) AI */ /* Ships are not implemented in this (broken) AI */
return INVALID_ENGINE; return INVALID_ENGINE;

View File

@ -590,10 +590,10 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
* @todo Rewrite (dedicated) server to something more than a dirty hack! * @todo Rewrite (dedicated) server to something more than a dirty hack!
*/ */
if (_networking && !(cmd & CMD_NETWORK_COMMAND)) { if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
CompanyID pbck = _local_company; CompanyID bck = _local_company;
if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST; if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
NetworkSend_Command(tile, p1, p2, cmd, callback); NetworkSend_Command(tile, p1, p2, cmd, callback);
if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = pbck; if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = bck;
_docommand_recursive = 0; _docommand_recursive = 0;
_cmd_text = NULL; _cmd_text = NULL;
ClearStorageChanges(false); ClearStorageChanges(false);

View File

@ -84,10 +84,10 @@ void SetLocalCompany(CompanyID new_company)
/* Do not update the patches if we are in the intro GUI */ /* Do not update the patches if we are in the intro GUI */
if (IsValidCompanyID(new_company) && _game_mode != GM_MENU) { if (IsValidCompanyID(new_company) && _game_mode != GM_MENU) {
const Company *p = GetCompany(new_company); const Company *c = GetCompany(new_company);
_settings_client.gui.autorenew = p->engine_renew; _settings_client.gui.autorenew = c->engine_renew;
_settings_client.gui.autorenew_months = p->engine_renew_months; _settings_client.gui.autorenew_months = c->engine_renew_months;
_settings_client.gui.autorenew_money = p->engine_renew_money; _settings_client.gui.autorenew_money = c->engine_renew_money;
InvalidateWindow(WC_GAME_OPTIONS, 0); InvalidateWindow(WC_GAME_OPTIONS, 0);
} }
} }
@ -106,9 +106,9 @@ uint16 GetDrawStringCompanyColor(CompanyID company)
return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOR; return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOR;
} }
void DrawCompanyIcon(CompanyID p, int x, int y) void DrawCompanyIcon(CompanyID c, int x, int y)
{ {
DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOR(p), x, y); DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOR(c), x, y);
} }
/** /**

View File

@ -43,7 +43,7 @@ struct HighScore {
extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
void SaveToHighScore(); void SaveToHighScore();
void LoadFromHighScore(); void LoadFromHighScore();
int8 SaveHighScoreValue(const Company *p); int8 SaveHighScoreValue(const Company *c);
int8 SaveHighScoreValueNetwork(); int8 SaveHighScoreValueNetwork();
#endif /* COMPANY_FUNC_H */ #endif /* COMPANY_FUNC_H */

View File

@ -8,7 +8,7 @@
#include "company_type.h" #include "company_type.h"
uint16 GetDrawStringCompanyColor(CompanyID company); uint16 GetDrawStringCompanyColor(CompanyID company);
void DrawCompanyIcon(CompanyID p, int x, int y); void DrawCompanyIcon(CompanyID c, int x, int y);
void ShowCompanyStations(CompanyID company); void ShowCompanyStations(CompanyID company);
void ShowCompanyFinances(CompanyID company); void ShowCompanyFinances(CompanyID company);

View File

@ -238,7 +238,7 @@ RailType GetBestRailtype(const CompanyID company);
* @param company the company to get the rail types for. * @param company the company to get the rail types for.
* @return the rail types. * @return the rail types.
*/ */
RailTypes GetCompanyRailtypes(const CompanyID p); RailTypes GetCompanyRailtypes(const CompanyID c);
/** /**
* Reset all rail type information to its default values. * Reset all rail type information to its default values.

View File

@ -98,7 +98,7 @@ const uint32 _send_to_depot_proc_table[] = {
DEFINE_OLD_POOL_GENERIC(Vehicle, Vehicle) DEFINE_OLD_POOL_GENERIC(Vehicle, Vehicle)
/** Function to tell if a vehicle needs to be autorenewed /** Function to tell if a vehicle needs to be autorenewed
* @param *p The vehicle owner * @param *c The vehicle owner
* @return true if the vehicle is old enough for replacement * @return true if the vehicle is old enough for replacement
*/ */
bool Vehicle::NeedsAutorenewing(const Company *c) const bool Vehicle::NeedsAutorenewing(const Company *c) const