info.wall_height = (BLOCK / dist) * (WIDTH / 2);
This creates perspective: closer walls (smaller dist) appear taller. The (WIDTH / 2) factor scales the wall to screen proportions.
info.start_y = (HEIGHT - info.wall_height) / 2;
Centers the wall vertically on screen. If wall is 400px tall on 600px screen, start_y = (600-400)/2 = 100.
if (info.start_y < 0) info.start_y = 0;
Prevents drawing above screen when wall is very close (very tall).
info.end_y = info.start_y + info.wall_height;
Simple addition to find where wall ends.
if (info.end_y > HEIGHT) info.end_y = HEIGHT;
Prevents drawing below screen when wall is very close.
info.step = (float)info.tex->height / info.wall_height;
How much texture to advance per screen pixel. If texture is 64px and wall is 320px on screen, step = 64/320 = 0.2.
info.tex_pos = (info.start_y - HEIGHT/2 + info.wall_height/2) * info.step;
Starting position in texture coordinates, accounting for wall centering and clipping.