mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +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)
|
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)
|
else if (sprite.voxel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,13 +71,12 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
|
||||||
|
|
||||||
namespace swrenderer
|
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;
|
FWallCoords wallc;
|
||||||
double x1, x2;
|
double x1, x2;
|
||||||
DVector2 left, right;
|
DVector2 left, right;
|
||||||
double gzb, gzt, tz;
|
double gzb, gzt, tz;
|
||||||
FTexture *pic = TexMan(picnum, true);
|
|
||||||
DAngle ang = thing->Angles.Yaw + 90;
|
DAngle ang = thing->Angles.Yaw + 90;
|
||||||
double angcos = ang.Cos();
|
double angcos = ang.Cos();
|
||||||
double angsin = ang.Sin();
|
double angsin = ang.Sin();
|
||||||
|
@ -93,7 +92,7 @@ namespace swrenderer
|
||||||
left.X = pos.X - x1 * angcos - thread->Viewport->viewpoint.Pos.X;
|
left.X = pos.X - x1 * angcos - thread->Viewport->viewpoint.Pos.X;
|
||||||
left.Y = pos.Y - x1 * angsin - thread->Viewport->viewpoint.Pos.Y;
|
left.Y = pos.Y - x1 * angsin - thread->Viewport->viewpoint.Pos.Y;
|
||||||
right.X = left.X + x2 * angcos;
|
right.X = left.X + x2 * angcos;
|
||||||
right.Y = right.Y + x2 * angsin;
|
right.Y = left.Y + x2 * angsin;
|
||||||
|
|
||||||
// Is it off-screen?
|
// Is it off-screen?
|
||||||
if (wallc.Init(thread, left, right, TOO_CLOSE_Z))
|
if (wallc.Init(thread, left, right, TOO_CLOSE_Z))
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace swrenderer
|
||||||
class RenderWallSprite : public VisibleSprite
|
class RenderWallSprite : public VisibleSprite
|
||||||
{
|
{
|
||||||
public:
|
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:
|
protected:
|
||||||
bool IsWallSprite() const override { return true; }
|
bool IsWallSprite() const override { return true; }
|
||||||
|
|
Loading…
Reference in a new issue