(svn r19193) -Codechange: increase the maximum number of airport tiles to 256 and introduce AirportTileOverrideManager

This commit is contained in:
yexo
2010-02-22 14:15:48 +00:00
parent d93bfaac26
commit 966382f3d8
7 changed files with 90 additions and 19 deletions

View File

@@ -97,12 +97,33 @@ public:
void SetEntitySpec(const IndustryTileSpec *indts);
};
struct AirportTileSpec;
class AirportTileOverrideManager : public OverrideManagerBase {
protected:
virtual bool CheckValidNewID(uint16 testid) { return testid != 0xFF; }
public:
AirportTileOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
OverrideManagerBase(offset, maximum, invalid) {}
void SetEntitySpec(const AirportTileSpec *ats);
};
extern HouseOverrideManager _house_mngr;
extern IndustryOverrideManager _industry_mngr;
extern IndustryTileOverrideManager _industile_mngr;
extern AirportTileOverrideManager _airporttile_mngr;
uint32 GetTerrainType(TileIndex tile);
TileIndex GetNearbyTile(byte parameter, TileIndex tile);
uint32 GetNearbyTileInformation(TileIndex tile);
/** Data related to the handling of grf files. */
struct GRFFileProps {
uint16 subst_id;
uint16 local_id; ///< id defined by the grf file for this entity
struct SpriteGroup *spritegroup; ///< pointer to the different sprites of the entity
const struct GRFFile *grffile; ///< grf file that introduced this entity
uint16 override; ///< id of the entity been replaced by
};
#endif /* NEWGRF_COMMONS_H */