Use HlpRGBColor() internally
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 42s
Builds / ExectOS (i686) (push) Successful in 41s

This commit is contained in:
Rafal Kupiec 2024-05-17 23:29:03 +02:00
parent 811b173387
commit d2014a5e82
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 10 additions and 10 deletions

View File

@ -32,7 +32,7 @@ HlClearScreen(IN ULONG Color)
FrameBuf = HlpFrameBufferData.Address; FrameBuf = HlpFrameBufferData.Address;
/* Convert background color */ /* Convert background color */
BackgroundColor = HlRGBColor(Color); BackgroundColor = HlpRGBColor(Color);
/* Fill the screen with a black box */ /* Fill the screen with a black box */
for(PositionY = 0; PositionY < HlpFrameBufferData.Height; PositionY++) for(PositionY = 0; PositionY < HlpFrameBufferData.Height; PositionY++)
@ -87,7 +87,7 @@ HlDrawPixel(IN ULONG PositionX,
FrameBufferIndex = 4 * HlpFrameBufferData.PixelsPerScanLine * PositionY + 4 * PositionX; FrameBufferIndex = 4 * HlpFrameBufferData.PixelsPerScanLine * PositionY + 4 * PositionX;
/* Set the color of the pixel by writing to the corresponding memory location */ /* Set the color of the pixel by writing to the corresponding memory location */
*((PULONG)(HlpFrameBufferData.Address + FrameBufferIndex)) = HlRGBColor(Color); *((PULONG)(HlpFrameBufferData.Address + FrameBufferIndex)) = HlpRGBColor(Color);
} }
/** /**
@ -248,7 +248,7 @@ HlPutCharacter(IN ULONG PositionX,
/* Find the glyph position on the frame buffer and set font color */ /* Find the glyph position on the frame buffer and set font color */
GlyphPixel = (UINT_PTR)HlpFrameBufferData.Address + PositionY * HlpFrameBufferData.Pitch + PositionX * 4; GlyphPixel = (UINT_PTR)HlpFrameBufferData.Address + PositionY * HlpFrameBufferData.Pitch + PositionX * 4;
FontColor = HlRGBColor(Color); FontColor = HlpRGBColor(Color);
/* Check all kerning fragments */ /* Check all kerning fragments */
Mapping = 0; Mapping = 0;
@ -333,7 +333,7 @@ HlPutCharacter(IN ULONG PositionX,
*/ */
XTAPI XTAPI
ULONG ULONG
HlRGBColor(IN ULONG Color) HlpRGBColor(IN ULONG Color)
{ {
USHORT Blue, Green, Red, Reserved; USHORT Blue, Green, Red, Reserved;

View File

@ -55,6 +55,10 @@ XTAPI
XTSTATUS XTSTATUS
HlInitializeFrameBuffer(VOID); HlInitializeFrameBuffer(VOID);
XTAPI
VOID
HlInitializeProcessor();
XTAPI XTAPI
VOID VOID
HlPutCharacter(IN ULONG PositionX, HlPutCharacter(IN ULONG PositionX,
@ -62,16 +66,12 @@ HlPutCharacter(IN ULONG PositionX,
IN ULONG Color, IN ULONG Color,
IN WCHAR WideCharacter); IN WCHAR WideCharacter);
XTAPI
ULONG
HlRGBColor(IN ULONG Color);
XTFASTCALL XTFASTCALL
VOID VOID
HlSetRunLevel(IN KRUNLEVEL RunLevel); HlSetRunLevel(IN KRUNLEVEL RunLevel);
XTAPI XTAPI
VOID ULONG
HlInitializeProcessor(); HlpRGBColor(IN ULONG Color);
#endif /* __XTOSKRNL_HLI_H */ #endif /* __XTOSKRNL_HLI_H */