This commit is contained in:
Rachael Alexanderson 2017-05-23 06:17:46 -04:00
commit 538bfabef8
4 changed files with 5 additions and 5 deletions

View file

@ -39,6 +39,7 @@
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
#include <functional>
#include <memory> #include <memory>
#include <chrono> #include <chrono>

View file

@ -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)
{ {

View file

@ -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))

View file

@ -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; }