Rename ColumnDrawerArgs to SpriteDrawerArgs

This commit is contained in:
Magnus Norddahl 2017-01-30 11:27:58 +01:00
parent e17c8c1678
commit 2f365e7d2b
18 changed files with 95 additions and 95 deletions

View file

@ -156,7 +156,7 @@ namespace swrenderer
} }
} }
void R_UpdateFuzzPos(const ColumnDrawerArgs &args) void R_UpdateFuzzPos(const SpriteDrawerArgs &args)
{ {
int yl = MAX(args.dc_yl, 1); int yl = MAX(args.dc_yl, 1);
int yh = MIN(args.dc_yh, fuzzviewheight); int yh = MIN(args.dc_yh, fuzzviewheight);

View file

@ -23,7 +23,7 @@ namespace swrenderer
class SkyDrawerArgs; class SkyDrawerArgs;
class WallDrawerArgs; class WallDrawerArgs;
class SpanDrawerArgs; class SpanDrawerArgs;
class ColumnDrawerArgs; class SpriteDrawerArgs;
extern int ylookup[MAXHEIGHT]; extern int ylookup[MAXHEIGHT];
extern uint8_t shadetables[/*NUMCOLORMAPS*16*256*/]; extern uint8_t shadetables[/*NUMCOLORMAPS*16*256*/];
@ -58,23 +58,23 @@ namespace swrenderer
virtual void DrawWallRevSubClampColumn(const WallDrawerArgs &args) = 0; virtual void DrawWallRevSubClampColumn(const WallDrawerArgs &args) = 0;
virtual void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) = 0; virtual void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) = 0;
virtual void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) = 0; virtual void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) = 0;
virtual void DrawColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawColumn(const SpriteDrawerArgs &args) = 0;
virtual void FillColumn(const ColumnDrawerArgs &args) = 0; virtual void FillColumn(const SpriteDrawerArgs &args) = 0;
virtual void FillAddColumn(const ColumnDrawerArgs &args) = 0; virtual void FillAddColumn(const SpriteDrawerArgs &args) = 0;
virtual void FillAddClampColumn(const ColumnDrawerArgs &args) = 0; virtual void FillAddClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void FillSubClampColumn(const ColumnDrawerArgs &args) = 0; virtual void FillSubClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void FillRevSubClampColumn(const ColumnDrawerArgs &args) = 0; virtual void FillRevSubClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawFuzzColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawFuzzColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawAddColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawAddColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawTranslatedColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawTranslatedColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawShadedColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawShadedColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawAddClampColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawAddClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawSubClampColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawSubClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawRevSubClampColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawRevSubClampColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; virtual void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) = 0;
virtual void DrawSpan(const SpanDrawerArgs &args) = 0; virtual void DrawSpan(const SpanDrawerArgs &args) = 0;
virtual void DrawSpanMasked(const SpanDrawerArgs &args) = 0; virtual void DrawSpanMasked(const SpanDrawerArgs &args) = 0;
virtual void DrawSpanTranslucent(const SpanDrawerArgs &args) = 0; virtual void DrawSpanTranslucent(const SpanDrawerArgs &args) = 0;
@ -91,5 +91,5 @@ namespace swrenderer
void R_InitFuzzTable(int fuzzoff); void R_InitFuzzTable(int fuzzoff);
void R_InitParticleTexture(); void R_InitParticleTexture();
void R_UpdateFuzzPos(const ColumnDrawerArgs &args); void R_UpdateFuzzPos(const SpriteDrawerArgs &args);
} }

View file

