Implement fix from Mednafen for Fantastic Pinball Kyuutenkai. (#206)
[pcsx_rearmed.git] / frontend / nopic.h
... / ...
CommitLineData
1/* these are just deps, to be removed */
2
3static const struct {
4 unsigned int width;
5 unsigned int height;
6 unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
7 unsigned char pixel_data[128 * 96 * 3 + 1];
8} NoPic_Image = {
9 128, 96, 3, ""
10};
11
12extern void PaintPicDot(unsigned char * p,unsigned char c);
13extern unsigned char cFont[10][120];
14
15void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot)
16{
17 unsigned char *pf;
18 int x,y;
19 int c,v;
20
21 pf=pMem+(103*3); // offset to number rect
22
23 for(y=0;y<20;y++) // loop the number rect pixel
24 {
25 for(x=0;x<6;x++)
26 {
27 c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot)
28 v=(c&0xc0)>>6;
29 PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect
30 v=(c&0x30)>>4;
31 PaintPicDot(pf,(unsigned char)v);pf+=3;
32 v=(c&0x0c)>>2;
33 PaintPicDot(pf,(unsigned char)v);pf+=3;
34 v=c&0x03;
35 PaintPicDot(pf,(unsigned char)v);pf+=3;
36 }
37 pf+=104*3; // next rect y line
38 }
39
40 pf=pMem; // ptr to first pos in 128x96 pic
41 for(x=0;x<128;x++) // loop top/bottom line
42 {
43 *(pf+(95*128*3))=0x00;*pf++=0x00;
44 *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red
45 *(pf+(95*128*3))=0xff;*pf++=0xff;
46 }
47 pf=pMem; // ptr to first pos
48 for(y=0;y<96;y++) // loop left/right line
49 {
50 *(pf+(127*3))=0x00;*pf++=0x00;
51 *(pf+(127*3))=0x00;*pf++=0x00; // paint it red
52 *(pf+(127*3))=0xff;*pf++=0xff;
53 pf+=127*3; // offset to next line
54 }
55}
56
57