描画了鼠标指针,只改变了一点点代码
百度网盘下载地址:https://pan.baidu.com/s/1_-IznMWL3z1CROziiD6mCw 代码如下:void init_mouse_cursor8(int *mouse, int bc)/* 鼠标初始化函数 */{ static char cursor[16][16] = { "**************..", ...
百度网盘下载地址:
https://pan.baidu.com/s/1_-IznMWL3z1CROziiD6mCw
代码如下:
void init_mouse_cursor8(int *mouse, int bc)
/* 鼠标初始化函数 */
{
static char cursor[16][16] = {
"**************..",
"*OOOOOOOOOOO*...",
"*OOOOOOOOOO*....",
"*OOOOOOOOO*.....",
"*OOOOOOOO*......",
"*OOOOOOO*.......",
"*OOOOOOO*.......",
"*OOOOOOOO*......",
"*OOOO**OOO*.....",
"*OOO*..*OOO*....",
"*OO*....*OOO*...",
"*O*......*OOO*..",
"**........*OOO*.",
"*..........*OOO*",
"............*OO*",
".............***"
};
int x, y;
for (y = 0; y < 16; y++) {
for (x = 0; x < 16; x++) {
if (cursor[y][x] == '*') {
mouse[y * 16 + x] = 0x000000;
}
if (cursor[y][x] == 'O') {
mouse[y * 16 + x] = 0x00FFFF;
}
if (cursor[y][x] == '.') {
mouse[y * 16 + x] = bc;
}
}
}
return;
}
void putblock8_8(int *vram, int vxsize, int pxsize,
int pysize, int px0, int py0, int *buf, int bxsize)
{
int x, y;
for (y = 0; y < pysize; y++) {
for (x = 0; x < pxsize; x++) {
vram[(py0 + y) * vxsize + (px0 + x)] = buf[y * bxsize + x];
}
}
return;
}
更多推荐
所有评论(0)