@ -862,7 +862,7 @@ namespace swrenderer
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
PalColumnCommand::PalColumnCommand(const ColumnDrawerArgs &args) PalColumnCommand::PalColumnCommand(const SpriteDrawerArgs &args)
{ {
_count = args.dc_count; _count = args.dc_count;
_dest = args.Dest(); _dest = args.Dest();
@ -1759,7 +1759,7 @@ namespace swrenderer
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
DrawFuzzColumnPalCommand::DrawFuzzColumnPalCommand(const ColumnDrawerArgs &args) DrawFuzzColumnPalCommand::DrawFuzzColumnPalCommand(const SpriteDrawerArgs &args)
{ {
_yl = args.dc_yl; _yl = args.dc_yl;
_yh = args.dc_yh; _yh = args.dc_yh;

View file

@ -69,7 +69,7 @@ namespace swrenderer
class PalColumnCommand : public DrawerCommand class PalColumnCommand : public DrawerCommand
{ {
public: public:
PalColumnCommand(const ColumnDrawerArgs &args); PalColumnCommand(const SpriteDrawerArgs &args);
FString DebugInfo() override { return "PalColumnCommand"; } FString DebugInfo() override { return "PalColumnCommand"; }
protected: protected:
@ -110,7 +110,7 @@ namespace swrenderer
class DrawFuzzColumnPalCommand : public DrawerCommand class DrawFuzzColumnPalCommand : public DrawerCommand
{ {
public: public:
DrawFuzzColumnPalCommand(const ColumnDrawerArgs &args); DrawFuzzColumnPalCommand(const SpriteDrawerArgs &args);
void Execute(DrawerThread *thread) override; void Execute(DrawerThread *thread) override;
FString DebugInfo() override { return "DrawFuzzColumnPalCommand"; } FString DebugInfo() override { return "DrawFuzzColumnPalCommand"; }
@ -257,23 +257,23 @@ namespace swrenderer
void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1PalCommand>(args); } void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1PalCommand>(args); }
void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand<DrawSingleSky1PalCommand>(args, solid_top, solid_bottom, fadeSky); } void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand<DrawSingleSky1PalCommand>(args, solid_top, solid_bottom, fadeSky); }
void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand<DrawDoubleSky1PalCommand>(args, solid_top, solid_bottom, fadeSky); } void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand<DrawDoubleSky1PalCommand>(args, solid_top, solid_bottom, fadeSky); }
void DrawColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnPalCommand>(args); } void DrawColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnPalCommand>(args); }
void FillColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnPalCommand>(args); } void FillColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnPalCommand>(args); }
void FillAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddPalCommand>(args); } void FillAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddPalCommand>(args); }
void FillAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddClampPalCommand>(args); } void FillAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddClampPalCommand>(args); }
void FillSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnSubClampPalCommand>(args); } void FillSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnSubClampPalCommand>(args); }
void FillRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnRevSubClampPalCommand>(args); } void FillRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnRevSubClampPalCommand>(args); }
void DrawFuzzColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawFuzzColumnPalCommand>(args); R_UpdateFuzzPos(args); } void DrawFuzzColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawFuzzColumnPalCommand>(args); R_UpdateFuzzPos(args); }
void DrawAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddPalCommand>(args); } void DrawAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddPalCommand>(args); }
void DrawTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTranslatedPalCommand>(args); } void DrawTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTranslatedPalCommand>(args); }
void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddPalCommand>(args); } void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddPalCommand>(args); }
void DrawShadedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnShadedPalCommand>(args); } void DrawShadedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnShadedPalCommand>(args); }
void DrawAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampPalCommand>(args); } void DrawAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampPalCommand>(args); }
void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedPalCommand>(args); } void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedPalCommand>(args); }
void DrawSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampPalCommand>(args); } void DrawSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampPalCommand>(args); }
void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedPalCommand>(args); } void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedPalCommand>(args); }
void DrawRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampPalCommand>(args); } void DrawRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampPalCommand>(args); }
void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedPalCommand>(args); } void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedPalCommand>(args); }
void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanPalCommand>(args); } void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanPalCommand>(args); }
void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanMaskedPalCommand>(args); } void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanMaskedPalCommand>(args); }
void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanTranslucentPalCommand>(args); } void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanTranslucentPalCommand>(args); }

View file

