mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
This commit is contained in:
parent
b3726f4c7c
commit
1906aa2bbb
@ -293,7 +293,7 @@ static EngineID AiChooseTrainToReplaceWith(const Company *c, const Vehicle *v)
|
||||
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 */
|
||||
return INVALID_ENGINE;
|
||||
|
@ -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!
|
||||
*/
|
||||
if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
|
||||
CompanyID pbck = _local_company;
|
||||
if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
|
||||
CompanyID bck = _local_company;
|
||||
if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
|
||||
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;
|
||||
_cmd_text = NULL;
|
||||
ClearStorageChanges(false);
|
||||
|
@ -84,10 +84,10 @@ void SetLocalCompany(CompanyID new_company)
|
||||
|
||||
/* Do not update the patches if we are in the intro GUI */
|
||||
if (IsValidCompanyID(new_company) && _game_mode != GM_MENU) {
|
||||
const Company *p = GetCompany(new_company);
|
||||
_settings_client.gui.autorenew = p->engine_renew;
|
||||
_settings_client.gui.autorenew_months = p->engine_renew_months;
|
||||
_settings_client.gui.autorenew_money = p->engine_renew_money;
|
||||
const Company *c = GetCompany(new_company);
|
||||
_settings_client.gui.autorenew = c->engine_renew;
|
||||
_settings_client.gui.autorenew_months = c->engine_renew_months;
|
||||
_settings_client.gui.autorenew_money = c->engine_renew_money;
|
||||
InvalidateWindow(WC_GAME_OPTIONS, 0);
|
||||
}
|
||||
}
|
||||
@ -106,9 +106,9 @@ uint16 GetDrawStringCompanyColor(CompanyID company)
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ struct HighScore {
|
||||
extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
|
||||
void SaveToHighScore();
|
||||
void LoadFromHighScore();
|
||||
int8 SaveHighScoreValue(const Company *p);
|
||||
int8 SaveHighScoreValue(const Company *c);
|
||||
int8 SaveHighScoreValueNetwork();
|
||||
|
||||
#endif /* COMPANY_FUNC_H */
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "company_type.h"
|
||||
|
||||
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 ShowCompanyFinances(CompanyID company);
|
||||
|
@ -238,7 +238,7 @@ RailType GetBestRailtype(const CompanyID company);
|
||||
* @param company the company to get the rail types for.
|
||||
* @return the rail types.
|
||||
*/
|
||||
RailTypes GetCompanyRailtypes(const CompanyID p);
|
||||
RailTypes GetCompanyRailtypes(const CompanyID c);
|
||||
|
||||
/**
|
||||
* Reset all rail type information to its default values.
|
||||
|
@ -98,7 +98,7 @@ const uint32 _send_to_depot_proc_table[] = {
|
||||
DEFINE_OLD_POOL_GENERIC(Vehicle, Vehicle)
|
||||
|
||||
/** 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
|
||||
*/
|
||||
bool Vehicle::NeedsAutorenewing(const Company *c) const
|
||||
|
Loading…
Reference in New Issue
Block a user