Translations update
[openttd/fttd.git] / src / object.h
blobd0b0ab18b38c57d87351f6549da96563a281b001
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 object.h Functions related to objects. */
12 #ifndef OBJECT_H
13 #define OBJECT_H
15 #include "map/coord.h"
16 #include "map/object.h"
17 #include "company_type.h"
18 #include "object_type.h"
20 ObjectType GetObjectType(TileIndex t);
22 /**
23 * Check whether the object on a tile is of a specific type.
24 * @param t Tile to test.
25 * @param type Type to test.
26 * @pre IsObjectTile(t)
27 * @return True if type matches.
29 static inline bool IsObjectType(TileIndex t, ObjectType type)
31 return GetObjectType(t) == type;
34 /**
35 * Check whether a tile is a object tile of a specific type.
36 * @param t Tile to test.
37 * @param type Type to test.
38 * @return True if type matches.
40 static inline bool IsObjectTypeTile(TileIndex t, ObjectType type)
42 return IsObjectTile(t) && IsObjectType(t, type);
45 void UpdateCompanyHQ(TileIndex tile, uint score);
47 void BuildObject(ObjectType type, TileIndex tile, CompanyID owner = OWNER_NONE, struct Town *town = NULL, uint8 view = 0);
49 void PlaceProc_Object(TileIndex tile);
50 void ShowBuildObjectPicker(struct Window *w);
52 #endif /* OBJECT_H */