mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-01 06:23:35 +01:00
16 lines
310 B
C
16 lines
310 B
C
#include <gint/image.h>
|
|
#include <gint/mmu.h>
|
|
#include <stdlib.h>
|
|
|
|
void image_free(image_t *img)
|
|
{
|
|
if(!img || mmu_is_rom(img))
|
|
return;
|
|
|
|
if(img->flags & IMAGE_FLAGS_DATA_ALLOC)
|
|
free(img->data);
|
|
if(img->flags & IMAGE_FLAGS_PALETTE_ALLOC)
|
|
free(img->palette);
|
|
|
|
free(img);
|
|
}
|