Linux compile fixes and missing variable declarations

This commit is contained in:
Magnus Norddahl 2016-06-10 16:32:47 +02:00
parent 103a6baac5
commit 27156eb60a
3 changed files with 9 additions and 3 deletions

View file

@ -28,6 +28,7 @@
#include <memory> #include <memory>
#include <thread> #include <thread>
#include <mutex> #include <mutex>
#include <condition_variable>
// Spectre/Invisibility. // Spectre/Invisibility.
#define FUZZTABLE 50 #define FUZZTABLE 50
@ -460,7 +461,7 @@ public:
// Range of rows processed this pass // Range of rows processed this pass
int pass_start_y = 0; 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_rgbabuff_rgba[MAXHEIGHT * 4];
uint32_t *dc_temp_rgba; uint32_t *dc_temp_rgba;
@ -527,7 +528,7 @@ class DrawerCommandQueue
std::mutex end_mutex; std::mutex end_mutex;
std::condition_variable end_condition; std::condition_variable end_condition;
int finished_threads = 0; size_t finished_threads = 0;
bool no_threading = false; bool no_threading = false;
DrawerThread single_core_thread; DrawerThread single_core_thread;

View file

@ -1726,6 +1726,7 @@ class DrawSpanMaskedRGBACommand : public DrawerCommand
fixed_t ds_yfrac; fixed_t ds_yfrac;
BYTE *dc_destorg; BYTE *dc_destorg;
int ds_x1; int ds_x1;
int ds_x2;
int ds_y1; int ds_y1;
int ds_y; int ds_y;
fixed_t ds_xstep; fixed_t ds_xstep;
@ -1828,6 +1829,7 @@ class DrawSpanTranslucentRGBACommand : public DrawerCommand
fixed_t ds_yfrac; fixed_t ds_yfrac;
BYTE *dc_destorg; BYTE *dc_destorg;
int ds_x1; int ds_x1;
int ds_x2;
int ds_y1; int ds_y1;
int ds_y; int ds_y;
fixed_t ds_xstep; fixed_t ds_xstep;
@ -1949,6 +1951,7 @@ class DrawSpanMaskedTranslucentRGBACommand : public DrawerCommand
fixed_t ds_yfrac; fixed_t ds_yfrac;
BYTE *dc_destorg; BYTE *dc_destorg;
int ds_x1; int ds_x1;
int ds_x2;
int ds_y1; int ds_y1;
int ds_y; int ds_y;
fixed_t ds_xstep; fixed_t ds_xstep;
@ -2080,6 +2083,7 @@ class DrawSpanAddClampRGBACommand : public DrawerCommand
fixed_t ds_yfrac; fixed_t ds_yfrac;
BYTE *dc_destorg; BYTE *dc_destorg;
int ds_x1; int ds_x1;
int ds_x2;
int ds_y1; int ds_y1;
int ds_y; int ds_y;
fixed_t ds_xstep; fixed_t ds_xstep;
@ -2201,6 +2205,7 @@ class DrawSpanMaskedAddClampRGBACommand : public DrawerCommand
fixed_t ds_yfrac; fixed_t ds_yfrac;
BYTE *dc_destorg; BYTE *dc_destorg;
int ds_x1; int ds_x1;
int ds_x2;
int ds_y1; int ds_y1;
int ds_y; int ds_y;
fixed_t ds_xstep; fixed_t ds_xstep;

View file

@ -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. // 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. // 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; 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 *= uv_height;
v *= (1 << fracbits); v *= (1 << fracbits);