*/
qboolean FS_AddPack(const char *pakfile, qboolean *already_loaded, qboolean keep_plain_dirs)
{
- char fullpath[MAX_QPATH];
+ char fullpath[MAX_OSPATH];
int index;
searchpath_t *search;
Cvar_SetQuick (&scr_screenshot_name, com_modname);
else
Cvar_SetQuick (&scr_screenshot_name, gamescreenshotname);
+
+ if((i = COM_CheckParm("-modname")) && i < com_argc - 1)
+ strlcpy(com_modname, com_argv[i+1], sizeof(com_modname));
// If "-condebug" is in the command line, remove the previous log file
if (COM_CheckParm ("-condebug") != 0)
return fs_checkgamedir_missing;
}
-static void FS_ListGameDirs()
+static void FS_ListGameDirs(void)
{
stringlist_t list, list2;
int i, j;
}
stringlistfreecontents(&list);
- fs_all_gamedirs = Mem_Alloc(fs_mempool, list2.numstrings * sizeof(*fs_all_gamedirs));
+ fs_all_gamedirs = (gamedir_t *)Mem_Alloc(fs_mempool, list2.numstrings * sizeof(*fs_all_gamedirs));
for(i = 0; i < list2.numstrings; ++i)
{
info = FS_CheckGameDir(list2.strings[i]);
int FS_FileType (const char *filename)
{
searchpath_t *search;
- char fullpath[MAX_QPATH];
+ char fullpath[MAX_OSPATH];
search = FS_FindFile (filename, NULL, true);
if(!search)
unsigned char *out = NULL;
unsigned char *tmp;
+ *deflated_size = 0;
+ if(!zlib_dll)
+ return NULL;
+
memset(&strm, 0, sizeof(strm));
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
unsigned int have;
sizebuf_t outbuf;
+ *inflated_size = 0;
+ if(!zlib_dll)
+ return NULL;
+
memset(&outbuf, 0, sizeof(outbuf));
outbuf.data = (unsigned char *) Mem_Alloc(tempmempool, sizeof(tmp));
outbuf.maxsize = sizeof(tmp);