Codechange: let NewGRF make use of SpriteFile instead of most of the FIO slot functions

(cherry picked from commit 10e35ca8e4)
This commit is contained in:
Rubidium
2021-04-14 17:41:45 +02:00
committed by Jonathan G Rennison
parent 6bd12e24d7
commit eecf7c8525
4 changed files with 154 additions and 150 deletions

View File

@@ -465,7 +465,7 @@ bool FillGRFDetails(GRFConfig *config, bool is_static, Subdirectory subdir)
}
/* Find and load the Action 8 information */
LoadNewGRFFile(config, CONFIG_SLOT, GLS_FILESCAN, subdir);
LoadNewGRFFile(config, GLS_FILESCAN, subdir, true);
config->SetSuitablePalette();
config->FinalizeParameterInfo();
@@ -474,7 +474,7 @@ bool FillGRFDetails(GRFConfig *config, bool is_static, Subdirectory subdir)
if (is_static) {
/* Perform a 'safety scan' for static GRFs */
LoadNewGRFFile(config, CONFIG_SLOT, GLS_SAFETYSCAN, subdir);
LoadNewGRFFile(config, GLS_SAFETYSCAN, subdir, true);
/* GCF_UNSAFE is set if GLS_SAFETYSCAN finds unsafe actions */
if (HasBit(config->flags, GCF_UNSAFE)) return false;