From 0ed24fdcd28d9f08afcbaa0826fbd392500e64dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 31 Aug 2018 19:12:47 +0200 Subject: [PATCH] Add multiple hits --- game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game.cpp b/game.cpp index 0991e82..1dadb34 100644 --- a/game.cpp +++ b/game.cpp @@ -16,7 +16,7 @@ public: int16_t getHeight(int16_t x, int16_t y) { if (x > 12 || y > 12) - return x * y; + return max(x,y) - 10; return (x < 0 || y < 0 || x > 9 || y > 9) ? 1 : 0; } @@ -59,7 +59,7 @@ void draw() { RayConstraints c; - c.maxHits = 1; + c.maxHits = 3; c.maxSteps = 32; render(player.mCamera,heightFunc,pixelFunc,c);