static inline void free_colormap (TFB_ColorMap *map) { if (!map) { log_add (log_Warning, "free_colormap(): tried to free a NULL map"); return; } if (poolcount < SPARE_COLORMAPS) { // return to the spare pool map->next = poolhead; poolhead = map; ++poolcount; } else { // don't need any more spares FreeNativePalette (map->palette); HFree (map); } }
static void delete_colormap (TFB_ColorMap *map) { FreeNativePalette (map->palette); HFree (map); }