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

@@ -168,6 +168,18 @@ static inline void SetObjectEffectiveFoundationType(TileIndex t, ObjectEffective
SB(_me[t].m6, 0, 2, foundation_type);
}
static inline bool GetObjectHasViewportMapViewOverride(TileIndex t)
{
assert_tile(IsTileType(t, MP_OBJECT), t);
return HasBit(_m[t].m4, 4);
}
static inline void SetObjectHasViewportMapViewOverride(TileIndex t, bool map_view_override)
{
assert_tile(IsTileType(t, MP_OBJECT), t);
SB(_m[t].m4, 4, 1, map_view_override ? 1 : 0);
}
/**
* Make an Object tile.
* @param t The tile to make and object tile.