looks like I'm doing disco debugging

This commit is contained in:
Amy G. Bowersox 2019-12-07 23:41:55 -07:00
parent 6af1c1c058
commit cc074e33e8

View File

@ -1,6 +1,7 @@
#include <string.h>
#include <alloca.h>
#include "wintype.h"
#inlcude "log.h"
#include "fbinit.h"
#include "fontengine.h"
#include "fbprimitive.h"
@ -122,21 +123,24 @@ static void internal_textout(INT32 x, INT32 y, INT32 width, INT32 height, PBYTE
INT32 i, j;
BYTE b;
PUINT16 dptr, lbuf;
Log(LDEBUG, "internal_textout(%d, %d, %d, %d, bits)", x, y, width, height);
if (((x + width) >= Fb_Info->width) || ((y + height) >= Fb_Info->height))
return;
dptr = loc_from_coords(x, y);
lbuf = (PUINT16)alloca(width * sizeof(UINT16));
for (i=0; i<height; i++)
{
Log(LDEBUG, "composing row %d", i);
for (j=0; j<width; j++)
{
b = *gsbits++;
lbuf[i] = ((UINT16)(b >> 3) & 0x1F) << 11;
lbuf[i] |= ((UINT16)(b >> 2) & 0x3F) << 5;
lbuf[i] |= ((UINT16)(b >> 3) & 0x1F);
lbuf[j] = ((UINT16)(b >> 3) & 0x1F) << 11;
lbuf[j] |= ((UINT16)(b >> 2) & 0x3F) << 5;
lbuf[j] |= ((UINT16)(b >> 3) & 0x1F);
}
Log(LDEBUG, "rendering row %d", i);
memcpy(dptr, lbuf, width * sizeof(UINT16));
dptr += Fb_Info->width;
}