X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fnopic.h;fp=frontend%2Fnopic.h;h=d664f805204a33689c2f2965bc24557d6a491793;hp=0000000000000000000000000000000000000000;hb=e906c010e1bea71ed4df425be97ce45dc777818c;hpb=f2bd6ff85d23f3e421b2f30f86080d71d4e95046 diff --git a/frontend/nopic.h b/frontend/nopic.h new file mode 100644 index 00000000..d664f805 --- /dev/null +++ b/frontend/nopic.h @@ -0,0 +1,57 @@ +/* these are just deps, to be removed */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[128 * 96 * 3 + 1]; +} NoPic_Image = { + 128, 96, 3, "" +}; + +extern void PaintPicDot(unsigned char * p,unsigned char c); +extern unsigned char cFont[10][120]; + +void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot) +{ + unsigned char *pf; + int x,y; + int c,v; + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +} + +