recommit revs 3280-3282
update dotnet2005 ignores git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3285 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d753d47758
commit
5038d72933
4 changed files with 62 additions and 29 deletions
|
@ -605,9 +605,11 @@ void IN_UpdateGrabs(int fullscreen, int activeapp)
|
|||
{
|
||||
int grabmouse;
|
||||
|
||||
if (fullscreen)
|
||||
if (!activeapp)
|
||||
grabmouse = false;
|
||||
else if (fullscreen)
|
||||
grabmouse = true;
|
||||
else if (activeapp && _windowed_mouse.value)
|
||||
else if (_windowed_mouse.value)
|
||||
{
|
||||
if (!Key_MouseShouldBeFree())
|
||||
grabmouse = true;
|
||||
|
@ -1739,7 +1741,7 @@ void IN_MouseMove (float *movements, int pnum)
|
|||
#ifdef USINGRAWINPUT
|
||||
if (rawmicecount)
|
||||
{
|
||||
if (in_rawinput_combine.value && pnum == 0)
|
||||
if ((in_rawinput_combine.value && pnum == 0) || cl.splitclients <= 1)
|
||||
{
|
||||
// not the right way to do this but it'll work for now
|
||||
int x;
|
||||
|
|
|
@ -52,6 +52,18 @@ static int pe_size2 = P_INVALID;
|
|||
static int pe_size3 = P_INVALID;
|
||||
static int pe_defaulttrail = P_INVALID;
|
||||
|
||||
static float psintable[64];
|
||||
|
||||
static void buildsintable(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 64; i++)
|
||||
psintable[i] = sin((i*M_PI)/32);
|
||||
}
|
||||
#define sin(x) (psintable[(int)(x*(64/M_PI)) & 63])
|
||||
#define cos(x) (psintable[((int)(x*(64/M_PI)) + 16) & 63])
|
||||
|
||||
|
||||
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
|
||||
typedef struct particle_s
|
||||
{
|
||||
|
@ -1305,6 +1317,8 @@ static void PScript_InitParticles (void)
|
|||
if (r_numparticles) //already inited
|
||||
return;
|
||||
|
||||
buildsintable();
|
||||
|
||||
i = COM_CheckParm ("-particles");
|
||||
|
||||
if (i)
|
||||
|
@ -3199,13 +3213,18 @@ static void GL_DrawTexturedParticle(int count, particle_t **plist, plooks_t *typ
|
|||
{
|
||||
p = *plist++;
|
||||
|
||||
scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1]
|
||||
+ (p->org[2] - r_origin[2])*vpn[2];
|
||||
scale = (scale*p->scale)*(type->invscalefactor) + p->scale * (type->scalefactor*250);
|
||||
if (scale < 20)
|
||||
scale = 0.25;
|
||||
if (type->scalefactor == 1)
|
||||
{
|
||||
scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1]
|
||||
+ (p->org[2] - r_origin[2])*vpn[2];
|
||||
scale = (scale*p->scale)*(type->invscalefactor) + p->scale * (type->scalefactor*250);
|
||||
if (scale < 20)
|
||||
scale = 0.25;
|
||||
else
|
||||
scale = 0.25 + scale * 0.001;
|
||||
}
|
||||
else
|
||||
scale = 0.25 + scale * 0.001;
|
||||
scale = 1;
|
||||
|
||||
qglColor4f (p->rgb[0],
|
||||
p->rgb[1],
|
||||
|
@ -3216,20 +3235,27 @@ static void GL_DrawTexturedParticle(int count, particle_t **plist, plooks_t *typ
|
|||
{
|
||||
x = sin(p->angle)*scale;
|
||||
y = cos(p->angle)*scale;
|
||||
|
||||
qglTexCoord2f(p->s1,p->t1);
|
||||
qglVertex3f (p->org[0] - x*pright[0] - y*pup[0], p->org[1] - x*pright[1] - y*pup[1], p->org[2] - x*pright[2] - y*pup[2]);
|
||||
qglTexCoord2f(p->s1,p->t2);
|
||||
qglVertex3f (p->org[0] - y*pright[0] + x*pup[0], p->org[1] - y*pright[1] + x*pup[1], p->org[2] - y*pright[2] + x*pup[2]);
|
||||
qglTexCoord2f(p->s2,p->t2);
|
||||
qglVertex3f (p->org[0] + x*pright[0] + y*pup[0], p->org[1] + x*pright[1] + y*pup[1], p->org[2] + x*pright[2] + y*pup[2]);
|
||||
qglTexCoord2f(p->s2,p->t1);
|
||||
qglVertex3f (p->org[0] + y*pright[0] - x*pup[0], p->org[1] + y*pright[1] - x*pup[1], p->org[2] + y*pright[2] - x*pup[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
y = scale;
|
||||
qglTexCoord2f(p->s1,p->t1);
|
||||
qglVertex3f (p->org[0] - scale*pup[0], p->org[1] - scale*pup[1], p->org[2] - scale*pup[2]);
|
||||
qglTexCoord2f(p->s1,p->t2);
|
||||
qglVertex3f (p->org[0] - scale*pright[0], p->org[1] - scale*pright[1], p->org[2] - scale*pright[2]);
|
||||
qglTexCoord2f(p->s2,p->t2);
|
||||
qglVertex3f (p->org[0] + scale*pup[0], p->org[1] + scale*pup[1], p->org[2] + scale*pup[2]);
|
||||
qglTexCoord2f(p->s2,p->t1);
|
||||
qglVertex3f (p->org[0] + scale*pright[0], p->org[1] + scale*pright[1], p->org[2] + scale*pright[2]);
|
||||
}
|
||||
qglTexCoord2f(p->s1,p->t1);
|
||||
qglVertex3f (p->org[0] - x*pright[0] - y*pup[0], p->org[1] - x*pright[1] - y*pup[1], p->org[2] - x*pright[2] - y*pup[2]);
|
||||
qglTexCoord2f(p->s1,p->t2);
|
||||
qglVertex3f (p->org[0] - y*pright[0] + x*pup[0], p->org[1] - y*pright[1] + x*pup[1], p->org[2] - y*pright[2] + x*pup[2]);
|
||||
qglTexCoord2f(p->s2,p->t2);
|
||||
qglVertex3f (p->org[0] + x*pright[0] + y*pup[0], p->org[1] + x*pright[1] + y*pup[1], p->org[2] + x*pright[2] + y*pup[2]);
|
||||
qglTexCoord2f(p->s2,p->t1);
|
||||
qglVertex3f (p->org[0] + y*pright[0] - x*pup[0], p->org[1] + y*pright[1] - x*pup[1], p->org[2] + y*pright[2] - x*pup[2]);
|
||||
}
|
||||
qglEnd();
|
||||
}
|
||||
|
@ -3276,16 +3302,19 @@ static void GL_DrawSketchParticle(int count, particle_t **plist, plooks_t *type)
|
|||
{
|
||||
x = sin(p->angle)*scale;
|
||||
y = cos(p->angle)*scale;
|
||||
|
||||
qglVertex3f (p->org[0] - x*pright[0] - y*pup[0], p->org[1] - x*pright[1] - y*pup[1], p->org[2] - x*pright[2] - y*pup[2]);
|
||||
qglVertex3f (p->org[0] + x*pright[0] + y*pup[0], p->org[1] + x*pright[1] + y*pup[1], p->org[2] + x*pright[2] + y*pup[2]);
|
||||
qglVertex3f (p->org[0] + y*pright[0] - x*pup[0], p->org[1] + y*pright[1] - x*pup[1], p->org[2] + y*pright[2] - x*pup[2]);
|
||||
qglVertex3f (p->org[0] - y*pright[0] + x*pup[0], p->org[1] - y*pright[1] + x*pup[1], p->org[2] - y*pright[2] + x*pup[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
y = scale;
|
||||
qglVertex3f (p->org[0] - scale*pup[0], p->org[1] - scale*pup[1], p->org[2] - scale*pup[2]);
|
||||
qglVertex3f (p->org[0] + scale*pup[0], p->org[1] + scale*pup[1], p->org[2] + scale*pup[2]);
|
||||
qglVertex3f (p->org[0] + scale*pright[0], p->org[1] + scale*pright[1], p->org[2] + scale*pright[2]);
|
||||
qglVertex3f (p->org[0] - scale*pright[0], p->org[1] - scale*pright[1], p->org[2] - scale*pright[2]);
|
||||
}
|
||||
qglVertex3f (p->org[0] - x*pright[0] - y*pup[0], p->org[1] - x*pright[1] - y*pup[1], p->org[2] - x*pright[2] - y*pup[2]);
|
||||
qglVertex3f (p->org[0] + x*pright[0] + y*pup[0], p->org[1] + x*pright[1] + y*pup[1], p->org[2] + x*pright[2] + y*pup[2]);
|
||||
qglVertex3f (p->org[0] + y*pright[0] - x*pup[0], p->org[1] + y*pright[1] - x*pup[1], p->org[2] + y*pright[2] - x*pup[2]);
|
||||
qglVertex3f (p->org[0] - y*pright[0] + x*pup[0], p->org[1] - y*pright[1] + x*pup[1], p->org[2] - y*pright[2] + x*pup[2]);
|
||||
}
|
||||
qglEnd();
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
//its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything
|
||||
#include <stdint.h>
|
||||
#define qintptr_t intptr_t
|
||||
#define quintptr_t uintptr_t
|
||||
#else
|
||||
#if defined(_WIN64)
|
||||
#define qintptr_t __int64
|
||||
|
@ -24,10 +25,11 @@
|
|||
#define qintptr_t long
|
||||
#endif
|
||||
#endif
|
||||
#define quintptr_t unsigned qintptr_t
|
||||
#endif
|
||||
|
||||
typedef qintptr_t (EXPORT_FN *sys_calldll_t) (qintptr_t arg, ...);
|
||||
typedef int (*sys_callqvm_t) (void *offset, unsigned qintptr_t mask, int fn, const int *arg);
|
||||
typedef int (*sys_callqvm_t) (void *offset, quintptr_t mask, int fn, const int *arg);
|
||||
|
||||
typedef struct vm_s vm_t;
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ void PF_precache_model_Internal (progfuncs_t *prinst, char *s);
|
|||
void PF_setmodel_Internal (progfuncs_t *prinst, edict_t *e, char *m);
|
||||
char *PF_infokey_Internal (int entnum, char *value);;
|
||||
|
||||
static int WrapQCBuiltin(builtin_t func, void *offset, unsigned qintptr_t mask, const qintptr_t *arg, char *argtypes)
|
||||
static int WrapQCBuiltin(builtin_t func, void *offset, quintptr_t mask, const qintptr_t *arg, char *argtypes)
|
||||
{
|
||||
globalvars_t gv;
|
||||
int argnum=0;
|
||||
|
@ -554,7 +554,7 @@ static int WrapQCBuiltin(builtin_t func, void *offset, unsigned qintptr_t mask,
|
|||
}
|
||||
|
||||
#define VALIDATEPOINTER(o,l) if ((qintptr_t)o + l >= mask || VM_POINTER(o) < offset) SV_Error("Call to game trap %i passes invalid pointer\n", fn); //out of bounds.
|
||||
static qintptr_t syscallhandle (void *offset, unsigned qintptr_t mask, qintptr_t fn, const qintptr_t *arg)
|
||||
static qintptr_t syscallhandle (void *offset, quintptr_t mask, qintptr_t fn, const qintptr_t *arg)
|
||||
{
|
||||
switch (fn)
|
||||
{
|
||||
|
@ -1259,7 +1259,7 @@ Con_DPrintf("PF_readcmd: %s\n%s", s, output);
|
|||
}
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
static int syscallqvm (void *offset, unsigned qintptr_t mask, int fn, const int *arg)
|
||||
static int syscallqvm (void *offset, quintptr_t mask, int fn, const int *arg)
|
||||
{
|
||||
qintptr_t args[13];
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue