diff --git a/src/r_draw.h b/src/r_draw.h index 196e26bea..7556575bd 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -393,19 +393,6 @@ void R_DrawSingleSkyCol4_rgba(uint32_t solid_top, uint32_t solid_bottom); void R_DrawDoubleSkyCol1_rgba(uint32_t solid_top, uint32_t solid_bottom); void R_DrawDoubleSkyCol4_rgba(uint32_t solid_top, uint32_t solid_bottom); -struct TriVertex -{ - TriVertex() { } - TriVertex(float x, float y, float z, float w, float u, float v, float light) : x(x), y(y), z(z), w(w) { varying[0] = u; varying[1] = v; varying[2] = light; } - - enum { NumVarying = 3 }; - float x, y, z, w; - float varying[NumVarying]; -}; - -class VSMatrix; -void R_DrawTriangles(const VSMatrix &objectToWorld, const TriVertex *vertices, int count, int clipleft, int clipright, const short *cliptop, const short *clipbottom, FTexture *texture); - extern bool r_swtruecolor; EXTERN_CVAR(Bool, r_multithreaded); diff --git a/src/r_draw_rgba.cpp b/src/r_draw_rgba.cpp index a649572cc..452de7962 100644 --- a/src/r_draw_rgba.cpp +++ b/src/r_draw_rgba.cpp @@ -1260,6 +1260,7 @@ void ApplySpecialColormapRGBACommand::Execute(DrawerThread *thread) ///////////////////////////////////////////////////////////////////////////// +#if 0 class DrawTrianglesCommand : public DrawerCommand { public: @@ -1705,6 +1706,7 @@ void R_DrawTriangles(const VSMatrix &transform, const TriVertex *vertices, int c DrawerCommandQueue::QueueCommand(transform, vertices, count, clipleft, clipright, clipdata, texture->GetPixelsBgra(), texture->GetWidth(), texture->GetHeight()); } +#endif ///////////////////////////////////////////////////////////////////////////// diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 96225729b..f39360b59 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -66,7 +66,6 @@ #endif EXTERN_CVAR(Int, r_skymode) -CVAR(Bool, r_cubesky, false, 0) //EXTERN_CVAR (Int, tx) //EXTERN_CVAR (Int, ty) @@ -1016,77 +1015,6 @@ static const BYTE *R_GetTwoSkyColumns (FTexture *fronttex, int x) } } -static void R_DrawCubeSky(visplane_t *pl) -{ - int x1 = pl->left; - int x2 = pl->right; - short *uwal = (short *)pl->top; - short *dwal = (short *)pl->bottom; - - static TriVertex cube[6 * 6] = - { - // Top - { -1.0f, 1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - { 1.0f, 1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - { 1.0f, -1.0f, 0.6f, 1.0f, 0.0f, 0.1f, 1.0f }, - - { 1.0f, -1.0f, 0.6f, 1.0f, 0.0f, 0.1f, 1.0f }, - { -1.0f, -1.0f, 0.6f, 1.0f, 1.0f, 0.1f, 1.0f }, - { -1.0f, 1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - - // Bottom - { 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 0.9f, 1.0f }, - { 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f }, - { -1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f }, - - { -1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f }, - { -1.0f, -1.0f, -1.0f, 1.0f, 0.0f, 0.9f, 1.0f }, - { 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 0.9f, 1.0f }, - - // Front - { 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f }, - { 1.0f, 1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - { -1.0f, 1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - - { -1.0f, 1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - { -1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - { 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f }, - - // Back - { -1.0f, -1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - { 1.0f, -1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - { 1.0f, -1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - - { 1.0f, -1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - { -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f }, - { -1.0f, -1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - - // Right - { 1.0f, -1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - { 1.0f, 1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - { 1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - - { 1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - { 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f }, - { 1.0f, -1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - - // Left - { -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f }, - { -1.0f, 1.0f, 0.6f, 1.0f, 1.0f, 0.0f, 1.0f }, - { -1.0f, -1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - - { -1.0f, -1.0f, 0.6f, 1.0f, 0.0f, 0.0f, 1.0f }, - { -1.0f, -1.0f, -1.0f, 1.0f, 0.0f, 2.0f, 1.0f }, - { -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 2.0f, 1.0f } - }; - - VSMatrix transform(0); - transform.translate((float)ViewPos.X, (float)ViewPos.Y, (float)ViewPos.Z); - transform.scale(1000.0f, 1000.0f, 1000.0f); - - R_DrawTriangles(transform, cube, 6 * 6, x1, x2 - 1, uwal, dwal, frontskytex); -} - static void R_DrawSkyColumnStripe(int start_x, int y1, int y2, int columns, double scale, double texturemid, double yrepeat) { uint32_t height = frontskytex->GetHeight(); @@ -1279,12 +1207,7 @@ static void R_DrawCapSky(visplane_t *pl) static void R_DrawSky (visplane_t *pl) { - if (r_swtruecolor && r_cubesky) - { - R_DrawCubeSky(pl); - return; - } - else if (r_skymode == 2) + if (r_skymode == 2) { R_DrawCapSky(pl); return;