3 },
{ 120, 250 },
{ 133, 203 },
{ 160, 170 },
{ 200, 140 },
{ 240, 130 },
{ 280, 135 },
{ 312, 146 },
{ 340, 170 },
{ 360, 195 },
{ 375, 230 }
};
char buff[46][50] = {
"一封信",
"两年未都",
"没动笔",
"三个字",
"过了",
"几个四季",
"你是有",
"多想逃避",
"来不及",
"问问你",
"我已经",
"错过",
"相爱",
"的日期",
"那天你",
"消失在",
"人海里",
"你的背影",
"沉默的",
"让人恐惧",
"你说的",
"那些问题",
"我回答得",
"很坚定",
"偏偏",
"那个时候",
"我最想你",
"我不曾",
"爱过你",
"我自己",
"骗自己",
"已经给你",
"写了信",
"又被我",
"丢进海里",
"我不曾",
"爱过你",
"我自己",
"骗自己",
"明明觉得",
"自己",
"很冷静",
"却还",
"掉入",
"我自己",
"的陷阱"
};
//通过时间做随机数的种子
srand((unsigned)time(NULL));
//如何在窗口显示文字
//编程 和计算机做交互 显示
//printf
InitImg();
//for (int i = 0; i < 20; i++)
//{
// //3.显示 printf("%d\n", x);//显示整数 putimage()
// putimage(0, 0, &img[i]);//图片在窗口显示的位置
// Sleep(1000);//格式化输出
//}
//out输出 text文本 xy位置
//在窗口对应的位置输出文本
//outtextxy(0,0,"Hello,World!");
//简单的绘图
for (int i = 0; i < 46; i++){
//设置颜色
settextcolor(RGB(rand() % 256, rand() % 256, rand() % 256));
//i 0-45
//outtextxy(arr[i].x, arr[i].y,buff[i]);
putimage(arr[i].x, arr[i].y, &imgSmall[i % 20]);
Sleep(80);
}
/*MOUSEMSG m;
while (1){
m = GetMouseMsg();
if (m.uMsg == WM_LBUTTONDOWN){
printf("X:%d,Y:%d\n", m.x, m.y);
}
}*/
int add = 0;
while (1){
//清除设备
cleardevice();
for (int i = 0; i < 46; i++){
//设置颜色
//settextcolor(RGB(rand() % 256, rand() % 256, rand() % 256));
//i 0-45
//outtextxy(arr[i].x, arr[i].y, buff[(i+add)%46]);
putimage(arr[i].x, arr[i].y, &imgSmall[(i + add) % 20]);
}
//ctrl +k ctrl+c 注释 20张 0-19 rand%20 0-1