![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Data Structures | |
| struct | fssearch_t |
| struct | gamedir_t |
| struct | vfs_t |
Macros | |
| #define | FS_FILETYPE_DIRECTORY 2 |
| #define | FS_FILETYPE_FILE 1 |
| #define | FS_FILETYPE_NONE 0 |
| #define | MAX_GAMEDIRS 17 |
Typedefs | |
| typedef int64_t | fs_offset_t |
Enumerations | |
| enum | addgamedirs_t { GAMEDIRS_ALLGOOD = -1 , GAMEDIRS_FAILURE = 0 , GAMEDIRS_SUCCESS = 1 } |
Functions | |
| qbool | FS_AddPack (const char *pakfile, qbool *already_loaded, qbool keep_plain_dirs, qbool dlcache) |
| qbool | FS_ChangeGameDirs (int numgamedirs, const char *gamedirs[], qbool failmissing) |
| const char * | FS_CheckGameDir (const char *gamedir) |
| int | FS_CheckNastyPath (const char *path, qbool isgamedir) |
| int | FS_Close (qfile_t *file) |
| int | FS_CRCFile (const char *filename, size_t *filesizepointer) |
| void | FS_CreatePath (char *path) |
| void | FS_DefaultExtension (char *path, const char *extension, size_t size_path) |
| unsigned char * | FS_Deflate (const unsigned char *data, size_t size, size_t *deflated_size, int level, mempool_t *mempool) |
| const char * | FS_FileExists (const char *filename) |
| Look for a file in the packages and in the filesystem Returns its canonical name (same case as used in the pack) if found, else NULL. | |
| const char * | FS_FileExtension (const char *in) |
| qfile_t * | FS_FileFromData (const unsigned char *data, const size_t size, qbool quiet) |
| fs_offset_t | FS_FileSize (qfile_t *file) |
| int | FS_FileType (const char *filename) |
| Look for a file in the packages and in the filesystem. | |
| const char * | FS_FileWithoutPath (const char *in) |
| void | FS_FreeSearch (fssearch_t *search) |
| int | FS_Getc (qfile_t *file) |
| qbool | FS_HasZlib (void) |
| unsigned char * | FS_Inflate (const unsigned char *data, size_t size, size_t *inflated_size, mempool_t *mempool) |
| void | FS_Init (void) |
| void | FS_Init_Commands (void) |
| void | FS_Init_SelfPack (void) |
| qbool | FS_IsRegisteredQuakePack (const char *name) |
| unsigned char * | FS_LoadFile (const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer) |
| qfile_t * | FS_OpenRealFile (const char *filepath, const char *mode, qbool quiet) |
| qfile_t * | FS_OpenVirtualFile (const char *filepath, qbool quiet) |
| int | FS_Print (qfile_t *file, const char *msg) |
| int | FS_Printf (qfile_t *file, const char *format,...) DP_FUNC_PRINTF(2) |
| void | FS_Purge (qfile_t *file) |
| fs_offset_t | FS_Read (qfile_t *file, void *buffer, size_t buffersize) |
| void | FS_RemoveOnClose (qfile_t *file) |
| void | FS_Rescan (void) |
| void | FS_SanitizePath (char *path) |
| fssearch_t * | FS_Search (const char *pattern, int caseinsensitive, int quiet, const char *packfile) |
| int | FS_Seek (qfile_t *file, fs_offset_t offset, int whence) |
| addgamedirs_t | FS_SetGameDirs (int numgamedirs, const char *gamedirs[], qbool failmissing, qbool abortonfail) |
| void | FS_Shutdown (void) |
| void | FS_StripExtension (const char *in, char *out, size_t size_out) |
| qbool | FS_SysFileExists (const char *filename) |
| Look for a file in the filesystem only. | |
| int | FS_SysFileType (const char *filename) |
| Look for a file in the filesystem only. | |
| unsigned char * | FS_SysLoadFile (const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer) |
| qfile_t * | FS_SysOpen (const char *filepath, const char *mode, qbool nonblocking) |
| int | FS_SysOpenFD (const char *filepath, const char *mode, qbool nonblocking) |
| fs_offset_t | FS_Tell (qfile_t *file) |
| int | FS_UnGetc (qfile_t *file, unsigned char c) |
| void | FS_UnloadPacks_dlcache (void) |
| int | FS_VPrintf (qfile_t *file, const char *format, va_list ap) |
| const char * | FS_WhichPack (const char *filename) |
| fs_offset_t | FS_Write (qfile_t *file, const void *data, size_t datasize) |
| qbool | FS_WriteFile (const char *filename, const void *data, fs_offset_t len) |
| qbool | FS_WriteFileInBlocks (const char *filename, const void *const *data, const fs_offset_t *len, size_t count) |
Variables | |
| gamedir_t * | fs_all_gamedirs |
| int | fs_all_gamedirs_count |
| char | fs_basedir [MAX_OSPATH] |
| const char *const | fs_checkgamedir_missing |
| char | fs_gamedir [MAX_OSPATH] |
| char | fs_gamedirs [MAX_GAMEDIRS][MAX_QPATH] |
| int | fs_numgamedirs |
| char | fs_userdir [MAX_OSPATH] |
| #define FS_FILETYPE_DIRECTORY 2 |
Definition at line 139 of file fs.h.
Referenced by Con_CompleteCommandLine(), and FS_SysFileType().
| #define FS_FILETYPE_FILE 1 |
Definition at line 138 of file fs.h.
Referenced by Con_CompleteCommandLine(), FS_FileType(), and FS_SysFileType().
| #define FS_FILETYPE_NONE 0 |
Definition at line 137 of file fs.h.
Referenced by FS_FileType(), FS_SysFileExists(), and FS_SysFileType().
| #define MAX_GAMEDIRS 17 |
Definition at line 46 of file fs.h.
Referenced by FS_GameDir_f(), FS_Init_Dir(), and FS_SetGameDirs().
| typedef int64_t fs_offset_t |
| enum addgamedirs_t |
| Enumerator | |
|---|---|
| GAMEDIRS_ALLGOOD | |
| GAMEDIRS_FAILURE | |
| GAMEDIRS_SUCCESS | |
Definition at line 102 of file fs.h.
| qbool FS_AddPack | ( | const char * | pakfile, |
| qbool * | already_loaded, | ||
| qbool | keep_plain_dirs, | ||
| qbool | dlcache ) |
Adds the given pack to the search path and searches for it in the game path. The pack type is autodetected by the file extension.
Returns true if the file was successfully added to the search path or if it was already included.
If keep_plain_dirs is set, the pack will be added AFTER the first sequence of plain directories.
Definition at line 1309 of file fs.c.
References Con_Printf(), dpsnprintf(), searchpath_t::filename, FS_AddPack_Fullpath(), FS_FindFile(), index, MAX_OSPATH, NULL, and searchpath_t::pack.
Referenced by Curl_Begin(), and Curl_EndDownload().
Definition at line 1719 of file fs.c.
References Cbuf_InsertText(), CL_Disconnect(), cls, cmd_local, COM_ChangeGameTypeForGameDirs(), CONFIGFILENAME, FS_Rescan(), GAMEDIRS_ALLGOOD, GAMEDIRS_FAILURE, Host_SaveConfig(), and S_UnloadAllSounds_f().
Referenced by CL_ParseServerInfo(), FS_GameDir_f(), and ModList_Enable().
| const char * FS_CheckGameDir | ( | const char * | gamedir | ) |
Definition at line 1824 of file fs.c.
References buf, fs_basedir, fs_checkgamedir_missing, FS_CheckNastyPath(), FS_SysCheckGameDir(), fs_userdir, NULL, ret, and va().
Referenced by FS_ListGameDirs(), FS_SetGameDirs(), and ModList_RebuildList().
Definition at line 2619 of file fs.c.
References strlen().
Referenced by CL_DownloadBegin_f(), FS_CheckGameDir(), FS_OpenReadFile(), FS_OpenRealFile(), FS_OpenVirtualFile(), SV_Download_f(), and VM_loadfromfile().
| int FS_Close | ( | qfile_t * | file | ) |
Definition at line 2971 of file fs.c.
References FILEDESC_CLOSE, Mem_Free, QFILE_FLAG_DATA, QFILE_FLAG_REMOVE, and remove().
Referenced by CL_CutDemo(), CL_Locs_Save_f(), CL_Stop_f(), CL_StopPlayback(), Con_ConDump_f(), Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), Crypto_LoadFile(), Crypto_SavePubKeyTextFile(), Curl_Begin(), Curl_EndDownload(), FS_LoadAndCloseQFile(), FS_OpenReadFile(), FS_SysCheckGameDir(), FS_WriteFileInBlocks(), GetMapList(), Host_SaveConfig(), Host_UnlockSession(), hz_bitstream_read_close(), jam_close(), JPEG_SaveImage_preflipped(), Key_History_Init(), Key_History_Shutdown(), libavw_close(), Log_Close(), Log_Printf(), M_ScanSaves(), PNG_SaveImage_preflipped(), PRVM_Prog_Load(), QW_CL_CheckOrDownloadFile(), R_GLSL_DumpShader_f(), SCR_CaptureVideo_Avi_EndVideo(), SCR_CaptureVideo_Ogg_EndVideo(), SV_Download_f(), SV_DropClient(), SV_ReadClientMessage(), SV_Savegame_to(), SV_StopDemoRecording(), VM_buf_loadfile(), VM_fclose(), VM_Files_CloseAll(), W_LoadTextureWadFile(), and W_UnloadAll().
| int FS_CRCFile | ( | const char * | filename, |
| size_t * | filesizepointer ) |
Definition at line 4159 of file fs.c.
References CRC_Block(), FS_LoadFile(), Mem_Free, and tempmempool.
Referenced by CL_BeginDownloads(), CL_StopDownload(), and QW_CL_RequestNextDownload().
| void FS_CreatePath | ( | char * | path | ) |
Definition at line 1028 of file fs.c.
References FS_mkdir(), and ofs.
Referenced by Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), FS_OpenRealFile(), and Host_LockSession().
| void FS_DefaultExtension | ( | char * | path, |
| const char * | extension, | ||
| size_t | size_path ) |
Definition at line 3642 of file fs.c.
References dp_strlcat, src, and strlen().
Referenced by CL_PlayDemo(), CL_Record_f(), R_LoadTextureDDSFile(), SV_Loadgame_f(), SV_Savegame_f(), and SV_StartDemoRecording().
| unsigned char * FS_Deflate | ( | const unsigned char * | data, |
| size_t | size, | ||
| size_t * | deflated_size, | ||
| int | level, | ||
| mempool_t * | mempool ) |
Definition at line 4179 of file fs.c.
References z_stream::avail_in, z_stream::avail_out, Con_Printf(), data, int(), level, MAX_WBITS, Mem_Alloc, Mem_Free, z_stream::next_in, z_stream::next_out, NULL, z_stream::opaque, qz_deflateInit2, size, tempmempool, z_stream::total_out, Z_BINARY, Z_DEFAULT_COMPRESSION, Z_DEFLATED, Z_FINISH, Z_MEMLEVEL_DEFAULT, Z_NULL, Z_OK, Z_STREAM_END, z_stream::zalloc, z_stream::zfree, and zlib_dll.
Referenced by SV_Prepare_CSQC().
| const char * FS_FileExists | ( | const char * | filename | ) |
Look for a file in the packages and in the filesystem Returns its canonical name (same case as used in the pack) if found, else NULL.
If the file is found outside a pak, this will be the same pointer as passed in.
Definition at line 3694 of file fs.c.
References FS_FindFile(), and NULL.
Referenced by CDAudio_Play_byName(), CL_BeginDownloads(), CL_SetupWorldModel(), CL_StopDownload(), Curl_Begin(), Curl_Curl_f(), Font_LoadFont(), FS_Rescan(), Host_AddConfigText(), loadimagepixelsbgra(), M_Menu_Main_f(), MR_SetRouting(), SV_Download_f(), and SV_SpawnServer().
| const char * FS_FileExtension | ( | const char * | in | ) |
Definition at line 1403 of file fs.c.
References NULL.
Referenced by CL_PlayVideo_f(), CL_StopDownload(), FS_AddGameDirectory(), FS_AddPack_Fullpath(), Image_StripImageExtension(), Mod_LoadModel(), SCR_ScreenShot_f(), and SV_Download_f().
| qfile_t * FS_FileFromData | ( | const unsigned char * | data, |
| const size_t | size, | ||
| qbool | quiet ) |
Definition at line 2952 of file fs.c.
References data, fs_mempool, Mem_Alloc, QFILE_FLAG_DATA, and size.
Referenced by SV_Download_f().
| fs_offset_t FS_FileSize | ( | qfile_t * | file | ) |
Definition at line 3475 of file fs.c.
Referenced by LibAvW_FS_SeekSize(), SV_Download_f(), and SV_ReadClientMessage().
| int FS_FileType | ( | const char * | filename | ) |
Look for a file in the packages and in the filesystem.
Definition at line 3668 of file fs.c.
References dpsnprintf(), searchpath_t::filename, FS_FILETYPE_FILE, FS_FILETYPE_NONE, FS_FindFile(), FS_SysFileType(), MAX_OSPATH, NULL, searchpath_t::pack, and pack_t::vpack.
Referenced by Con_CompleteCommandLine().
| const char * FS_FileWithoutPath | ( | const char * | in | ) |
Definition at line 1431 of file fs.c.
Referenced by COM_InitGameType(), and FS_IsRegisteredQuakePack().
| void FS_FreeSearch | ( | fssearch_t * | search | ) |
Definition at line 3964 of file fs.c.
References Z_Free.
Referenced by Cmd_Exec_f(), Con_CompleteCommandLine(), FS_ListDirectory(), GetMapList(), Image_FixTransparentPixels_f(), Mod_LoadQ3Shaders(), VM_search_end(), and VM_Search_Reset().
| int FS_Getc | ( | qfile_t * | file | ) |
Definition at line 3324 of file fs.c.
References FS_Read().
Referenced by CL_PlayDemo(), Key_History_Init(), VM_buf_loadfile(), and VM_fgets().
Definition at line 620 of file fs.c.
References PK3_OpenLibrary(), and zlib_dll.
Referenced by CL_BeginDownloads().
| unsigned char * FS_Inflate | ( | const unsigned char * | data, |
| size_t | size, | ||
| size_t * | inflated_size, | ||
| mempool_t * | mempool ) |
Definition at line 4274 of file fs.c.
References AssertBufsize(), z_stream::avail_in, z_stream::avail_out, Con_Print(), Con_Printf(), sizebuf_t::cursize, data, sizebuf_t::data, int(), max, MAX_WBITS, sizebuf_t::maxsize, Mem_Alloc, Mem_Free, z_stream::next_in, z_stream::next_out, NULL, z_stream::opaque, qz_inflateInit2, ret, size, SZ_Write(), tempmempool, z_stream::total_in, Z_BUF_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Z_NO_FLUSH, Z_NULL, Z_OK, Z_STREAM_END, Z_STREAM_ERROR, z_stream::zalloc, z_stream::zfree, and zlib_dll.
Referenced by CL_StopDownload().
Definition at line 2342 of file fs.c.
References COM_InitGameType(), FS_Init_Commands(), FS_Init_Dir(), FS_Init_SelfPack(), fs_mempool, Mem_AllocPool, NULL, and PK3_OpenLibrary().
Referenced by Host_Init().
Definition at line 2117 of file fs.c.
References CF_SHARED, Cmd_AddCommand(), com_startupgamegroup, cvar_fs_gamedir, Cvar_RegisterVariable(), FS_Dir_f(), fs_empty_files_in_pack_mark_deletions, FS_GameDir_f(), FS_Ls_f(), FS_Path_f(), FS_Rescan_f(), fs_unload_dlcache, FS_Which_f(), GAME_NORMAL, scr_screenshot_name, and Sys_EM_Register_Commands().
Referenced by FS_Init().
Definition at line 2299 of file fs.c.
References buf, COM_InsertFlags(), FS_AddSelfPack(), FS_LoadFile(), FS_LoadPackPK3FromFD(), fs_selfpack, FS_SysLoadFile(), Mem_Free, NULL, sys, Sys_CheckParm(), and tempmempool.
Referenced by FS_Init().
| qbool FS_IsRegisteredQuakePack | ( | const char * | name | ) |
Definition at line 4113 of file fs.c.
References searchpath_t::filename, pack_t::files, FS_FileWithoutPath(), fs_searchpaths, pack_t::ignorecase, int(), name, packfile_t::name, searchpath_t::next, pack_t::numfiles, searchpath_t::pack, right, and pack_t::vpack.
Referenced by SV_Download_f().
| unsigned char * FS_LoadFile | ( | const char * | path, |
| mempool_t * | pool, | ||
| qbool | quiet, | ||
| fs_offset_t * | filesizepointer ) |
Definition at line 3541 of file fs.c.
References FS_LoadAndCloseQFile(), and FS_OpenVirtualFile().
Referenced by CL_CutDemo(), CL_IPLog_Load(), CL_Locs_Reload_f(), CL_Particles_LoadEffectInfo(), CL_ReadPointFile_f(), CL_VM_Init(), Cmd_Exec(), Curl_FindPackURL(), decode_image(), fontfilecache_LoadFile(), FS_CRCFile(), FS_Init_SelfPack(), GetMapList(), gl_main_newmap(), Image_GetStockPicSize(), LoadFont(), loadimagepixelsbgra(), LoadSubtitles(), M_Setup_Draw(), Mod_LoadModel(), Mod_LoadQ3Shaders(), Mod_LoadSkinFiles(), Mod_PSKMODEL_Load(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q2BSP_LoadTexinfo(), OGG_LoadVorbisFile(), Palette_Load(), Palette_LoadQ2Colormap(), Palette_SetupSpecialPalettes(), PRVM_LoadLNO(), PRVM_PO_Load(), PRVM_Prog_Load(), R_InitParticleTexture(), R_LoadQWSkin(), R_LoadTextureDDSFile(), R_Shadow_LoadLightsFile(), R_Shadow_LoadWorldLights(), R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(), S_LoadWavFile(), ShaderModeInfo_GetShaderText(), SV_Loadgame_f(), SV_ParticleEffectIndex(), SV_Prepare_CSQC(), SV_SpawnServer(), VM_loadfromfile(), W_GetLumpName(), and XMP_LoadModFile().
| qfile_t * FS_OpenRealFile | ( | const char * | filepath, |
| const char * | mode, | ||
| qbool | quiet ) |
Definition at line 2902 of file fs.c.
References Con_Printf(), dpsnprintf(), FS_CheckNastyPath(), FS_CreatePath(), fs_gamedir, FS_SysOpen(), MAX_OSPATH, mode, and NULL.
Referenced by CheckPendingDownloads(), CL_CutDemo(), CL_Locs_Save_f(), CL_ParseServerInfo(), CL_Record_f(), Con_ConDump_f(), Curl_Begin(), Curl_EndDownload(), FS_WriteFileInBlocks(), Host_SaveConfig(), JPEG_SaveImage_preflipped(), Key_History_Init(), Key_History_Shutdown(), Log_Open(), Log_Printf(), M_ScanSaves(), PNG_SaveImage_preflipped(), PRVM_Prog_Load(), R_GLSL_DumpShader_f(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_CaptureVideo_Ogg_BeginVideo(), SV_Savegame_to(), SV_StartDemoRecording(), and VM_fopen().
| qfile_t * FS_OpenVirtualFile | ( | const char * | filepath, |
| qbool | quiet ) |
Definition at line 2929 of file fs.c.
References Con_Printf(), FS_CheckNastyPath(), fs_mutex, FS_OpenReadFile(), NULL, Thread_LockMutex, and Thread_UnlockMutex.
Referenced by CL_PlayDemo(), FS_LoadFile(), GetMapList(), hz_bitstream_read_open(), jam_open(), LibAvW_OpenVideo(), QW_CL_CheckOrDownloadFile(), SV_Download_f(), VM_buf_loadfile(), VM_fopen(), and W_LoadTextureWadFile().
| int FS_Print | ( | qfile_t * | file, |
| const char * | msg ) |
Definition at line 3262 of file fs.c.
References FS_Write(), and strlen().
Referenced by Log_Close(), Log_ConPrint(), Log_Open(), PRVM_ED_Write(), PRVM_ED_WriteGlobals(), R_GLSL_DumpShader_f(), and SV_Savegame_to().
| int FS_Printf | ( | qfile_t * | file, |
| const char * | format, | ||
| ... ) |
Definition at line 3274 of file fs.c.
References format, and FS_VPrintf().
Referenced by CL_CutDemo(), CL_Locs_Save_f(), CL_ParseServerInfo(), CL_Record_f(), Crypto_SavePubKeyTextFile(), Cvar_WriteVariables(), Key_History_Shutdown(), Key_WriteBindings(), PRVM_ED_Write(), PRVM_ED_WriteGlobals(), PRVM_Prog_Load(), SV_Savegame_to(), and SV_StartDemoRecording().
| void FS_Purge | ( | qfile_t * | file | ) |
Definition at line 3488 of file fs.c.
Referenced by FS_Read(), FS_Seek(), and FS_Write().
| fs_offset_t FS_Read | ( | qfile_t * | file, |
| void * | buffer, | ||
| size_t | buffersize ) |
Definition at line 3067 of file fs.c.
References z_stream::avail_in, z_stream::avail_out, buffer, ztoolkit_t::comp_length, Con_Printf(), count, error(), FILEDESC_READ, FILEDESC_SEEK, FS_Purge(), ztoolkit_t::in_ind, ztoolkit_t::in_len, ztoolkit_t::in_position, ztoolkit_t::input, int(), z_stream::next_in, z_stream::next_out, QFILE_FLAG_DATA, QFILE_FLAG_DEFLATED, Z_OK, Z_STREAM_END, Z_SYNC_FLUSH, and ztoolkit_t::zstream.
Referenced by CL_ReadDemoMessage(), Crypto_LoadFile(), Curl_Begin(), FS_Getc(), FS_LoadAndCloseQFile(), FS_OpenReadFile(), FS_Seek(), FS_SysCheckGameDir(), GetMapList(), hz_bitstream_read_blocks_read(), jam_open(), jam_video(), LibAvW_FS_Read(), M_ScanSaves(), SV_ReadClientMessage(), SV_SendClientDatagram(), W_GetTextureBGRA(), and W_LoadTextureWadFile().
| void FS_RemoveOnClose | ( | qfile_t * | file | ) |
Definition at line 3008 of file fs.c.
References QFILE_FLAG_REMOVE.
Referenced by CL_Stop_f(), and SV_StopDemoRecording().
Definition at line 1538 of file fs.c.
References ca_dedicated, cls, com_modname, Con_Print(), cvar_fs_gamedir, Cvar_SetQuick(), Cvar_SetValueQuick(), dp_strlcat, dp_strlcpy, FS_AddGameHierarchy(), FS_AddSelfPack(), FS_ClearSearchPath(), FS_FileExists(), fs_gamedir, fs_gamedirs, FS_ListGameDirs(), fs_numgamedirs, GAME_HIPNOTIC, GAME_NORMAL, GAME_ROGUE, GAME_STEELSTORM, gamedirname1, gamedirname2, gamemode, gamescreenshotname, MAX_INPUTLINE, registered, scr_screenshot_name, sys, Sys_CheckParm(), va(), and W_UnloadAll().
Referenced by CL_StopDownload(), FS_ChangeGameDirs(), FS_Init_Dir(), and FS_Rescan_f().
| void FS_SanitizePath | ( | char * | path | ) |
Definition at line 2674 of file fs.c.
Referenced by loadimagepixelsbgra().
| fssearch_t * FS_Search | ( | const char * | pattern, |
| int | caseinsensitive, | ||
| int | quiet, | ||
| const char * | packfile ) |
Definition at line 3757 of file fs.c.
References Con_Printf(), developer_loading, dp_strlcat, dp_strlcpy, dp_ustr2stp(), pack_t::filename, searchpath_t::filename, fssearch_t::filenames, fssearch_t::filenamesbuffer, pack_t::files, fs_searchpaths, int(), listdirectory(), matchpattern(), max, MAX_OSPATH, Mem_Alloc, Mem_Free, packfile_t::name, searchpath_t::next, NULL, fssearch_t::numfilenames, pack_t::numfiles, stringlist_t::numstrings, searchpath_t::pack, pack_t::shortname, stringlistappend(), stringlistfreecontents(), stringlistinit(), stringlistsort(), stringlist_t::strings, strlen(), tempmempool, pack_t::vpack, and Z_Malloc.
Referenced by Cmd_Exec_f(), Con_CompleteCommandLine(), FS_ListDirectory(), GetMapList(), Image_FixTransparentPixels_f(), Mod_LoadQ3Shaders(), and VM_search_begin().
| int FS_Seek | ( | qfile_t * | file, |
| fs_offset_t | offset, | ||
| int | whence ) |
Definition at line 3360 of file fs.c.
References z_stream::avail_in, buffer, Con_Printf(), count, FILEDESC_SEEK, FS_Purge(), FS_Read(), ztoolkit_t::in_ind, ztoolkit_t::in_len, ztoolkit_t::in_position, ztoolkit_t::input, Mem_Alloc, Mem_Free, z_stream::next_in, offset, position, QFILE_FLAG_DATA, QFILE_FLAG_DEFLATED, tempmempool, and ztoolkit_t::zstream.
Referenced by CheckPendingDownloads(), CL_ReadDemoMessage(), GetMapList(), LibAvW_FS_Seek(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_CaptureVideo_Avi_EndVideo(), SCR_CaptureVideo_RIFF_Finish(), SCR_CaptureVideo_RIFF_MakeIxChunk(), SCR_CaptureVideo_RIFF_Pop(), SV_ReadClientMessage(), W_GetTextureBGRA(), and W_LoadTextureWadFile().
| addgamedirs_t FS_SetGameDirs | ( | int | numgamedirs, |
| const char * | gamedirs[], | ||
| qbool | failmissing, | ||
| qbool | abortonfail ) |
Definition at line 1633 of file fs.c.
References CON_ERROR, Con_Printf(), CON_WARN, dp_strlcpy, FS_CheckGameDir(), fs_checkgamedir_missing, fs_gamedirs, fs_numgamedirs, gamedirname1, gamedirname2, GAMEDIRS_ALLGOOD, GAMEDIRS_FAILURE, GAMEDIRS_SUCCESS, MAX_GAMEDIRS, and Sys_Error().
Referenced by COM_ChangeGameTypeForGameDirs().
Definition at line 2364 of file fs.c.
References FS_ClearSearchPath(), fs_mempool, fs_mutex, Mem_FreePool, PK3_CloseLibrary(), Sys_FreeLibrary(), and Thread_DestroyMutex.
| void FS_StripExtension | ( | const char * | in, |
| char * | out, | ||
| size_t | size_out ) |
Definition at line 3612 of file fs.c.
References NULL.
Referenced by CL_ParseServerInfo(), CL_SetupWorldModel(), COM_InitGameType(), dpvsimpledecode_open(), Image_StripImageExtension(), jam_open(), LibAvW_OpenVideo(), Mod_Decompile_f(), Mod_PSKMODEL_Load(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_LoadTextures(), Mod_Q3BSP_LoadLightmaps(), PRVM_LoadLNO(), R_LoadTextureDDSFile(), and SV_SpawnServer().
| qbool FS_SysFileExists | ( | const char * | filename | ) |
Look for a file in the filesystem only.
Definition at line 3745 of file fs.c.
References FS_FILETYPE_NONE, and FS_SysFileType().
Referenced by FS_FindFile(), SCR_ScreenShot_f(), and Sys_FindInPATH().
| int FS_SysFileType | ( | const char * | filename | ) |
Look for a file in the filesystem only.
Definition at line 3709 of file fs.c.
References buf, FS_FILETYPE_DIRECTORY, FS_FILETYPE_FILE, FS_FILETYPE_NONE, S_ISDIR, WIDE, and WPATHDEF.
Referenced by FS_FileType(), and FS_SysFileExists().
| unsigned char * FS_SysLoadFile | ( | const char * | path, |
| mempool_t * | pool, | ||
| qbool | quiet, | ||
| fs_offset_t * | filesizepointer ) |
Definition at line 3556 of file fs.c.
References FS_LoadAndCloseQFile(), and FS_SysOpen().
Referenced by FS_Init_SelfPack(), and listdirectory().
| qfile_t * FS_SysOpen | ( | const char * | filepath, |
| const char * | mode, | ||
| qbool | nonblocking ) |
Definition at line 2484 of file fs.c.
References FILEDESC_ISVALID, FILEDESC_SEEK, fs_mempool, FS_SysOpenFiledesc(), Mem_Alloc, Mem_Free, Mem_strdup, mode, and NULL.
Referenced by Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), Crypto_LoadFile(), Crypto_SavePubKeyTextFile(), FS_OpenReadFile(), FS_OpenRealFile(), FS_SysCheckGameDir(), FS_SysLoadFile(), and Host_LockSession().
Definition at line 2468 of file fs.c.
References FS_SysOpenFiledesc(), and mode.
Referenced by Sys_ProvideSelfFD().
| fs_offset_t FS_Tell | ( | qfile_t * | file | ) |
Definition at line 3462 of file fs.c.
Referenced by CheckPendingDownloads(), SCR_CaptureVideo_RIFF_IndexEntry(), and SV_SendClientDatagram().
| int FS_UnGetc | ( | qfile_t * | file, |
| unsigned char | c ) |
Definition at line 3342 of file fs.c.
Referenced by VM_buf_loadfile(), and VM_fgets().
Definition at line 1485 of file fs.c.
References Con_DPrintf(), pack_t::dlcache, FILEDESC_CLOSE, pack_t::files, fs_searchpaths, fs_unload_dlcache, pack_t::handle, Mem_Free, searchpath_t::next, searchpath_t::pack, and pack_t::shortname.
Referenced by CL_DisconnectEx(), and CL_ParseServerInfo().
| int FS_VPrintf | ( | qfile_t * | file, |
| const char * | format, | ||
| va_list | ap ) |
Definition at line 3294 of file fs.c.
References dpvsnprintf(), FILEDESC_WRITE, format, MAX_INPUTLINE, Mem_Alloc, Mem_Free, and tempmempool.
Referenced by FS_Printf(), and Log_Printf().
| const char * FS_WhichPack | ( | const char * | filename | ) |
Definition at line 4092 of file fs.c.
References FS_FindFile(), index, NULL, searchpath_t::pack, and pack_t::shortname.
Referenced by Curl_SendRequirement(), SV_Download_f(), and VM_whichpack().
| fs_offset_t FS_Write | ( | qfile_t * | file, |
| const void * | data, | ||
| size_t | datasize ) |
Definition at line 3020 of file fs.c.
References Con_Printf(), CON_WARN, data, FILEDESC_SEEK, FILEDESC_WRITE, FS_Purge(), int(), and min.
Referenced by CL_PasteDemo(), CL_WriteDemoMessage(), Con_ConDump_f(), Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), CURL_fwrite(), FS_Print(), FS_WriteFileInBlocks(), JPEG_EmptyOutputBuffer(), JPEG_TermDestination(), Log_Start(), PNG_fWriteData(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_CaptureVideo_Ogg_EndVideo(), SCR_CaptureVideo_Ogg_FlushInterleaving(), SCR_CaptureVideo_Ogg_Interleave(), SCR_CaptureVideo_RIFF_Flush(), SCR_CaptureVideo_RIFF_FlushNoIncrease(), SCR_CaptureVideo_RIFF_Pop(), SCR_CaptureVideo_RIFF_WriteBytes(), SV_WriteDemoMessage(), VM_buf_writefile(), and VM_fputs().
| qbool FS_WriteFile | ( | const char * | filename, |
| const void * | data, | ||
| fs_offset_t | len ) |
Definition at line 3593 of file fs.c.
References data, and FS_WriteFileInBlocks().
Referenced by CL_StopDownload(), Image_WriteTGABGRA(), Mod_Decompile_f(), Mod_Decompile_OBJ(), Mod_Decompile_SMD(), QW_CL_ParseDownload(), R_SaveTextureDDSFile(), R_Shadow_SaveWorldLights(), and SV_SaveEntFile_f().
| qbool FS_WriteFileInBlocks | ( | const char * | filename, |
| const void *const * | data, | ||
| const fs_offset_t * | len, | ||
| size_t | count ) |
Definition at line 3570 of file fs.c.
References Con_DPrintf(), Con_Printf(), count, data, FS_Close(), FS_OpenRealFile(), and FS_Write().
Referenced by FS_WriteFile(), and Image_WriteTGABGR_preflipped().
|
extern |
Definition at line 452 of file fs.c.
Referenced by FS_ListGameDirs(), and VM_M_getgamedirinfo().
|
extern |
Definition at line 453 of file fs.c.
Referenced by FS_ListGameDirs(), and VM_M_getgamedirinfo().
|
extern |
Definition at line 444 of file fs.c.
Referenced by Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), Crypto_LoadFile(), Crypto_SavePubKeyTextFile(), FS_AddGameHierarchy(), FS_CheckGameDir(), FS_ChooseUserDir(), FS_Init_Dir(), FS_ListGameDirs(), Host_LockSession(), and ModList_RebuildList().
|
extern |
Definition at line 438 of file fs.c.
Referenced by FS_CheckGameDir(), FS_ListGameDirs(), FS_SetGameDirs(), and ModList_RebuildList().
|
extern |
Definition at line 443 of file fs.c.
Referenced by FS_AddGameDirectory(), FS_Init_Dir(), FS_OpenRealFile(), FS_Rescan(), and SCR_ScreenShot_f().
|
extern |
Definition at line 449 of file fs.c.
Referenced by COM_ChangeGameTypeForGameDirs(), FS_GameDir_f(), FS_Rescan(), FS_SetGameDirs(), and ModList_RebuildList().
|
extern |
Definition at line 448 of file fs.c.
Referenced by COM_ChangeGameTypeForGameDirs(), FS_GameDir_f(), FS_Rescan(), FS_SetGameDirs(), and ModList_RebuildList().
|
extern |
Definition at line 442 of file fs.c.
Referenced by Crypto_KeyGen_f(), Crypto_KeyGen_Finished(), Crypto_LoadFile(), Crypto_SavePubKeyTextFile(), FS_AddGameHierarchy(), FS_CheckGameDir(), FS_Init_Dir(), FS_ListGameDirs(), and Host_LockSession().