OpenTTD Source: src/object.h Source File

OpenTTD Source 15.0-RC2

object.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef OBJECT_H
11#define OBJECT_H
12
13#include "tile_type.h"
14#include "company_type.h"
15#include "object_type.h"
16
17void UpdateCompanyHQ(TileIndex tile, uint score);
18
19void BuildObject(ObjectType type, TileIndex tile, CompanyID owner = OWNER_NONE, struct Town *town = nullptr, uint8_t view = 0);
20
21 Window *ShowBuildObjectPicker();
22
23#endif /* OBJECT_H */
company_type.h
Types related to companies.
OWNER_NONE
static constexpr Owner OWNER_NONE
The tile has no ownership.
Definition company_type.h:26
BuildObject
void BuildObject(ObjectType type, TileIndex tile, CompanyID owner=OWNER_NONE, struct Town *town=nullptr, uint8_t view=0)
Actually build the object.
Definition object_cmd.cpp:88
ShowBuildObjectPicker
Window * ShowBuildObjectPicker()
Show our object picker.
Definition object_gui.cpp:425
UpdateCompanyHQ
void UpdateCompanyHQ(TileIndex tile, uint score)
Update the CompanyHQ to the state associated with the given score.
Definition object_cmd.cpp:165
object_type.h
Types related to object tiles.
ObjectType
uint16_t ObjectType
Types of objects.
Definition object_type.h:16
PoolID< uint8_t, struct CompanyIDTag, 0xF, 0xFF >
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
Town
Town data structure.
Definition town.h:63
Window
Data structure for an opened window.
Definition window_gui.h:274
tile_type.h
Types related to tiles.