summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.h
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-02-22 14:15:48 +0000
committeryexo <yexo@openttd.org>2010-02-22 14:15:48 +0000
commit683ad53d21871e49bd8f6071db25e8ab1ad4485b (patch)
tree2ceff6d0297c9f2f4163d14ea0224ea9a9f68560 /src/newgrf_commons.h
parent3530156e15b6770894a6e07d065f4f771934e83a (diff)
downloadopenttd-683ad53d21871e49bd8f6071db25e8ab1ad4485b.tar.xz
(svn r19193) -Codechange: increase the maximum number of airport tiles to 256 and introduce AirportTileOverrideManager
Diffstat (limited to 'src/newgrf_commons.h')
-rw-r--r--src/newgrf_commons.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 56a16aaeb..e531c824e 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -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 */