mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-18 10:21:42 +00:00
Remove redundant dc_pitch
This commit is contained in:
parent
93166fa150
commit
7b578bbb53
4 changed files with 16 additions and 25 deletions
|
@ -106,7 +106,7 @@ namespace swrenderer
|
|||
_dest = args.Dest();
|
||||
_dest_y = args.DestY();
|
||||
_fracbits = args.dc_wall_fracbits;
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
_srcblend = args.dc_srcblend;
|
||||
_destblend = args.dc_destblend;
|
||||
_dynlights = args.dc_lights;
|
||||
|
@ -564,7 +564,7 @@ namespace swrenderer
|
|||
_dest = args.Dest();
|
||||
_dest_y = args.DestY();
|
||||
_count = args.Count();
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
_source = args.FrontTexturePixels();
|
||||
_source2 = args.BackTexturePixels();
|
||||
_sourceheight[0] = args.FrontTextureHeight();
|
||||
|
@ -870,7 +870,7 @@ namespace swrenderer
|
|||
_count = args.dc_count;
|
||||
_dest = args.Dest();
|
||||
_dest_y = args.DestY();
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
_iscale = args.dc_iscale;
|
||||
_texturefrac = args.dc_texturefrac;
|
||||
_colormap = args.Colormap();
|
||||
|
@ -1768,7 +1768,7 @@ namespace swrenderer
|
|||
_yh = args.dc_yh;
|
||||
_x = args.dc_x;
|
||||
_destorg = RenderViewport::Instance()->dc_destorg;
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
_fuzzpos = fuzzpos;
|
||||
_fuzzviewheight = fuzzviewheight;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace swrenderer
|
|||
args.xbits = drawerargs.TextureWidthBits();
|
||||
args.ybits = drawerargs.TextureHeightBits();
|
||||
args.destorg = (uint32_t*)RenderViewport::Instance()->dc_destorg;
|
||||
args.destpitch = RenderViewport::Instance()->dc_pitch;
|
||||
args.destpitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
args.source = (const uint32_t*)drawerargs.TexturePixels();
|
||||
args.light = LightBgra::calc_light_multiplier(drawerargs.Light());
|
||||
args.light_red = shade_constants.light_red;
|
||||
|
@ -186,7 +186,7 @@ namespace swrenderer
|
|||
auto shade_constants = drawerargs.ColormapConstants();
|
||||
args.dest = (uint32_t*)drawerargs.Dest();
|
||||
args.dest_y = drawerargs.DestY();
|
||||
args.pitch = RenderViewport::Instance()->dc_pitch;
|
||||
args.pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
args.count = drawerargs.dc_count;
|
||||
args.texturefrac[0] = drawerargs.dc_texturefrac;
|
||||
args.texturefracx[0] = drawerargs.dc_texturefracx;
|
||||
|
@ -256,7 +256,7 @@ namespace swrenderer
|
|||
args.colormap = drawerargs.Colormap();
|
||||
args.translation = drawerargs.TranslationMap();
|
||||
args.basecolors = (const uint32_t *)GPalette.BaseColors;
|
||||
args.pitch = RenderViewport::Instance()->dc_pitch;
|
||||
args.pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
args.count = drawerargs.dc_count;
|
||||
args.dest_y = drawerargs.DestY();
|
||||
args.iscale = drawerargs.dc_iscale;
|
||||
|
@ -307,7 +307,7 @@ namespace swrenderer
|
|||
args.dest = (uint32_t*)drawerargs.Dest();
|
||||
args.dest_y = drawerargs.DestY();
|
||||
args.count = drawerargs.Count();
|
||||
args.pitch = RenderViewport::Instance()->dc_pitch;
|
||||
args.pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
args.texturefrac[0] = drawerargs.TextureVPos();
|
||||
args.iscale[0] = drawerargs.TextureVStep();
|
||||
args.source0[0] = (const uint32_t *)drawerargs.FrontTexturePixels();
|
||||
|
@ -332,7 +332,7 @@ namespace swrenderer
|
|||
_yl = drawerargs.dc_yl;
|
||||
_yh = drawerargs.dc_yh;
|
||||
_destorg = RenderViewport::Instance()->dc_destorg;
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
_fuzzpos = fuzzpos;
|
||||
_fuzzviewheight = fuzzviewheight;
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ namespace swrenderer
|
|||
_a = a;
|
||||
|
||||
_destorg = RenderViewport::Instance()->dc_destorg;
|
||||
_pitch = RenderViewport::Instance()->dc_pitch;
|
||||
_pitch = RenderViewport::Instance()->RenderTarget->GetPitch();
|
||||
}
|
||||
|
||||
void FillTransColumnRGBACommand::Execute(DrawerThread *thread)
|
||||
|
|
|
@ -126,26 +126,18 @@ namespace swrenderer
|
|||
|
||||
void RenderViewport::SetupBuffer()
|
||||
{
|
||||
static BYTE *lastbuff = NULL;
|
||||
|
||||
int pitch = RenderTarget->GetPitch();
|
||||
int pixelsize = RenderTarget->IsBgra() ? 4 : 1;
|
||||
BYTE *lineptr = RenderTarget->GetBuffer() + (viewwindowy*pitch + viewwindowx) * pixelsize;
|
||||
|
||||
if (dc_pitch != pitch || lineptr != lastbuff)
|
||||
{
|
||||
if (dc_pitch != pitch)
|
||||
{
|
||||
dc_pitch = pitch;
|
||||
R_InitFuzzTable(pitch);
|
||||
}
|
||||
|
||||
dc_destorg = lineptr;
|
||||
dc_destheight = RenderTarget->GetHeight() - viewwindowy;
|
||||
for (int i = 0; i < RenderTarget->GetHeight(); i++)
|
||||
{
|
||||
ylookup[i] = i * pitch;
|
||||
}
|
||||
}
|
||||
|
||||
R_InitParticleTexture();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ namespace swrenderer
|
|||
|
||||
uint8_t *dc_destorg = nullptr;
|
||||
int dc_destheight = 0;
|
||||
int dc_pitch = 0;
|
||||
|
||||
private:
|
||||
void InitTextureMapping();
|
||||
|
|
Loading…
Reference in a new issue