From 16c08d0cf38bc12658dfe87b5c53abf9e2b68472 Mon Sep 17 00:00:00 2001 From: Felipe Manga Date: Wed, 17 Jan 2024 14:30:43 +0000 Subject: [PATCH] Generate larger/smoother hills --- apps/synthwave/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/synthwave/app.js b/apps/synthwave/app.js index 9edd2abff..a04300f44 100644 --- a/apps/synthwave/app.js +++ b/apps/synthwave/app.js @@ -47,7 +47,7 @@ void shiftTerrain() { } for (int x = 0; x < terrainWidth; ++x) - terrain[0][x] = (rng() & 0x3F) + 0xF; + terrain[0][x] = (int(terrain[0][x]) + ((rng() & 0x7F) + 0x7)) >> 1; int mid = terrainWidth >> 1; terrain[0][mid-1] >>= 1; terrain[0][mid ] = 0;