|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| struct | capacities_t |
| Store capacities in base. More... | |
Macros | |
| #define | CAP_Get(base, capacity) &((base)->capacities[(capacity)]) |
| Capacity macros. More... | |
| #define | CAP_GetMax(base, capacity) (base)->capacities[(capacity)].max |
| #define | CAP_GetCurrent(base, capacity) (base)->capacities[(capacity)].cur |
Enumerations | |
| enum | baseCapacities_t { CAP_ALIENS , CAP_AIRCRAFT_SMALL , CAP_AIRCRAFT_BIG , CAP_EMPLOYEES , CAP_ITEMS , CAP_LABSPACE , CAP_WORKSPACE , CAP_ANTIMATTER , MAX_CAP } |
| All possible capacities in base. More... | |
Functions | |
| void | CAP_UpdateStorageCap (struct base_s *base) |
| void | CAP_SetMax (struct base_s *base, baseCapacities_t capacity, int value) |
| void | CAP_AddMax (struct base_s *base, baseCapacities_t capacity, int value) |
| void | CAP_SetCurrent (struct base_s *base, baseCapacities_t capacity, int value) |
| void | CAP_AddCurrent (struct base_s *base, baseCapacities_t capacity, int value) |
| void | CAP_RemoveAntimatterExceedingCapacity (struct base_s *base) |
| int | CAP_GetFreeCapacity (const struct base_s *base, baseCapacities_t cap) |
| void | CAP_CheckOverflow (void) |
| Checks capacity overflows on bases. More... | |
| #define CAP_Get | ( | base, | |
| capacity | |||
| ) | &((base)->capacities[(capacity)]) |
Capacity macros.
Definition at line 50 of file cp_capacity.h.
| #define CAP_GetCurrent | ( | base, | |
| capacity | |||
| ) | (base)->capacities[(capacity)].cur |
Definition at line 52 of file cp_capacity.h.
| #define CAP_GetMax | ( | base, | |
| capacity | |||
| ) | (base)->capacities[(capacity)].max |
Definition at line 51 of file cp_capacity.h.
| enum baseCapacities_t |
All possible capacities in base.
Definition at line 27 of file cp_capacity.h.
| void CAP_AddCurrent | ( | struct base_s * | base, |
| baseCapacities_t | capacity, | ||
| int | value | ||
| ) |
| void CAP_AddMax | ( | struct base_s * | base, |
| baseCapacities_t | capacity, | ||
| int | value | ||
| ) |
Checks capacity overflows on bases.
Definition at line 129 of file cp_capacity.cpp.
References _, B_GetBuildingTemplateByType(), B_GetBuildingTypeByCapacity(), B_GetNext(), BASE_DESTROYED, base_t::baseStatus, CAP_AIRCRAFT_BIG, CAP_AIRCRAFT_SMALL, CAP_ALIENS, CAP_ANTIMATTER, CAP_EMPLOYEES, CAP_Get, CAP_ITEMS, CAP_LABSPACE, CAP_RemoveAntimatterExceedingCapacity(), CAP_WORKSPACE, cgi, CP_GameTimeStop(), capacities_t::cur, i, base_t::idx, capacities_t::max, MAX_CAP, base_t::name, building_t::name, PR_UpdateProductionCap(), and RS_RemoveScientistsExceedingCapacity().
Referenced by B_BuildingDestroy(), and CP_CampaignRun().
| int CAP_GetFreeCapacity | ( | const struct base_s * | base, |
| baseCapacities_t | cap | ||
| ) |
| void CAP_RemoveAntimatterExceedingCapacity | ( | struct base_s * | base | ) |
| void CAP_SetCurrent | ( | struct base_s * | base, |
| baseCapacities_t | capacity, | ||
| int | value | ||
| ) |
| void CAP_SetMax | ( | struct base_s * | base, |
| baseCapacities_t | capacity, | ||
| int | value | ||
| ) |
| void CAP_UpdateStorageCap | ( | struct base_s * | base | ) |