From 3364f8ab105cce5f10807ee17b6d26806d223b56 Mon Sep 17 00:00:00 2001 From: zbyti Date: Fri, 25 Sep 2020 11:20:16 +0200 Subject: [PATCH] Quatari Landscape refactor --- examples/a8/landscape.mfk | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/a8/landscape.mfk b/examples/a8/landscape.mfk index 43e90197..ac89a029 100644 --- a/examples/a8/landscape.mfk +++ b/examples/a8/landscape.mfk @@ -7,7 +7,7 @@ alias prev_y = os_OLDROW alias cursor_y = os_ROWCRS alias color = os_ATACHR -byte tmp, i +byte i array(byte) color_height = [ 170,150,144,144,122,122,110,110,94,94,86,86,82,80 @@ -28,17 +28,13 @@ void main(){ while color != $ff { cursor_y = color_height[color] - tmp = color_height[color] - if (pokey_random & 1) != 0 { - tmp += 1 + color_height[color] += 1 } else { if (pokey_random & 1) != 0 { - tmp -= 1 + color_height[color] -= 1 } } - - color_height[color] = tmp drawto() color -= 1 }