From 6ac29936ca2723411ce28db027ccd71f99e1f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Tue, 18 Sep 2018 19:10:20 +0200 Subject: [PATCH] Update --- demo1.cpp | 12 ++++++------ demo3.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/demo1.cpp b/demo1.cpp index 59c2733..fa8efeb 100644 --- a/demo1.cpp +++ b/demo1.cpp @@ -995,7 +995,7 @@ inline void pixelFunc(RCL_PixelInfo *pixel) if (pixel->position.y == MIDDLE_ROW) zBuffer[pixel->position.x] = pixel->depth; - uint8_t c; + uint8_t color; RCL_Unit depth = pixel->depth - RCL_UNITS_PER_SQUARE * 3; depth = depth > 0 ? depth : 1; @@ -1014,19 +1014,19 @@ inline void pixelFunc(RCL_PixelInfo *pixel) intensity = 0; #if RCL_COMPUTE_WALL_TEXCOORDS == 1 - c = sampleImage(textures[pixel->hit.type],pixel->texCoords.x,pixel->texCoords.y); + color = sampleImage(textures[pixel->hit.type],pixel->texCoords.x,pixel->texCoords.y); #else - c = textures[pixel->hit.type][2]; + color = textures[pixel->hit.type][2]; #endif - c = addIntensity(c,intensity - 3); + color = addIntensity(color,intensity - 3); } else - c = pixel->isFloor ? + color = pixel->isFloor ? rgbToIndex(intensity/2,intensity,intensity/3) : rgbToIndex(intensity,intensity/2,0); - putSubsampledPixel(pixel,c); + putSubsampledPixel(pixel->position.x,pixel->position.y,color); } void draw() diff --git a/demo3.cpp b/demo3.cpp index e1de023..c30ef56 100644 --- a/demo3.cpp +++ b/demo3.cpp @@ -460,12 +460,12 @@ uint16_t backgroundColumn = 0; ///< Precomputed background column. */ inline void pixelFunc(RCL_PixelInfo *pixel) { - uint8_t c = 0; + uint8_t color = 0; int16_t intensity = 0; if (pixel->isWall) { - c = pixel->hit.square.x != selectedSquare.x || pixel->hit.square.y != selectedSquare.y || (editing && pokitto.frameCount % 2) == 0 ? + color = pixel->hit.square.x != selectedSquare.x || pixel->hit.square.y != selectedSquare.y || (editing && pokitto.frameCount % 2) == 0 ? squareColors[pixel->hit.type] : 30; intensity = pixel->depth / (RCL_UNITS_PER_SQUARE * 3); @@ -473,7 +473,7 @@ inline void pixelFunc(RCL_PixelInfo *pixel) } else if (pixel->isFloor) { - c = floorColor; + color = floorColor; if (!pixel->isHorizon) intensity = pixel->depth / (RCL_UNITS_PER_SQUARE * 3); @@ -482,7 +482,7 @@ inline void pixelFunc(RCL_PixelInfo *pixel) { if (previousColumn == pixel->position.x) { - c = imageBackground[2 + backgroundColumn * 44 + RCL_clamp(pixel->position.y - player.mCamera.shear,0,43)]; + color = imageBackground[2 + backgroundColumn * 44 + RCL_clamp(pixel->position.y - player.mCamera.shear,0,43)]; } else { @@ -492,9 +492,9 @@ inline void pixelFunc(RCL_PixelInfo *pixel) } if (intensity != 0) - c = addIntensity(c,intensity); + color = addIntensity(color,intensity); - putSubsampledPixel(pixel,c); + putSubsampledPixel(pixel->position.x,pixel->position.y,color); } bool flyBy = true;