misc fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5054 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-02-01 04:42:33 +00:00
parent 2e7388bb30
commit f03a578eaa
9 changed files with 76 additions and 21 deletions

View file

@ -1003,7 +1003,7 @@ ifeq ($(FTE_TARGET),vc)
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) $(W32_CFLAGS) -DMULTITHREAD -DMSVCLIBPATH=libs/
SV_EXE_NAME=../fteqw-sv$(BITS)$(EXEPOSTFIX)
SV_DIR=sv_vc$(BITS)
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) fs_win32.o resources.o
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(BOTLIB_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) fs_win32.o resources.o
SV_LDFLAGS=/subsystem:console
GL_EXE_NAME=../fteqw-gl$(BITS)$(EXEPOSTFIX)
@ -1012,13 +1012,13 @@ ifeq ($(FTE_TARGET),vc)
GLCL_DIR=glcl_vc$(BITS)
GL_LDFLAGS=$(GLLDFLAGS) $(JPEGLIB) libs/libpng$(BITS).lib uuid.lib gdi32.lib ole32.lib /subsystem:windows
GL_CFLAGS=$(GLCFLAGS) $(W32_CFLAGS) -DMULTITHREAD $(SPEEXCFLAGS) -DMSVCLIBPATH=libs/
GLCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SPEEX_OBJS) gl_vidnt.o $(WINDOWS_OBJS)
GLCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(BOTLIB_OBJS) $(SPEEX_OBJS) gl_vidnt.o $(WINDOWS_OBJS)
GL_OBJS=
MINGL_DIR=mingl_vc$(BITS)
MINGL_EXE_NAME=../fteqw-mingl$(BITS)$(EXEPOSTFIX)
D3DCL_OBJS=$(D3DQUAKE_OBJS) $(D3DGL_OBJS) $(SPEEX_OBJS) $(WINDOWS_OBJS)
D3DCL_OBJS=$(D3DQUAKE_OBJS) $(D3DGL_OBJS) $(BOTLIB_OBJS) $(SPEEX_OBJS) $(WINDOWS_OBJS)
D3D_EXE_NAME=../fteqw-d3d$(BITS)$(EXEPOSTFIX)
D3DCL_EXE_NAME=../fteqw-d3dcl$(BITS)$(EXEPOSTFIX)
D3D_LDFLAGS=$(JPEGLIB) libs/libpng$(BITS).lib uuid.lib gdi32.lib ole32.lib /subsystem:windows
@ -1027,7 +1027,7 @@ ifeq ($(FTE_TARGET),vc)
D3DCL_DIR=d3dcl_vc$(BITS)
M_EXE_NAME=../fteqw$(BITS)$(EXEPOSTFIX)
MCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(D3DQUAKE_OBJS) $(GLQUAKE_OBJS) gl_vidnt.o $(SPEEX_OBJS) $(WINDOWS_OBJS)
MCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(D3DQUAKE_OBJS) $(GLQUAKE_OBJS) gl_vidnt.o $(BOTLIB_OBJS) $(SPEEX_OBJS) $(WINDOWS_OBJS)
M_CFLAGS=$(D3DCFLAGS) $(GLCFLAGS) $(W32_CFLAGS) $(D3DCFLAGS) -DMULTITHREAD $(SPEEXCFLAGS) -DMSVCLIBPATH=libs/
MB_DIR=m_vc$(BITS)
M_LDFLAGS=$(GLLDFLAGS) $(JPEGLIB) libs/libpng$(BITS).lib uuid.lib gdi32.lib ole32.lib /subsystem:windows

View file

@ -2867,7 +2867,7 @@ static void QDECL capture_raw_video (void *vctx, void *data, int frame, int widt
if (inf.f_frsize*(double)inf.f_blocks < (1024.*1024)*capturethrottlesize.value)
Sys_Sleep(1);
}
#elif defined( _WIN32)
#elif defined(_WIN32) && !defined(FTE_SDL)
wchar_t ffs[MAX_OSPATH];
ULARGE_INTEGER freebytes;
if (GetDiskFreeSpaceExW(widen(ffs, sizeof(ffs), filename), &freebytes, NULL, NULL))

View file

