Improve random and key

This commit is contained in:
Armel FAUVEAU committed 2025-04-29 03:06:43 +02:00
1 parent ed05b7c663
commit 655e9e25fd
1 file changed
+4
+4
View File
@@ -359,11 +359,13 @@ static void OnKeyDown(uint8_t key)
switch (key)
{
case KEY_4:
case KEY_UP:
if(!isPaused && racket.x > 0)
racket.x -= 2;
isPaused = false;
break;
case KEY_0:
case KEY_DOWN:
if(!isPaused && racket.x < 102)
racket.x += 2;
isPaused = false;
@@ -452,6 +454,8 @@ static void Tick()
void APP_RunBreakout(void) {
static uint8_t swap = 0;
srand_custom(BK4819_ReadRegister(BK4819_REG_67) & 0x01FF * gBatteryVoltageAverage * gEeprom.VfoInfo[0].pRX->Frequency);
UI_DisplayClear();
initWall();
initRacket();