(svn r27732) -Change: Turn the message about 'missing baseset sprites' from a popup into a static message that only shows in non-release versions, just like the 'missing translations' message.

This commit is contained in:
frosch
2017-01-14 18:30:26 +00:00
parent 08b4255b67
commit 7b553d255e
68 changed files with 75 additions and 155 deletions

View File

@@ -149,6 +149,25 @@ uint GetOriginFileSlot(SpriteID sprite)
return GetSpriteCache(sprite)->file_slot;
}
/**
* Count the sprites which originate from a specific file slot in a range of SpriteIDs.
* @param file_slot FIOS file slot.
* @param begin First sprite in range.
* @param end First sprite not in range.
* @return Number of sprites.
*/
uint GetSpriteCountForSlot(uint file_slot, SpriteID begin, SpriteID end)
{
uint count = 0;
for (SpriteID i = begin; i != end; i++) {
if (SpriteExists(i)) {
SpriteCache *sc = GetSpriteCache(i);
if (sc->file_slot == file_slot) count++;
}
}
return count;
}
/**
* Get a reasonable (upper bound) estimate of the maximum
* SpriteID used in OpenTTD; there will be no sprites with