You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I added FastDoom's Saturn Fuzz effect to my fork and I was wondering if you would like it for GBADoom.
I however have no idea how to do a merge request for just a snip-it of code so Ill post it here.
//Code adapted from viti95's FastDoom to the GBA
void R_DrawFuzzColumnSaturn(const draw_column_vars_t *dcvars)
{
int dc_yl = dcvars->yl;
int dc_yh = dcvars->yh;
int count;
byte *dest;
fixed_t frac;
fixed_t fracstep;
int initialdrawpos = 0;
// Adjust borders. Low...
if (dc_yl <= 0)
dc_yl = 1;
// .. and high.
if (dc_yh >= viewheight-1)
dc_yh = viewheight - 2;
count = IDiv32((dc_yh - dc_yl), 2) - 1;
// Zero length, column does not exceed a pixel.
if (count <= 0)
return;
const byte* colormap = &fullcolormap[6*256];
initialdrawpos = dc_yl + dcvars->x;
dest = drawvars.byte_topleft + ScreenYToOffset(dcvars->yl) + dcvars->x;
fracstep = (dcvars->iscale << COLEXTRABITS);
frac = (dcvars->texturemid + (dc_yl - centery)*dcvars->iscale) << COLEXTRABITS;
if (initialdrawpos & 1)
{
dest += SCREENWIDTH * 2;
frac += fracstep;
}
fracstep = 2 * (fracstep);
do
{
*dest = colormap[dcvars->source[frac>>COLBITS]];
dest += SCREENWIDTH * 4;
frac += fracstep;
} while (count--);
if ((dc_yh - dc_yl) & 1)
{
*dest = colormap[dcvars->source[(frac >> COLBITS)]];
}
else
{
if (!(initialdrawpos & 1))
{
*dest = colormap[dcvars->source[(frac >> COLBITS)]];
}
}
}
The text was updated successfully, but these errors were encountered:
Hi I added FastDoom's Saturn Fuzz effect to my fork and I was wondering if you would like it for GBADoom.
I however have no idea how to do a merge request for just a snip-it of code so Ill post it here.
//Code adapted from viti95's FastDoom to the GBA
void R_DrawFuzzColumnSaturn(const draw_column_vars_t *dcvars)
{
int dc_yl = dcvars->yl;
int dc_yh = dcvars->yh;
}
The text was updated successfully, but these errors were encountered: