Merge __VGLGetXY() back into VGLGetXY(). They were split to simplify
the organization of fixes for the mouse cursor, but after optimizations VGLGetXY() automatically avoids the mouse cursor.
This commit is contained in:
parent
37f3d66311
commit
f766b709ef
@ -133,12 +133,19 @@ VGLSetXY(VGLBitmap *object, int x, int y, u_long color)
|
||||
}
|
||||
}
|
||||
|
||||
static u_long
|
||||
__VGLGetXY(VGLBitmap *object, int x, int y)
|
||||
u_long
|
||||
VGLGetXY(VGLBitmap *object, int x, int y)
|
||||
{
|
||||
int offset;
|
||||
u_long color;
|
||||
int offset;
|
||||
|
||||
VGLCheckSwitch();
|
||||
if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize)
|
||||
return 0;
|
||||
if (object == VGLDisplay)
|
||||
object = &VGLVDisplay;
|
||||
else if (object->Type != MEMBUF)
|
||||
return 0; /* invalid */
|
||||
offset = (y * object->VXsize + x) * object->PixelBytes;
|
||||
switch (object->PixelBytes) {
|
||||
case 1:
|
||||
@ -157,19 +164,6 @@ __VGLGetXY(VGLBitmap *object, int x, int y)
|
||||
return 0; /* invalid */
|
||||
}
|
||||
|
||||
u_long
|
||||
VGLGetXY(VGLBitmap *object, int x, int y)
|
||||
{
|
||||
VGLCheckSwitch();
|
||||
if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize)
|
||||
return 0;
|
||||
if (object == VGLDisplay)
|
||||
object = &VGLVDisplay;
|
||||
else if (object->Type != MEMBUF)
|
||||
return 0; /* invalid */
|
||||
return __VGLGetXY(object, x, y);
|
||||
}
|
||||
|
||||
/*
|
||||
* Symmetric Double Step Line Algorithm by Brian Wyvill from
|
||||
* "Graphics Gems", Academic Press, 1990.
|
||||
|
Loading…
Reference in New Issue
Block a user