mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
Optimize fade_screen_black(). 49 --> 54 fps for test scene.
git-svn-id: https://svn.eduke32.com/eduke32@2407 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
823d37fb51
commit
bb5f118985
1 changed files with 11 additions and 5 deletions
|
@ -2332,14 +2332,20 @@ void fade_screen_black(int32_t moreopaquep)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int32_t i;
|
|
||||||
const int32_t shiftamnt = ((!!moreopaquep)*8);
|
|
||||||
|
|
||||||
assert(!offscreenrendering);
|
assert(!offscreenrendering);
|
||||||
|
|
||||||
begindrawing();
|
begindrawing();
|
||||||
for (i=0; i<xdim*ydim; i++)
|
{
|
||||||
((uint8_t *)frameplace)[i] = transluc[(((uint8_t *)frameplace)[i])<<shiftamnt];
|
char *const p = (char *)frameplace;
|
||||||
|
const char *const trans = transluc;
|
||||||
|
const int32_t shiftamnt = ((!!moreopaquep)*8);
|
||||||
|
const int32_t dimprod = xdim*ydim;
|
||||||
|
|
||||||
|
int32_t i;
|
||||||
|
|
||||||
|
for (i=0; i<dimprod; i++)
|
||||||
|
p[i] = trans[p[i]<<shiftamnt];
|
||||||
|
}
|
||||||
enddrawing();
|
enddrawing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue