Remove SIGTYPE_LAST_NOPBS
[openttd/fttd.git] / src / autoreplace_base.h
blob9584e6432358bcaa7757e5a0710f22cf17acdc9c
1 /* $Id$ */
3 /*
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/>.
8 */
10 /** @file autoreplace_base.h Base class for autoreplaces/autorenews. */
12 #ifndef AUTOREPLACE_BASE_H
13 #define AUTOREPLACE_BASE_H
15 #include "core/pool_type.hpp"
16 #include "autoreplace_type.h"
17 #include "engine_type.h"
18 #include "group_type.h"
20 typedef uint16 EngineRenewID;
22 /**
23 * Struct to store engine replacements. DO NOT USE outside of engine.c. Is
24 * placed here so the only exception to this rule, the saveload code, can use
25 * it.
27 struct EngineRenew : PooledItem <EngineRenew, EngineRenewID, 16, 64000> {
28 EngineID from;
29 EngineID to;
30 EngineRenew *next;
31 GroupID group_id;
32 bool replace_when_old; ///< Do replacement only when vehicle is old.
34 EngineRenew(EngineID from = INVALID_ENGINE, EngineID to = INVALID_ENGINE) : from(from), to(to) {}
35 ~EngineRenew() {}
38 #define FOR_ALL_ENGINE_RENEWS_FROM(var, start) FOR_ALL_ITEMS_FROM(EngineRenew, enginerenew_index, var, start)
39 #define FOR_ALL_ENGINE_RENEWS(var) FOR_ALL_ENGINE_RENEWS_FROM(var, 0)
41 #endif /* AUTOREPLACE_BASE_H */