summaryrefslogtreecommitdiff
path: root/src/gfxinit.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-01-14 18:30:26 +0000
committerfrosch <frosch@openttd.org>2017-01-14 18:30:26 +0000
commit7b553d255ee5a5e5be3e4c1c8a0d56504cfdc418 (patch)
tree8cb6fcf4083fcf3e98864fbb40f7e323706f90d7 /src/gfxinit.cpp
parent08b4255b677259e3e3f9039b903bd5a62a909da6 (diff)
downloadopenttd-7b553d255ee5a5e5be3e4c1c8a0d56504cfdc418.tar.xz
(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.
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r--src/gfxinit.cpp8
1 files changed, 8 insertions, 0 deletions
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;