(svn r26612) -Add: Method to copy newgrf parameters.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
alberth 10 years ago
parent c1e7c32f07
commit 3c9d3f5ecd

@ -107,6 +107,17 @@ GRFConfig::~GRFConfig()
for (uint i = 0; i < this->param_info.Length(); i++) delete this->param_info[i];
}
/**
* Copy the parameter information from the \a src config.
* @param src Source config.
*/
void GRFConfig::CopyParams(const GRFConfig &src)
{
this->num_params = src.num_params;
this->num_valid_params = src.num_valid_params;
MemCpyT<uint32>(this->param, src.param, lengthof(this->param));
}
/**
* Get the name of this grf. In case the name isn't known
* the filename is returned.

@ -177,6 +177,8 @@ struct GRFConfig : ZeroedMemoryAllocator {
struct GRFConfig *next; ///< NOSAVE: Next item in the linked list
void CopyParams(const GRFConfig &src);
bool IsOpenTTDBaseGRF() const;
const char *GetTextfile(TextfileType type) const;

Loading…
Cancel
Save