git-svn-id: https://svn.eduke32.com/eduke32@359 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-11-22 01:25:35 +00:00
parent 4de01782d3
commit cac0d84384
4 changed files with 20 additions and 125 deletions

View file

@ -62,7 +62,6 @@ enum {
T_FOGPAL, T_FOGPAL,
T_LOADGRP, T_LOADGRP,
T_DUMMYTILE,T_DUMMYTILERANGE, T_DUMMYTILE,T_DUMMYTILERANGE,
/* T_NEGSHADEOFFSET, T_NEGSHADESCALE, T_SHADESCALE, T_SPRSHADESCALE */
}; };
typedef struct { char *text; int tokenid; } tokenlist; typedef struct { char *text; int tokenid; } tokenlist;
@ -108,10 +107,6 @@ static tokenlist basetokens[] =
{ "loadgrp", T_LOADGRP }, { "loadgrp", T_LOADGRP },
{ "dummytile", T_DUMMYTILE }, { "dummytile", T_DUMMYTILE },
{ "dummytilerange", T_DUMMYTILERANGE }, { "dummytilerange", T_DUMMYTILERANGE },
/* { "glnegshadeoffset",T_NEGSHADEOFFSET },
{ "glnegshadescale", T_NEGSHADESCALE },
{ "glshadescale", T_SHADESCALE },
{ "glsprshadescale", T_SPRSHADESCALE }, */
}; };
static tokenlist modeltokens[] = { static tokenlist modeltokens[] = {
@ -323,50 +318,6 @@ static int defsparser(scriptfile *script)
hicsetpalettetint(pal,r,g,b,f); hicsetpalettetint(pal,r,g,b,f);
} }
break; break;
/* case T_NEGSHADEOFFSET:
{
double val;
extern float glnegshadeoffset;
if (scriptfile_getdouble(script,&val)) break;
#if defined(POLYMOST) && defined(USE_OPENGL)
glnegshadeoffset = val;
#endif
}
break;
case T_NEGSHADESCALE:
{
double val;
extern float glnegshadescale;
if (scriptfile_getdouble(script,&val)) break;
#if defined(POLYMOST) && defined(USE_OPENGL)
glnegshadescale = val;
#endif
}
break;
case T_SHADESCALE:
{
double val;
extern float glshadescale;
if (scriptfile_getdouble(script,&val)) break;
#if defined(POLYMOST) && defined(USE_OPENGL)
glshadescale = val;
#endif
}
break;
case T_SPRSHADESCALE:
{
double val;
extern float glsprshadescale;
if (scriptfile_getdouble(script,&val)) break;
#if defined(POLYMOST) && defined(USE_OPENGL)
glsprshadescale = val;
#endif
}
break; */
case T_ALPHAHACK: case T_ALPHAHACK:
{ {
int tile; int tile;

View file

@ -133,33 +133,14 @@ long fullbrightloadingpass = 0;
long fullbrightdrawingpass = 0; long fullbrightdrawingpass = 0;
long shadeforfullbrightpass; long shadeforfullbrightpass;
// float shadetable[] = { 0.165, 0.198, 0.231, 0.264, 0.297, 0.330, 0.363, 0.396, 0.429, 0.462, 0.495, 0.528, 0.561, 0.594, 0.627, 0.660, 0.693, 0.726, 0.759, 0.792, 0.825, 0.858, 0.891, 0.924, 0.957, 1.023, 1.056, 1.089, 1.122, 1.155, 1.188, 1.221 };
// float shadetable[] = { 0.175, 0.200, 0.225, 0.250, 0.275, 0.300, 0.325, 0.350, 0.375, 0.400, 0.425, 0.450, 0.475, 0.500, 0.525, 0.550, 0.575, 0.600, 0.625, 0.650, 0.675, 0.700, 0.725, 0.750, 0.775, 0.800, 0.825, 0.850, 0.875, 0.900, 0.925, 0.950 };
// float shadetable[] = { 0.275, 0.325, 0.375, 0.425, 0.475, 0.525, 0.575, 0.625, 0.675, 0.725, 0.775, 0.825, 0.875, 0.925, 0.975, 1.025, 1.075, 1.125, 1.175, 1.225, 1.275, 1.325, 1.375, 1.425, 1.475, 1.525, 1.575, 1.625, 1.675, 1.725, 1.775, 1.825 };
// float shadetable[] = { 0.275, 0.341, 0.407, 0.473, 0.539, 0.605, 0.671, 0.737, 0.803, 0.869, 0.935, 1.001, 1.067, 1.133, 1.199, 1.265, 1.331, 1.397, 1.463, 1.529, 1.595, 1.661, 1.727, 1.793, 1.859, 1.925, 1.991, 2.057, 2.123, 2.189, 2.255, 2.321 };
/*
float glnegshadeoffset = 0.075;
float glnegshadescale = 8.300;
float glshadescale = 1.900;
float glsprshadescale = 1.700;
*/
float fogcalc (signed char shade, char vis) float fogcalc (signed char shade, char vis)
{ {
float result; float result;
// return(gvisibility/(shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(vis<240?vis+16:vis-239)))); if (vis < 240) result = (float)(vis+16+(shade<0?shade/2.f:shade));
else result = (float)((vis-240+(shade<0?shade/2.f:shade))/(klabs(vis-256)));
result = (float)((vis<240?vis+16:vis-240)+shade/(vis>239?(klabs(vis-256)):1));
if(result < 0.000) result = 0.000;
// if(result > 1.000) result = 1.000;
if (result < 0.000) return (0);
return (gvisibility * result); return (gvisibility * result);
} }
#endif #endif
@ -594,7 +575,7 @@ void polymost_glinit()
GLfloat col[4]; GLfloat col[4];
bglFogi(GL_FOG_MODE,GL_EXP2); //GL_EXP(default),GL_EXP2,GL_LINEAR bglFogi(GL_FOG_MODE,GL_EXP2); //GL_EXP(default),GL_EXP2,GL_LINEAR
//bglHint(GL_FOG_HINT,GL_NICEST); bglHint(GL_FOG_HINT,GL_NICEST);
bglFogf(GL_FOG_DENSITY,1.0); //must be > 0, default is 1 bglFogf(GL_FOG_DENSITY,1.0); //must be > 0, default is 1
bglFogf(GL_FOG_START,0.0); //default is 0 bglFogf(GL_FOG_START,0.0); //default is 0
bglFogf(GL_FOG_END,1.0); //default is 1 bglFogf(GL_FOG_END,1.0); //default is 1
@ -4933,50 +4914,6 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
else glnvmultisamplehint = (val != 0); else glnvmultisamplehint = (val != 0);
return OSDCMD_OK; return OSDCMD_OK;
} }
/* else if (!Bstrcasecmp(parm->name, "r_shadescale")) {
if (showval) { OSD_Printf("r_shadescale is %g\n", glshadescale); }
else {
float val;
char value[256];
Bstrcpy(value,parm->parms[0]);
val = atof(value);
glshadescale = val;
}
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "r_sprshadescale")) {
if (showval) { OSD_Printf("r_sprshadescale is %g\n", glsprshadescale); }
else {
float val;
char value[256];
Bstrcpy(value,parm->parms[0]);
val = atof(value);
glsprshadescale = val;
}
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "r_negshadescale")) {
if (showval) { OSD_Printf("r_negshadescale is %g\n", glnegshadescale); }
else {
float val;
char value[256];
Bstrcpy(value,parm->parms[0]);
val = atof(value);
glnegshadescale = val;
}
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "r_negshadeoffset")) {
if (showval) { OSD_Printf("r_negshadeoffset is %g\n", glnegshadeoffset); }
else {
float val;
char value[256];
Bstrcpy(value,parm->parms[0]);
val = atof(value);
glnegshadeoffset = val;
}
return OSDCMD_OK;
} */
#endif #endif
return OSDCMD_SHOWHELP; return OSDCMD_SHOWHELP;
} }

