void draw_mouse_pointer(uint16_t *fb)
{
uint16_t *dest = fb + mouse_y * FB_WIDTH + mouse_x;
-
- DEST(0, 0) = 0xffff;
- DEST(1, 1) = 0xffff;
- DEST(2, 2) = 0xffff;
- DEST(3, 3) = 0xffff;
- DEST(4, 4) = 0xffff;
- DEST(5, 5) = 0xffff;
- DEST(6, 6) = 0xffff;
- DEST(0, 1) = 0xffff;
- DEST(0, 2) = 0xffff;
- DEST(0, 3) = 0xffff;
- DEST(0, 4) = 0xffff;
- DEST(0, 5) = 0xffff;
- DEST(0, 6) = 0xffff;
- DEST(0, 7) = 0xffff;
- DEST(0, 8) = 0xffff;
- DEST(0, 9) = 0xffff;
- DEST(1, 8) = 0xffff;
- DEST(2, 7) = 0xffff;
- DEST(3, 6) = 0xffff;
- DEST(4, 6) = 0xffff;
- DEST(5, 6) = 0xffff;
- DEST(1, 2) = 0;
- DEST(1, 3) = 0;
- DEST(2, 3) = 0;
- DEST(1, 4) = 0;
- DEST(2, 4) = 0;
- DEST(3, 4) = 0;
- DEST(1, 5) = 0;
- DEST(2, 5) = 0;
- DEST(3, 5) = 0;
- DEST(4, 5) = 0;
- DEST(1, 6) = 0;
- DEST(2, 6) = 0;
- DEST(1, 7) = 0;
+ int ylines = FB_HEIGHT - mouse_y;
+
+ switch(ylines) {
+ default:
+ case 10:
+ DEST(0, 9) = 0xffff;
+ case 9:
+ DEST(0, 8) = 0xffff;
+ DEST(1, 8) = 0xffff;
+ case 8:
+ DEST(0, 7) = 0xffff;
+ DEST(2, 7) = 0xffff;
+ DEST(1, 7) = 0;
+ case 7:
+ DEST(6, 6) = 0xffff;
+ DEST(0, 6) = 0xffff;
+ DEST(3, 6) = 0xffff;
+ DEST(4, 6) = 0xffff;
+ DEST(5, 6) = 0xffff;
+ DEST(1, 6) = 0;
+ DEST(2, 6) = 0;
+ case 6:
+ DEST(5, 5) = 0xffff;
+ DEST(0, 5) = 0xffff;
+ DEST(1, 5) = 0;
+ DEST(2, 5) = 0;
+ DEST(3, 5) = 0;
+ DEST(4, 5) = 0;
+ case 5:
+ DEST(4, 4) = 0xffff;
+ DEST(0, 4) = 0xffff;
+ DEST(1, 4) = 0;
+ DEST(2, 4) = 0;
+ DEST(3, 4) = 0;
+ case 4:
+ DEST(3, 3) = 0xffff;
+ DEST(0, 3) = 0xffff;
+ DEST(1, 3) = 0;
+ DEST(2, 3) = 0;
+ case 3:
+ DEST(2, 2) = 0xffff;
+ DEST(0, 2) = 0xffff;
+ DEST(1, 2) = 0;
+ case 2:
+ DEST(1, 1) = 0xffff;
+ DEST(0, 1) = 0xffff;
+ case 1:
+ DEST(0, 0) = 0xffff;
+ }
}
static void change_screen(int idx)