diff --git a/raycaster.c b/raycaster.c index 24de363..94878fb 100644 --- a/raycaster.c +++ b/raycaster.c @@ -884,7 +884,25 @@ void drawRays3D() for (y = 0; y < lineHeight; y++) { float c = All_Textures[((int)textureY * mapSize) + textureX] * shade; - glColor3f(c, c, c); + // glColor3f(c, c, c); + + if (horizontalMapTexture == 0) // Checkerboard + { + glColor3f(c, c, c / 2.0); + } + if (horizontalMapTexture == 1) // Brick + { + glColor3f(c, c / 2.0, c / 2.0); + } + if (horizontalMapTexture == 2) // Window + { + glColor3f(c / 2.0, c / 2.0, c); + } + if (horizontalMapTexture == 3) // Door + { + glColor3f(c / 2.0, c, c / 2.0); + } + glVertex2i(MAP_WIDTH + GAP + x, (int)(y + lineOffset)); textureY += textureYstep; }