diff --git a/src/r_draw.h b/src/r_draw.h index 409b7c01b..37a0e6778 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -28,6 +28,7 @@ #include #include #include +#include // Spectre/Invisibility. #define FUZZTABLE 50 @@ -460,7 +461,7 @@ public: // Range of rows processed this pass int pass_start_y = 0; - int pass_end_y = 300; + int pass_end_y = MAXHEIGHT; uint32_t dc_temp_rgbabuff_rgba[MAXHEIGHT * 4]; uint32_t *dc_temp_rgba; @@ -527,7 +528,7 @@ class DrawerCommandQueue std::mutex end_mutex; std::condition_variable end_condition; - int finished_threads = 0; + size_t finished_threads = 0; bool no_threading = false; DrawerThread single_core_thread; diff --git a/src/r_draw_rgba.cpp b/src/r_draw_rgba.cpp index b81ee4cca..e2dbd443a 100644 --- a/src/r_draw_rgba.cpp +++ b/src/r_draw_rgba.cpp @@ -1726,6 +1726,7 @@ class DrawSpanMaskedRGBACommand : public DrawerCommand fixed_t ds_yfrac; BYTE *dc_destorg; int ds_x1; + int ds_x2; int ds_y1; int ds_y; fixed_t ds_xstep; @@ -1828,6 +1829,7 @@ class DrawSpanTranslucentRGBACommand : public DrawerCommand fixed_t ds_yfrac; BYTE *dc_destorg; int ds_x1; + int ds_x2; int ds_y1; int ds_y; fixed_t ds_xstep; @@ -1949,6 +1951,7 @@ class DrawSpanMaskedTranslucentRGBACommand : public DrawerCommand fixed_t ds_yfrac; BYTE *dc_destorg; int ds_x1; + int ds_x2; int ds_y1; int ds_y; fixed_t ds_xstep; @@ -2080,6 +2083,7 @@ class DrawSpanAddClampRGBACommand : public DrawerCommand fixed_t ds_yfrac; BYTE *dc_destorg; int ds_x1; + int ds_x2; int ds_y1; int ds_y; fixed_t ds_xstep; @@ -2201,6 +2205,7 @@ class DrawSpanMaskedAddClampRGBACommand : public DrawerCommand fixed_t ds_yfrac; BYTE *dc_destorg; int ds_x1; + int ds_x2; int ds_y1; int ds_y; fixed_t ds_xstep; diff --git a/src/r_segs.cpp b/src/r_segs.cpp index 87ce48ec4..c1d1ad744 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -1184,7 +1184,7 @@ void calc_uv_start_and_step(int y1, float swal, double yrepeat, uint32_t uv_heig // Find start uv in [0-uv_height[ range. // Not using xs_ToFixed because it rounds the result and we need something that always rounds down to stay within the range. double v = (dc_texturemid + uv_stepd * (y1 - CenterY + 0.5)) / uv_height; - v = v - std::floor(v); + v = v - floor(v); v *= uv_height; v *= (1 << fracbits);