@ -87,8 +87,8 @@ typedef struct {
#define SPR_VP_PARALLEL 2 //faces camera (traditional sprite)
#define SPR_ORIENTED 3 //uses axis
#define SPR_VP_PARALLEL_ORIENTED 4 //faces camera *then* rotated
#define SPRDP_LABEL 5
#define SPRDP_LABEL_SCALE 6
#define SPRDP_LABEL 5
#define SPRDP_LABEL_SCALE 6
#define SPRDP_OVERHEAD 7
#define SPRHL_OPAQUE 0

View file

@ -366,7 +366,9 @@ XZ_EXTERN uint64_t xz_crc64(const uint8_t *buf, size_t size, uint64_t crc);
typedef unsigned char bool;
# define true 1
# define false 0
# define inline __inline
# ifndef inline
# define inline __inline
# endif
#else
# include <stdbool.h>
#endif

View file

@ -37,8 +37,11 @@ Also, can efficiency be improved much?
#ifdef VM_ANY
#ifdef _MSC_VER //fix this please
#define inline __forceinline
#if defined(_MSC_VER) //fix this please
#ifdef inline
#undef inline
#endif
#define inline __forceinline
#endif

View file

@ -62,6 +62,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models", "..\..\plugins\mod
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iqm", "..\..\iqm\iqm.vcproj", "{0AE4667A-A446-44E7-A758-69CF5D9AF8FC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmake", "gmake.vcproj", "{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
D3DDebug|Win32 = D3DDebug|Win32
@ -1064,6 +1066,48 @@ Global
{0AE4667A-A446-44E7-A758-69CF5D9AF8FC}.VkRelease|Win32.Build.0 = Release|Win32
{0AE4667A-A446-44E7-A758-69CF5D9AF8FC}.VkRelease|x64.ActiveCfg = Release|x64
{0AE4667A-A446-44E7-A758-69CF5D9AF8FC}.VkRelease|x64.Build.0 = Release|x64
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DDebug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DDebug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DDebug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DRelease|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DRelease|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.D3DRelease|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug Dedicated Server|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug Dedicated Server|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug Dedicated Server|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Debug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLDebug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLDebug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLDebug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLRelease|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLRelease|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.GLRelease|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MDebug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MDebug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MDebug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLDebug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLDebug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLDebug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLRelease|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLRelease|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MinGLRelease|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MRelease|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MRelease|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.MRelease|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.Release|x64.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkDebug|Win32.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkDebug|Win32.Build.0 = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkDebug|x64.ActiveCfg = Debug|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkRelease|Win32.ActiveCfg = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkRelease|Win32.Build.0 = Release|Win32
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919}.VkRelease|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1074,6 +1118,7 @@ Global
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365} = {EB5DFF7C-C0A8-426C-BC66-524162350F1B}
{4735677B-6D5A-4BE6-A945-CB32A7282F56} = {EB5DFF7C-C0A8-426C-BC66-524162350F1B}
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B} = {EB5DFF7C-C0A8-426C-BC66-524162350F1B}
{0B1B2549-24DE-4FF2-844B-7A93ED5CF919} = {EB5DFF7C-C0A8-426C-BC66-524162350F1B}
{4877586B-E85B-4DF8-BCCE-59D31514D240} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
{32B12987-DF8C-4E40-B07C-B18586A4CA65} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
{873CCE24-3549-49D4-A4B4-653F91B1532A} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}

View file

@ -726,8 +726,9 @@ enum {
WARN_ENUMFLAGS_NOTINTEGER,
WARN_ENUMFLAGS_NOTBINARY,
WARN_CASEINSENSITIVEFRAMEMACRO,
WARN_DUPLICATELABEL,
WARN_STALEMACRO,
WARN_DUPLICATEMACRO,
WARN_DUPLICATELABEL,
WARN_ASSIGNMENTINCONDITIONAL,
WARN_MACROINSTRING,
WARN_BADPARAMS,

View file

@ -2314,7 +2314,7 @@ int QCC_PR_FindMacro (char *name)
if (!STRCMP (name, pr_framemacro[i].name))
{
if (pr_framemacro[i].file != s_filen)
QCC_PR_ParseWarning(WARN_DUPLICATEMACRO, "Stale macro used (%s, defined in %s)", pr_token, pr_framemacro[i].file);
QCC_PR_ParseWarning(WARN_STALEMACRO, "Stale macro used (%s, defined in %s)", pr_token, pr_framemacro[i].file);
return pr_framemacro[i].value;
}
}
@ -2324,7 +2324,7 @@ int QCC_PR_FindMacro (char *name)
{
QCC_PR_ParseWarning(WARN_CASEINSENSITIVEFRAMEMACRO, "Case insensitive frame macro (using %s)", pr_framemacro[i].name);
if (pr_framemacro[i].file != s_filen)
QCC_PR_ParseWarning(WARN_DUPLICATEMACRO, "Stale macro used (%s, defined in %s)", pr_token, pr_framemacro[i].file);
QCC_PR_ParseWarning(WARN_STALEMACRO, "Stale macro used (%s, defined in %s)", pr_token, pr_framemacro[i].file);
return pr_framemacro[i].value;
}
}
@ -4438,6 +4438,8 @@ QCC_type_t *QCC_PR_ParseFunctionType (int newtype, QCC_type_t *returntype)
paramlist[numparms].ofs = 0;
paramlist[numparms].arraysize = 0;
paramlist[numparms].type = QCC_PR_ParseType(false, false);
if (!paramlist[numparms].type)
QCC_PR_ParseError(0, "Expected type\n");
if (paramlist[numparms].type->type == ev_void)
break;
@ -4540,6 +4542,8 @@ QCC_type_t *QCC_PR_ParseFunctionTypeReacc (int newtype, QCC_type_t *returntype)
nptype = QCC_PR_ParseType(true, false);
}
if (!nptype)
QCC_PR_ParseError(0, "Expected type\n");
if (nptype->type == ev_void)
break;
// type->name = "FUNC PARAMETER";
@ -4671,14 +4675,12 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
//so .*float will give you that.
//however, we can't cope parsing that with regular types, so we support that ONLY when . was already specified.
//this is pretty much an evil syntax hack.
if (QCC_PR_CheckToken ("*"))
{
type = QCC_PR_NewType("POINTER TYPE", ev_pointer, false);
type->aux_type = QCC_PR_ParseType (false, false);
type->size = type->aux_type->size;
}
else
type = QCC_PR_ParseType (false, false);
pbool ptr = QCC_PR_CheckToken ("*");
type = QCC_PR_ParseType(false, false);
if (!type)
QCC_PR_ParseError(0, "Expected type\n");
if (ptr)
type = QCC_PointerTypeTo(type);
name = qccHunkAlloc(strlen(type->name)+2);
*name = '.';

View file

@ -202,6 +202,8 @@ struct {
{" F314", WARN_LAXCAST},
{" F315", WARN_DUPLICATEPRECOMPILER},
{" F316", WARN_IDENTICALPRECOMPILER},
{" F317", WARN_STALEMACRO},
{" F318", WARN_DUPLICATEMACRO},
{" F208", WARN_NOTREFERENCEDCONST},
{" F209", WARN_EXTRAPRECACHE},