/*
1.创建一个可视化窗口
2.显示一张背景图
*/
#include
#include
#include
#include
#include
#include
#pragma comment(lib,"winmm.lib")
/*
stdlib.h : Sleep
stdio.h : C语言头文件
conio.h : _getch()
graphics.h: 图形库头文件
写的时候报错,需要安装
*/
int main()
{
//288*608
srand((unsigned int)time(NULL));
initgraph(288, 608);
struct 柱子 pillar[3];
for (int i = 0; i < 3; i++)
{
initPillar(pillar, i);
//让柱子之间有差距
pillar[i].x = 288 + i * 150;
}
loadResource();
while (1)
{
putimage(0, 0, &background);
drawBird(flyBird.x, flyBird.y);
flyBird.y += 10;
for (int i = 0; i < 3; i++)
{<