company_func.h File Reference

Functions related to companies. More...

#include "core/math_func.hpp"
#include "company_type.h"
#include "tile_type.h"
#include "strings_type.h"
#include "gfx_type.h"

Go to the source code of this file.

Functions

void ChangeOwnershipOfCompanyItems (Owner old_owner, Owner new_owner)
void GetNameOfOwner (Owner owner, TileIndex tile)
 Set the right DParams to get the name of an owner.
void SetLocalCompany (CompanyID new_company)
 Sets the local company and updates the settings that are set on a per-company basis to reflect the core's state in the GUI.
void ShowBuyCompanyDialog (CompanyID company)
static bool IsLocalCompany ()
static bool IsInteractiveCompany (CompanyID company)

Variables

CompanyByte _local_company
CompanyByte _current_company
Colours _company_colours [MAX_COMPANIES]
 NOSAVE: can be determined from company structs.
CompanyManagerFace _company_manager_face
 for company manager face storage in openttd.cfg


Detailed Description

Functions related to companies.

Definition in file company_func.h.


Function Documentation

void GetNameOfOwner ( Owner  owner,
TileIndex  tile 
)

Set the right DParams to get the name of an owner.

Parameters:
owner the owner to get the name of.
tile optional tile to get the right town.
Precondition:
if tile == 0, then owner can't be OWNER_TOWN.

Definition at line 221 of file company_cmd.cpp.

References OWNER_TOWN, and SetDParam().

Referenced by CheckOwnership(), and CheckTileOwnership().

void SetLocalCompany ( CompanyID  new_company  ) 

Sets the local company and updates the settings that are set on a per-company basis to reflect the core's state in the GUI.

Parameters:
new_company the new company
Precondition:
Company::IsValidID(new_company) || new_company == COMPANY_SPECTATOR || new_company == OWNER_NONE

Definition at line 88 of file company_cmd.cpp.

References COMPANY_SPECTATOR, DeleteConstructionWindows(), InvalidateWindowData(), MarkWholeScreenDirty(), and OWNER_NONE.

Referenced by ClickChangeCompanyCheat(), CmdCompanyCtrl(), GenerateWorld(), and StartScenario().


Generated on Tue Jan 5 21:03:02 2010 for OpenTTD by  doxygen 1.5.6