* Free all ressources loaded in memory. */
| 607 | * Free all ressources loaded in memory. |
| 608 | */ |
| 609 | void File_Uninit(void) |
| 610 | { |
| 611 | if (s_currentPakFp != NULL) fclose(s_currentPakFp); |
| 612 | s_currentPakFp = NULL; |
| 613 | s_currentPakInfo = NULL; |
| 614 | while (s_files_in_root != NULL) { |
| 615 | FileInfoLinkedElem *e = s_files_in_root; |
| 616 | s_files_in_root = e->next; |
| 617 | free(e); |
| 618 | } |
| 619 | |
| 620 | while (s_files_in_pak != NULL) { |
| 621 | PakFileInfoLinkedElem *e = s_files_in_pak; |
| 622 | s_files_in_pak = e->next; |
| 623 | free(e); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | /** |
| 628 | * Check if a file exists either in a PAK or on the disk. |