2017-01-03 06:17:54 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
2016-12-30 06:51:39 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-12-31 11:45:07 +00:00
|
|
|
#include "r_visiblesprite.h"
|
2017-01-16 04:26:22 +00:00
|
|
|
#include "r_sprite.h"
|
2016-12-30 06:51:39 +00:00
|
|
|
|
2017-01-12 15:21:46 +00:00
|
|
|
class DPSprite;
|
|
|
|
|
2016-12-30 06:51:39 +00:00
|
|
|
namespace swrenderer
|
|
|
|
{
|
2017-01-11 17:35:20 +00:00
|
|
|
class RenderPlayerSprite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static void SetupSpriteScale();
|
2017-01-09 13:28:31 +00:00
|
|
|
|
2017-01-11 17:35:20 +00:00
|
|
|
static void RenderPlayerSprites();
|
|
|
|
static void RenderRemainingPlayerSprites();
|
|
|
|
|
|
|
|
private:
|
2017-01-12 20:29:19 +00:00
|
|
|
static void Render(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac, int spriteshade, FDynamicColormap *basecolormap);
|
2017-01-11 17:35:20 +00:00
|
|
|
|
2017-01-11 17:38:51 +00:00
|
|
|
enum { BASEXCENTER = 160 };
|
|
|
|
enum { BASEYCENTER = 100 };
|
|
|
|
|
2017-01-11 17:35:20 +00:00
|
|
|
// Used to store a psprite's drawing information if it needs to be drawn later.
|
|
|
|
struct vispsp_t
|
|
|
|
{
|
2017-01-16 04:26:22 +00:00
|
|
|
RenderSprite *vis;
|
2017-01-11 17:35:20 +00:00
|
|
|
FDynamicColormap *basecolormap;
|
|
|
|
int x1;
|
|
|
|
};
|
|
|
|
|
|
|
|
static TArray<vispsp_t> vispsprites;
|
|
|
|
static unsigned int vispspindex;
|
|
|
|
|
|
|
|
static double pspritexscale;
|
|
|
|
static double pspritexiscale;
|
|
|
|
static double pspriteyscale;
|
|
|
|
|
2017-01-16 04:26:22 +00:00
|
|
|
static TArray<RenderSprite> avis;
|
2017-01-11 17:35:20 +00:00
|
|
|
};
|
2016-12-30 06:51:39 +00:00
|
|
|
}
|