2009-08-21 21:21:05 +01:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-03-31 08:25:49 +01:00
|
|
|
/** @file signs_base.h Base class for signs. */
|
2007-04-04 02:35:16 +01:00
|
|
|
|
2008-03-31 08:25:49 +01:00
|
|
|
#ifndef SIGNS_BASE_H
|
|
|
|
#define SIGNS_BASE_H
|
2005-01-12 11:21:28 +00:00
|
|
|
|
2008-03-31 08:25:49 +01:00
|
|
|
#include "signs_type.h"
|
2008-05-07 14:18:33 +01:00
|
|
|
#include "viewport_type.h"
|
2009-05-22 16:39:22 +01:00
|
|
|
#include "core/pool_type.hpp"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "company_type.h"
|
2005-02-04 14:45:32 +00:00
|
|
|
|
2009-05-22 16:13:50 +01:00
|
|
|
typedef Pool<Sign, SignID, 16, 64000> SignPool;
|
|
|
|
extern SignPool _sign_pool;
|
2007-08-02 14:27:45 +01:00
|
|
|
|
2009-05-22 16:13:50 +01:00
|
|
|
struct Sign : SignPool::PoolItem<&_sign_pool> {
|
2020-05-17 22:31:59 +01:00
|
|
|
std::string name;
|
2019-12-01 22:17:33 +00:00
|
|
|
TrackedViewportSign sign;
|
2023-05-08 18:01:06 +01:00
|
|
|
int32_t x;
|
|
|
|
int32_t y;
|
|
|
|
int32_t z;
|
2019-12-01 22:17:33 +00:00
|
|
|
Owner owner; // placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games.
|
2005-01-12 11:21:28 +00:00
|
|
|
|
2008-09-30 21:39:50 +01:00
|
|
|
Sign(Owner owner = INVALID_OWNER);
|
2007-08-02 14:27:45 +01:00
|
|
|
~Sign();
|
2009-07-13 23:33:25 +01:00
|
|
|
|
|
|
|
void UpdateVirtCoord();
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2005-01-12 11:21:28 +00:00
|
|
|
|
2008-03-31 08:25:49 +01:00
|
|
|
#endif /* SIGNS_BASE_H */
|