Skip to content

Commit

Permalink
(svn r25835) -Change: Increase the total number of object types from …
Browse files Browse the repository at this point in the history
…256 to 64000.
  • Loading branch information
frosch123 committed Oct 12, 2013
1 parent 60f4838 commit ac59962
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/object_cmd.cpp
Expand Up @@ -205,7 +205,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
{
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;
Expand Down
2 changes: 1 addition & 1 deletion src/object_type.h
Expand Up @@ -24,7 +24,7 @@ static const ObjectType OBJECT_HQ = 4; ///< HeadQuarter of a play
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. */
Expand Down

0 comments on commit ac59962

Please sign in to comment.