Move code into R_UpdateFuzzPos

This commit is contained in:
Magnus Norddahl 2016-12-27 07:45:10 +01:00
parent 4554cf45f1
commit 398001b6cb
2 changed files with 14 additions and 7 deletions

View file

@ -736,21 +736,26 @@ namespace swrenderer
DrawerCommandQueue::QueueCommand<FillColumnRevSubClampPalCommand>(); DrawerCommandQueue::QueueCommand<FillColumnRevSubClampPalCommand>();
} }
void R_DrawFuzzColumn() void R_UpdateFuzzPos()
{ {
using namespace drawerargs; using namespace drawerargs;
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>();
else
DrawerCommandQueue::QueueCommand<DrawFuzzColumnPalCommand>();
dc_yl = MAX(dc_yl, 1); dc_yl = MAX(dc_yl, 1);
dc_yh = MIN(dc_yh, fuzzviewheight); dc_yh = MIN(dc_yh, fuzzviewheight);
if (dc_yl <= dc_yh) if (dc_yl <= dc_yh)
fuzzpos = (fuzzpos + dc_yh - dc_yl + 1) % FUZZTABLE; fuzzpos = (fuzzpos + dc_yh - dc_yl + 1) % FUZZTABLE;
} }
void R_DrawFuzzColumn()
{
if (r_swtruecolor)
DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>();
else
DrawerCommandQueue::QueueCommand<DrawFuzzColumnPalCommand>();
R_UpdateFuzzPos();
}
void R_DrawAddColumn() void R_DrawAddColumn()
{ {
if (r_swtruecolor) if (r_swtruecolor)

View file

@ -134,6 +134,8 @@ namespace swrenderer
const uint8_t *R_GetColumn(FTexture *tex, int col); const uint8_t *R_GetColumn(FTexture *tex, int col);
void R_UpdateFuzzPos();
void R_DrawColumn(); void R_DrawColumn();
void R_DrawFuzzColumn(); void R_DrawFuzzColumn();
void R_DrawTranslatedColumn(); void R_DrawTranslatedColumn();