diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -13,7 +13,7 @@ static Game *game = NULL; static void deinit(void); static int main_loop(void *udata); -static void acid(void); +static void acid(const Game *game); int main(int argc, char **argv) @@ -87,7 +87,7 @@ main_loop(void *udata) pxCls(0); pxPalt(0, true); game_draw(game); - acid(); + acid(game); pxFlip(); if (TZR_DrawEnd()) return 1; @@ -95,12 +95,13 @@ main_loop(void *udata) } static void -acid(void) +acid(const Game *game) { PxCol cols[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; + const int bg = (game->queue_restart_scene != 0); for (int i = 0; i < 1024; i++) { - const int i = 1 + rand() % 7; - const int k = 1 + rand() % 7; + const int i = !bg + rand() % (7 + bg); + const int k = !bg + rand() % (7 + bg); if (i == k) continue; cols[i] ^= cols[k]; |