mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
- Implement VidSolidColorFill, VidSetScrollRegion and VidSetTextColor
- Fix a bug in VidpBuildColor svn path=/trunk/; revision=33975
This commit is contained in:
parent
bfd0d8594d
commit
133e63adea
1 changed files with 54 additions and 8 deletions
|
@ -23,6 +23,16 @@
|
||||||
#define WRITE_REGISTER_USHORT(r, v) (*(volatile USHORT *)(r) = (v))
|
#define WRITE_REGISTER_USHORT(r, v) (*(volatile USHORT *)(r) = (v))
|
||||||
|
|
||||||
PUSHORT VgaArmBase;
|
PUSHORT VgaArmBase;
|
||||||
|
UCHAR VidpTextColor = 0xF;
|
||||||
|
ULONG VidpCurrentX = 0;
|
||||||
|
ULONG VidpCurrentY = 0;
|
||||||
|
ULONG VidpScrollRegion[4] =
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
640 - 1,
|
||||||
|
480 - 1
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _VGA_COLOR
|
typedef struct _VGA_COLOR
|
||||||
{
|
{
|
||||||
|
@ -69,7 +79,7 @@ VidpBuildColor(IN UCHAR Color)
|
||||||
//
|
//
|
||||||
// Build the 16-bit color mask
|
// Build the 16-bit color mask
|
||||||
//
|
//
|
||||||
return ((Blue & 0x1F) << 11) | ((Green & 0x1F) << 6) | ((Red & 0x1F));
|
return ((Red & 0x1F) << 11) | ((Green & 0x1F) << 6) | ((Blue & 0x1F));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,9 +192,18 @@ ULONG
|
||||||
NTAPI
|
NTAPI
|
||||||
VidSetTextColor(ULONG Color)
|
VidSetTextColor(ULONG Color)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UCHAR OldColor;
|
||||||
while (TRUE);
|
|
||||||
return 0;
|
//
|
||||||
|
// Save the old, set the new
|
||||||
|
//
|
||||||
|
OldColor = VidpTextColor;
|
||||||
|
VidpTextColor = Color;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Return the old text color
|
||||||
|
//
|
||||||
|
return OldColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -211,8 +230,19 @@ VidSetScrollRegion(ULONG x1,
|
||||||
ULONG x2,
|
ULONG x2,
|
||||||
ULONG y2)
|
ULONG y2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
/* Assert alignment */
|
||||||
while (TRUE);
|
ASSERT((x1 & 0x7) == 0);
|
||||||
|
ASSERT((x2 & 0x7) == 7);
|
||||||
|
|
||||||
|
/* Set Scroll Region */
|
||||||
|
VidpScrollRegion[0] = x1;
|
||||||
|
VidpScrollRegion[1] = y1;
|
||||||
|
VidpScrollRegion[2] = x2;
|
||||||
|
VidpScrollRegion[3] = y2;
|
||||||
|
|
||||||
|
/* Set current X and Y */
|
||||||
|
VidpCurrentX = x1;
|
||||||
|
VidpCurrentY = y1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -293,6 +323,22 @@ VidSolidColorFill(IN ULONG Left,
|
||||||
IN ULONG Bottom,
|
IN ULONG Bottom,
|
||||||
IN UCHAR Color)
|
IN UCHAR Color)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
int y, x;
|
||||||
while (TRUE);
|
|
||||||
|
//
|
||||||
|
// Loop along the Y-axis
|
||||||
|
//
|
||||||
|
for (y = Top; y <= Bottom; y++)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Loop along the X-axis
|
||||||
|
//
|
||||||
|
for (x = Left; x <= Right; x++)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Draw the pixel
|
||||||
|
//
|
||||||
|
VidpSetPixel(x, y, Color);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue