# company_base.h File Reference

Definition of stuff that is very close to a company, like the company struct itself. More...

`#include "company_type.h"`
`#include "oldpool.h"`
`#include "road_type.h"`
`#include "rail_type.h"`
`#include "date_type.h"`
`#include "engine_type.h"`
`#include "livery.h"`
`#include "autoreplace_type.h"`
`#include "economy_type.h"`
`#include "tile_type.h"`

Go to the source code of this file.

## Data Structures

struct | CompanyEconomyEntry

## Defines

#define | FOR_ALL_COMPANIES_FROM(d, start) for (d = GetCompany(start); d != NULL; d = (d->index + 1U < GetCompanyPoolSize()) ? GetCompany(d->index + 1U) : NULL) if (d->IsValid())
#define | FOR_ALL_COMPANIES(d) FOR_ALL_COMPANIES_FROM(d, 0)

## Functions

| DECLARE_OLD_POOL (Company, Company, 1,(MAX_COMPANIES+1) >> 1) struct Company
static bool | IsValidCompanyID (CompanyID company)
static byte | ActiveCompanyCount ()
Money | CalculateCompanyValue (const Company *c)

## Variables

uint | _next_competitor_start
| the number of ticks before the next AI is started
uint | _cur_company_tick_index
| used to generate a name for one company that doesn't have a name yet per tick

## Detailed Description

Definition of stuff that is very close to a company, like the company struct itself.

Definition in file company_base.h.

## Function Documentation

DECLARE_OLD_POOL | ( | Company | ,
|  | Company | ,
|  | 1 | ,
|  | (MAX_COMPANIES+1) >> | 1 |
| ) |  |  |

< which cargo types were transported the last year

< northern tile of HQ ; INVALID_TILE when there is none

< which companies were asked about buying it?

< Defined later

< caches the number of engines of each type the company owns (no need to save this)

Definition at line 31 of file company_base.h.