mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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,
|
||||
scale / (FIXED2DBL(scalex) * float(1 << MAPBITS)),
|
||||
scale / (FIXED2DBL(scaley) * float(1 << MAPBITS)),
|
||||
rotation,
|
||||
ANGLE2DBL(rotation),
|
||||
colormap,
|
||||
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,
|
||||
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)
|
||||
{
|
||||
#ifndef NO_SWRENDER
|
||||
|
@ -1163,8 +1163,7 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
|||
int i;
|
||||
int y1, y2, y;
|
||||
fixed_t x;
|
||||
double rot = rotation * M_PI / double(1u << 31);
|
||||
bool dorotate = rot != 0;
|
||||
bool dorotate = rotation != 0.;
|
||||
double cosrot, sinrot;
|
||||
|
||||
if (--npoints < 2 || Buffer == NULL)
|
||||
|
@ -1205,8 +1204,9 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
|||
scalex /= FIXED2DBL(tex->xScale);
|
||||
scaley /= FIXED2DBL(tex->yScale);
|
||||
|
||||
cosrot = cos(rot);
|
||||
sinrot = sin(rot);
|
||||
// Use the CRT's functions here.
|
||||
cosrot = cos(ToRadians(rotation));
|
||||
sinrot = sin(ToRadians(rotation));
|
||||
|
||||
// Setup constant texture mapping parameters.
|
||||
R_SetupSpanBits(tex);
|
||||
|
|
|
@ -180,7 +180,7 @@ public:
|
|||
|
||||
// Fill a simple polygon with a texture
|
||||
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);
|
||||
|
||||
// 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,
|
||||
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
|
||||
fixed_t shade = LIGHT2SHADE(lightlevel) - 12*FRACUNIT;
|
||||
|
@ -3083,8 +3083,7 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
|||
D3DCOLOR color0, color1;
|
||||
float ox, oy;
|
||||
float cosrot, sinrot;
|
||||
float rot = float(rotation * M_PI / float(1u << 31));
|
||||
bool dorotate = rot != 0;
|
||||
bool dorotate = rotation != 0;
|
||||
|
||||
if (npoints < 3)
|
||||
{ // This is no polygon.
|
||||
|
@ -3105,8 +3104,8 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
|||
return;
|
||||
}
|
||||
|
||||
cosrot = cos(rot);
|
||||
sinrot = sin(rot);
|
||||
cosrot = (float)cos(ToRadians(rotation));
|
||||
sinrot = (float)sin(ToRadians(rotation));
|
||||
|
||||
CheckQuadBatch(npoints - 2, npoints);
|
||||
quad = &QuadExtra[QuadBatchPos];
|
||||
|
|
|
@ -265,7 +265,7 @@ public:
|
|||
void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor);
|
||||
void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||
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);
|
||||
void WipeEndScreen();
|
||||
bool WipeDo(int ticks);
|
||||
|
|
Loading…
Reference in a new issue