@ -246,7 +246,7 @@ namespace swrenderer
return "DrawColumn\n" + args.ToString(); return "DrawColumn\n" + args.ToString();
} }
DrawColumnLLVMCommand::DrawColumnLLVMCommand(const ColumnDrawerArgs &drawerargs) DrawColumnLLVMCommand::DrawColumnLLVMCommand(const SpriteDrawerArgs &drawerargs)
{ {
auto shade_constants = drawerargs.ColormapConstants(); auto shade_constants = drawerargs.ColormapConstants();
@ -326,7 +326,7 @@ namespace swrenderer
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
DrawFuzzColumnRGBACommand::DrawFuzzColumnRGBACommand(const ColumnDrawerArgs &drawerargs) DrawFuzzColumnRGBACommand::DrawFuzzColumnRGBACommand(const SpriteDrawerArgs &drawerargs)
{ {
_x = drawerargs.dc_x; _x = drawerargs.dc_x;
_yl = drawerargs.dc_yl; _yl = drawerargs.dc_yl;

View file

@ -150,7 +150,7 @@ namespace swrenderer
FString DebugInfo() override; FString DebugInfo() override;
public: public:
DrawColumnLLVMCommand(const ColumnDrawerArgs &drawerargs); DrawColumnLLVMCommand(const SpriteDrawerArgs &drawerargs);
void Execute(DrawerThread *thread) override; void Execute(DrawerThread *thread) override;
}; };
@ -201,7 +201,7 @@ namespace swrenderer
int _fuzzviewheight; int _fuzzviewheight;
public: public:
DrawFuzzColumnRGBACommand(const ColumnDrawerArgs &drawerargs); DrawFuzzColumnRGBACommand(const SpriteDrawerArgs &drawerargs);
void Execute(DrawerThread *thread) override; void Execute(DrawerThread *thread) override;
FString DebugInfo() override; FString DebugInfo() override;
}; };
@ -362,23 +362,23 @@ namespace swrenderer
void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1LLVMCommand>(args); } void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawWallRevSubClamp1LLVMCommand>(args); }
void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand<DrawSingleSky1LLVMCommand>(args, solid_top, solid_bottom, skyFade); } void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand<DrawSingleSky1LLVMCommand>(args, solid_top, solid_bottom, skyFade); }
void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand<DrawDoubleSky1LLVMCommand>(args, solid_top, solid_bottom, skyFade); } void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand<DrawDoubleSky1LLVMCommand>(args, solid_top, solid_bottom, skyFade); }
void DrawColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnLLVMCommand>(args); } void DrawColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnLLVMCommand>(args); }
void FillColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnLLVMCommand>(args); } void FillColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnLLVMCommand>(args); }
void FillAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddLLVMCommand>(args); } void FillAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddLLVMCommand>(args); }
void FillAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddClampLLVMCommand>(args); } void FillAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnAddClampLLVMCommand>(args); }
void FillSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnSubClampLLVMCommand>(args); } void FillSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnSubClampLLVMCommand>(args); }
void FillRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnRevSubClampLLVMCommand>(args); } void FillRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<FillColumnRevSubClampLLVMCommand>(args); }
void DrawFuzzColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>(args); R_UpdateFuzzPos(args); } void DrawFuzzColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawFuzzColumnRGBACommand>(args); R_UpdateFuzzPos(args); }
void DrawAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddLLVMCommand>(args); } void DrawAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddLLVMCommand>(args); }
void DrawTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTranslatedLLVMCommand>(args); } void DrawTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTranslatedLLVMCommand>(args); }
void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddLLVMCommand>(args); } void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnTlatedAddLLVMCommand>(args); }
void DrawShadedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnShadedLLVMCommand>(args); } void DrawShadedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnShadedLLVMCommand>(args); }
void DrawAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampLLVMCommand>(args); } void DrawAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampLLVMCommand>(args); }
void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedLLVMCommand>(args); } void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnAddClampTranslatedLLVMCommand>(args); }
void DrawSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampLLVMCommand>(args); } void DrawSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampLLVMCommand>(args); }
void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedLLVMCommand>(args); } void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnSubClampTranslatedLLVMCommand>(args); }
void DrawRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampLLVMCommand>(args); } void DrawRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampLLVMCommand>(args); }
void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedLLVMCommand>(args); } void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawColumnRevSubClampTranslatedLLVMCommand>(args); }
void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanLLVMCommand>(args); } void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanLLVMCommand>(args); }
void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanMaskedLLVMCommand>(args); } void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanMaskedLLVMCommand>(args); }
void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanTranslucentLLVMCommand>(args); } void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand<DrawSpanTranslucentLLVMCommand>(args); }

