bool liquid_reflection_maps_create(void) { bool ok; char err_str[256]; if (os_dialog_confirm("Build Liquid Reflection Maps","Building liquids reflection maps will replace the 6th sets of textures and save the map.\nAre you sure you want to build the liquid reflection maps?",FALSE)!=0) return(FALSE); // see if there are any liquids if (map.liquid.nliquid==0) { os_dialog_alert("Can not build liquid reflection maps","There are no liquids set to build reflection maps in this map."); return(FALSE); } if (map.liquid.nliquid>max_liquid_reflection_map_textures) { os_dialog_alert("Can not build liquid reflection maps","There are too many liquids set to build reflection maps in this map."); return(FALSE); } // generate the reflection maps progress_start("Generating Liquid Reflection Maps...",(2+map.liquid.nliquid)); ok=liquid_reflection_maps_create_process(map.liquid.nliquid,err_str); progress_end(); if (!ok) { os_dialog_alert("Can not build liquid reflection maps",err_str); return(FALSE); } file_save_map(); return(TRUE); }
static void push_file_timeline(FILELIST* flptr, const uint8 *title, size_t len, sw_tl_extent extent) { sw_tl_ref tl_ref ; HQASSERT(!stack_full(), "file timeline stack full"); CHECK_TL_VALID(tl_ref = progress_start(title, len, extent)) ; if ( tl_ref != SW_TL_REF_INVALID ) { ++maxIndex; aReadFile[maxIndex].flptr = flptr; aReadFile[maxIndex].tl_ref = tl_ref; } }