summaryrefslogtreecommitdiff
path: root/src/object_type.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-10-12 16:31:31 +0000
committerfrosch <frosch@openttd.org>2013-10-12 16:31:31 +0000
commit60f483822f07e6b3e0b680ebe9353ccefa9c2c52 (patch)
treea7828e0cc7f9defde4c0557e02ca0169461fe44b /src/object_type.h
parent35d7e8bca4e24bc211ed24d07fba62193d5f5f31 (diff)
downloadopenttd-60f483822f07e6b3e0b680ebe9353ccefa9c2c52.tar.xz
(svn r25834) -Codechange: Use NUM_OBJECTS_PER_GRF instead of NUM_OBJECTS to properly distinguish limits per NewGRF and limits of the pool.
-Change: [NewGRF] Lower the limit of object types per NewGRF from 256 to 255 to prevent usage of ID 0xFF in Action3, and thus allowing it to become an extended byte somewhen.
Diffstat (limited to 'src/object_type.h')
-rw-r--r--src/object_type.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/object_type.h b/src/object_type.h
index 7987c6481..9716b360e 100644
--- a/src/object_type.h
+++ b/src/object_type.h
@@ -21,8 +21,10 @@ static const ObjectType OBJECT_STATUE = 2; ///< Statue in towns
static const ObjectType OBJECT_OWNED_LAND = 3; ///< Owned land 'flag'
static const ObjectType OBJECT_HQ = 4; ///< HeadQuarter of a player
+static const ObjectType NUM_OBJECTS_PER_GRF = 255; ///< Number of supported objects per NewGRF; limited to 255 to allow extending Action3 with an extended byte later on.
+
static const ObjectType NEW_OBJECT_OFFSET = 5; ///< Offset for new objects
-static const ObjectType NUM_OBJECTS = 256; ///< Number of supported objects
+static const ObjectType NUM_OBJECTS = 256; ///< Number of supported objects overall
static const ObjectType INVALID_OBJECT_TYPE = 0xFFFF; ///< An invalid object
/** Unique identifier for an object. */