mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r11757) -Fix(r11727): Don't use a function's default parameter when the value can be (more adequately, even better) computed from another source.
Thanks peter1138.
This commit is contained in:
parent
1cd2c3d517
commit
6b37ab36ea
@ -5532,7 +5532,7 @@ static void DecodeSpecialSprite(uint num, GrfLoadingStage stage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage, bool ottd_grf)
|
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
|
||||||
{
|
{
|
||||||
const char *filename = config->filename;
|
const char *filename = config->filename;
|
||||||
uint16 num;
|
uint16 num;
|
||||||
@ -5551,7 +5551,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage, b
|
|||||||
if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename);
|
if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename);
|
||||||
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
|
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
|
||||||
if (stage == GLS_ACTIVATION && !HasBit(config->flags, GCF_RESERVED)) return;
|
if (stage == GLS_ACTIVATION && !HasBit(config->flags, GCF_RESERVED)) return;
|
||||||
_cur_grffile->is_ottdfile = ottd_grf;
|
_cur_grffile->is_ottdfile = config->IsOpenTTDBaseGRF();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_index > LAST_GRF_SLOT) {
|
if (file_index > LAST_GRF_SLOT) {
|
||||||
@ -5694,7 +5694,7 @@ void LoadNewGRF(uint load_index, uint file_index)
|
|||||||
if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
|
if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
|
||||||
|
|
||||||
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
|
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
|
||||||
LoadNewGRFFile(c, slot++, stage, true);
|
LoadNewGRFFile(c, slot++, stage);
|
||||||
if (stage == GLS_RESERVE) {
|
if (stage == GLS_RESERVE) {
|
||||||
SetBit(c->flags, GCF_RESERVED);
|
SetBit(c->flags, GCF_RESERVED);
|
||||||
} else if (stage == GLS_ACTIVATION) {
|
} else if (stage == GLS_ACTIVATION) {
|
||||||
|
@ -94,7 +94,7 @@ struct GRFLoadedFeatures {
|
|||||||
/* Indicates which are the newgrf features currently loaded ingame */
|
/* Indicates which are the newgrf features currently loaded ingame */
|
||||||
extern GRFLoadedFeatures _loaded_newgrf_features;
|
extern GRFLoadedFeatures _loaded_newgrf_features;
|
||||||
|
|
||||||
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage, bool ottd_grf = false);
|
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage);
|
||||||
void LoadNewGRF(uint load_index, uint file_index);
|
void LoadNewGRF(uint load_index, uint file_index);
|
||||||
void ReloadNewGRFData(); // in openttd.cpp
|
void ReloadNewGRFData(); // in openttd.cpp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user