Changeset - r20791:e90181ef6d4a
[Not reviewed]
master
0 2 0
frosch - 11 years ago 2013-10-12 16:31:55
frosch@openttd.org
(svn r25835) -Change: Increase the total number of object types from 256 to 64000.
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/object_cmd.cpp
Show inline comments
 
@@ -205,7 +205,8 @@ CommandCost CmdBuildObject(TileIndex til
 
{
 
	CommandCost cost(EXPENSES_PROPERTY);
 

	
 
	ObjectType type = (ObjectType)GB(p1, 0, 8);
 
	ObjectType type = (ObjectType)GB(p1, 0, 16);
 
	if (type >= NUM_OBJECTS) return CMD_ERROR;
 
	uint8 view = GB(p2, 0, 2);
 
	const ObjectSpec *spec = ObjectSpec::Get(type);
 
	if (!spec->IsAvailable()) return CMD_ERROR;
src/object_type.h
Show inline comments
 
@@ -24,7 +24,7 @@ static const ObjectType OBJECT_HQ       
 
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 overall
 
static const ObjectType NUM_OBJECTS         = 64000;  ///< Number of supported objects overall
 
static const ObjectType INVALID_OBJECT_TYPE = 0xFFFF; ///< An invalid object
 

	
 
/** Unique identifier for an object. */
0 comments (0 inline, 0 general)