29{
30 ULONG DestX, EndX, DestY, EndY;
39
40 DestX = StartX < 0 ? 0 : StartX;
41 DestY = StartY < 0 ? 0 : StartY;
42 EndX = StartX + SizeX;
43 EndY = StartY + SizeY;
44
45
48
49
52
53 if ((DestX % 8) != 0)
54 {
55
56 Mask = (1 << (8 - (DestX % 8))) - 1;
57 if ((EndX - DestX) < (8 - (DestX % 8)))
58 {
59 Mask &= ~((1 << (8 - (EndX % 8))) - 1);
60 }
63
64
66 Src = MaskBits + (SizeY - (DestY - StartY)) * MaskPitch;
67 for (
i = DestY;
i < EndY;
i++, Video += 80)
68 {
69 Src -= MaskPitch;
70 SrcValue = (*Src) >> (DestX % 8);
73 }
74 }
75
76
79
80
81 if ((EndX - DestX) < (8 - (DestX % 8)))
82 return;
83
84
85 Left = (DestX + 7) & ~0x7;
86 Length = (EndX >> 3) - (Left >> 3);
87 Bits = StartX;
88 while (Bits < 0)
89 Bits += 8;
90 Bits = Bits % 8;
91 for (
i = DestY;
i < EndY;
i++)
92 {
94 Src = MaskBits + (EndY -
i - 1) * MaskPitch + ((DestX - StartX) >> 3);
95 for (
j = 0;
j <
Length;
j++, Video++, Src++)
96 {
97 if (Bits != 0)
98 {
99 SrcValue = (Src[0] << (8 - Bits));
100 SrcValue |= (Src[1] >> Bits);
101 }
102 else
103 {
104 SrcValue = Src[0];
105 }
108 }
109 }
110
111
112 if ((EndX % 8) != 0)
113 {
114
115 Mask = ~((1 << (8 - (EndX % 8))) - 1);
118
120 Src = MaskBits + (SizeY - (DestY - StartY)) * MaskPitch + (SizeX >> 3) - 1;
121 for (
i = DestY;
i < EndY;
i++, Video += 80)
122 {
123 Src -= MaskPitch;
124 SrcValue = (Src[0] << (8 - Bits));
127 }
128
129
132 }
133
134
137
138
141}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define WRITE_PORT_UCHAR(p, d)
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)