View file

@ -59,7 +59,7 @@ namespace swrenderer
return active_drawers; return active_drawers;
} }
ColumnDrawerArgs::ColumnDrawerArgs() SpriteDrawerArgs::SpriteDrawerArgs()
{ {
colfunc = &SWPixelFormatDrawers::DrawColumn; colfunc = &SWPixelFormatDrawers::DrawColumn;
basecolfunc = &SWPixelFormatDrawers::DrawColumn; basecolfunc = &SWPixelFormatDrawers::DrawColumn;
@ -151,7 +151,7 @@ namespace swrenderer
ds_source_mipmapped = tex->Mipmapped() && tex->GetWidth() > 1 && tex->GetHeight() > 1; ds_source_mipmapped = tex->Mipmapped() && tex->GetWidth() > 1 && tex->GetHeight() > 1;
} }
void ColumnDrawerArgs::DrawMaskedColumn(int x, fixed_t iscale, FTexture *tex, fixed_t col, double spryscale, double sprtopscreen, bool sprflipvert, const short *mfloorclip, const short *mceilingclip, bool unmasked) void SpriteDrawerArgs::DrawMaskedColumn(int x, fixed_t iscale, FTexture *tex, fixed_t col, double spryscale, double sprtopscreen, bool sprflipvert, const short *mfloorclip, const short *mceilingclip, bool unmasked)
{ {
// Handle the linear filtered version in a different function to reduce chances of merge conflicts from zdoom. // Handle the linear filtered version in a different function to reduce chances of merge conflicts from zdoom.
if (r_swtruecolor && !drawer_needs_pal_input) // To do: add support to R_DrawColumnHoriz_rgba if (r_swtruecolor && !drawer_needs_pal_input) // To do: add support to R_DrawColumnHoriz_rgba
@ -228,7 +228,7 @@ namespace swrenderer
} }
} }
void ColumnDrawerArgs::DrawMaskedColumnBgra(int x, fixed_t iscale, FTexture *tex, fixed_t col, double spryscale, double sprtopscreen, bool sprflipvert, const short *mfloorclip, const short *mceilingclip, bool unmasked) void SpriteDrawerArgs::DrawMaskedColumnBgra(int x, fixed_t iscale, FTexture *tex, fixed_t col, double spryscale, double sprtopscreen, bool sprflipvert, const short *mfloorclip, const short *mceilingclip, bool unmasked)
{ {
dc_x = x; dc_x = x;
dc_iscale = iscale; dc_iscale = iscale;
@ -343,7 +343,7 @@ namespace swrenderer
} }
} }
bool ColumnDrawerArgs::SetBlendFunc(int op, fixed_t fglevel, fixed_t bglevel, int flags) bool SpriteDrawerArgs::SetBlendFunc(int op, fixed_t fglevel, fixed_t bglevel, int flags)
{ {
// r_drawtrans is a seriously bad thing to turn off. I wonder if I should // r_drawtrans is a seriously bad thing to turn off. I wonder if I should
// just remove it completely. // just remove it completely.
@ -467,7 +467,7 @@ namespace swrenderer
} }
} }
fixed_t ColumnDrawerArgs::GetAlpha(int type, fixed_t alpha) fixed_t SpriteDrawerArgs::GetAlpha(int type, fixed_t alpha)
{ {
switch (type) switch (type)
{ {
@ -479,7 +479,7 @@ namespace swrenderer
} }
} }
bool ColumnDrawerArgs::SetPatchStyle(FRenderStyle style, fixed_t alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade) bool SpriteDrawerArgs::SetPatchStyle(FRenderStyle style, fixed_t alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade)
{ {
fixed_t fglevel, bglevel; fixed_t fglevel, bglevel;
@ -581,14 +581,14 @@ namespace swrenderer
SetColorMapLight(&identitycolormap, 0, 0); SetColorMapLight(&identitycolormap, 0, 0);
} }
if (!ColumnDrawerArgs::SetBlendFunc(style.BlendOp, fglevel, bglevel, style.Flags)) if (!SpriteDrawerArgs::SetBlendFunc(style.BlendOp, fglevel, bglevel, style.Flags))
{ {
return false; return false;
} }
return true; return true;
} }
bool ColumnDrawerArgs::SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade) bool SpriteDrawerArgs::SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade)
{ {
return SetPatchStyle(style, FLOAT2FIXED(alpha), translation, color, basecolormap, shadedlightshade); return SetPatchStyle(style, FLOAT2FIXED(alpha), translation, color, basecolormap, shadedlightshade);
} }
@ -724,12 +724,12 @@ namespace swrenderer
dc_dest_y = y; dc_dest_y = y;
} }
void ColumnDrawerArgs::FillColumn() void SpriteDrawerArgs::FillColumn()
{ {
Drawers()->FillColumn(*this); Drawers()->FillColumn(*this);
} }
void ColumnDrawerArgs::SetDest(int x, int y) void SpriteDrawerArgs::SetDest(int x, int y)
{ {
int pixelsize = r_swtruecolor ? 4 : 1; int pixelsize = r_swtruecolor ? 4 : 1;
dc_dest = dc_destorg + (ylookup[y] + x) * pixelsize; dc_dest = dc_destorg + (ylookup[y] + x) * pixelsize;

View file

@ -36,7 +36,7 @@ namespace swrenderer
typedef void(SWPixelFormatDrawers::*DrawerFunc)(const DrawerArgs &args); typedef void(SWPixelFormatDrawers::*DrawerFunc)(const DrawerArgs &args);
typedef void(SWPixelFormatDrawers::*WallDrawerFunc)(const WallDrawerArgs &args); typedef void(SWPixelFormatDrawers::*WallDrawerFunc)(const WallDrawerArgs &args);
typedef void(SWPixelFormatDrawers::*ColumnDrawerFunc)(const ColumnDrawerArgs &args); typedef void(SWPixelFormatDrawers::*SpriteDrawerFunc)(const SpriteDrawerArgs &args);
typedef void(SWPixelFormatDrawers::*SpanDrawerFunc)(const SpanDrawerArgs &args); typedef void(SWPixelFormatDrawers::*SpanDrawerFunc)(const SpanDrawerArgs &args);
class DrawerArgs class DrawerArgs
@ -163,10 +163,10 @@ namespace swrenderer
int dc_dest_y = 0; int dc_dest_y = 0;
}; };
class ColumnDrawerArgs : public DrawerArgs class SpriteDrawerArgs : public DrawerArgs
{ {
public: public:
ColumnDrawerArgs(); SpriteDrawerArgs();
bool SetPatchStyle(FRenderStyle style, fixed_t alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade = 0); bool SetPatchStyle(FRenderStyle style, fixed_t alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade = 0);
bool SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade = 0); bool SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color, FDynamicColormap *&basecolormap, fixed_t shadedlightshade = 0);
@ -200,10 +200,10 @@ namespace swrenderer
fixed_t dc_srcalpha; fixed_t dc_srcalpha;
fixed_t dc_destalpha; fixed_t dc_destalpha;
ColumnDrawerFunc colfunc; SpriteDrawerFunc colfunc;
ColumnDrawerFunc basecolfunc; SpriteDrawerFunc basecolfunc;
ColumnDrawerFunc fuzzcolfunc; SpriteDrawerFunc fuzzcolfunc;
ColumnDrawerFunc transcolfunc; SpriteDrawerFunc transcolfunc;
private: private:
bool SetBlendFunc(int op, fixed_t fglevel, fixed_t bglevel, int flags); bool SetBlendFunc(int op, fixed_t fglevel, fixed_t bglevel, int flags);

