Skip to content

Commit

Permalink
Update GyroRaycaster.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
codingABI committed Jun 3, 2022
1 parent f57eea6 commit 74d1dd8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/GyroRaycaster.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* - use bit shift for multis or divs where possible
* - sin128 with 0-255 "degrees"
* 27.05.2022, Display 0-255 "degrees" on OLED as 0-359 degrees
* 03.06.2022, Improve symetry due odd height for stripes
* 03.06.2022, Release version v0.1.0
*/

#include <Adafruit_GFX.h>
Expand Down Expand Up @@ -261,7 +263,8 @@ void drawScene() {

minDistance= ((long)minDistance* (int) sin128(64-(g_viewerAngle-angle))) >> 7; //fisheye reduce

height = (long) ((VIEWPORT_HEIGHT<<STRIPEHEIGHTSHIFT)<<STRIPEHEIGHTSCALERSHIFT)/minDistance; // Current stripheight
height = (long) ((VIEWPORT_HEIGHT<<STRIPEHEIGHTSHIFT)<<STRIPEHEIGHTSCALERSHIFT)/minDistance; // Current stripe height
if (height & 1) height ++; // align to odd height

// texture pixel height is proportional to max/real wall stripe height
textureDeltaY = (float)STRIPEHEIGHT/height;
Expand Down Expand Up @@ -349,7 +352,8 @@ void setup(void) {
while (true);
}

// Font settings
// Intro text
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.setTextSize(2);
display.println(F("Find the"));
Expand Down

0 comments on commit 74d1dd8

Please sign in to comment.