| 40 | } |
| 41 | |
| 42 | SpriteCache *AllocateSpriteCache(uint index) |
| 43 | { |
| 44 | if (index >= _spritecache.size()) { |
| 45 | /* Add another 1024 items to the 'pool' */ |
| 46 | uint items = Align(index + 1, 1024); |
| 47 | |
| 48 | Debug(sprite, 4, "Increasing sprite cache to {} items ({} bytes)", items, items * sizeof(SpriteCache)); |
| 49 | |
| 50 | _spritecache.resize(items); |
| 51 | } |
| 52 | |
| 53 | return GetSpriteCache(index); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Get the cached SpriteFile given the name of the file. |