diff --git a/src/swrenderer/drawers/r_draw.cpp b/src/swrenderer/drawers/r_draw.cpp index db7cb8a6b..2625db1a0 100644 --- a/src/swrenderer/drawers/r_draw.cpp +++ b/src/swrenderer/drawers/r_draw.cpp @@ -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 yh = MIN(args.dc_yh, fuzzviewheight); diff --git a/src/swrenderer/drawers/r_draw.h b/src/swrenderer/drawers/r_draw.h index f34601b57..2ab900058 100644 --- a/src/swrenderer/drawers/r_draw.h +++ b/src/swrenderer/drawers/r_draw.h @@ -23,7 +23,7 @@ namespace swrenderer class SkyDrawerArgs; class WallDrawerArgs; class SpanDrawerArgs; - class ColumnDrawerArgs; + class SpriteDrawerArgs; extern int ylookup[MAXHEIGHT]; extern uint8_t shadetables[/*NUMCOLORMAPS*16*256*/]; @@ -58,23 +58,23 @@ namespace swrenderer 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 DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) = 0; - virtual void DrawColumn(const ColumnDrawerArgs &args) = 0; - virtual void FillColumn(const ColumnDrawerArgs &args) = 0; - virtual void FillAddColumn(const ColumnDrawerArgs &args) = 0; - virtual void FillAddClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void FillSubClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void FillRevSubClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawFuzzColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawAddColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawTranslatedColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawShadedColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawAddClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawSubClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawRevSubClampColumn(const ColumnDrawerArgs &args) = 0; - virtual void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) = 0; + virtual void DrawColumn(const SpriteDrawerArgs &args) = 0; + virtual void FillColumn(const SpriteDrawerArgs &args) = 0; + virtual void FillAddColumn(const SpriteDrawerArgs &args) = 0; + virtual void FillAddClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void FillSubClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void FillRevSubClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawFuzzColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawAddColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawTranslatedColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawShadedColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawAddClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawSubClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawRevSubClampColumn(const SpriteDrawerArgs &args) = 0; + virtual void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) = 0; virtual void DrawSpan(const SpanDrawerArgs &args) = 0; virtual void DrawSpanMasked(const SpanDrawerArgs &args) = 0; virtual void DrawSpanTranslucent(const SpanDrawerArgs &args) = 0; @@ -91,5 +91,5 @@ namespace swrenderer void R_InitFuzzTable(int fuzzoff); void R_InitParticleTexture(); - void R_UpdateFuzzPos(const ColumnDrawerArgs &args); + void R_UpdateFuzzPos(const SpriteDrawerArgs &args); } diff --git a/src/swrenderer/drawers/r_draw_pal.cpp b/src/swrenderer/drawers/r_draw_pal.cpp index b778b27eb..2304cff09 100644 --- a/src/swrenderer/drawers/r_draw_pal.cpp +++ b/src/swrenderer/drawers/r_draw_pal.cpp @@ -862,7 +862,7 @@ namespace swrenderer ///////////////////////////////////////////////////////////////////////// - PalColumnCommand::PalColumnCommand(const ColumnDrawerArgs &args) + PalColumnCommand::PalColumnCommand(const SpriteDrawerArgs &args) { _count = args.dc_count; _dest = args.Dest(); @@ -1759,7 +1759,7 @@ namespace swrenderer ///////////////////////////////////////////////////////////////////////// - DrawFuzzColumnPalCommand::DrawFuzzColumnPalCommand(const ColumnDrawerArgs &args) + DrawFuzzColumnPalCommand::DrawFuzzColumnPalCommand(const SpriteDrawerArgs &args) { _yl = args.dc_yl; _yh = args.dc_yh; diff --git a/src/swrenderer/drawers/r_draw_pal.h b/src/swrenderer/drawers/r_draw_pal.h index 8dbdd5145..50dd0ef82 100644 --- a/src/swrenderer/drawers/r_draw_pal.h +++ b/src/swrenderer/drawers/r_draw_pal.h @@ -69,7 +69,7 @@ namespace swrenderer class PalColumnCommand : public DrawerCommand { public: - PalColumnCommand(const ColumnDrawerArgs &args); + PalColumnCommand(const SpriteDrawerArgs &args); FString DebugInfo() override { return "PalColumnCommand"; } protected: @@ -110,7 +110,7 @@ namespace swrenderer class DrawFuzzColumnPalCommand : public DrawerCommand { public: - DrawFuzzColumnPalCommand(const ColumnDrawerArgs &args); + DrawFuzzColumnPalCommand(const SpriteDrawerArgs &args); void Execute(DrawerThread *thread) override; FString DebugInfo() override { return "DrawFuzzColumnPalCommand"; } @@ -257,23 +257,23 @@ namespace swrenderer void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand(args, solid_top, solid_bottom, fadeSky); } void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool fadeSky) override { DrawerCommandQueue::QueueCommand(args, solid_top, solid_bottom, fadeSky); } - void DrawColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawFuzzColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); R_UpdateFuzzPos(args); } - void DrawAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawShadedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawFuzzColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); R_UpdateFuzzPos(args); } + void DrawAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawShadedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } diff --git a/src/swrenderer/drawers/r_draw_rgba.cpp b/src/swrenderer/drawers/r_draw_rgba.cpp index 4e71ffcde..183d347c1 100644 --- a/src/swrenderer/drawers/r_draw_rgba.cpp +++ b/src/swrenderer/drawers/r_draw_rgba.cpp @@ -246,7 +246,7 @@ namespace swrenderer return "DrawColumn\n" + args.ToString(); } - DrawColumnLLVMCommand::DrawColumnLLVMCommand(const ColumnDrawerArgs &drawerargs) + DrawColumnLLVMCommand::DrawColumnLLVMCommand(const SpriteDrawerArgs &drawerargs) { 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; _yl = drawerargs.dc_yl; diff --git a/src/swrenderer/drawers/r_draw_rgba.h b/src/swrenderer/drawers/r_draw_rgba.h index ae0b259db..671de80fe 100644 --- a/src/swrenderer/drawers/r_draw_rgba.h +++ b/src/swrenderer/drawers/r_draw_rgba.h @@ -150,7 +150,7 @@ namespace swrenderer FString DebugInfo() override; public: - DrawColumnLLVMCommand(const ColumnDrawerArgs &drawerargs); + DrawColumnLLVMCommand(const SpriteDrawerArgs &drawerargs); void Execute(DrawerThread *thread) override; }; @@ -201,7 +201,7 @@ namespace swrenderer int _fuzzviewheight; public: - DrawFuzzColumnRGBACommand(const ColumnDrawerArgs &drawerargs); + DrawFuzzColumnRGBACommand(const SpriteDrawerArgs &drawerargs); void Execute(DrawerThread *thread) override; FString DebugInfo() override; }; @@ -362,23 +362,23 @@ namespace swrenderer void DrawWallRevSubClampColumn(const WallDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSingleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand(args, solid_top, solid_bottom, skyFade); } void DrawDoubleSkyColumn(const SkyDrawerArgs &args, uint32_t solid_top, uint32_t solid_bottom, bool skyFade) override { DrawerCommandQueue::QueueCommand(args, solid_top, solid_bottom, skyFade); } - void DrawColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void FillRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawFuzzColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); R_UpdateFuzzPos(args); } - void DrawAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawTranslatedAddColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawShadedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawAddClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawAddClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawRevSubClampColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } - void DrawRevSubClampTranslatedColumn(const ColumnDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void FillRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawFuzzColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); R_UpdateFuzzPos(args); } + void DrawAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawTranslatedAddColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawShadedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawAddClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawAddClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawRevSubClampColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } + void DrawRevSubClampTranslatedColumn(const SpriteDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpan(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpanMasked(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } void DrawSpanTranslucent(const SpanDrawerArgs &args) override { DrawerCommandQueue::QueueCommand(args); } diff --git a/src/swrenderer/drawers/r_drawerargs.cpp b/src/swrenderer/drawers/r_drawerargs.cpp index 24f25f3b8..4c7f421c2 100644 --- a/src/swrenderer/drawers/r_drawerargs.cpp +++ b/src/swrenderer/drawers/r_drawerargs.cpp @@ -59,7 +59,7 @@ namespace swrenderer return active_drawers; } - ColumnDrawerArgs::ColumnDrawerArgs() + SpriteDrawerArgs::SpriteDrawerArgs() { colfunc = &SWPixelFormatDrawers::DrawColumn; basecolfunc = &SWPixelFormatDrawers::DrawColumn; @@ -151,7 +151,7 @@ namespace swrenderer 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. 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_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 // 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) { @@ -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; @@ -581,14 +581,14 @@ namespace swrenderer 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 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); } @@ -724,12 +724,12 @@ namespace swrenderer dc_dest_y = y; } - void ColumnDrawerArgs::FillColumn() + void SpriteDrawerArgs::FillColumn() { Drawers()->FillColumn(*this); } - void ColumnDrawerArgs::SetDest(int x, int y) + void SpriteDrawerArgs::SetDest(int x, int y) { int pixelsize = r_swtruecolor ? 4 : 1; dc_dest = dc_destorg + (ylookup[y] + x) * pixelsize; diff --git a/src/swrenderer/drawers/r_drawerargs.h b/src/swrenderer/drawers/r_drawerargs.h index ca624a662..619b2f7a3 100644 --- a/src/swrenderer/drawers/r_drawerargs.h +++ b/src/swrenderer/drawers/r_drawerargs.h @@ -36,7 +36,7 @@ namespace swrenderer typedef void(SWPixelFormatDrawers::*DrawerFunc)(const DrawerArgs &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); class DrawerArgs @@ -163,10 +163,10 @@ namespace swrenderer int dc_dest_y = 0; }; - class ColumnDrawerArgs : public DrawerArgs + class SpriteDrawerArgs : public DrawerArgs { 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, 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_destalpha; - ColumnDrawerFunc colfunc; - ColumnDrawerFunc basecolfunc; - ColumnDrawerFunc fuzzcolfunc; - ColumnDrawerFunc transcolfunc; + SpriteDrawerFunc colfunc; + SpriteDrawerFunc basecolfunc; + SpriteDrawerFunc fuzzcolfunc; + SpriteDrawerFunc transcolfunc; private: bool SetBlendFunc(int op, fixed_t fglevel, fixed_t bglevel, int flags); diff --git a/src/swrenderer/line/r_renderdrawsegment.cpp b/src/swrenderer/line/r_renderdrawsegment.cpp index 8096056bc..bdd587aa8 100644 --- a/src/swrenderer/line/r_renderdrawsegment.cpp +++ b/src/swrenderer/line/r_renderdrawsegment.cpp @@ -72,7 +72,7 @@ namespace swrenderer WallDrawerArgs walldrawerargs; walldrawerargs.SetStyle(true, additive, FLOAT2FIXED(alpha)); - ColumnDrawerArgs columndrawerargs; + SpriteDrawerArgs columndrawerargs; FDynamicColormap *patchstylecolormap = nullptr; bool visible = columndrawerargs.SetPatchStyle(LegacyRenderStyles[additive ? STYLE_Add : STYLE_Translucent], alpha, 0, 0, patchstylecolormap); diff --git a/src/swrenderer/things/r_decal.cpp b/src/swrenderer/things/r_decal.cpp index ad830101f..9653a91fa 100644 --- a/src/swrenderer/things/r_decal.cpp +++ b/src/swrenderer/things/r_decal.cpp @@ -274,7 +274,7 @@ namespace swrenderer { int x = x1; - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; if (cameraLight->fixedlightlev >= 0) drawerargs.SetColorMapLight((r_fullbrightignoresectorcolor) ? &FullNormalLight : usecolormap, 0, FIXEDLIGHT2SHADE(cameraLight->fixedlightlev)); @@ -315,7 +315,7 @@ namespace swrenderer } 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; double spryscale = 1 / iscale; diff --git a/src/swrenderer/things/r_decal.h b/src/swrenderer/things/r_decal.h index 00f232651..4d14a85c9 100644 --- a/src/swrenderer/things/r_decal.h +++ b/src/swrenderer/things/r_decal.h @@ -20,7 +20,7 @@ namespace swrenderer { struct DrawSegment; class ProjectedWallTexcoords; - class ColumnDrawerArgs; + class SpriteDrawerArgs; class RenderDecal { @@ -29,6 +29,6 @@ namespace swrenderer 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 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); }; } diff --git a/src/swrenderer/things/r_playersprite.cpp b/src/swrenderer/things/r_playersprite.cpp index 2d937bef7..938c45900 100644 --- a/src/swrenderer/things/r_playersprite.cpp +++ b/src/swrenderer/things/r_playersprite.cpp @@ -587,7 +587,7 @@ namespace swrenderer return; } - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; drawerargs.SetColorMapLight(Light.BaseColormap, 0, Light.ColormapNum << FRACBITS); FDynamicColormap *basecolormap = static_cast(Light.BaseColormap); diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index 5110f550f..f3df8d2a4 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -245,7 +245,7 @@ namespace swrenderer return; } - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; drawerargs.SetColorMapLight(vis->Light.BaseColormap, 0, vis->Light.ColormapNum << FRACBITS); FDynamicColormap *basecolormap = static_cast(vis->Light.BaseColormap); diff --git a/src/swrenderer/things/r_voxel.cpp b/src/swrenderer/things/r_voxel.cpp index bc6e8ad65..0d35a1768 100644 --- a/src/swrenderer/things/r_voxel.cpp +++ b/src/swrenderer/things/r_voxel.cpp @@ -187,7 +187,7 @@ namespace swrenderer FDynamicColormap *basecolormap = static_cast(sprite->Light.BaseColormap); - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; drawerargs.SetColorMapLight(sprite->Light.BaseColormap, 0, sprite->Light.ColormapNum << FRACBITS); 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); } - 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; if (viewspace) diff --git a/src/swrenderer/things/r_voxel.h b/src/swrenderer/things/r_voxel.h index f08f33654..7d5fd621f 100644 --- a/src/swrenderer/things/r_voxel.h +++ b/src/swrenderer/things/r_voxel.h @@ -31,7 +31,7 @@ struct FVoxel; namespace swrenderer { - class ColumnDrawerArgs; + class SpriteDrawerArgs; // [RH] A c-buffer. Used for keeping track of offscreen voxel spans. struct FCoverageBuffer @@ -83,7 +83,7 @@ namespace swrenderer 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 *GetSlabEnd(const FVoxelMipLevel &mip, int x, int y); diff --git a/src/swrenderer/things/r_wallsprite.cpp b/src/swrenderer/things/r_wallsprite.cpp index 94a0d294c..25e33d9ce 100644 --- a/src/swrenderer/things/r_wallsprite.cpp +++ b/src/swrenderer/things/r_wallsprite.cpp @@ -179,7 +179,7 @@ namespace swrenderer rereadcolormap = false; } - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; int shade = LIGHT2SHADE(spr->sector->lightlevel + R_ActualExtraLight(spr->foggy)); 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; double spryscale = 1 / iscale; diff --git a/src/swrenderer/things/r_wallsprite.h b/src/swrenderer/things/r_wallsprite.h index ffdb36997..1a0c87b70 100644 --- a/src/swrenderer/things/r_wallsprite.h +++ b/src/swrenderer/things/r_wallsprite.h @@ -18,7 +18,7 @@ namespace swrenderer { class ProjectedWallTexcoords; - class ColumnDrawerArgs; + class SpriteDrawerArgs; class RenderWallSprite : public VisibleSprite { @@ -30,7 +30,7 @@ namespace swrenderer void Render(short *cliptop, short *clipbottom, int minZ, int maxZ) override; 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; uint32_t Translation = 0; diff --git a/src/v_draw.cpp b/src/v_draw.cpp index f7e9520ef..1736837f1 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -184,7 +184,7 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms) translation = parms.remap->Remap; } - ColumnDrawerArgs drawerargs; + SpriteDrawerArgs drawerargs; if (translation != NULL) {