|
FS2_Open
Open source remastering of the Freespace 2 engine
|
#include <stdlib.h>#include <string.h>#include <stdio.h>#include <errno.h>#include <sstream>#include <algorithm>#include "cfile/cfile.h"#include "cfile/cfilesystem.h"#include "cmdline/cmdline.h"#include "globalincs/pstypes.h"#include "localization/localize.h"Go to the source code of this file.
Classes | |
| struct | cf_root |
| struct | cf_root_sort |
| struct | cf_root_block |
| struct | cf_file |
| struct | cf_file_block |
| struct | VP_FILE_HEADER |
| struct | VP_FILE |
Macros | |
| #define | CF_ROOTTYPE_PATH 0 |
| #define | CF_ROOTTYPE_PACK 1 |
| #define | CF_NUM_ROOTS_PER_BLOCK 32 |
| #define | CF_MAX_ROOT_BLOCKS 256 |
| #define | CF_MAX_ROOTS (CF_NUM_ROOTS_PER_BLOCK * CF_MAX_ROOT_BLOCKS) |
| #define | CF_NUM_FILES_PER_BLOCK 512 |
| #define | CF_MAX_FILE_BLOCKS 128 |
Typedefs | |
| typedef struct cf_root | cf_root |
| typedef struct cf_root_sort | cf_root_sort |
| typedef struct cf_root_block | cf_root_block |
| typedef struct cf_file | cf_file |
| typedef struct cf_file_block | cf_file_block |
| typedef struct VP_FILE_HEADER | VP_FILE_HEADER |
| typedef struct VP_FILE | VP_FILE |
Variables | |
| char * | Pilot_file_path = NULL |
| int | cfile_inited |
| int(* | Get_file_list_filter )(const char *filename) = NULL |
| const char * | Get_file_list_child = NULL |
| int | Skip_packfile_search = 0 |
| #define CF_MAX_FILE_BLOCKS 128 |
Definition at line 89 of file cfilesystem.cpp.
| #define CF_MAX_ROOT_BLOCKS 256 |
Definition at line 66 of file cfilesystem.cpp.
| #define CF_MAX_ROOTS (CF_NUM_ROOTS_PER_BLOCK * CF_MAX_ROOT_BLOCKS) |
Definition at line 67 of file cfilesystem.cpp.
| #define CF_NUM_FILES_PER_BLOCK 512 |
Definition at line 88 of file cfilesystem.cpp.
| #define CF_NUM_ROOTS_PER_BLOCK 32 |
Definition at line 65 of file cfilesystem.cpp.
| #define CF_ROOTTYPE_PACK 1 |
Definition at line 43 of file cfilesystem.cpp.
| #define CF_ROOTTYPE_PATH 0 |
Definition at line 42 of file cfilesystem.cpp.
| typedef struct cf_file_block cf_file_block |
| typedef struct cf_root_block cf_root_block |
| typedef struct cf_root_sort cf_root_sort |
| typedef struct VP_FILE_HEADER VP_FILE_HEADER |
| void cf_build_file_list | ( | ) |
Definition at line 753 of file cfilesystem.cpp.
Definition at line 234 of file cfilesystem.cpp.
| void cf_build_root_list | ( | const char * | cdrom_dir | ) |
Definition at line 364 of file cfilesystem.cpp.
| void cf_build_secondary_filelist | ( | const char * | cdrom_dir | ) |
Definition at line 772 of file cfilesystem.cpp.
| int cf_create_default_path_string | ( | char * | path, |
| uint | path_max, | ||
| int | pathtype, | ||
| const char * | filename, | ||
| bool | localize | ||
| ) |
Definition at line 2004 of file cfilesystem.cpp.
| int cf_create_default_path_string | ( | SCP_string & | path, |
| int | pathtype, | ||
| const char * | filename, | ||
| bool | localize | ||
| ) |
Definition at line 2076 of file cfilesystem.cpp.
| cf_file* cf_create_file | ( | ) |
Definition at line 109 of file cfilesystem.cpp.
| cf_root* cf_create_root | ( | ) |
Definition at line 142 of file cfilesystem.cpp.
Definition at line 1594 of file cfilesystem.cpp.
| int cf_file_already_in_list_preallocated | ( | int | num_files, |
| char | arr[][MAX_FILENAME_LEN], | ||
| const char * | filename | ||
| ) |
Definition at line 1793 of file cfilesystem.cpp.
| int cf_find_file_location | ( | const char * | filespec, |
| int | pathtype, | ||
| int | max_out, | ||
| char * | pack_filename, | ||
| int * | size, | ||
| int * | offset, | ||
| bool | localize | ||
| ) |
Searches for a file.
| filespec | Filename & extension |
| pathtype | See CF_TYPE_ defines in CFILE.H |
| max_out | Maximum string length that should be stuffed into pack_filename |
| pack_filename | OUTPUT: Absolute path and filename of this file. Could be a packfile or the actual file. |
| size | OUTPUT: File size |
| offset | OUTPUT: Offset into pack file. 0 if not a packfile. |
| localize | Undertake localization |
Definition at line 839 of file cfilesystem.cpp.
| int cf_find_file_location_ext | ( | const char * | filename, |
| const int | ext_num, | ||
| const char ** | ext_list, | ||
| int | pathtype, | ||
| int | max_out, | ||
| char * | pack_filename, | ||
| int * | size, | ||
| int * | offset, | ||
| bool | localize | ||
| ) |
Searches for a file.
| filename | Filename & extension |
| ext_num | Number of extensions to look for |
| ext_list | Extension filter list |
| pathtype | See CF_TYPE_ defines in CFILE.H |
| max_out | Maximum string length that should be stuffed into pack_filename |
| pack_filename | OUTPUT: Absolute path and filename of this file. Could be a packfile or the actual file. |
| size | OUTPUT: File size |
| offset | OUTPUT: Offset into pack file. 0 if not a packfile. |
| localize | Undertake localization |
Definition at line 1050 of file cfilesystem.cpp.
| void cf_free_secondary_filelist | ( | ) |
Definition at line 801 of file cfilesystem.cpp.
Definition at line 100 of file cfilesystem.cpp.
| int cf_get_file_list | ( | SCP_vector< SCP_string > & | list, |
| int | pathtype, | ||
| const char * | filter, | ||
| int | sort, | ||
| SCP_vector< file_list_info > * | info | ||
| ) |
Definition at line 1417 of file cfilesystem.cpp.
| int cf_get_file_list | ( | int | max, |
| char ** | list, | ||
| int | pathtype, | ||
| const char * | filter, | ||
| int | sort, | ||
| file_list_info * | info | ||
| ) |
Definition at line 1618 of file cfilesystem.cpp.
| int cf_get_file_list_preallocated | ( | int | max, |
| char | arr[][MAX_FILENAME_LEN], | ||
| char ** | list, | ||
| int | pathtype, | ||
| const char * | filter, | ||
| int | sort, | ||
| file_list_info * | info | ||
| ) |
Definition at line 1817 of file cfilesystem.cpp.
Definition at line 158 of file cfilesystem.cpp.
Definition at line 129 of file cfilesystem.cpp.
| int cf_matches_spec | ( | const char * | filespec, |
| const char * | filename | ||
| ) |
Definition at line 1324 of file cfilesystem.cpp.
| bool cf_packfile_sort_func | ( | const cf_root_sort & | r1, |
| const cf_root_sort & | r2 | ||
| ) |
Definition at line 222 of file cfilesystem.cpp.
Definition at line 645 of file cfilesystem.cpp.
Definition at line 514 of file cfilesystem.cpp.
| void cfile_spew_pack_file_crcs | ( | ) |
Definition at line 2128 of file cfilesystem.cpp.
| int is_ext_in_list | ( | const char * | ext_list, |
| const char * | ext | ||
| ) |
Definition at line 501 of file cfilesystem.cpp.
| char* stristr | ( | char * | str, |
| const char * | substr | ||
| ) |
Definition at line 3729 of file parselo.cpp.
| const char* Get_file_list_child = NULL |
Definition at line 1361 of file cfilesystem.cpp.
Definition at line 1360 of file cfilesystem.cpp.
| char* Pilot_file_path = NULL |
Definition at line 46 of file cfilesystem.cpp.
| int Skip_packfile_search = 0 |
Definition at line 1362 of file cfilesystem.cpp.