View file

@ -72,7 +72,7 @@ namespace swrenderer
WallDrawerArgs walldrawerargs; WallDrawerArgs walldrawerargs;
walldrawerargs.SetStyle(true, additive, FLOAT2FIXED(alpha)); walldrawerargs.SetStyle(true, additive, FLOAT2FIXED(alpha));
ColumnDrawerArgs columndrawerargs; SpriteDrawerArgs columndrawerargs;
FDynamicColormap *patchstylecolormap = nullptr; FDynamicColormap *patchstylecolormap = nullptr;
bool visible = columndrawerargs.SetPatchStyle(LegacyRenderStyles[additive ? STYLE_Add : STYLE_Translucent], alpha, 0, 0, patchstylecolormap); bool visible = columndrawerargs.SetPatchStyle(LegacyRenderStyles[additive ? STYLE_Add : STYLE_Translucent], alpha, 0, 0, patchstylecolormap);

View file

@ -274,7 +274,7 @@ namespace swrenderer
{ {
int x = x1; int x = x1;
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
if (cameraLight->fixedlightlev >= 0) if (cameraLight->fixedlightlev >= 0)
drawerargs.SetColorMapLight((r_fullbrightignoresectorcolor) ? &FullNormalLight : usecolormap, 0, FIXEDLIGHT2SHADE(cameraLight->fixedlightlev)); drawerargs.SetColorMapLight((r_fullbrightignoresectorcolor) ? &FullNormalLight : usecolormap, 0, FIXEDLIGHT2SHADE(cameraLight->fixedlightlev));
@ -315,7 +315,7 @@ namespace swrenderer
} while (needrepeat--); } while (needrepeat--);
} }
void RenderDecal::DrawColumn(ColumnDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip) void RenderDecal::DrawColumn(SpriteDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip)
{ {
float iscale = walltexcoords.VStep[x] * maskedScaleY; float iscale = walltexcoords.VStep[x] * maskedScaleY;
double spryscale = 1 / iscale; double spryscale = 1 / iscale;

View file

@ -20,7 +20,7 @@ namespace swrenderer
{ {
struct DrawSegment; struct DrawSegment;
class ProjectedWallTexcoords; class ProjectedWallTexcoords;
class ColumnDrawerArgs; class SpriteDrawerArgs;
class RenderDecal class RenderDecal
{ {
@ -29,6 +29,6 @@ namespace swrenderer
private: private:
static void Render(side_t *wall, DBaseDecal *first, DrawSegment *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass); static void Render(side_t *wall, DBaseDecal *first, DrawSegment *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass);
static void DrawColumn(ColumnDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip); static void DrawColumn(SpriteDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip);
}; };
} }

View file

@ -587,7 +587,7 @@ namespace swrenderer
return; return;
} }
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
drawerargs.SetColorMapLight(Light.BaseColormap, 0, Light.ColormapNum << FRACBITS); drawerargs.SetColorMapLight(Light.BaseColormap, 0, Light.ColormapNum << FRACBITS);
FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(Light.BaseColormap); FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(Light.BaseColormap);

