1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-11-23 20:49:57 +01:00

Fix texturing

This commit is contained in:
Miloslav Číž 2018-09-13 11:07:34 +02:00
parent eb78a2a569
commit 6c35be3177

View file

@ -863,8 +863,9 @@ for (uint_maybe32_t j = 0; j <= hitCount; ++j)
#define drawVertical(pref,l1,l2,comp,inc)\ #define drawVertical(pref,l1,l2,comp,inc)\
{\ {\
limit = clamp(pref##Z2Screen,l1,l2);\ limit = clamp(pref##Z2Screen,l1,l2);\
Unit wallLength = pref##Z2Screen - pref##Z1Screen;\ Unit wallLength = pref##Z2Screen - pref##Z1Screen - 1;\
Unit wallPosition = absVal(pref##Z1Screen - pref##PosY);\ wallLength = wallLength != 0 ? wallLength : 1;\
Unit wallPosition = absVal(pref##Z1Screen - pref##PosY) + 1;\
for (i = pref##PosY inc 1; i comp##= limit; inc##inc i)\ for (i = pref##PosY inc 1; i comp##= limit; inc##inc i)\
{\ {\
p.position.y = i;\ p.position.y = i;\