/** @file spritecache_internal.h Internal functions to cache sprites in memory. */
#ifndef SPRITECACHE_INTERNAL_H
#define SPRITECACHE_INTERNAL_H
#include"stdafx.h"
#include"core/math_func.hpp"
#include"gfx_type.h"
#include"spriteloader/spriteloader.hpp"
#include"table/sprites.h"
/* These declarations are internal to spritecache but need to be exposed for unit-tests. */
structSpriteCache{
void*ptr;
size_tfile_pos;
SpriteFile*file;///< The file the sprite in this entry can be found in.
uint32_tid;
int16_tlru;
SpriteTypetype;///< In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
boolwarned;///< True iff the user has been warned about incorrect use of this sprite
bytecontrol_flags;///< Control flags, see SpriteCacheCtrlFlags