void cleanup_angband(void) { int i; /* Free the macros */ macro_free(); /* Free the macro triggers */ macro_trigger_free(); /* Free the allocation tables */ free_obj_alloc(); FREE(alloc_ego_table); FREE(alloc_race_table); if (store) { /* Free the store inventories */ for (i = 0; i < MAX_STORES; i++) { /* Get the store */ store_type *st_ptr = &store[i]; /* Free the store inventory */ FREE(st_ptr->stock); FREE(st_ptr->table); } } /* Free the stores */ FREE(store); /* Free the player inventory */ FREE(inventory); /* Free the quest list */ FREE(q_list); /* Free the lore, monster, and object lists */ FREE(l_list); FREE(mon_list); FREE(o_list); /* Flow arrays */ FREE(cave_when); FREE(cave_cost); /* Free the cave */ FREE(cave_o_idx); FREE(cave_m_idx); FREE(cave_feat); FREE(cave_info2); FREE(cave_info); /* Free the "update_view()" array */ FREE(view_g); /* Free the temp array */ FREE(temp_g); /* Free the messages */ messages_free(); /* Free the "quarks" */ quarks_free(); /* Free the info, name, and text arrays */ free_info(&flavor_head); free_info(&g_head); free_info(&b_head); free_info(&c_head); free_info(&p_head); free_info(&h_head); free_info(&v_head); free_info(&r_head); free_info(&e_head); free_info(&a_head); free_info(&k_head); free_info(&f_head); free_info(&z_head); free_info(&s_head); /* Free the format() buffer */ vformat_kill(); /* Free the directories */ string_free(ANGBAND_DIR_APEX); string_free(ANGBAND_DIR_EDIT); string_free(ANGBAND_DIR_FILE); string_free(ANGBAND_DIR_HELP); string_free(ANGBAND_DIR_INFO); string_free(ANGBAND_DIR_SAVE); string_free(ANGBAND_DIR_PREF); string_free(ANGBAND_DIR_USER); string_free(ANGBAND_DIR_XTRA); }
void cleanup_angband(void) { int i; delete_notes_file(); /* Free the macros */ macro_free(); /* Free the macro triggers */ macro_trigger_free(); /* Free the allocation tables */ FREE(alloc_ego_table); FREE(alloc_feat_table); FREE(alloc_race_table); FREE(alloc_kind_table); if (store) { /* Free the store inventories */ for (i = 0; i < MAX_STORES; i++) { /* Get the store */ store_type *st_ptr = &store[i]; /* Free the store inventory */ FREE(st_ptr->stock); } } /* Free the stores */ FREE(store); event_remove_all_handlers(); /* free the buttons */ button_free(); /* Free the player inventory */ FREE(inventory); /*Clean the Autoinscribe*/ autoinscribe_clean(); /* Free the lore, monster, effects, and object lists */ FREE(l_list); FREE(f_l_list); FREE(a_l_list); FREE(mon_list); FREE(o_list); FREE(x_list); #ifdef MONSTER_SMELL /* Flow arrays */ FREE(cave_when); #endif /* MONSTER_SMELL */ /* Free the cave */ FREE(cave_o_idx); FREE(cave_m_idx); FREE(cave_x_idx); FREE(cave_feat); FREE(cave_info); /* Prepare monster movement array*/ FREE(mon_moment_info); /* Free the "update_view()" array */ FREE(view_g); /* Free the other "update_view()" array */ FREE(fire_g); /* Free the temp array */ FREE(temp_g); FREE(temp_y); FREE(temp_x); /* Free the dynamic features array */ FREE(dyna_g); /* Free the stacked monster messages */ FREE(mon_msg); FREE(mon_message_hist); /* Free the messages */ messages_free(); /* Free the "quarks" */ quarks_free(); /*free the randart arrays*/ free_randart_tables(); /* Free the info, name, and text arrays */ free_info(&flavor_head); free_info(&g_head); free_info(&b_head); free_info(&c_head); free_info(&p_head); free_info(&h_head); free_info(&v_head); free_info(&r_head); free_info(&e_head); free_info(&a_head); free_info(&k_head); free_info(&t_head); free_info(&f_head); free_info(&z_head); free_info(&n_head); /* Free the format() buffer */ vformat_kill(); /* Free the directories */ string_free(ANGBAND_DIR); string_free(ANGBAND_DIR_APEX); string_free(ANGBAND_DIR_BONE); string_free(ANGBAND_DIR_DATA); string_free(ANGBAND_DIR_EDIT); string_free(ANGBAND_DIR_FILE); string_free(ANGBAND_DIR_HELP); string_free(ANGBAND_DIR_INFO); string_free(ANGBAND_DIR_SAVE); string_free(ANGBAND_DIR_PREF); string_free(ANGBAND_DIR_USER); string_free(ANGBAND_DIR_XTRA); }