From 3e5ae0de2d3e140490931109cbc7f60a303b3517 Mon Sep 17 00:00:00 2001 From: iridiumR Date: Mon, 6 Jun 2022 22:57:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(MCU=E8=AF=BE=E8=AE=BE):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=86=E6=95=B0=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MCU/MCU_REAL _FINAL/menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MCU/MCU_REAL _FINAL/menu.c b/MCU/MCU_REAL _FINAL/menu.c index 9fbbe9c..ab5d39a 100644 --- a/MCU/MCU_REAL _FINAL/menu.c +++ b/MCU/MCU_REAL _FINAL/menu.c @@ -23,7 +23,7 @@ Menu* LAST = NULL; // enum OPR opr = idle; static unsigned char local[10] = {0}; -unsigned int score = 0; +unsigned int score; extern enum GS blockGameStatus; @@ -126,9 +126,9 @@ void m_block(struct _menu* this) drawVOID8(70, 6, 32); } drawSUPNUM(70, 2, score/10000); //绘制分数 - drawSUPNUM(79, 2, score/1000); - drawSUPNUM(88, 2, score/100); - drawSUPNUM(97, 2, score/10); + drawSUPNUM(79, 2, (score%10000)/1000); + drawSUPNUM(88, 2, (score%1000)/100); + drawSUPNUM(97, 2, (score%100)/10); drawSUPNUM(106, 2, score%10); blockGameOver(); //检查是否游戏结束 genPiece(); //若有需要,生成新块