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:
parent
3111e72dd6
commit
62fc4ab7c7
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@
|
|||
serves the purpose of a fixed-point arithmetic. */
|
||||
#define UNIT_INFINITY 5000000;
|
||||
#else
|
||||
#define UNITS_PER_SQUARE 64
|
||||
#define UNITS_PER_SQUARE 128
|
||||
typedef int16_t Unit;
|
||||
#define UNIT_INFINITY 32767;
|
||||
#endif
|
||||
|
@ -873,7 +873,7 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray)
|
|||
limit = clamp(pref##Z2Screen,l1,l2);\
|
||||
Unit wallLength = pref##Z2Screen - pref##Z1Screen - 1;\
|
||||
wallLength = wallLength != 0 ? wallLength : 1;\
|
||||
Unit wallPosition = absVal(pref##Z1Screen - pref##PosY) + 1;\
|
||||
Unit wallPosition = absVal(pref##Z1Screen - pref##PosY) inc (-1);\
|
||||
for (i = pref##PosY inc 1; i comp##= limit; inc##inc i)\
|
||||
{\
|
||||
p.position.y = i;\
|
||||
|
|
Loading…
Reference in a new issue