Check if the given Sprite ID exists */
| 125 | |
| 126 | /* Check if the given Sprite ID exists */ |
| 127 | bool SpriteExists(SpriteID id) |
| 128 | { |
| 129 | if (id >= _spritecache.size()) return false; |
| 130 | |
| 131 | /* Special case for Sprite ID zero -- its position is also 0... */ |
| 132 | if (id == 0) return true; |
| 133 | return !(GetSpriteCache(id)->file_pos == 0 && GetSpriteCache(id)->file == nullptr); |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Get the sprite type of a given sprite. |
no test coverage detected