Optimize 'rainbow' background drawing in the editor with 8-bit renderer.

git-svn-id: https://svn.eduke32.com/eduke32@2423 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-07 19:42:20 +00:00
parent b1dbd58913
commit aa89dc6725

View file

@ -983,11 +983,18 @@ void yax_drawrooms(void (*ExtAnalyzeSprites)(void), int32_t horiz, int16_t sectn
if (getrendermode()==0)
{
begindrawing();
j = 0;
for (i=0; i<xdimen*ydimen; i++)
{
*((char *)frameplace + i) = (char)j;
j = (j+1)%xdimen;
const int32_t dimenprod = xdimen*ydimen;
char *const p = (char *)frameplace;
j = 0;
for (i=0; i<dimenprod; i++)
{
p[i] = (char)j;
j++;
if (j >= xdimen)
j = 0;
}
}
enddrawing();
}