summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-07-31 09:35:49 +0000
committeryexo <yexo@openttd.org>2010-07-31 09:35:49 +0000
commit75c4a2d2fb4c400eb2eef6e1e1fa1bf3573c5be0 (patch)
tree62647c7494da5efbff57de09eab31dda31ecad18 /src/newgrf_config.cpp
parent897818c198944e22c0df4fb132f28a8d2b2f32bb (diff)
downloadopenttd-75c4a2d2fb4c400eb2eef6e1e1fa1bf3573c5be0.tar.xz
(svn r20251) -Add: [NewGRF] allow grfs to specify the number of valid parameters
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 74c526b93..d7769a394 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -26,7 +26,8 @@
* @param filename Set the filename of this GRFConfig to filename. The argument
* is copied so the original string isn't needed after the constructor.
*/
-GRFConfig::GRFConfig(const char *filename)
+GRFConfig::GRFConfig(const char *filename) :
+ num_valid_params(lengthof(param))
{
if (filename != NULL) this->filename = strdup(filename);
}
@@ -41,6 +42,7 @@ GRFConfig::GRFConfig(const GRFConfig &config) :
status(config.status),
grf_bugs(config.grf_bugs),
num_params(config.num_params),
+ num_valid_params(config.num_valid_params),
windows_paletted(config.windows_paletted)
{
MemCpyT<uint8>(this->original_md5sum, config.original_md5sum, lengthof(this->original_md5sum));