mingl fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4540 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-11-28 01:08:12 +00:00
parent ad8d634916
commit 75ef62b6f3
3 changed files with 35 additions and 10 deletions

View file

@ -1700,6 +1700,7 @@ void CL_PlayDemo(char *demoname)
//figure out where we started //figure out where we started
start = VFS_TELL(f); start = VFS_TELL(f);
#ifdef Q2CLIENT
//check if its a quake2 demo. //check if its a quake2 demo.
VFS_READ(f, &len, sizeof(len)); VFS_READ(f, &len, sizeof(len));
VFS_READ(f, &type, sizeof(type)); VFS_READ(f, &type, sizeof(type));
@ -1710,7 +1711,9 @@ void CL_PlayDemo(char *demoname)
CL_PlayDemoStream(f, NULL, name, DPB_QUAKE2, 0); CL_PlayDemoStream(f, NULL, name, DPB_QUAKE2, 0);
return; return;
} }
#endif
#ifdef NQPROT
//not quake2, check if its NQ //not quake2, check if its NQ
ft = 0; //work out if the first line is a int for the track number. ft = 0; //work out if the first line is a int for the track number.
while ((VFS_READ(f, &chr, 1)==1) && (chr != '\n')) while ((VFS_READ(f, &chr, 1)==1) && (chr != '\n'))
@ -1730,6 +1733,7 @@ void CL_PlayDemo(char *demoname)
return; return;
} }
VFS_SEEK(f, start); VFS_SEEK(f, start);
#endif
//its not NQ then. must be QuakeWorld, either .qwd or .mvd //its not NQ then. must be QuakeWorld, either .qwd or .mvd
//could also be .qwz or .dmz or whatever that nq extension is. we don't support either. //could also be .qwz or .dmz or whatever that nq extension is. we don't support either.

View file

@ -3635,7 +3635,7 @@ void Host_BeginFileDownload(struct dl_download *dl, char *mimetype)
else if (!strcmp(mimetype, "application/x-ftemanifest")) else if (!strcmp(mimetype, "application/x-ftemanifest"))
f->flags |= HRF_MANIFEST; f->flags |= HRF_MANIFEST;
else if (!strcmp(mimetype, "application/x-multiviewdemo")) else if (!strcmp(mimetype, "application/x-multiviewdemo"))
f->flags |= HRF_MVD; f->flags |= HRF_DEMO_MVD;
// else if (!strcmp(mimetype, "application/x-ftebsp")) // else if (!strcmp(mimetype, "application/x-ftebsp"))
// f->flags |= HRF_BSP; // f->flags |= HRF_BSP;
// else if (!strcmp(mimetype, "application/x-ftepackage")) // else if (!strcmp(mimetype, "application/x-ftepackage"))
@ -3665,7 +3665,7 @@ void Host_BeginFileDownload(struct dl_download *dl, char *mimetype)
f->flags |= HRF_PACKAGE; f->flags |= HRF_PACKAGE;
else else
{ {
//file type not guessable from extension. //file type not guessable from extension either.
f->flags |= HRF_ABORT; f->flags |= HRF_ABORT;
Host_DoRunFile(f); Host_DoRunFile(f);
return; return;
@ -3679,10 +3679,17 @@ void Host_BeginFileDownload(struct dl_download *dl, char *mimetype)
CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_QUAKEWORLD, 0); CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_QUAKEWORLD, 0);
else if (f->flags & HRF_DEMO_MVD) else if (f->flags & HRF_DEMO_MVD)
CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_MVD, 0); CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_MVD, 0);
#ifdef Q2CLIENT
else if (f->flags & HRF_DEMO_DM2) else if (f->flags & HRF_DEMO_DM2)
CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_QUAKE2, 0); CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_QUAKE2, 0);
else if (f->flags & HRF_DEMO_DEM) #endif
CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_NETQUAKE, 0); #ifdef NQPROT
//fixme: the demo code can't handle the cd track like this.
// else if (f->flags & HRF_DEMO_DEM)
// CL_PlayDemoStream((dl->file = VFSPIPE_Open()), dl, f->fname, DPB_NETQUAKE, 0);
#endif
else if (f->flags & HRF_DEMO)
Con_Printf("%s: format not supported\n", f->fname); //demos that are not supported in this build for one reason or another
else else
return; return;
@ -3750,15 +3757,21 @@ void Host_DoRunFile(hrf_t *f)
//if we get here, we have no mime type to give us any clues. //if we get here, we have no mime type to give us any clues.
ext = COM_FileExtension(f->fname); ext = COM_FileExtension(f->fname);
if (!strcmp(ext, "qwd") || !strcmp(ext, "dem") || !strcmp(ext, "dm2") || !strcmp(ext, "mvd")) if (!strcmp(ext, "qwd"))
f->flags |= HRF_DEMO; f->flags |= HRF_DEMO_QWD;
if (!strcmp(ext, "qtv")) else if (!strcmp(ext, "mvd"))
f->flags |= HRF_DEMO_MVD;
else if (!strcmp(ext, "dm2"))
f->flags |= HRF_DEMO_DM2;
else if (!strcmp(ext, "dem"))
f->flags |= HRF_DEMO_DEM;
else if (!strcmp(ext, "qtv"))
f->flags |= HRF_QTVINFO; f->flags |= HRF_QTVINFO;
if (!strcmp(ext, "fmf")) else if (!strcmp(ext, "fmf"))
f->flags |= HRF_MANIFEST; f->flags |= HRF_MANIFEST;
if (!strcmp(ext, "bsp")) else if (!strcmp(ext, "bsp"))
f->flags |= HRF_BSP; f->flags |= HRF_BSP;
if (!strcmp(ext, "pak") || !strcmp(ext, "pk3")) else if (!strcmp(ext, "pak") || !strcmp(ext, "pk3"))
f->flags |= HRF_PACKAGE; f->flags |= HRF_PACKAGE;
//if we still don't know what it is, give up. //if we still don't know what it is, give up.

View file

@ -29643,6 +29643,14 @@
<File <File
RelativePath="..\common\net_sellingmysoultothedevil.cpp" RelativePath="..\common\net_sellingmysoultothedevil.cpp"
> >
<FileConfiguration
Name="MinGLDebug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="GLDebug|Win32" Name="GLDebug|Win32"
> >