mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- fixed errors in wallsprite setup for the classic software renderer:
* it did not use the correct texture. * it had a math error in the right edge's y-coordinate calculation.
This commit is contained in:
parent
bc0f9023f6
commit
9d73e4c635
3 changed files with 4 additions and 5 deletions
|
@ -897,7 +897,7 @@ namespace swrenderer
|
|||
|
||||
if ((sprite.renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
||||
{
|
||||
RenderWallSprite::Project(Thread, thing, sprite.pos, sprite.picnum, sprite.spriteScale, sprite.renderflags, thingShade, foggy, thingColormap);
|
||||
RenderWallSprite::Project(Thread, thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, thingShade, foggy, thingColormap);
|
||||
}
|
||||
else if (sprite.voxel)
|
||||
{
|
||||
|
|
|
@ -71,13 +71,12 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
void RenderWallSprite::Project(RenderThread *thread, AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags, int spriteshade, bool foggy, FDynamicColormap *basecolormap)
|
||||
void RenderWallSprite::Project(RenderThread *thread, AActor *thing, const DVector3 &pos, FTexture *pic, const DVector2 &scale, int renderflags, int spriteshade, bool foggy, FDynamicColormap *basecolormap)
|
||||
{
|
||||
FWallCoords wallc;
|
||||
double x1, x2;
|
||||
DVector2 left, right;
|
||||
double gzb, gzt, tz;
|
||||
FTexture *pic = TexMan(picnum, true);
|
||||
DAngle ang = thing->Angles.Yaw + 90;
|
||||
double angcos = ang.Cos();
|
||||
double angsin = ang.Sin();
|
||||
|
@ -93,7 +92,7 @@ namespace swrenderer
|
|||
left.X = pos.X - x1 * angcos - thread->Viewport->viewpoint.Pos.X;
|
||||
left.Y = pos.Y - x1 * angsin - thread->Viewport->viewpoint.Pos.Y;
|
||||
right.X = left.X + x2 * angcos;
|
||||
right.Y = right.Y + x2 * angsin;
|
||||
right.Y = left.Y + x2 * angsin;
|
||||
|
||||
// Is it off-screen?
|
||||
if (wallc.Init(thread, left, right, TOO_CLOSE_Z))
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace swrenderer
|
|||
class RenderWallSprite : public VisibleSprite
|
||||
{
|
||||
public:
|
||||
static void Project(RenderThread *thread, AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags, int spriteshade, bool foggy, FDynamicColormap *basecolormap);
|
||||
static void Project(RenderThread *thread, AActor *thing, const DVector3 &pos, FTexture *pic, const DVector2 &scale, int renderflags, int spriteshade, bool foggy, FDynamicColormap *basecolormap);
|
||||
|
||||
protected:
|
||||
bool IsWallSprite() const override { return true; }
|
||||
|
|
Loading…
Reference in a new issue