2014-11-22 12:32:56 +00:00
|
|
|
#ifndef polymost_h_
|
|
|
|
# define polymost_h_
|
2006-08-30 23:32:39 +00:00
|
|
|
|
|
|
|
|
2019-09-19 20:02:45 +00:00
|
|
|
#include "mdsprite.h"
|
2009-08-09 05:32:17 +00:00
|
|
|
|
2021-04-02 08:28:40 +00:00
|
|
|
extern tspritetype pm_tsprite[MAXSPRITESONSCREEN];
|
|
|
|
extern int pm_spritesortcnt;
|
2021-04-04 11:10:26 +00:00
|
|
|
extern int pm_smoothratio;
|
2021-04-02 08:28:40 +00:00
|
|
|
|
|
|
|
|
2021-03-15 18:39:58 +00:00
|
|
|
namespace Polymost
|
|
|
|
{
|
2008-12-02 10:44:39 +00:00
|
|
|
extern float gtang;
|
2019-03-19 17:08:05 +00:00
|
|
|
extern double gxyaspect;
|
|
|
|
extern float grhalfxdown10x;
|
2014-09-30 04:06:05 +00:00
|
|
|
extern float gcosang, gsinang, gcosang2, gsinang2;
|
2008-12-02 10:44:39 +00:00
|
|
|
|
2012-01-12 20:47:41 +00:00
|
|
|
//void phex(char v, char *s);
|
2009-01-09 09:29:17 +00:00
|
|
|
void polymost_drawsprite(int32_t snum);
|
|
|
|
void polymost_drawmaskwall(int32_t damaskwallcnt);
|
2019-12-30 11:23:26 +00:00
|
|
|
void polymost_dorotatespritemodel(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, uint8_t dapalnum, int32_t dastat, uint8_t daalpha, uint8_t dablend, int32_t uniqid);
|
2008-12-02 10:44:39 +00:00
|
|
|
void polymost_initosdfuncs(void);
|
2019-04-19 21:45:22 +00:00
|
|
|
|
2008-12-02 10:44:39 +00:00
|
|
|
void polymost_glreset(void);
|
2021-03-15 18:39:58 +00:00
|
|
|
void polymost_scansector(int32_t sectnum);
|
2008-12-02 10:44:39 +00:00
|
|
|
|
2009-02-02 01:49:14 +00:00
|
|
|
extern float curpolygonoffset;
|
|
|
|
|
2014-06-01 11:55:19 +00:00
|
|
|
}
|
|
|
|
|
2021-03-24 18:45:42 +00:00
|
|
|
void renderPrepareMirror(int32_t dax, int32_t day, int32_t daz, fixed_t daang, fixed_t dahoriz, int16_t dawall,
|
|
|
|
int32_t* tposx, int32_t* tposy, fixed_t* tang);
|
|
|
|
void renderCompleteMirror(void);
|
|
|
|
|
2021-11-08 22:40:57 +00:00
|
|
|
int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz, fixed_t daang, fixed_t dahoriz, int dacursectnum, bool fromoutside);
|
2021-12-01 23:13:07 +00:00
|
|
|
int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz, fixed_t daang, fixed_t dahoriz, sectortype* dacursect, bool fromoutside);
|
2021-03-24 18:45:42 +00:00
|
|
|
|
|
|
|
void renderDrawMasks(void);
|
|
|
|
|
|
|
|
// PLAG: line utility functions
|
|
|
|
typedef struct s_equation
|
|
|
|
{
|
|
|
|
float a, b, c;
|
|
|
|
} _equation;
|
|
|
|
|
|
|
|
void renderSetRollAngle(float rolla);
|
|
|
|
|
|
|
|
|
2021-03-15 18:39:58 +00:00
|
|
|
// these are defined in engine.cpp.
|
|
|
|
extern int16_t globalpicnum;
|
|
|
|
extern float fcosglobalang, fsinglobalang;
|
|
|
|
extern float fydimen, fviewingrange;
|
|
|
|
extern int32_t viewingrangerecip;
|
2014-09-30 04:17:37 +00:00
|
|
|
|
2014-05-28 22:40:16 +00:00
|
|
|
// Flags of the <dameth> argument of various functions
|
|
|
|
enum {
|
2015-12-04 11:52:54 +00:00
|
|
|
DAMETH_NOMASK = 0,
|
|
|
|
DAMETH_MASK = 1,
|
|
|
|
DAMETH_TRANS1 = 2,
|
|
|
|
DAMETH_TRANS2 = 3,
|
|
|
|
|
|
|
|
DAMETH_MASKPROPS = 3,
|
|
|
|
|
2014-05-28 22:40:16 +00:00
|
|
|
DAMETH_CLAMPED = 4,
|
2019-10-18 12:04:32 +00:00
|
|
|
DAMETH_MODEL = 8,
|
2019-10-19 17:29:59 +00:00
|
|
|
DAMETH_SKY = 16,
|
2014-05-28 22:40:16 +00:00
|
|
|
|
2014-06-01 11:55:19 +00:00
|
|
|
DAMETH_WALL = 32, // signals a texture for a wall (for r_npotwallmode)
|
|
|
|
|
2015-12-04 11:52:54 +00:00
|
|
|
// used internally by polymost_domost
|
|
|
|
DAMETH_BACKFACECULL = -1,
|
2014-05-28 22:40:16 +00:00
|
|
|
};
|
|
|
|
|
2008-12-02 10:44:39 +00:00
|
|
|
#endif
|