HiresTextures: Remove the need to explicitly free SOIL allocated data

This commit is contained in:
Lioncash
2015-12-29 07:32:39 -05:00
parent 1d01fbd217
commit e082ebad1a
3 changed files with 29 additions and 24 deletions

View File

@ -13,6 +13,8 @@
class HiresTexture
{
public:
using SOILPointer = std::unique_ptr<u8, void(*)(unsigned char*)>;
static void Init();
static void Update();
static void Shutdown();
@ -36,9 +38,12 @@ public:
struct Level
{
u8* data;
size_t data_size;
u32 width, height;
Level();
SOILPointer data;
size_t data_size = 0;
u32 width = 0;
u32 height = 0;
};
std::vector<Level> m_levels;