- 注册时间
- 2004-10-2
- 最后登录
- 1970-1-1
|
#define onSCREEN 0x40
#define INVERSE 0x08
#define BIG_FONT 0x80
#define DRAW 0x01
#define FLIP 0x20
void _GetBlock(int x,int y,int w,int h,int buf,int data)
//Width=160;Height=80;
{
int bx,mb,i,my,mx,dest;
int Width,Height;
char prev,next;
mb=x%8;
i=0;
Width=160;Height=80;
for(my=y;my<y+h;my++)
for(mx=x/8;mx<(x+w)/8;mx++)
{
dest=buf+mx+my*Width/8;
prev=*dest<<mb;
next=*(dest+1)>>(8-mb);
*(data+i)=prev|next;
i++;
}
}
void main()
{
char buffer[1600];
Circle(80,40,36,0,1);
_GetBlock(10,10,70,70,_GRAPH,buffer);
WriteBlock(0,0,70,70,onSCREEN|DRAW,buffer);
}
|
|