forked from mirror/OpenTTD
(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:
@@ -5693,35 +5693,6 @@ static void SkipAct5(ByteReader *buf)
|
||||
grfmsg(3, "SkipAct5: Skipping %d sprites", _cur.skip_sprites);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether we are (obviously) missing some of the extra
|
||||
* (Action 0x05) sprites that we like to use.
|
||||
* When missing sprites are found a warning will be shown.
|
||||
*/
|
||||
void CheckForMissingSprites()
|
||||
{
|
||||
/* Don't break out quickly, but allow to check the other
|
||||
* sprites as well, so we can give the best information. */
|
||||
bool missing = false;
|
||||
for (uint8 i = 0; i < lengthof(_action5_types); i++) {
|
||||
const Action5Type *type = &_action5_types[i];
|
||||
if (type->block_type == A5BLOCK_INVALID) continue;
|
||||
|
||||
for (uint j = 0; j < type->max_sprites; j++) {
|
||||
if (!SpriteExists(type->sprite_base + j)) {
|
||||
DEBUG(grf, 0, "%s sprites are missing", type->name);
|
||||
missing = true;
|
||||
/* No need to log more of the same. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (missing) {
|
||||
ShowErrorMessage(IsReleasedVersion() ? STR_NEWGRF_ERROR_MISSING_SPRITES : STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE, INVALID_STRING_ID, WL_CRITICAL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a variable common to VarAction2 and Action7/9/D.
|
||||
*
|
||||
|
Reference in New Issue
Block a user