mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-04 07:53:34 +01:00
17 lines
310 B
C
17 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);
|
||
|
}
|