diff --git a/src/newgrf.cpp b/src/newgrf.cpp --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -66,6 +66,11 @@ /** List of all loaded GRF files */ static std::vector _grf_files; +const std::vector &GetAllGRFFiles() +{ + return _grf_files; +} + /** Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E */ byte _misc_grf_features = 0; @@ -5000,6 +5005,7 @@ static void NewSpriteGroup(ByteReader *b assert(DeterministicSpriteGroup::CanAllocateItem()); DeterministicSpriteGroup *group = new DeterministicSpriteGroup(); + group->nfo_line = _cur.nfo_line; act_group = group; group->var_scope = HasBit(type, 1) ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF; @@ -5116,6 +5122,7 @@ static void NewSpriteGroup(ByteReader *b { assert(RandomizedSpriteGroup::CanAllocateItem()); RandomizedSpriteGroup *group = new RandomizedSpriteGroup(); + group->nfo_line = _cur.nfo_line; act_group = group; group->var_scope = HasBit(type, 1) ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF; @@ -5164,6 +5171,7 @@ static void NewSpriteGroup(ByteReader *b assert(RealSpriteGroup::CanAllocateItem()); RealSpriteGroup *group = new RealSpriteGroup(); + group->nfo_line = _cur.nfo_line; act_group = group; group->num_loaded = num_loaded; @@ -5197,6 +5205,7 @@ static void NewSpriteGroup(ByteReader *b assert(TileLayoutSpriteGroup::CanAllocateItem()); TileLayoutSpriteGroup *group = new TileLayoutSpriteGroup(); + group->nfo_line = _cur.nfo_line; act_group = group; /* On error, bail out immediately. Temporary GRF data was already freed */ @@ -5212,6 +5221,7 @@ static void NewSpriteGroup(ByteReader *b assert(IndustryProductionSpriteGroup::CanAllocateItem()); IndustryProductionSpriteGroup *group = new IndustryProductionSpriteGroup(); + group->nfo_line = _cur.nfo_line; act_group = group; group->version = type; if (type == 0) {