(svn r20604) -Feature: add a reset button to the newgrf parameters window

This commit is contained in:
yexo
2010-08-23 22:25:50 +00:00
parent da4dc61f76
commit f6f218cf6b
4 changed files with 15 additions and 2 deletions

View File

@@ -101,6 +101,9 @@ const char *GRFConfig::GetDescription() const
/** Set the default value for all parameters as specified by action14. */
void GRFConfig::SetParameterDefaults()
{
this->num_params = 0;
MemSetT<uint32>(this->param, 0, lengthof(this->param));
if (!this->has_param_defaults) return;
for (uint i = 0; i < this->param_info.Length(); i++) {