Add drawer commands for pal mode

This commit is contained in:
Magnus Norddahl 2016-12-05 10:44:24 +01:00
parent 7ffab207cb
commit dfbd7fd2ad
6 changed files with 795 additions and 71 deletions

View file

@ -1046,6 +1046,8 @@ set( FASTMATH_PCH_SOURCES
r_3dfloors.cpp
r_bsp.cpp
r_draw_tc.cpp
r_draw_pal.cpp
r_drawt_pal.cpp
r_draw_rgba.cpp
r_drawt_rgba.cpp
r_drawers.cpp

221
src/r_draw_pal.cpp Normal file
View file

@ -0,0 +1,221 @@
#include "templates.h"
#include "doomtype.h"
#include "doomdef.h"
#include "r_defs.h"
#include "r_draw.h"
#include "r_main.h"
#include "r_things.h"
#include "v_video.h"
#include "r_draw_pal.h"
namespace swrenderer
{
PalWall1Command::PalWall1Command()
{
}
PalWall4Command::PalWall4Command()
{
}
void DrawWall1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWall4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallMasked1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallMasked4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallAdd1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallAdd4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallAddClamp1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallAddClamp4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallSubClamp1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallSubClamp4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallRevSubClamp1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawWallRevSubClamp4PalCommand::Execute(DrawerThread *thread)
{
}
PalSkyCommand::PalSkyCommand(uint32_t solid_top, uint32_t solid_bottom)
{
}
void DrawSingleSky1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawSingleSky4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawDoubleSky1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawDoubleSky4PalCommand::Execute(DrawerThread *thread)
{
}
PalColumnCommand::PalColumnCommand()
{
}
void DrawColumnPalCommand::Execute(DrawerThread *thread)
{
}
void FillColumnPalCommand::Execute(DrawerThread *thread)
{
}
void FillColumnAddPalCommand::Execute(DrawerThread *thread)
{
}
void FillColumnAddClampPalCommand::Execute(DrawerThread *thread)
{
}
void FillColumnSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void FillColumnRevSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnAddPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnTlatedAddPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnShadedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnAddClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnAddClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnSubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRevSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRevSubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawFuzzColumnPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanMaskedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanTranslucentPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanMaskedTranslucentPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanAddClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawSpanMaskedAddClampPalCommand::Execute(DrawerThread *thread)
{
}
void FillSpanPalCommand::Execute(DrawerThread *thread)
{
}
DrawTiltedSpanPalCommand::DrawTiltedSpanPalCommand(int y, int x1, int x2, const FVector3 &plane_sz, const FVector3 &plane_su, const FVector3 &plane_sv, bool plane_shade, int planeshade, float planelightfloat, fixed_t pviewx, fixed_t pviewy)
{
}
void DrawTiltedSpanPalCommand::Execute(DrawerThread *thread)
{
}
DrawColoredSpanPalCommand::DrawColoredSpanPalCommand(int y, int x1, int x2)
{
}
void DrawColoredSpanPalCommand::Execute(DrawerThread *thread)
{
}
DrawSlabPalCommand::DrawSlabPalCommand(int dx, fixed_t v, int dy, fixed_t vi, const uint8_t *vptr, uint8_t *p, const uint8_t *colormap)
{
}
void DrawSlabPalCommand::Execute(DrawerThread *thread)
{
}
DrawFogBoundaryLinePalCommand::DrawFogBoundaryLinePalCommand(int y, int y2, int x1)
{
}
void DrawFogBoundaryLinePalCommand::Execute(DrawerThread *thread)
{
}
}

163
src/r_draw_pal.h Normal file
View file

@ -0,0 +1,163 @@
#pragma once
#include "r_draw.h"
#include "v_palette.h"
#include "r_thread.h"
namespace swrenderer
{
class PalWall1Command : public DrawerCommand
{
public:
PalWall1Command();
FString DebugInfo() override { return "PalWallCommand"; }
};
class PalWall4Command : public DrawerCommand
{
public:
PalWall4Command();
FString DebugInfo() override { return "PalWallCommand"; }
};
class DrawWall1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWall4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallMasked1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallMasked4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallAdd1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallAdd4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallAddClamp1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallAddClamp4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallSubClamp1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallSubClamp4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallRevSubClamp1PalCommand : public PalWall1Command { public: void Execute(DrawerThread *thread) override; };
class DrawWallRevSubClamp4PalCommand : public PalWall4Command { public: void Execute(DrawerThread *thread) override; };
class PalSkyCommand : public DrawerCommand
{
public:
PalSkyCommand(uint32_t solid_top, uint32_t solid_bottom);
FString DebugInfo() override { return "PalSkyCommand"; }
};
class DrawSingleSky1PalCommand : public PalSkyCommand { public: using PalSkyCommand::PalSkyCommand; void Execute(DrawerThread *thread) override; };
class DrawSingleSky4PalCommand : public PalSkyCommand { public: using PalSkyCommand::PalSkyCommand; void Execute(DrawerThread *thread) override; };
class DrawDoubleSky1PalCommand : public PalSkyCommand { public: using PalSkyCommand::PalSkyCommand; void Execute(DrawerThread *thread) override; };
class DrawDoubleSky4PalCommand : public PalSkyCommand { public: using PalSkyCommand::PalSkyCommand; void Execute(DrawerThread *thread) override; };
class PalColumnCommand : public DrawerCommand
{
public:
PalColumnCommand();
FString DebugInfo() override { return "PalColumnCommand"; }
};
class DrawColumnPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnAddPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnAddClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnSubClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnRevSubClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnAddPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnTranslatedPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnTlatedAddPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnShadedPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnAddClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnAddClampTranslatedPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnSubClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnSubClampTranslatedPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnRevSubClampPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawColumnRevSubClampTranslatedPalCommand : public PalColumnCommand { public: void Execute(DrawerThread *thread) override; };
class DrawFuzzColumnPalCommand : public DrawerCommand
{
public:
void Execute(DrawerThread *thread) override;
FString DebugInfo() override { return "DrawFuzzColumnPalCommand"; }
};
class PalSpanCommand : public DrawerCommand
{
public:
FString DebugInfo() override { return "PalSpanCommand"; }
};
class DrawSpanPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawSpanMaskedPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawSpanTranslucentPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawSpanMaskedTranslucentPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawSpanAddClampPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawSpanMaskedAddClampPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class FillSpanPalCommand : public PalSpanCommand { public: void Execute(DrawerThread *thread) override; };
class DrawTiltedSpanPalCommand : public DrawerCommand
{
public:
DrawTiltedSpanPalCommand(int y, int x1, int x2, const FVector3 &plane_sz, const FVector3 &plane_su, const FVector3 &plane_sv, bool plane_shade, int planeshade, float planelightfloat, fixed_t pviewx, fixed_t pviewy);
void Execute(DrawerThread *thread) override;
FString DebugInfo() override { return "DrawTiltedSpanPalCommand"; }
};
class DrawColoredSpanPalCommand : public PalSpanCommand
{
public:
DrawColoredSpanPalCommand(int y, int x1, int x2);
void Execute(DrawerThread *thread) override;
FString DebugInfo() override { return "DrawColoredSpanPalCommand"; }
};
class DrawSlabPalCommand : public PalSpanCommand
{
public:
DrawSlabPalCommand(int dx, fixed_t v, int dy, fixed_t vi, const uint8_t *vptr, uint8_t *p, const uint8_t *colormap);
void Execute(DrawerThread *thread) override;
};
class DrawFogBoundaryLinePalCommand : public PalSpanCommand
{
public:
DrawFogBoundaryLinePalCommand(int y, int y2, int x1);
void Execute(DrawerThread *thread) override;
};
//class RtInitColsPalCommand : public DrawerCommand { public: void Execute(DrawerThread *thread) override; };
//class DrawColumnHorizPalCommand : public DrawerCommand { public: void Execute(DrawerThread *thread) override; };
class FillColumnHorizPalCommand : public DrawerCommand
{
public:
void Execute(DrawerThread *thread) override;
FString DebugInfo() override { return "FillColumnHorizPalCommand"; }
};
class PalRtCommand : public DrawerCommand
{
public:
PalRtCommand(int hx, int sx, int yl, int yh);
FString DebugInfo() override { return "PalRtCommand"; }
};
class DrawColumnRt1CopyPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1PalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4PalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1TranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4TranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1AddPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4AddPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1AddTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4AddTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1ShadedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4ShadedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1AddClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4AddClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1AddClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4AddClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1SubClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4SubClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1SubClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4SubClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1RevSubClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4RevSubClampPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt1RevSubClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
class DrawColumnRt4RevSubClampTranslatedPalCommand : public PalRtCommand { public: using PalRtCommand::PalRtCommand; void Execute(DrawerThread *thread) override; };
}

View file

@ -17,6 +17,7 @@
#include "r_plane.h"
#include "r_draw_tc.h"
#include "r_draw_rgba.h"
#include "r_draw_pal.h"
#include "r_thread.h"
namespace swrenderer
@ -841,7 +842,10 @@ namespace swrenderer
(*span)[1] = dc_yh;
*span += 2;
DrawerCommandQueue::QueueCommand<FillColumnHorizRGBACommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnHorizRGBACommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnHorizPalCommand>();
}
void R_DrawColumnHoriz()
@ -857,7 +861,7 @@ namespace swrenderer
(*span)[1] = dc_yh;
*span += 2;
if (drawer_needs_pal_input)
if (drawer_needs_pal_input || !r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnHorizRGBACommand<uint8_t>>();
else
DrawerCommandQueue::QueueCommand<DrawColumnHorizRGBACommand<uint32_t>>();
@ -866,7 +870,10 @@ namespace swrenderer
// Copies one span at hx to the screen at sx.
void rt_copy1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1CopyLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1CopyLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1CopyPalCommand>(hx, sx, yl, yh);
}
// Copies all four spans to the screen starting at sx.
@ -882,140 +889,210 @@ namespace swrenderer
// Maps one span at hx to the screen at sx.
void rt_map1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1LLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1LLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1PalCommand>(hx, sx, yl, yh);
}
// Maps all four spans to the screen starting at sx.
void rt_map4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4LLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4LLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4PalCommand>(0, sx, yl, yh);
}
// Translates one span at hx to the screen at sx.
void rt_tlate1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1TranslatedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1TranslatedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1TranslatedPalCommand>(hx, sx, yl, yh);
}
// Translates all four spans to the screen starting at sx.
void rt_tlate4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4TranslatedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4TranslatedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4TranslatedPalCommand>(0, sx, yl, yh);
}
// Adds one span at hx to the screen at sx without clamping.
void rt_add1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddPalCommand>(hx, sx, yl, yh);
}
// Adds all four spans to the screen starting at sx without clamping.
void rt_add4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddPalCommand>(0, sx, yl, yh);
}
// Translates and adds one span at hx to the screen at sx without clamping.
void rt_tlateadd1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampTranslatedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampTranslatedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddTranslatedPalCommand>(hx, sx, yl, yh);
}
// Translates and adds all four spans to the screen starting at sx without clamping.
void rt_tlateadd4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampTranslatedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampTranslatedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddTranslatedPalCommand>(0, sx, yl, yh);
}
// Shades one span at hx to the screen at sx.
void rt_shaded1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1ShadedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1ShadedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1ShadedPalCommand>(hx, sx, yl, yh);
}
// Shades all four spans to the screen starting at sx.
void rt_shaded4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4ShadedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4ShadedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4ShadedPalCommand>(0, sx, yl, yh);
}
// Adds one span at hx to the screen at sx with clamping.
void rt_addclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampPalCommand>(hx, sx, yl, yh);
}
// Adds all four spans to the screen starting at sx with clamping.
void rt_addclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampPalCommand>(0, sx, yl, yh);
}
// Translates and adds one span at hx to the screen at sx with clamping.
void rt_tlateaddclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampTranslatedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampTranslatedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1AddClampTranslatedPalCommand>(hx, sx, yl, yh);
}
// Translates and adds all four spans to the screen starting at sx with clamping.
void rt_tlateaddclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampTranslatedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampTranslatedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4AddClampTranslatedPalCommand>(0, sx, yl, yh);
}
// Subtracts one span at hx to the screen at sx with clamping.
void rt_subclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampPalCommand>(hx, sx, yl, yh);
}
// Subtracts all four spans to the screen starting at sx with clamping.
void rt_subclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampPalCommand>(0, sx, yl, yh);
}
// Translates and subtracts one span at hx to the screen at sx with clamping.
void rt_tlatesubclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampTranslatedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampTranslatedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1SubClampTranslatedPalCommand>(hx, sx, yl, yh);
}
// Translates and subtracts all four spans to the screen starting at sx with clamping.
void rt_tlatesubclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampTranslatedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampTranslatedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampTranslatedPalCommand>(0, sx, yl, yh);
}
// Subtracts one span at hx from the screen at sx with clamping.
void rt_revsubclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampPalCommand>(hx, sx, yl, yh);
}
// Subtracts all four spans from the screen starting at sx with clamping.
void rt_revsubclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4SubClampLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4RevSubClampLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4RevSubClampPalCommand>(0, sx, yl, yh);
}
// Translates and subtracts one span at hx from the screen at sx with clamping.
void rt_tlaterevsubclamp1col(int hx, int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampTranslatedLLVMCommand>(hx, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampTranslatedLLVMCommand>(hx, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt1RevSubClampTranslatedPalCommand>(hx, sx, yl, yh);
}
// Translates and subtracts all four spans from the screen starting at sx with clamping.
void rt_tlaterevsubclamp4cols(int sx, int yl, int yh)
{
DrawerCommandQueue::QueueCommand<DrawColumnRt4RevSubClampTranslatedLLVMCommand>(0, sx, yl, yh);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRt4RevSubClampTranslatedLLVMCommand>(0, sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<DrawColumnRt4RevSubClampTranslatedPalCommand>(0, sx, yl, yh);
}
uint32_t vlinec1()
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWall1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWall1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWall1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1023,7 +1100,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWall4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWall4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWall4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
@ -1032,7 +1113,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallMasked1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallMasked1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallMasked1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1040,7 +1125,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallMasked4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallMasked4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallMasked4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
@ -1049,7 +1138,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallAdd1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallAdd1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallAdd1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1057,7 +1150,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallAdd4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallAdd4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallAdd4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
@ -1066,7 +1163,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallAddClamp1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallAddClamp1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallAddClamp1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1074,7 +1175,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallAddClamp4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallAddClamp4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallAddClamp4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
@ -1083,7 +1188,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallSubClamp1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallSubClamp1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallSubClamp1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1091,7 +1200,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallSubClamp4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallSubClamp4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallSubClamp4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
@ -1100,7 +1213,11 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1PalCommand>();
return dc_texturefrac + dc_count * dc_iscale;
}
@ -1108,66 +1225,103 @@ namespace swrenderer
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp4LLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp4LLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp4PalCommand>();
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
}
void R_DrawSingleSkyCol1(uint32_t solid_top, uint32_t solid_bottom)
{
DrawerCommandQueue::QueueCommand<DrawSingleSky1LLVMCommand>(solid_top, solid_bottom);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSingleSky1LLVMCommand>(solid_top, solid_bottom);
else
DrawerCommandQueue::QueueCommand<DrawSingleSky1PalCommand>(solid_top, solid_bottom);
}
void R_DrawSingleSkyCol4(uint32_t solid_top, uint32_t solid_bottom)
{
DrawerCommandQueue::QueueCommand<DrawSingleSky4LLVMCommand>(solid_top, solid_bottom);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSingleSky4LLVMCommand>(solid_top, solid_bottom);
else
DrawerCommandQueue::QueueCommand<DrawSingleSky4PalCommand>(solid_top, solid_bottom);
}
void R_DrawDoubleSkyCol1(uint32_t solid_top, uint32_t solid_bottom)
{
DrawerCommandQueue::QueueCommand<DrawDoubleSky1LLVMCommand>(solid_top, solid_bottom);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawDoubleSky1LLVMCommand>(solid_top, solid_bottom);
else
DrawerCommandQueue::QueueCommand<DrawDoubleSky1PalCommand>(solid_top, solid_bottom);
}
void R_DrawDoubleSkyCol4(uint32_t solid_top, uint32_t solid_bottom)
{
DrawerCommandQueue::QueueCommand<DrawDoubleSky4LLVMCommand>(solid_top, solid_bottom);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawDoubleSky4LLVMCommand>(solid_top, solid_bottom);
else
DrawerCommandQueue::QueueCommand<DrawDoubleSky4PalCommand>(solid_top, solid_bottom);
}
void R_DrawColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnPalCommand>();
}
void R_FillColumn()
{
DrawerCommandQueue::QueueCommand<FillColumnLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnPalCommand>();
}
void R_FillAddColumn()
{
DrawerCommandQueue::QueueCommand<FillColumnAddLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnAddLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnAddPalCommand>();
}
void R_FillAddClampColumn()
{
DrawerCommandQueue::QueueCommand<FillColumnAddClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnAddClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnAddClampPalCommand>();
}
void R_FillSubClampColumn()
{
DrawerCommandQueue::QueueCommand<FillColumnSubClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnSubClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnSubClampPalCommand>();
}
void R_FillRevSubClampColumn()
{
DrawerCommandQueue::QueueCommand<FillColumnRevSubClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillColumnRevSubClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<FillColumnRevSubClampPalCommand>();
}
void R_DrawFuzzColumn()
{
using namespace drawerargs;
DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>();
else
DrawerCommandQueue::QueueCommand<DrawFuzzColumnPalCommand>();
dc_yl = MAX(dc_yl, 1);
dc_yh = MIN(dc_yh, fuzzviewheight);
@ -1177,97 +1331,154 @@ namespace swrenderer
void R_DrawAddColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnAddLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnAddLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnAddPalCommand>();
}
void R_DrawTranslatedColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnTranslatedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnTranslatedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnTranslatedPalCommand>();
}
void R_DrawTlatedAddColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddPalCommand>();
}
void R_DrawShadedColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnShadedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnShadedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnShadedPalCommand>();
}
void R_DrawAddClampColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnAddClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnAddClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnAddClampPalCommand>();
}
void R_DrawAddClampTranslatedColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedPalCommand>();
}
void R_DrawSubClampColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnSubClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnSubClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnSubClampPalCommand>();
}
void R_DrawSubClampTranslatedColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedPalCommand>();
}
void R_DrawRevSubClampColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampPalCommand>();
}
void R_DrawRevSubClampTranslatedColumn()
{
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedPalCommand>();
}
void R_DrawSpan()
{
DrawerCommandQueue::QueueCommand<DrawSpanLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanPalCommand>();
}
void R_DrawSpanMasked()
{
DrawerCommandQueue::QueueCommand<DrawSpanMaskedLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanMaskedLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanMaskedPalCommand>();
}
void R_DrawSpanTranslucent()
{
DrawerCommandQueue::QueueCommand<DrawSpanTranslucentLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanTranslucentLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanTranslucentPalCommand>();
}
void R_DrawSpanMaskedTranslucent()
{
DrawerCommandQueue::QueueCommand<DrawSpanMaskedTranslucentLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanMaskedTranslucentLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanMaskedTranslucentPalCommand>();
}
void R_DrawSpanAddClamp()
{
DrawerCommandQueue::QueueCommand<DrawSpanAddClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanAddClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanAddClampPalCommand>();
}
void R_DrawSpanMaskedAddClamp()
{
DrawerCommandQueue::QueueCommand<DrawSpanMaskedAddClampLLVMCommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSpanMaskedAddClampLLVMCommand>();
else
DrawerCommandQueue::QueueCommand<DrawSpanMaskedAddClampPalCommand>();
}
void R_FillSpan()
{
DrawerCommandQueue::QueueCommand<FillSpanRGBACommand>();
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<FillSpanRGBACommand>();
else
DrawerCommandQueue::QueueCommand<FillSpanPalCommand>();
}
void R_DrawTiltedSpan(int y, int x1, int x2, const FVector3 &plane_sz, const FVector3 &plane_su, const FVector3 &plane_sv, bool plane_shade, int planeshade, float planelightfloat, fixed_t pviewx, fixed_t pviewy)
{
DrawerCommandQueue::QueueCommand<DrawTiltedSpanRGBACommand>(y, x1, x2, plane_sz, plane_su, plane_sv, plane_shade, planeshade, planelightfloat, pviewx, pviewy);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawTiltedSpanRGBACommand>(y, x1, x2, plane_sz, plane_su, plane_sv, plane_shade, planeshade, planelightfloat, pviewx, pviewy);
else
DrawerCommandQueue::QueueCommand<DrawTiltedSpanPalCommand>(y, x1, x2, plane_sz, plane_su, plane_sv, plane_shade, planeshade, planelightfloat, pviewx, pviewy);
}
void R_DrawColoredSpan(int y, int x1, int x2)
{
DrawerCommandQueue::QueueCommand<DrawColoredSpanRGBACommand>(y, x1, x2);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawColoredSpanRGBACommand>(y, x1, x2);
else
DrawerCommandQueue::QueueCommand<DrawColoredSpanPalCommand>(y, x1, x2);
}
namespace
@ -1295,7 +1506,10 @@ namespace swrenderer
void R_DrawSlab(int dx, fixed_t v, int dy, fixed_t vi, const uint8_t *vptr, uint8_t *p)
{
DrawerCommandQueue::QueueCommand<DrawSlabRGBACommand>(dx, v, dy, vi, vptr, p, slab_rgba_shade_constants, slab_rgba_colormap, slab_rgba_light);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawSlabRGBACommand>(dx, v, dy, vi, vptr, p, slab_rgba_shade_constants, slab_rgba_colormap, slab_rgba_light);
else
DrawerCommandQueue::QueueCommand<DrawSlabPalCommand>(dx, v, dy, vi, vptr, p, slab_rgba_colormap);
}
void R_DrawFogBoundarySection(int y, int y2, int x1)
@ -1303,7 +1517,10 @@ namespace swrenderer
for (; y < y2; ++y)
{
int x2 = spanend[y];
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, x1, x2);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, x1, x2);
else
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLinePalCommand>(y, x1, x2);
}
}
@ -1365,13 +1582,19 @@ namespace swrenderer
while (t2 < stop)
{
int y = t2++;
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, xr, spanend[y]);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, xr, spanend[y]);
else
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLinePalCommand>(y, xr, spanend[y]);
}
stop = MAX(b1, t2);
while (b2 > stop)
{
int y = --b2;
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, xr, spanend[y]);
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLineRGBACommand>(y, xr, spanend[y]);
else
DrawerCommandQueue::QueueCommand<DrawFogBoundaryLinePalCommand>(y, xr, spanend[y]);
}
}
else

113
src/r_drawt_pal.cpp Normal file
View file

@ -0,0 +1,113 @@
#include "templates.h"
#include "doomtype.h"
#include "doomdef.h"
#include "r_defs.h"
#include "r_draw.h"
#include "r_main.h"
#include "r_things.h"
#include "v_video.h"
#include "r_draw_pal.h"
namespace swrenderer
{
PalRtCommand::PalRtCommand(int hx, int sx, int yl, int yh)
{
}
void FillColumnHorizPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1CopyPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1PalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4PalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1TranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4TranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1AddPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4AddPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1AddTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4AddTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1ShadedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4ShadedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1AddClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4AddClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1AddClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4AddClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1SubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4SubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1SubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4SubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1RevSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4RevSubClampPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt1RevSubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
void DrawColumnRt4RevSubClampTranslatedPalCommand::Execute(DrawerThread *thread)
{
}
}

View file

@ -2800,6 +2800,8 @@ void R_DrawParticle_C (vissprite_t *vis)
R_DrawMaskedSegsBehindParticle (vis);
DrawerCommandQueue::WaitForWorkers();
// vis->renderflags holds translucency level (0-255)
{
fixed_t fglevel, bglevel;