summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-07 20:51:07 +0000
committerrubidium <rubidium@openttd.org>2010-08-07 20:51:07 +0000
commitaf9d8824bd7d08fa512f34c02c238d0042d060a7 (patch)
tree170c8c3254db148d81d53cf6ee71f8a1ae169c04 /src/newgrf_commons.h
parentf5d972cadee484c55987564b0103be83854329d4 (diff)
downloadopenttd-af9d8824bd7d08fa512f34c02c238d0042d060a7.tar.xz
(svn r20398) -Codechange: move some variables of GRFFileProps into (the new) GRFFilePropsBase
Diffstat (limited to 'src/newgrf_commons.h')
-rw-r--r--src/newgrf_commons.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 7b5c6c297..0b7ee3d85 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -129,11 +129,24 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile);
uint32 GetNearbyTileInformation(TileIndex tile);
/** Data related to the handling of grf files. */
-struct GRFFileProps {
- uint16 subst_id;
+struct GRFFilePropsBase {
+ /** Set all data constructor for the props. */
+ GRFFilePropsBase(uint local_id, const struct GRFFile *grffile) : local_id(local_id), grffile(grffile) {}
+ /** Simple constructor for the props. */
+ GRFFilePropsBase() {}
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
+};
+
+/** Data related to the handling of grf files. */
+struct GRFFileProps : GRFFilePropsBase {
+ /** Set all default data constructor for the props. */
+ GRFFileProps(uint16 subst_id) :
+ GRFFilePropsBase(0, NULL), subst_id(subst_id), spritegroup(NULL), override(subst_id) {}
+ /** Simple constructor for the props. */
+ GRFFileProps() : GRFFilePropsBase() {}
+ uint16 subst_id;
+ struct SpriteGroup *spritegroup; ///< pointer to the different sprites of the entity
uint16 override; ///< id of the entity been replaced by
};