程序不报错但是就是烧进板里面直接显示游戏结束,去掉中断之后出现的只有蜂鸣器和闪烁的游戏起始位置
void main()
{
uint i,z,j;
Init_INT();
Map_init();
MatrixLED_Init();
while(1)
{
j=100;
while(j--)
{
z++;
if(z>50)
{
z=0;
Go_DW();
}
if(K_UP==0)
{
Delay_us(2);
if(K_UP==0)
{
Go_UP();
Delay_us(20);
while(!K_UP)
{
for(i=0;i<8;i++)
{
MatrixLED_ShowColumn(i,Map[i]);
Delay_us(20);
MatrixLED_ShowColumn(i,Bird[i]);
}
}
while(!K_UP)
{
Bright();
}
}
}
for(i=0;i<8;i++)
{
MatrixLED_ShowColumn(i,Map[i]);
Delay_us(20);
MatrixLED_ShowColumn(i,Bird[i]);
}
if((Bird[1])&(Map[1]))
{
// InitTimer0();
for(z=0;z<200;z++) //蜂鸣器叫两声
{
buzzer=buzzer;buzzer;
Delay_us(200);
}
for(z=0;z<200;z++)
{
buzzer=
Delay_us(200);
}
app_start();
}
}
Shift();
}
}
使游戏能够正常进行游戏
游戏代码这么少?不可能吧?