diff options
author | frosch <frosch@openttd.org> | 2012-05-25 20:54:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-25 20:54:54 +0000 |
commit | b8f6b300d641e091f300db65b8f57bf28cef5974 (patch) | |
tree | 6427177cbb7d51695c2539878f8d3f47c00cebeb /src/newgrf.h | |
parent | e1617a3d109400a3037688730adacb7a07cf9df4 (diff) | |
download | openttd-b8f6b300d641e091f300db65b8f57bf28cef5974.tar.xz |
(svn r24276) -Codechange: Enhance GRFFile with constructor and destructor.
Diffstat (limited to 'src/newgrf.h')
-rw-r--r-- | src/newgrf.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf.h b/src/newgrf.h index 57ce45d1c..502699730 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -16,6 +16,7 @@ #include "rail_type.h" #include "fileio_type.h" #include "core/bitmath_func.hpp" +#include "core/alloc_type.hpp" /** * List of different canal 'features'. @@ -98,7 +99,7 @@ struct GRFLabel { }; /** Dynamic data of a loaded NewGRF */ -struct GRFFile { +struct GRFFile : ZeroedMemoryAllocator { char *filename; bool is_ottdfile; uint32 grfid; @@ -138,6 +139,9 @@ struct GRFFile { uint32 grf_features; ///< Bitset of GrfSpecFeature the grf uses PriceMultipliers price_base_multipliers; ///< Price base multipliers as set by the grf. + GRFFile(const struct GRFConfig *config); + ~GRFFile(); + /** Get GRF Parameter with range checking */ uint32 GetParam(uint number) const { |