mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-07 00:41:26 +00:00
Fix compiling for MSVC
This commit is contained in:
parent
0ca87560ab
commit
3120c99eeb
4 changed files with 15 additions and 15 deletions
|
@ -1404,7 +1404,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf,
|
||||||
|
|
||||||
typedef struct vbo_vertex_s
|
typedef struct vbo_vertex_s
|
||||||
{
|
{
|
||||||
float x, y, z;
|
double x, y, z;
|
||||||
float u, v;
|
float u, v;
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
} vbo_vertex_t;
|
} vbo_vertex_t;
|
||||||
|
@ -1448,17 +1448,17 @@ static INT32 lasttex = -1;
|
||||||
|
|
||||||
static void SkyVertex(vbo_vertex_t *vbo, int r, int c)
|
static void SkyVertex(vbo_vertex_t *vbo, int r, int c)
|
||||||
{
|
{
|
||||||
const float radians = (M_PIl / 180.0f);
|
const double radians = (M_PIl / 180.0f);
|
||||||
const float scale = 10000.0f;
|
const double scale = 10000.0f;
|
||||||
const float maxSideAngle = 60.0f;
|
const float maxSideAngle = 60.0f;
|
||||||
|
|
||||||
float topAngle = (c / (float)columns * 360.0f);
|
float topAngle = (c / (float)columns * 360.0f);
|
||||||
float sideAngle = (maxSideAngle * (rows - r) / rows);
|
float sideAngle = (maxSideAngle * (rows - r) / rows);
|
||||||
float height = sin(sideAngle * radians);
|
double height = sin(sideAngle * radians);
|
||||||
float realRadius = scale * cos(sideAngle * radians);
|
double realRadius = scale * cos(sideAngle * radians);
|
||||||
float x = realRadius * cos(topAngle * radians);
|
double x = realRadius * cos(topAngle * radians);
|
||||||
float y = (!yflip) ? scale * height : -scale * height;
|
double y = (!yflip) ? scale * height : -scale * height;
|
||||||
float z = realRadius * sin(topAngle * radians);
|
double z = realRadius * sin(topAngle * radians);
|
||||||
float timesRepeat = (4 * (256.0f / texw));
|
float timesRepeat = (4 * (256.0f / texw));
|
||||||
if (fpclassify(timesRepeat) == FP_ZERO)
|
if (fpclassify(timesRepeat) == FP_ZERO)
|
||||||
timesRepeat = 1.0f;
|
timesRepeat = 1.0f;
|
||||||
|
|
|
@ -5361,7 +5361,7 @@ static void M_DrawNightsAttackBackground(void)
|
||||||
M_DrawNightsAttackMountains();
|
M_DrawNightsAttackMountains();
|
||||||
|
|
||||||
// back top foreground patch
|
// back top foreground patch
|
||||||
x = -(ntsatkdrawtimer%backtopwidth);
|
x = 0-(ntsatkdrawtimer%backtopwidth);
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, backtopfg);
|
V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, backtopfg);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
|
@ -5372,7 +5372,7 @@ static void M_DrawNightsAttackBackground(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// front top foreground patch
|
// front top foreground patch
|
||||||
x = -((ntsatkdrawtimer*2)%fronttopwidth);
|
x = 0-((ntsatkdrawtimer*2)%fronttopwidth);
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, fronttopfg);
|
V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, fronttopfg);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
|
@ -5383,7 +5383,7 @@ static void M_DrawNightsAttackBackground(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// back bottom foreground patch
|
// back bottom foreground patch
|
||||||
x = -(ntsatkdrawtimer%backbottomwidth);
|
x = 0-(ntsatkdrawtimer%backbottomwidth);
|
||||||
y = BASEVIDHEIGHT - backbottomheight;
|
y = BASEVIDHEIGHT - backbottomheight;
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, backbottomfg);
|
V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, backbottomfg);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
@ -5395,7 +5395,7 @@ static void M_DrawNightsAttackBackground(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// front bottom foreground patch
|
// front bottom foreground patch
|
||||||
x = -((ntsatkdrawtimer*2)%frontbottomwidth);
|
x = 0-((ntsatkdrawtimer*2)%frontbottomwidth);
|
||||||
y = BASEVIDHEIGHT - frontbottomheight;
|
y = BASEVIDHEIGHT - frontbottomheight;
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, frontbottomfg);
|
V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, frontbottomfg);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
|
|
@ -4652,7 +4652,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
UINT8 i, numtospawn = 24;
|
UINT8 i, numtospawn = 24;
|
||||||
angle_t ang = 0, interval = FixedAngle((360 << FRACBITS) / numtospawn);
|
angle_t ang = 0, interval = FixedAngle((360 << FRACBITS) / numtospawn);
|
||||||
mobj_t *shock, *sfirst = NULL, *sprev = NULL;
|
mobj_t *shock = NULL, *sfirst = NULL, *sprev = NULL;
|
||||||
|
|
||||||
mobj->movecount = mobj->health+1;
|
mobj->movecount = mobj->health+1;
|
||||||
mobj->movefactor = -512*FRACUNIT;
|
mobj->movefactor = -512*FRACUNIT;
|
||||||
|
|
|
@ -786,8 +786,8 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
|
||||||
{
|
{
|
||||||
char *sprinfoToken;
|
char *sprinfoToken;
|
||||||
size_t sprinfoTokenLength;
|
size_t sprinfoTokenLength;
|
||||||
char *frameChar;
|
char *frameChar = NULL;
|
||||||
UINT8 frameFrame;
|
UINT8 frameFrame = -1;
|
||||||
#ifdef ROTSPRITE
|
#ifdef ROTSPRITE
|
||||||
INT16 frameXPivot = 0;
|
INT16 frameXPivot = 0;
|
||||||
INT16 frameYPivot = 0;
|
INT16 frameYPivot = 0;
|
||||||
|
|
Loading…
Reference in a new issue