1 /* $Id: signs_base.h 23104 2011-11-04 11:09:06Z rubidium $ */
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
10 /** @file signs_base.h Base class for signs. */
15 #include "signs_type.h"
16 #include "viewport_type.h"
17 #include "core/pool_type.hpp"
18 #include "company_type.h"
20 typedef Pool
<Sign
, SignID
, 16, 64000> SignPool
;
21 extern SignPool _sign_pool
;
23 struct Sign
: SignPool::PoolItem
<&_sign_pool
> {
29 OwnerByte owner
; // placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games.
31 Sign(Owner owner
= INVALID_OWNER
);
34 void UpdateVirtCoord();
37 #define FOR_ALL_SIGNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Sign, sign_index, var, start)
38 #define FOR_ALL_SIGNS(var) FOR_ALL_SIGNS_FROM(var, 0)
40 #endif /* SIGNS_BASE_H */