Import and rebase Max NewGRFs patch

Fix trailing whitespace, clean up code a bit

http://www.tt-forums.net/viewtopic.php?p=894743#p894743
This commit is contained in:
patch-import
2015-08-02 22:16:49 +01:00
committed by Jonathan G Rennison
parent 67366cf03d
commit 8f5ef2ae01
5 changed files with 32 additions and 2 deletions

View File

@@ -9299,3 +9299,16 @@ void LoadNewGRF(uint load_index, uint file_index)
_tick_counter = tick_counter;
_display_opt = display_opt;
}
/**
* Returns amount of user selected NewGRFs files.
*/
int CountSelectedGRFs(GRFConfig *grfconf)
{
int i = 0;
/* Find last entry in the list */
for (const GRFConfig *list = grfconf; list != NULL; list = list->next, i++) {
}
return i;
}