removed all exit() calls from functions compiled into shared library. palette failures result in white palettes, smooth interpolation falls back to linear instead of exiting on first/last segments, etc.

git-svn-id: https://flam3.googlecode.com/svn/trunk@35 77852712-ef1d-11de-8684-7d64432d61a3
This commit is contained in:
Erik Reckase
2010-11-18 04:16:25 +00:00
committed by Scott Draves
parent ac95d6e473
commit 26f5c53f09
4 changed files with 87 additions and 44 deletions

View File

@ -253,9 +253,11 @@ void scan_for_flame_nodes(xmlNode *cur_node, char *parent_file, int default_flag
/* Clear out the realloc'd memory */
memset(&(genome_storage[*all_ncps]),0,sizeof(flam3_genome));
if (loc_current_cp.palette_index != flam3_palette_random) {
flam3_get_palette(loc_current_cp.palette_index, loc_current_cp.palette,
if (loc_current_cp.palette_index != -1) {
col_success = flam3_get_palette(loc_current_cp.palette_index, loc_current_cp.palette,
loc_current_cp.hue_rotation);
if (col_success < 0)
fprintf(stderr,"error retrieving palette %d, setting to all white\n",loc_current_cp.palette_index);
}
col_success = flam3_interp_missing_colors(&loc_current_cp);