mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- changed angle parameter of FillSimplePoly.
This commit is contained in:
parent
5bf806e478
commit
41387622f2
5 changed files with 12 additions and 13 deletions
|
@ -2070,7 +2070,7 @@ void AM_drawSubsectors()
|
||||||
originx, originy,
|
originx, originy,
|
||||||
scale / (FIXED2DBL(scalex) * float(1 << MAPBITS)),
|
scale / (FIXED2DBL(scalex) * float(1 << MAPBITS)),
|
||||||
scale / (FIXED2DBL(scaley) * float(1 << MAPBITS)),
|
scale / (FIXED2DBL(scaley) * float(1 << MAPBITS)),
|
||||||
rotation,
|
ANGLE2DBL(rotation),
|
||||||
colormap,
|
colormap,
|
||||||
floorlight
|
floorlight
|
||||||
);
|
);
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ void DCanvas::Clear (int left, int top, int right, int bottom, int palcolor, uin
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
double originx, double originy, double scalex, double scaley, angle_t rotation,
|
double originx, double originy, double scalex, double scaley, DAngle rotation,
|
||||||
FDynamicColormap *colormap, int lightlevel)
|
FDynamicColormap *colormap, int lightlevel)
|
||||||
{
|
{
|
||||||
#ifndef NO_SWRENDER
|
#ifndef NO_SWRENDER
|
||||||
|
@ -1163,8 +1163,7 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
int i;
|
int i;
|
||||||
int y1, y2, y;
|
int y1, y2, y;
|
||||||
fixed_t x;
|
fixed_t x;
|
||||||
double rot = rotation * M_PI / double(1u << 31);
|
bool dorotate = rotation != 0.;
|
||||||
bool dorotate = rot != 0;
|
|
||||||
double cosrot, sinrot;
|
double cosrot, sinrot;
|
||||||
|
|
||||||
if (--npoints < 2 || Buffer == NULL)
|
if (--npoints < 2 || Buffer == NULL)
|
||||||
|
@ -1205,8 +1204,9 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
scalex /= FIXED2DBL(tex->xScale);
|
scalex /= FIXED2DBL(tex->xScale);
|
||||||
scaley /= FIXED2DBL(tex->yScale);
|
scaley /= FIXED2DBL(tex->yScale);
|
||||||
|
|
||||||
cosrot = cos(rot);
|
// Use the CRT's functions here.
|
||||||
sinrot = sin(rot);
|
cosrot = cos(ToRadians(rotation));
|
||||||
|
sinrot = sin(ToRadians(rotation));
|
||||||
|
|
||||||
// Setup constant texture mapping parameters.
|
// Setup constant texture mapping parameters.
|
||||||
R_SetupSpanBits(tex);
|
R_SetupSpanBits(tex);
|
||||||
|
|
|
@ -180,7 +180,7 @@ public:
|
||||||
|
|
||||||
// Fill a simple polygon with a texture
|
// Fill a simple polygon with a texture
|
||||||
virtual void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
virtual void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
double originx, double originy, double scalex, double scaley, angle_t rotation,
|
double originx, double originy, double scalex, double scaley, DAngle rotation,
|
||||||
struct FDynamicColormap *colormap, int lightlevel);
|
struct FDynamicColormap *colormap, int lightlevel);
|
||||||
|
|
||||||
// Set an area to a specified color
|
// Set an area to a specified color
|
||||||
|
|
|
@ -3071,7 +3071,7 @@ void D3DFB::FlatFill(int left, int top, int right, int bottom, FTexture *src, bo
|
||||||
|
|
||||||
void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
||||||
double originx, double originy, double scalex, double scaley,
|
double originx, double originy, double scalex, double scaley,
|
||||||
angle_t rotation, FDynamicColormap *colormap, int lightlevel)
|
DAngle rotation, FDynamicColormap *colormap, int lightlevel)
|
||||||
{
|
{
|
||||||
// Use an equation similar to player sprites to determine shade
|
// Use an equation similar to player sprites to determine shade
|
||||||
fixed_t shade = LIGHT2SHADE(lightlevel) - 12*FRACUNIT;
|
fixed_t shade = LIGHT2SHADE(lightlevel) - 12*FRACUNIT;
|
||||||
|
@ -3083,8 +3083,7 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
||||||
D3DCOLOR color0, color1;
|
D3DCOLOR color0, color1;
|
||||||
float ox, oy;
|
float ox, oy;
|
||||||
float cosrot, sinrot;
|
float cosrot, sinrot;
|
||||||
float rot = float(rotation * M_PI / float(1u << 31));
|
bool dorotate = rotation != 0;
|
||||||
bool dorotate = rot != 0;
|
|
||||||
|
|
||||||
if (npoints < 3)
|
if (npoints < 3)
|
||||||
{ // This is no polygon.
|
{ // This is no polygon.
|
||||||
|
@ -3105,8 +3104,8 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cosrot = cos(rot);
|
cosrot = (float)cos(ToRadians(rotation));
|
||||||
sinrot = sin(rot);
|
sinrot = (float)sin(ToRadians(rotation));
|
||||||
|
|
||||||
CheckQuadBatch(npoints - 2, npoints);
|
CheckQuadBatch(npoints - 2, npoints);
|
||||||
quad = &QuadExtra[QuadBatchPos];
|
quad = &QuadExtra[QuadBatchPos];
|
||||||
|
|
|
@ -265,7 +265,7 @@ public:
|
||||||
void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor);
|
void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor);
|
||||||
void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
double originx, double originy, double scalex, double scaley,
|
double originx, double originy, double scalex, double scaley,
|
||||||
angle_t rotation, FDynamicColormap *colormap, int lightlevel);
|
DAngle rotation, FDynamicColormap *colormap, int lightlevel);
|
||||||
bool WipeStartScreen(int type);
|
bool WipeStartScreen(int type);
|
||||||
void WipeEndScreen();
|
void WipeEndScreen();
|
||||||
bool WipeDo(int ticks);
|
bool WipeDo(int ticks);
|
||||||
|
|
Loading…
Reference in a new issue