for(int n = startPos; n<startPos+300; n++)
{
Line &l = lines[n%N]; ////////////////////<-
l.project(playerX*roadW-x, camH, startPos*segL - (n>=N?N*segL:0));
x+=dx;
dx+=l.curve;
l.clip=maxy;
if (l.Y>=maxy) continue;
maxy = l.Y;