mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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
|
||||
{
|
||||
int32_t i;
|
||||
const int32_t shiftamnt = ((!!moreopaquep)*8);
|
||||
|
||||
assert(!offscreenrendering);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue