Merge branch 'Saturn-Next' into fastpoinonside
This commit is contained in:
commit
765dd72b38
6 files changed
+17
-25
No files matched your search
@@ -171,7 +171,6 @@ enum
|
||||
{
|
||||
SHADER_NONE = -1,
|
||||
SHADER_FLOOR = 0,
|
||||
SHADER_SHADOW,
|
||||
SHADER_WALL,
|
||||
SHADER_SPRITE,
|
||||
SHADER_MODEL,
|
||||
|
||||
+9
-10
@@ -3218,8 +3218,6 @@ static void HWR_DrawSpriteShadow(gl_vissprite_t *spr, GLPatch_t *gpatch)
|
||||
pslope_t *floorslope;
|
||||
fixed_t slopez;
|
||||
float offset = 0;
|
||||
|
||||
INT32 shader = SHADER_NONE;
|
||||
|
||||
// technically this_scale gets multiplied and added to sprite y/x scale, but this thing needs it for some crap so ill just throw it in here again
|
||||
const boolean hires = (spr->mobj && spr->mobj->skin && ((skin_t *)( (spr->mobj->localskin) ? spr->mobj->localskin : spr->mobj->skin ))->flags & SF_HIRES);
|
||||
@@ -3376,14 +3374,7 @@ static void HWR_DrawSpriteShadow(gl_vissprite_t *spr, GLPatch_t *gpatch)
|
||||
if (sSurf.PolyColor.s.alpha > floorheight/4)
|
||||
{
|
||||
sSurf.PolyColor.s.alpha = (UINT8)(sSurf.PolyColor.s.alpha - floorheight/4);
|
||||
|
||||
if (HWR_UseShader())
|
||||
{
|
||||
shader = SHADER_SHADOW;
|
||||
blendmode |= PF_ColorMapped;
|
||||
}
|
||||
|
||||
HWR_ProcessPolygon(&sSurf, swallVerts, 4, blendmode|PF_Translucent|PF_Modulated, shader, false);
|
||||
HWR_ProcessPolygon(&sSurf, swallVerts, 4, blendmode|PF_Translucent|PF_Modulated, SHADER_NONE, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4599,6 +4590,14 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||
else
|
||||
rollsum = rollangle;
|
||||
|
||||
// this is kinda dumb lkmao, but try to mitigate shadows being weirdly offset on slopes
|
||||
if (thing->type == MT_SHADOW)
|
||||
{
|
||||
sprinfo->available = true; // < lmao
|
||||
sprinfo->pivot[(thing->frame & FF_FRAMEMASK)].x = spr_offset>>FRACBITS;
|
||||
sprinfo->pivot[(thing->frame & FF_FRAMEMASK)].y = -8; // noones gonna replace shadow sprite anyways, right? that random value ftw, otherwise this clips into the ground Zzz...
|
||||
}
|
||||
|
||||
rollangle = R_GetRollAngle(rollsum);
|
||||
rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle);
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@ static struct {
|
||||
// Floor shader
|
||||
{GLSL_DEFAULT_VERTEX_SHADER, GLSL_FLOOR_FRAGMENT_SHADER},
|
||||
|
||||
// Shadow shader
|
||||
{GLSL_DEFAULT_VERTEX_SHADER, GLSL_SHADOW_FRAGMENT_SHADER},
|
||||
|
||||
// Wall shader
|
||||
{GLSL_DEFAULT_VERTEX_SHADER, GLSL_WALL_FRAGMENT_SHADER},
|
||||
|
||||
@@ -432,7 +429,6 @@ static inline UINT16 HWR_FindShaderDefs(UINT16 wadnum)
|
||||
customshaderxlat_t shaderxlat[] =
|
||||
{
|
||||
{"Flat", SHADER_FLOOR},
|
||||
{"Shadow", SHADER_SHADOW},
|
||||
{"WallTexture", SHADER_WALL},
|
||||
{"Sprite", SHADER_SPRITE},
|
||||
{"Model", SHADER_MODEL},
|
||||
|
||||
@@ -211,10 +211,6 @@
|
||||
GLSL_WALL_FUDGES \
|
||||
GLSL_SOFTWARE_FRAGMENT_SHADER
|
||||
|
||||
#define GLSL_SHADOW_FRAGMENT_SHADER \
|
||||
GLSL_FLOOR_FUDGES \
|
||||
GLSL_SOFTWARE_FRAGMENT_SHADER_NOPAL
|
||||
|
||||
//
|
||||
// Water surface shader
|
||||
//
|
||||
|
||||
@@ -4213,6 +4213,8 @@ void P_DoTimeOver(player_t *player)
|
||||
|
||||
player->pflags |= PF_TIMEOVER;
|
||||
|
||||
demo.savebutton = leveltime;
|
||||
|
||||
if (P_IsLocalPlayer(player) && !demo.playback)
|
||||
legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p
|
||||
|
||||
|
||||
+6
-6
@@ -842,8 +842,8 @@ patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spri
|
||||
}
|
||||
else
|
||||
{
|
||||
xpivot = patch->leftoffset;
|
||||
ypivot = patch->height / 2;
|
||||
xpivot = SHORT(patch->leftoffset);
|
||||
ypivot = SHORT(patch->height) / 2;
|
||||
}
|
||||
|
||||
RotatedPatch_DoRotation(rotsprite, patch, rotationangle, xpivot, ypivot, flip);
|
||||
@@ -902,9 +902,9 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle
|
||||
size_t size;
|
||||
INT32 bflip = (flip != 0x00);
|
||||
|
||||
INT32 width = patch->width;
|
||||
INT32 height = patch->height;
|
||||
INT32 leftoffset = patch->leftoffset;
|
||||
INT32 width = SHORT(patch->width);
|
||||
INT32 height = SHORT(patch->height);
|
||||
INT32 leftoffset = SHORT(patch->leftoffset);
|
||||
INT32 newwidth, newheight;
|
||||
|
||||
fixed_t ca = rollcosang[angle];
|
||||
@@ -975,7 +975,7 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle
|
||||
}
|
||||
|
||||
ox = (newwidth / 2) + (leftoffset - xpivot);
|
||||
oy = (newheight / 2) + (patch->topoffset - ypivot);
|
||||
oy = (newheight / 2) + (SHORT(patch->topoffset) - ypivot);
|
||||
width = (maxx - minx);
|
||||
height = (maxy - miny);
|
||||
|
||||
|
||||
Reference in new issue
Block a user