summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/render.c b/render.c
index f6dc018..a63dfe4 100644
--- a/render.c
+++ b/render.c
@@ -730,7 +730,7 @@ void ren_map(
const Texture* texture = get_texture(asset_id_brick_texture);
w = r->vp[0] << fbits;
h = r->vp[1] << fbits;
- hh = h / 2;
+ hh = (h / 4) * r->asp;
for (x = r->clip[0]; x < r->clip[2]; x++) {
int ray = ((2 * x) << (fbits * 2)) / w - f1;
int d[2];
@@ -775,8 +775,8 @@ void ren_map(
if (mp[1] >= map->h) break;
if (data[mp[0] + mp[1] * map->w]) {
int y;
- int sy = (r->vp[1] / 2) - (((hh << fbits) / dist) >> fbits);
- int ey = (r->vp[1] / 2) + (((hh << fbits) / dist) >> fbits);
+ int sy = (r->vp[1] / 2) - ((hh / dist) >> fbits);
+ int ey = (r->vp[1] / 2) + ((hh / dist) >> fbits);
sy = maxi(sy, r->clip[1]);
ey = mini(ey, r->clip[3]);
for (y = sy; y < ey; y++) {