mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
More consistent console scroll speed (especially with a low framerate)
This still seems to screw up sometimes. git-svn-id: https://svn.eduke32.com/eduke32@449 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c4868aa2b6
commit
d6aa1e6c85
2 changed files with 26 additions and 14 deletions
|
@ -730,21 +730,32 @@ void OSD_Draw(void)
|
|||
osdscroll = 0;
|
||||
else
|
||||
{
|
||||
/*
|
||||
int i = getticks();
|
||||
|
||||
int i = getticks(), j;
|
||||
|
||||
if (!osdscrtime) osdscrtime = i;
|
||||
*/
|
||||
if ((osdrowscur < osdrows && osdscroll == 1) || osdrowscur < -1)
|
||||
osdrowscur += 1;//(i-osdscrtime)>>3;
|
||||
{
|
||||
j = (i-osdscrtime);
|
||||
while (j > -1)
|
||||
{
|
||||
osdrowscur++;
|
||||
j -= 10;
|
||||
if (osdrowscur > osdrows-1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((osdrowscur > -1 && osdscroll == -1) || osdrowscur > osdrows)
|
||||
osdrowscur -= 1;//(i-osdscrtime)>>3;
|
||||
/*
|
||||
if (osdrowscur > osdrows) osdrowscur = osdrows;
|
||||
if (osdrowscur < -1) osdrowscur = -1;
|
||||
OSD_Printf("%ld\n",(i-osdscrtime)>>3);
|
||||
osdscrtime = i;
|
||||
*/
|
||||
{
|
||||
j = (i-osdscrtime);
|
||||
while (j > -1)
|
||||
{
|
||||
osdrowscur--;
|
||||
j -= 10;
|
||||
if (osdrowscur < 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
osdscrtime = getticks();
|
||||
}
|
||||
|
||||
if (!osdvisible || !osdrowscur) return;
|
||||
|
|
|
@ -149,7 +149,7 @@ GLuint *peels; // peels identifiers
|
|||
GLuint *peelfbos; // peels FBOs identifiers
|
||||
GLuint peelprogram; // ARBfp peeling fragment program
|
||||
|
||||
float fogresult;
|
||||
float fogresult, ofogresult;
|
||||
|
||||
void fogcalc (const signed char *shade, const char *vis)
|
||||
{
|
||||
|
@ -1810,9 +1810,10 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
|||
shadeforfullbrightpass = globalshade; // save the current shade
|
||||
bglFogf(GL_FOG_DENSITY,0.0f); // no fog
|
||||
globalshade = -128; // fullbright
|
||||
ofogresult = fogresult;
|
||||
drawpoly(dpx, dpy, n_, method_); // draw them afterwards, then. :)
|
||||
fogresult = ofogresult;
|
||||
globalshade = shadeforfullbrightpass;
|
||||
fogcalc(&globalshade, &globalvisibility);
|
||||
bglFogf(GL_FOG_DENSITY, fogresult);
|
||||
fullbrightdrawingpass = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue