From 8c76f3a6d3b1d92f3971470b2d663b57929f7581 Mon Sep 17 00:00:00 2001 From: iridiumR Date: Mon, 6 Jun 2022 20:06:14 +0800 Subject: [PATCH] =?UTF-8?q?perf(MCU=E8=AF=BE=E8=AE=BE):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MCU/MCU_REAL _FINAL/MCU_1.uvopt | 4 ++-- MCU/MCU_REAL _FINAL/block.c | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/MCU/MCU_REAL _FINAL/MCU_1.uvopt b/MCU/MCU_REAL _FINAL/MCU_1.uvopt index 19e6e61..2dd09f6 100644 --- a/MCU/MCU_REAL _FINAL/MCU_1.uvopt +++ b/MCU/MCU_REAL _FINAL/MCU_1.uvopt @@ -213,7 +213,7 @@ 1 1 1 - 1 + 0 0 0 .\main.c @@ -273,7 +273,7 @@ 1 6 1 - 1 + 0 0 0 .\block.c diff --git a/MCU/MCU_REAL _FINAL/block.c b/MCU/MCU_REAL _FINAL/block.c index cf7a3e8..ae895ad 100644 --- a/MCU/MCU_REAL _FINAL/block.c +++ b/MCU/MCU_REAL _FINAL/block.c @@ -2,6 +2,7 @@ #include "draw.h" #include "button.h" #include +#include "delay.h" char base[MAX_X][MAX_Y] = {0}; //x*y //0为空 1为下落完成 2为正在下落 extern unsigned char score; @@ -253,6 +254,11 @@ void blockGameOver() { for(j = 0; j < MAX_Y; j++) for(i = 0; i < MAX_X; i++) - base[i][j] = 1; + { + //此处看似降低效率,但其实是为了增加喜剧效果 + delayms(10); + base[i][j]=1; + placeIMG_BLOCK(i, j); + } } } \ No newline at end of file