#define GINT_NEED_VRAM #include #include /* dpixel() - change a pixel's color */ void dpixel(int x, int y, color_t color) { /* Sanity checks */ if((uint)x >= 128 || (uint)y >= 64) return; uint32_t *lword = vram + (y << 2) + (x >> 5); uint32_t mask = 1 << (~x & 31); switch(color) { case color_white: *lword &= ~mask; break; case color_black: *lword |= mask; break; case color_reverse: *lword ^= mask; break; default: return; } }