mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Apply the transformations of the previous commit to tslopevlin().
This doesn't give much, maybe 0.5 fps more, probably because the loop body is pretty long. git-svn-id: https://svn.eduke32.com/eduke32@2406 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
792ac2fdf0
commit
823d37fb51
1 changed files with 22 additions and 13 deletions
|
@ -4069,34 +4069,43 @@ static void setupslopevlin_alsotrans(int32_t logylogx, intptr_t bufplc, int32_t
|
||||||
ggpal = palookup[globalpal] + (getpalookup(0,globalshade)<<8);
|
ggpal = palookup[globalpal] + (getpalookup(0,globalshade)<<8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cnt iterations
|
||||||
static void tslopevlin(uint8_t *p, int32_t i, const intptr_t *slopalptr, int32_t cnt, int32_t bx, int32_t by)
|
static void tslopevlin(uint8_t *p, int32_t i, const intptr_t *slopalptr, int32_t cnt, int32_t bx, int32_t by)
|
||||||
{
|
{
|
||||||
int32_t bz, bzinc;
|
const char *const buf = ggbuf;
|
||||||
|
const char *const pal = ggpal;
|
||||||
|
const char *const trans = transluc;
|
||||||
|
const int32_t bzinc = (asm1>>3), pinc = ggpinc;
|
||||||
|
|
||||||
|
const int32_t transmode = (globalorientation&128);
|
||||||
|
const int32_t xtou = globalx3, ytov = globaly3;
|
||||||
|
const int32_t logx = gglogx, logy = gglogy;
|
||||||
|
|
||||||
|
int32_t bz = asm3;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
uint8_t ch;
|
||||||
uint32_t u, v;
|
uint32_t u, v;
|
||||||
|
|
||||||
uint8_t ch;
|
|
||||||
|
|
||||||
bz = asm3; bzinc = (asm1>>3);
|
|
||||||
|
|
||||||
for (; cnt>0; cnt--)
|
|
||||||
{
|
|
||||||
i = krecipasm(bz>>6); bz += bzinc;
|
i = krecipasm(bz>>6); bz += bzinc;
|
||||||
u = bx+globalx3*i;
|
u = bx + xtou*i;
|
||||||
v = by+globaly3*i;
|
v = by + ytov*i;
|
||||||
ch = *(uint8_t *)(slopalptr[0] + ggbuf[((u>>(32-gglogx))<<gglogy)+(v>>(32-gglogy))]);
|
ch = *(uint8_t *)(slopalptr[0] + buf[((u>>(32-logx))<<logy)+(v>>(32-logy))]);
|
||||||
|
|
||||||
if (globalorientation&128)
|
if (transmode)
|
||||||
{
|
{
|
||||||
if (ch != 255) *p = transluc[*p+(ggpal[ch]<<8)];
|
if (ch != 255) *p = trans[*p|(pal[ch]<<8)];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ch != 255) *p = transluc[(*p<<8)+ggpal[ch]];
|
if (ch != 255) *p = trans[(*p<<8)|pal[ch]];
|
||||||
}
|
}
|
||||||
|
|
||||||
slopalptr--;
|
slopalptr--;
|
||||||
p += ggpinc;
|
p += pinc;
|
||||||
}
|
}
|
||||||
|
while (--cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue