tuxtxt: simplify FillRect() for Tripledragon

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1393 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2011-04-11 17:17:42 +00:00
parent df3d2fbc3b
commit 48d34b432d

View File

@@ -36,6 +36,9 @@ void FillRect(int x, int y, int w, int h, int color)
unsigned char *p = lfb + x*4 + y * fix_screeninfo.line_length; unsigned char *p = lfb + x*4 + y * fix_screeninfo.line_length;
#if !HAVE_TRIPLEDRAGON #if !HAVE_TRIPLEDRAGON
unsigned int col = bgra[color][3] << 24 | bgra[color][2] << 16 | bgra[color][1] << 8 | bgra[color][0]; unsigned int col = bgra[color][3] << 24 | bgra[color][2] << 16 | bgra[color][1] << 8 | bgra[color][0];
#else
unsigned int col = *((unsigned int*)bgra[color]);
#endif
if (w > 0) if (w > 0)
for (int count = 0; count < h; count++) { for (int count = 0; count < h; count++) {
unsigned int * dest0 = (unsigned int *)p; unsigned int * dest0 = (unsigned int *)p;
@@ -43,18 +46,6 @@ void FillRect(int x, int y, int w, int h, int color)
*(dest0++) = col; *(dest0++) = col;
p += fix_screeninfo.line_length; p += fix_screeninfo.line_length;
} }
#else
int xtmp;
if (w > 0)
for ( ; h > 0 ; h--)
{
for (xtmp=0; xtmp<=w; xtmp++)
{
memmove(p+xtmp*4,bgra[color],4);
}
p += fix_screeninfo.line_length;
}
#endif
} }
void FillBorder(int color) void FillBorder(int color)