Merge branch 'master' into jgrpp

# Conflicts:
#	src/console_cmds.cpp
#	src/date.cpp
#	src/economy.cpp
#	src/misc.cpp
#	src/newgrf_house.cpp
This commit is contained in:
Jonathan G Rennison
2020-01-29 19:32:06 +00:00
52 changed files with 787 additions and 84 deletions

View File

@@ -196,6 +196,17 @@ uint GetOriginFileSlot(SpriteID sprite)
return GetSpriteCache(sprite)->file_slot;
}
/**
* Get the GRF-local sprite id of a given sprite.
* @param sprite The sprite to look at.
* @return The GRF-local sprite id.
*/
uint32 GetSpriteLocalID(SpriteID sprite)
{
if (!SpriteExists(sprite)) return 0;
return GetSpriteCache(sprite)->id;
}
/**
* Count the sprites which originate from a specific file slot in a range of SpriteIDs.
* @param file_slot FIOS file slot.