OpenTTD
signs_base.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 <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef SIGNS_BASE_H
11 #define SIGNS_BASE_H
12 
13 #include "signs_type.h"
14 #include "viewport_type.h"
15 #include "core/pool_type.hpp"
16 #include "company_type.h"
17 
19 extern SignPool _sign_pool;
20 
21 struct Sign : SignPool::PoolItem<&_sign_pool> {
22  char *name;
24  int32 x;
25  int32 y;
26  int32 z;
27  Owner owner; // placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games.
28 
29  Sign(Owner owner = INVALID_OWNER);
30  ~Sign();
31 
32  void UpdateVirtCoord();
33 };
34 
35 #endif /* SIGNS_BASE_H */
Owner
Enum for all companies/owners.
Definition: company_type.h:18
An invalid owner.
Definition: company_type.h:29
Sign(Owner owner=INVALID_OWNER)
Creates a new sign.
Definition: signs.cpp:29
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle...
Specialised ViewportSign that tracks whether it is valid for entering into a Kdtree.
Definition: viewport_type.h:57
Types related to viewports.
SignPool _sign_pool
Initialize the sign-pool.
void UpdateVirtCoord()
Update the coordinate of one sign.
Definition: signs.cpp:47
Base class for all PoolItems.
Definition: pool_type.hpp:188
Base class for all pools.
Definition: pool_type.hpp:82
~Sign()
Destroy the sign.
Definition: signs.cpp:35
Types related to companies.
Types related to signs.