gpfce patch
[fceu.git] / input / cursor.c
CommitLineData
c62d2810 1#include "share.h"
2
3static uint8 FCEUcursor[11*19]=
4{
5 1,0,0,0,0,0,0,0,0,0,0,
6 1,1,0,0,0,0,0,0,0,0,0,
7 1,2,1,0,0,0,0,0,0,0,0,
8 1,2,2,1,0,0,0,0,0,0,0,
9 1,2,2,2,1,0,0,0,0,0,0,
10 1,2,2,2,2,1,0,0,0,0,0,
11 1,2,2,2,2,2,1,0,0,0,0,
12 1,2,2,2,2,2,2,1,0,0,0,
13 1,2,2,2,2,2,2,2,1,0,0,
14 1,2,2,2,2,2,2,2,2,1,0,
15 1,2,2,2,2,2,1,1,1,1,1,
16 1,2,2,1,2,2,1,0,0,0,0,
17 1,2,1,0,1,2,2,1,0,0,0,
18 1,1,0,0,1,2,2,1,0,0,0,
19 1,0,0,0,0,1,2,2,1,0,0,
20 0,0,0,0,0,1,2,2,1,0,0,
21 0,0,0,0,0,0,1,2,2,1,0,
22 0,0,0,0,0,0,1,2,2,1,0,
23 0,0,0,0,0,0,0,1,1,0,0,
24};
25
26void FCEU_DrawCursor(uint8 *buf, int xc, int yc)
27{
28 int x,y;
29 int c,d;
30
31 if(xc<256 && yc<240)
32 for(y=0;y<19;y++)
33 for(x=0;x<11;x++)
34 {
35 uint8 a;
36 a=FCEUcursor[y*11+x];
37 if(a)
38 {
39 c=(yc+y);
40 d=(xc+x);
41 if(d<256 && c<240)
42 buf[c*272+d]=a+127;
43 }
44 }
45}