OpenTTD Source  12.0-beta2
object_type.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 OBJECT_TYPE_H
11 #define OBJECT_TYPE_H
12 
14 typedef uint16 ObjectType;
15 
16 static const ObjectType OBJECT_TRANSMITTER = 0;
17 static const ObjectType OBJECT_LIGHTHOUSE = 1;
18 static const ObjectType OBJECT_STATUE = 2;
19 static const ObjectType OBJECT_OWNED_LAND = 3;
20 static const ObjectType OBJECT_HQ = 4;
21 
22 static const ObjectType NUM_OBJECTS_PER_GRF = 255;
23 
24 static const ObjectType NEW_OBJECT_OFFSET = 5;
25 static const ObjectType NUM_OBJECTS = 64000;
26 static const ObjectType INVALID_OBJECT_TYPE = 0xFFFF;
27 
29 typedef uint32 ObjectID;
30 
31 struct Object;
32 struct ObjectSpec;
33 
34 static const ObjectID INVALID_OBJECT = 0xFFFFFFFF;
35 
36 #endif /* OBJECT_TYPE_H */
ObjectSpec
Allow incrementing of ObjectClassID variables.
Definition: newgrf_object.h:58
OBJECT_STATUE
static const ObjectType OBJECT_STATUE
Statue in towns.
Definition: object_type.h:18
NUM_OBJECTS
static const ObjectType NUM_OBJECTS
Number of supported objects overall.
Definition: object_type.h:25
NUM_OBJECTS_PER_GRF
static const ObjectType NUM_OBJECTS_PER_GRF
Number of supported objects per NewGRF; limited to 255 to allow extending Action3 with an extended by...
Definition: object_type.h:22
NEW_OBJECT_OFFSET
static const ObjectType NEW_OBJECT_OFFSET
Offset for new objects.
Definition: object_type.h:24
ObjectType
uint16 ObjectType
Types of objects.
Definition: object_type.h:14
INVALID_OBJECT
static const ObjectID INVALID_OBJECT
An invalid object.
Definition: object_type.h:34
Object
An object, such as transmitter, on the map.
Definition: object_base.h:23
OBJECT_OWNED_LAND
static const ObjectType OBJECT_OWNED_LAND
Owned land 'flag'.
Definition: object_type.h:19
ObjectID
uint32 ObjectID
Unique identifier for an object.
Definition: object_type.h:29
INVALID_OBJECT_TYPE
static const ObjectType INVALID_OBJECT_TYPE
An invalid object.
Definition: object_type.h:26
OBJECT_HQ
static const ObjectType OBJECT_HQ
HeadQuarter of a player.
Definition: object_type.h:20
OBJECT_TRANSMITTER
static const ObjectType OBJECT_TRANSMITTER
The large antenna.
Definition: object_type.h:16
OBJECT_LIGHTHOUSE
static const ObjectType OBJECT_LIGHTHOUSE
The nice lighthouse.
Definition: object_type.h:17