mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@361 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8efa4670bb
commit
5ebab8df83
4 changed files with 12 additions and 10 deletions
|
@ -1386,7 +1386,7 @@ static int md3draw (md3model *m, spritetype *tspr)
|
||||||
|
|
||||||
bglEnable(GL_TEXTURE_2D);
|
bglEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * 1.300)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * SHADESCALE)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||||
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
||||||
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
||||||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||||
|
@ -2391,7 +2391,7 @@ if (grhalfxdown10x < 0) { mat[0] = -mat[0]; mat[4] = -mat[4]; mat[8] = -mat[8];
|
||||||
|
|
||||||
bglEnable(GL_TEXTURE_2D);
|
bglEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * 1.300)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * SHADESCALE)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||||
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
||||||
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
||||||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||||
|
|
|
@ -81,7 +81,7 @@ static double dxb1[MAXWALLSB], dxb2[MAXWALLSB];
|
||||||
#define USEZBUFFER 1 //1:use zbuffer (slow, nice sprite rendering), 0:no zbuffer (fast, bad sprite rendering)
|
#define USEZBUFFER 1 //1:use zbuffer (slow, nice sprite rendering), 0:no zbuffer (fast, bad sprite rendering)
|
||||||
#define LINTERPSIZ 4 //log2 of interpolation size. 4:pretty fast&acceptable quality, 0:best quality/slow!
|
#define LINTERPSIZ 4 //log2 of interpolation size. 4:pretty fast&acceptable quality, 0:best quality/slow!
|
||||||
#define DEPTHDEBUG 0 //1:render distance instead of texture, for debugging only!, 0:default
|
#define DEPTHDEBUG 0 //1:render distance instead of texture, for debugging only!, 0:default
|
||||||
#define FOGSCALE 0.0000600
|
#define FOGSCALE 0.0000640
|
||||||
#define PI 3.14159265358979323
|
#define PI 3.14159265358979323
|
||||||
|
|
||||||
static double gyxscale, gxyaspect, gviewxrange, ghalfx, grhalfxdown10, grhalfxdown10x, ghoriz;
|
static double gyxscale, gxyaspect, gviewxrange, ghalfx, grhalfxdown10, grhalfxdown10x, ghoriz;
|
||||||
|
@ -133,12 +133,14 @@ long fullbrightloadingpass = 0;
|
||||||
long fullbrightdrawingpass = 0;
|
long fullbrightdrawingpass = 0;
|
||||||
long shadeforfullbrightpass;
|
long shadeforfullbrightpass;
|
||||||
|
|
||||||
|
#define SHADESCALE 1.250
|
||||||
|
|
||||||
float fogcalc (signed char shade, char vis)
|
float fogcalc (signed char shade, char vis)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
|
// if(vis < 16) vis = 16;
|
||||||
if (vis < 240) result = (float)(vis+16+(shade<0?shade/2.f:shade));
|
if (vis < 240) result = (float)(vis+16+(shade<0?(-(shade)*(shade))/8.f:((shade)*(shade))/8.f));
|
||||||
else result = (float)((vis-240+(shade<0?shade/2.f:shade))/(klabs(vis-256)));
|
else result = (float)((vis-240+(shade<0?(-(shade)*(shade))/8.f:((shade)*(shade))/8.f))/(klabs(vis-256)));
|
||||||
|
|
||||||
if (result < 0.000) return (0);
|
if (result < 0.000) return (0);
|
||||||
return (gvisibility * result);
|
return (gvisibility * result);
|
||||||
|
@ -1485,7 +1487,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
|
|
||||||
{
|
{
|
||||||
float pc[4];
|
float pc[4];
|
||||||
f = ((float)(numpalookups-min(max(globalshade*1.300,0),numpalookups)))/((float)numpalookups);
|
f = ((float)(numpalookups-min(max(globalshade * SHADESCALE,0),numpalookups)))/((float)numpalookups);
|
||||||
pc[0] = pc[1] = pc[2] = f;
|
pc[0] = pc[1] = pc[2] = f;
|
||||||
switch (method&3)
|
switch (method&3)
|
||||||
{
|
{
|
||||||
|
@ -4587,7 +4589,7 @@ void polymost_fillpolygon (long npoints)
|
||||||
pth = gltexcache(globalpicnum,globalpal,0);
|
pth = gltexcache(globalpicnum,globalpal,0);
|
||||||
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
||||||
|
|
||||||
f = ((float)(numpalookups-min(max(globalshade*1.300,0),numpalookups)))/((float)numpalookups);
|
f = ((float)(numpalookups-min(max(globalshade * SHADESCALE,0),numpalookups)))/((float)numpalookups);
|
||||||
switch ((globalorientation>>7)&3) {
|
switch ((globalorientation>>7)&3) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -631,8 +631,6 @@ int32 CONFIG_ReadSetup(void)
|
||||||
if (SafeFileExists(setupfilename) && scripthandle < 0) // JBF 20031211
|
if (SafeFileExists(setupfilename) && scripthandle < 0) // JBF 20031211
|
||||||
scripthandle = SCRIPT_Load(setupfilename);
|
scripthandle = SCRIPT_Load(setupfilename);
|
||||||
|
|
||||||
initprintf("Using config file %s.\n",setupfilename);
|
|
||||||
|
|
||||||
if (scripthandle < 0) return -1;
|
if (scripthandle < 0) return -1;
|
||||||
|
|
||||||
if (scripthandle >= 0)
|
if (scripthandle >= 0)
|
||||||
|
|
|
@ -9603,6 +9603,8 @@ void app_main(int argc,char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initprintf("Using config file %s.\n",setupfilename);
|
||||||
|
|
||||||
ScanGroups();
|
ScanGroups();
|
||||||
{ // try and identify the 'defaultduke3dgrp' in the set of GRPs.
|
{ // try and identify the 'defaultduke3dgrp' in the set of GRPs.
|
||||||
// if it is found, set up the environment accordingly for the game it represents.
|
// if it is found, set up the environment accordingly for the game it represents.
|
||||||
|
|
Loading…
Reference in a new issue