Changeset - r21498:c603a3d7e3d7
[Not reviewed]
master
0 2 0
alberth - 10 years ago 2014-05-24 19:13:34
alberth@openttd.org
(svn r26612) -Add: Method to copy newgrf parameters.
2 files changed with 13 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf_config.cpp
Show inline comments
 
@@ -108,6 +108,17 @@ GRFConfig::~GRFConfig()
 
}
 

	
 
/**
 
 * 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.
 
 * @return The name of filename of this grf.
src/newgrf_config.h
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)