View file

@ -245,7 +245,7 @@ namespace swrenderer
return; return;
} }
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
drawerargs.SetColorMapLight(vis->Light.BaseColormap, 0, vis->Light.ColormapNum << FRACBITS); drawerargs.SetColorMapLight(vis->Light.BaseColormap, 0, vis->Light.ColormapNum << FRACBITS);
FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(vis->Light.BaseColormap); FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(vis->Light.BaseColormap);

View file

@ -187,7 +187,7 @@ namespace swrenderer
FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(sprite->Light.BaseColormap); FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(sprite->Light.BaseColormap);
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
drawerargs.SetColorMapLight(sprite->Light.BaseColormap, 0, sprite->Light.ColormapNum << FRACBITS); drawerargs.SetColorMapLight(sprite->Light.BaseColormap, 0, sprite->Light.ColormapNum << FRACBITS);
bool visible = drawerargs.SetPatchStyle(sprite->RenderStyle, sprite->Alpha, sprite->Translation, sprite->FillColor, basecolormap); bool visible = drawerargs.SetPatchStyle(sprite->RenderStyle, sprite->Alpha, sprite->Translation, sprite->FillColor, basecolormap);
@ -311,7 +311,7 @@ namespace swrenderer
return (kvxslab_t*)(((uint8_t*)slab) + 3 + slab->zleng); return (kvxslab_t*)(((uint8_t*)slab) + 3 + slab->zleng);
} }
void RenderVoxel::FillBox(ColumnDrawerArgs &drawerargs, DVector3 origin, double extentX, double extentY, int color, short *cliptop, short *clipbottom, bool viewspace, bool pixelstretch) void RenderVoxel::FillBox(SpriteDrawerArgs &drawerargs, DVector3 origin, double extentX, double extentY, int color, short *cliptop, short *clipbottom, bool viewspace, bool pixelstretch)
{ {
double viewX, viewY, viewZ; double viewX, viewY, viewZ;
if (viewspace) if (viewspace)

View file

@ -31,7 +31,7 @@ struct FVoxel;
namespace swrenderer namespace swrenderer
{ {
class ColumnDrawerArgs; class SpriteDrawerArgs;
// [RH] A c-buffer. Used for keeping track of offscreen voxel spans. // [RH] A c-buffer. Used for keeping track of offscreen voxel spans.
struct FCoverageBuffer struct FCoverageBuffer
@ -83,7 +83,7 @@ namespace swrenderer
enum { DVF_OFFSCREEN = 1, DVF_SPANSONLY = 2, DVF_MIRRORED = 4 }; enum { DVF_OFFSCREEN = 1, DVF_SPANSONLY = 2, DVF_MIRRORED = 4 };
static void FillBox(ColumnDrawerArgs &drawerargs, DVector3 origin, double extentX, double extentY, int color, short *cliptop, short *clipbottom, bool viewspace, bool pixelstretch); static void FillBox(SpriteDrawerArgs &drawerargs, DVector3 origin, double extentX, double extentY, int color, short *cliptop, short *clipbottom, bool viewspace, bool pixelstretch);
static kvxslab_t *GetSlabStart(const FVoxelMipLevel &mip, int x, int y); static kvxslab_t *GetSlabStart(const FVoxelMipLevel &mip, int x, int y);
static kvxslab_t *GetSlabEnd(const FVoxelMipLevel &mip, int x, int y); static kvxslab_t *GetSlabEnd(const FVoxelMipLevel &mip, int x, int y);

View file

@ -179,7 +179,7 @@ namespace swrenderer
rereadcolormap = false; rereadcolormap = false;
} }
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
int shade = LIGHT2SHADE(spr->sector->lightlevel + R_ActualExtraLight(spr->foggy)); int shade = LIGHT2SHADE(spr->sector->lightlevel + R_ActualExtraLight(spr->foggy));
double GlobVis = LightVisibility::Instance()->WallGlobVis(); double GlobVis = LightVisibility::Instance()->WallGlobVis();
@ -245,7 +245,7 @@ namespace swrenderer
} }
} }
void RenderWallSprite::DrawColumn(ColumnDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip) void RenderWallSprite::DrawColumn(SpriteDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip)
{ {
float iscale = walltexcoords.VStep[x] * maskedScaleY; float iscale = walltexcoords.VStep[x] * maskedScaleY;
double spryscale = 1 / iscale; double spryscale = 1 / iscale;

View file

@ -18,7 +18,7 @@
namespace swrenderer namespace swrenderer
{ {
class ProjectedWallTexcoords; class ProjectedWallTexcoords;
class ColumnDrawerArgs; class SpriteDrawerArgs;
class RenderWallSprite : public VisibleSprite class RenderWallSprite : public VisibleSprite
{ {
@ -30,7 +30,7 @@ namespace swrenderer
void Render(short *cliptop, short *clipbottom, int minZ, int maxZ) override; void Render(short *cliptop, short *clipbottom, int minZ, int maxZ) override;
private: private:
static void DrawColumn(ColumnDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip); static void DrawColumn(SpriteDrawerArgs &drawerargs, int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip);
FWallCoords wallc; FWallCoords wallc;
uint32_t Translation = 0; uint32_t Translation = 0;

View file

@ -184,7 +184,7 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
translation = parms.remap->Remap; translation = parms.remap->Remap;
} }
ColumnDrawerArgs drawerargs; SpriteDrawerArgs drawerargs;
if (translation != NULL) if (translation != NULL)
{ {