(svn r27730) -Change: Split openttd.grf into openttd.grf and orig_extra.grf

openttd.grf is now always loaded and provides all extra graphics in case the (possibly outdated) baseset does not.
  orig_extra.grf contains graphics specific to the original baseset only.
This commit is contained in:
frosch
2017-01-14 15:48:19 +00:00
parent ec9a920aab
commit 1aedadb49b
17 changed files with 212 additions and 113 deletions

View File

@@ -9203,8 +9203,9 @@ static void AfterLoadGRFs()
* Load all the NewGRFs.
* @param load_index The offset for the first sprite to add.
* @param file_index The Fio index of the first NewGRF to load.
* @param num_baseset Number of NewGRFs at the front of the list to look up in the baseset dir instead of the newgrf dir.
*/
void LoadNewGRF(uint load_index, uint file_index)
void LoadNewGRF(uint load_index, uint file_index, uint num_baseset)
{
/* In case of networking we need to "sync" the start values
* so all NewGRFs are loaded equally. For this we use the
@@ -9270,7 +9271,7 @@ void LoadNewGRF(uint load_index, uint file_index)
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND) continue;
if (stage > GLS_INIT && HasBit(c->flags, GCF_INIT_ONLY)) continue;
Subdirectory subdir = slot == file_index ? BASESET_DIR : NEWGRF_DIR;
Subdirectory subdir = slot < file_index + num_baseset ? BASESET_DIR : NEWGRF_DIR;
if (!FioCheckFileExists(c->filename, subdir)) {
DEBUG(grf, 0, "NewGRF file is missing '%s'; disabling", c->filename);
c->status = GCS_NOT_FOUND;