View file

@ -3180,7 +3180,7 @@ void displayrest(long smoothratio)
if (getrendermode() >= 3) if (getrendermode() >= 3)
{ {
if (pp->palette == waterpal) tintr=0,tintg=0,tintb=63,tintf=8; if (pp->palette == waterpal) tintr=0,tintg=0,tintb=63,tintf=8;
else if (pp->palette == slimepal) tintr=0,tintg=63,tintb=0,tintf=8; else if (pp->palette == slimepal) tintr=20,tintg=63,tintb=20,tintf=8;
} }
// this does pain tinting etc from the CON // this does pain tinting etc from the CON

View file

@ -4677,18 +4677,19 @@ SKIPJIBS:
insptr++; insptr++;
lIn=*insptr++; lIn=GetGameVarID(*insptr++, g_i, g_p);
lIn=GetGameVarID(lIn, g_i, g_p);
if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS) if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS)
lReturn = spawn(g_i, lIn); lReturn = spawn(g_i, lIn);
switch (tw) switch (tw)
{ {
case CON_EQSPAWNVAR: case CON_EQSPAWNVAR:
if (lReturn != -1)
insertspriteq(lReturn); insertspriteq(lReturn);
case CON_ESPAWNVAR: case CON_ESPAWNVAR:
SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p);
break; break;
case CON_QSPAWNVAR: case CON_QSPAWNVAR:
if (lReturn != -1)
insertspriteq(lReturn); insertspriteq(lReturn);
break; break;
} }
@ -4704,14 +4705,18 @@ SKIPJIBS:
insptr++; insptr++;
if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS) if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS)
lReturn = spawn(g_i,*insptr++); lReturn = spawn(g_i,*insptr++);
else insptr++;
switch (tw) switch (tw)
{ {
case CON_EQSPAWN: case CON_EQSPAWN:
if (lReturn != -1)
insertspriteq(lReturn); insertspriteq(lReturn);
case CON_ESPAWN: case CON_ESPAWN:
SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p);
break; break;
case CON_QSPAWN: case CON_QSPAWN:
if (lReturn != -1)
insertspriteq(lReturn); insertspriteq(lReturn);
break; break;
} }
@ -4737,6 +4742,8 @@ SKIPJIBS:
if (tw == CON_EZSHOOT || tw == CON_ESHOOT) if (tw == CON_EZSHOOT || tw == CON_ESHOOT)
SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p);
} }
else insptr++;
hittype[g_i].temp_data[9]=0; hittype[g_i].temp_data[9]=0;
break; break;
} }