revert nack a little

This commit is contained in:
Denis Pauk 2018-08-04 23:30:30 +03:00
parent a3406b38a3
commit 0d69454b54

View file

@ -117,25 +117,13 @@ RE_Draw_CharScaled(int x, int y, int num, float scale)
while (drawline--) while (drawline--)
{ {
for (ypos=0; ypos < iscale; ypos ++) for (ypos=0; ypos < iscale; ypos ++)
{
if (iscale == 1)
{ {
for(u=0; u < 8; u++) for(u=0; u < 8; u++)
{ {
if (source[u] != TRANSPARENT_COLOR) if (source[u] != TRANSPARENT_COLOR)
for (xpos=0; xpos < iscale; xpos ++)
{ {
dest[u] = source[u]; dest[u * iscale + xpos] = source[u];
}
}
}
else
{
for(u=0; u < 8; u++)
{
if (source[u] != TRANSPARENT_COLOR)
{
memset(dest + u * iscale, source[u], iscale);
}
} }
} }
dest += vid.width; dest += vid.width;
@ -294,33 +282,40 @@ RE_Draw_PicScaled(int x, int y, char *name, float scale)
dest = vid_buffer + y * vid.width + x; dest = vid_buffer + y * vid.width + x;
if (!pic->transparent) if (!pic->transparent)
{
for (v=0; v<height; v++)
{ {
if (iscale == 1) if (iscale == 1)
{
for (v=0; v<height; v++)
{ {
memcpy(dest, source, pic->width); memcpy(dest, source, pic->width);
dest += vid.width; dest += vid.width;
}
else
{
for(ypos=0; ypos < iscale; ypos++)
{
for (u=0; u<pic->width; u++)
{
memset(dest + u * iscale, source[u], iscale);
}
dest += vid.width;
}
}
source += pic->width; source += pic->width;
} }
} }
else else
{ {
for (v=0; v<height; v++) for (v=0; v<height; v++)
{
for(ypos=0; ypos < iscale; ypos++)
{
for (u=0; u<pic->width; u++)
{
for(xpos=0; xpos < iscale; xpos++)
{
dest[u * iscale + xpos] = source[u];
}
}
dest += vid.width;
}
source += pic->width;
}
}
}
else
{ {
if (iscale == 1) if (iscale == 1)
{
for (v=0; v<height; v++)
{ {
for (u=0; u<pic->width; u++) for (u=0; u<pic->width; u++)
{ {
@ -328,23 +323,30 @@ RE_Draw_PicScaled(int x, int y, char *name, float scale)
dest[u] = source[u]; dest[u] = source[u];
} }
dest += vid.width; dest += vid.width;
source += pic->width;
}
} }
else else
{
for (v=0; v<height; v++)
{ {
for(ypos=0; ypos < iscale; ypos++) for(ypos=0; ypos < iscale; ypos++)
{ {
for (u=0; u<pic->width; u++) for (u=0; u<pic->width; u++)
{ {
if (source[u] != TRANSPARENT_COLOR) if (source[u] != TRANSPARENT_COLOR)
memset(dest + u * iscale, source[u], iscale); for(xpos=0; xpos < iscale; xpos++)
{
dest[u * iscale + xpos] = source[u];
}
} }
dest += vid.width; dest += vid.width;
} }
}
source += pic->width; source += pic->width;
} }
} }
} }
}
/* /*
============= =============
@ -408,7 +410,7 @@ void
RE_Draw_Fill (int x, int y, int w, int h, int c) RE_Draw_Fill (int x, int y, int w, int h, int c)
{ {
pixel_t *dest; pixel_t *dest;
int u, v; int v;
if (x+w > vid.width) if (x+w > vid.width)
w = vid.width - x; w = vid.width - x;