From 7b553d255ee5a5e5be3e4c1c8a0d56504cfdc418 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 14 Jan 2017 18:30:26 +0000 Subject: (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. --- src/gfxinit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gfxinit.cpp') diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 23172bdd5..6dea627dd 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -230,6 +230,14 @@ static void LoadSpriteTables() LoadNewGRF(SPR_NEWGRFS_BASE, i, 2); + uint total_extra_graphics = SPR_NEWGRFS_BASE - SPR_OPENTTD_BASE; + _missing_extra_graphics = GetSpriteCountForSlot(i, SPR_OPENTTD_BASE, SPR_NEWGRFS_BASE); + DEBUG(sprite, 1, "%u extra sprites, %u from baseset, %u from fallback", total_extra_graphics, total_extra_graphics - _missing_extra_graphics, _missing_extra_graphics); + + /* The original baseset extra graphics intentionally make use of the fallback graphics. + * Let's say everything which provides less than 500 sprites misses the rest intentionally. */ + if (500 + _missing_extra_graphics > total_extra_graphics) _missing_extra_graphics = 0; + /* Free and remove the top element. */ delete extra; delete master; -- cgit v1.2.3-54-g00ecf