perf(MCU课设): 优化动画效果
This commit is contained in:
parent
a019d644db
commit
8c76f3a6d3
2 changed files with 9 additions and 3 deletions
|
@ -213,7 +213,7 @@
|
||||||
<GroupNumber>1</GroupNumber>
|
<GroupNumber>1</GroupNumber>
|
||||||
<FileNumber>1</FileNumber>
|
<FileNumber>1</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>.\main.c</PathWithFileName>
|
<PathWithFileName>.\main.c</PathWithFileName>
|
||||||
|
@ -273,7 +273,7 @@
|
||||||
<GroupNumber>1</GroupNumber>
|
<GroupNumber>1</GroupNumber>
|
||||||
<FileNumber>6</FileNumber>
|
<FileNumber>6</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>.\block.c</PathWithFileName>
|
<PathWithFileName>.\block.c</PathWithFileName>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include <reg52.h>
|
#include <reg52.h>
|
||||||
|
#include "delay.h"
|
||||||
|
|
||||||
char base[MAX_X][MAX_Y] = {0}; //x*y //0为空 1为下落完成 2为正在下落
|
char base[MAX_X][MAX_Y] = {0}; //x*y //0为空 1为下落完成 2为正在下落
|
||||||
extern unsigned char score;
|
extern unsigned char score;
|
||||||
|
@ -253,6 +254,11 @@ void blockGameOver()
|
||||||
{
|
{
|
||||||
for(j = 0; j < MAX_Y; j++)
|
for(j = 0; j < MAX_Y; j++)
|
||||||
for(i = 0; i < MAX_X; i++)
|
for(i = 0; i < MAX_X; i++)
|
||||||
|
{
|
||||||
|
//此处看似降低效率,但其实是为了增加喜剧效果
|
||||||
|
delayms(10);
|
||||||
base[i][j]=1;
|
base[i][j]=1;
|
||||||
|
placeIMG_BLOCK(i, j);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue