mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-11-21 20:29:59 +01:00
Make render work
This commit is contained in:
parent
cc93dfcba8
commit
c4b664714b
1 changed files with 6 additions and 3 deletions
|
@ -537,10 +537,13 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray)
|
|||
PixelInfo p;
|
||||
p.position.x = x;
|
||||
|
||||
// draw floor until the wall
|
||||
|
||||
p.isWall = 0;
|
||||
|
||||
// draw floor until the wall
|
||||
for (int32_t i = y; i > z1Screen; --i)
|
||||
Unit zTop = z1Screen < z2Screen ? z1Screen : z2Screen;
|
||||
|
||||
for (int32_t i = y; i > zTop; --i)
|
||||
{
|
||||
p.position.y = i;
|
||||
_pixelFunction(p);
|
||||
|
@ -557,7 +560,7 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray)
|
|||
_pixelFunction(p);
|
||||
}
|
||||
|
||||
y = z2Screen;
|
||||
y = y > zTop ? zTop : y;
|
||||
worldZPrev = worldZ2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue