// The following variables are internal, but made global in order to simplify cleanup upon errors. string temp_name_1=""; string temp_name_2=""; pack_file pack; string[] items; bool finddata; int ques; void main() { show_game_window("Assets Assembler"); string pack_name; string encryption_key; if(file_exists("../assetassemblerdata.as")) { finddata=true; ques=question("asset assembler", "Would you like to use last saved settings? "); } if(ques==1) { file f; f.open("../assetassemblerdata.as", "rb"); string data=f.read(); f.close(); string[] sp=string_split(data, "|", true); if(sp.length()==2) { pack_name=sp[0]; encryption_key=sp[1]; search_directory(""); } } else if(ques==0||ques==2||finddata==false) { pack_name=input_box("Type the filename", "Type the filename you want your sounds get packed in. Addresses are supported"); encryption_key=input_box("Encryption Key", "Please enter the encryption key that should be used."); if(encryption_key=="") { exit(); } search_directory(""); } if(items.length==0) { alert("Error", "No files were found."); exit(); } alert("Information", "" + items.length() + " files were found. Beginning process..."); bool result=pack.create(pack_name); if(result==false) { alert("Error", "An error occured while creating assets file.\nError description: " + get_last_error_text()); exit(); } for(uint i=0;i0) lookup_path=path + "/*"; string[] search=find_directories(lookup_path); if(search.length()>0) { for(uint i=0;i0) lookup_path=path + "/*.*"; search=find_files(lookup_path); if(search.length()==0) { return; } for(uint i=0;i