File diff r23537:f6a6d4ce4bd5 → r23538:8df50944b27a
src/newgrf.cpp
Show inline comments
 
@@ -62,13 +62,13 @@
 
 * Contains portions of documentation by TTDPatch team.
 
 * Thanks especially to Josef Drexler for the documentation as well as a lot
 
 * of help at #tycoon. Also thanks to Michael Blunck for his GRF files which
 
 * served as subject to the initial testing of this codec. */
 

	
 
/** List of all loaded GRF files */
 
static SmallVector<GRFFile *, 16> _grf_files;
 
static std::vector<GRFFile *> _grf_files;
 

	
 
/** Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E */
 
byte _misc_grf_features = 0;
 

	
 
/** 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
 
static uint32 _ttdpatch_flags[8];
 
@@ -456,13 +456,13 @@ static GRFError *DisableGrf(StringID mes
 
 */
 
struct StringIDMapping {
 
	uint32 grfid;     ///< Source NewGRF.
 
	StringID source;  ///< Source StringID (GRF local).
 
	StringID *target; ///< Destination for mapping result.
 
};
 
typedef SmallVector<StringIDMapping, 16> StringIDMappingVector;
 
typedef std::vector<StringIDMapping> StringIDMappingVector;
 
static StringIDMappingVector _string_to_grf_mapping;
 

	
 
/**
 
 * Record a static StringID for getting translated later.
 
 * @param source Source StringID (GRF local).
 
 * @param target Destination for the mapping result.
 
@@ -1898,13 +1898,13 @@ static ChangeInfoResult StationChangeInf
 
					}
 

	
 
					ReadSpriteLayoutSprite(buf, false, false, false, GSF_STATIONS, &dts->ground);
 
					/* On error, bail out immediately. Temporary GRF data was already freed */
 
					if (_cur.skip_sprites < 0) return CIR_DISABLED;
 

	
 
					static SmallVector<DrawTileSeqStruct, 8> tmp_layout;
 
					static std::vector<DrawTileSeqStruct> tmp_layout;
 
					tmp_layout.clear();
 
					for (;;) {
 
						/* no relative bounding box support */
 
						/*C++17: DrawTileSeqStruct &dtss = */ tmp_layout.emplace_back();
 
						DrawTileSeqStruct &dtss = tmp_layout.back();
 
						MemSetT(&dtss, 0);
 
@@ -4784,13 +4784,13 @@ static void NewSpriteGroup(ByteReader *b
 
				default: NOT_REACHED();
 
				case 0: group->size = DSG_SIZE_BYTE;  varsize = 1; break;
 
				case 1: group->size = DSG_SIZE_WORD;  varsize = 2; break;
 
				case 2: group->size = DSG_SIZE_DWORD; varsize = 4; break;
 
			}
 

	
 
			static SmallVector<DeterministicSpriteGroupAdjust, 16> adjusts;
 
			static std::vector<DeterministicSpriteGroupAdjust> adjusts;
 
			adjusts.clear();
 

	
 
			/* Loop through the var adjusts. Unfortunately we don't know how many we have
 
			 * from the outset, so we shall have to keep reallocing. */
 
			do {
 
				/*C++17: DeterministicSpriteGroupAdjust &adjust = */ adjusts.emplace_back();