Add NewGRF object properties to set viewport map mode/smallmap tile type

This commit is contained in:
Jonathan G Rennison
2022-02-07 01:16:45 +00:00
parent 1d885c462f
commit d4f11eca42
16 changed files with 479 additions and 39 deletions

View File

@@ -45,6 +45,7 @@ enum ObjectCtrlFlags {
OBJECT_CTRL_FLAG_USE_LAND_GROUND = 1 << 0, ///< Use land for ground sprite.
OBJECT_CTRL_FLAG_EDGE_FOUNDATION = 1 << 1, ///< Use edge foundation mode.
OBJECT_CTRL_FLAG_FLOOD_RESISTANT = 1 << 2, ///< Object is flood-resistant.
OBJECT_CTRL_FLAG_VPORT_MAP_TYPE = 1 << 3, ///< Viewport map type is set.
};
DECLARE_ENUM_AS_BIT_SET(ObjectCtrlFlags)
@@ -67,6 +68,20 @@ enum ObjectClassID {
/** Allow incrementing of ObjectClassID variables */
DECLARE_POSTFIX_INCREMENT(ObjectClassID)
enum ObjectViewportMapType {
OVMT_DEFAULT = 0,
OVMT_CLEAR,
OVMT_GRASS,
OVMT_ROUGH,
OVMT_ROCKS,
OVMT_FIELDS,
OVMT_SNOW,
OVMT_DESERT,
OVMT_TREES,
OVMT_HOUSE,
OVMT_WATER,
};
/** An object that isn't use for transport, industries or houses.
* @note If you change this struct, adopt the initialization of
* default objects in table/object_land.h
@@ -92,6 +107,8 @@ struct ObjectSpec {
uint8 views; ///< The number of views.
uint8 generate_amount; ///< Number of objects which are attempted to be generated per 256^2 map during world generation.
bool enabled; ///< Is this spec enabled?
ObjectViewportMapType vport_map_type; ///< Viewport map type
uint16 vport_map_subtype; ///< Viewport map subtype
/**
* Get the cost for building a structure of this type.