22 lines
964 B
C
22 lines
964 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ML_pixel_test.c */
|
|
/* | Project : libmonochrome */
|
|
/* */
|
|
/* By: Pierre "PierrotLL" Le Gall <legallpierre89@gmail.com> */
|
|
/* Last updated: 2011/11/22 */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <monochrome/internals.h>
|
|
|
|
ML_Color ML_pixel_test(int x, int y)
|
|
{
|
|
if (x & ~127 || y & ~63)
|
|
return ML_TRANSPARENT;
|
|
char *vram = ML_vram_xy(x, y);
|
|
int byte = 128 >> (x & 7);
|
|
|
|
return (*vram & byte ? ML_BLACK : ML_WHITE);
|
|
}
|