From 995781570e3537c96a8a7bd1217aa3db2efe4e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 16 Sep 2018 14:34:40 +0200 Subject: [PATCH] Update --- demo1.cpp | 2 +- demo2.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo1.cpp b/demo1.cpp index c395878..e62cc81 100644 --- a/demo1.cpp +++ b/demo1.cpp @@ -1004,7 +1004,7 @@ inline void pixelFunc(PixelInfo *pixel) if (intensity < 0) intensity = 0; - c = sampleImage(textures[pixel->hit.type],pixel->hit.textureCoord,pixel->textureCoordY); + c = sampleImage(textures[pixel->hit.type],pixel->texCoords.x,pixel->texCoords.y); c = addIntensity(c,intensity - 3); } else diff --git a/demo2.cpp b/demo2.cpp index 275745d..14a96ac 100644 --- a/demo2.cpp +++ b/demo2.cpp @@ -25,7 +25,7 @@ be seen at less shaky head bobbing when moving. However the latter algorithm doesn't support rolling doors (these will be turned off). */ -#define NO_TEXTURES +//#define NO_TEXTURES /* ^ Turns off textures and only uses colors, which increases FPS. */ //#define USE_DIST_APPROX 1 @@ -944,7 +944,7 @@ inline void pixelFunc(PixelInfo *pixel) c = textureAverageColors[pixel->hit.type]; #else c = pixel->depth < TEXTURE_MAX_DISTANCE ? - sampleImage(textures[pixel->hit.type],pixel->hit.textureCoord + textureScroll,pixel->textureCoordY) : + sampleImage(textures[pixel->hit.type],pixel->texCoords.x + textureScroll,pixel->texCoords.y) : textureAverageColors[pixel->hit.type]; #endif