Squash various warnings

Shadowed declarations
Unsuffixed float constants
There's an unsuffixed float constant I can't fix because the define is outside of SRB2. We could have our own copy of Pi if we really wanted.
This commit is contained in:
Sryder 2018-11-14 21:53:57 +00:00
parent ad79b4b83b
commit b8477b4067
8 changed files with 20 additions and 28 deletions

View file

@ -2931,8 +2931,6 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
}
else if (server)
{
XBOXSTATIC UINT8 buf[2];
// Sal: Because kicks (and a lot of other commands) are player-based, we can't tell which player pnum is on the node from a glance.
// When we want to remove everyone from a node, we have to get the kicked player's node, then remove everyone on that node manually so we don't miss any.
// This avoids the bugs with older SRB2 version's online splitscreen kicks, specifically ghosting.

View file

@ -492,8 +492,8 @@ static void GIF_framewrite(void)
// screen regions are handled in GIF_lzw
{
int d1 = (int)((100.0/NEWTICRATE)*(gif_frames+1));
int d2 = (int)((100.0/NEWTICRATE)*(gif_frames));
int d1 = (int)((100.0f/NEWTICRATE)*(gif_frames+1));
int d2 = (int)((100.0f/NEWTICRATE)*(gif_frames));
UINT16 delay = d1-d2;
INT32 startline;

View file

@ -9447,7 +9447,6 @@ static void M_DrawMonitorToggles(void)
for (j = 0; j < height; j++)
{
const INT32 thisitem = (i*height)+j;
INT32 drawnum = 0;
if (thisitem >= currentMenu->numitems)
continue;

View file

@ -470,7 +470,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
{
INT32 numingame = 0;
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
{
@ -521,7 +520,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
{
INT32 numingame = 0;
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
{

View file

@ -8868,7 +8868,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->health)
{
boolean blue = (mobj->type == MT_BLUEROBRA_HEAD);
UINT8 numsegs = abs(mobj->z - mobj->floorz) / (32 * mobj->scale);
UINT8 locnumsegs = abs(mobj->z - mobj->floorz) / (32 * mobj->scale);
UINT8 i;
mobj_t *cur = mobj->hnext, *prev = mobj;
@ -8876,13 +8876,13 @@ void P_MobjThinker(mobj_t *mobj)
mobj->angle = (angle_t)mobj->extravalue1;
mobj->extravalue1 += (FixedAngle(2*mobj->momz) * (blue ? -1 : 1));
for (i = 0; i < numsegs*2; i++) // *2 to check for any extra segs still present
for (i = 0; i < locnumsegs*2; i++) // *2 to check for any extra segs still present
{
fixed_t segz = mobj->z - ((i+1) * (32 * mobj->scale));
if (cur && !P_MobjWasRemoved(cur))
{
if (i >= numsegs) // Remove extras
if (i >= locnumsegs) // Remove extras
{
mobj_t *next = cur->hnext;
P_RemoveMobj(cur);
@ -8894,7 +8894,7 @@ void P_MobjThinker(mobj_t *mobj)
}
else
{
if (i >= numsegs) // We're done with this list
if (i >= locnumsegs) // We're done with this list
continue; //break;
else // Need another here!
cur = P_SpawnMobj(mobj->x, mobj->y, segz, (blue ? MT_BLUEROBRA_JOINT : MT_ROBRA_JOINT));
@ -10959,7 +10959,6 @@ void P_SpawnPlayer(INT32 playernum)
if (p->kartstuff[k_bumper])
{
INT32 i;
angle_t diff = FixedAngle(360*FRACUNIT/p->kartstuff[k_bumper]);
angle_t newangle = mobj->angle;
fixed_t newx = mobj->x + P_ReturnThrustX(mobj, newangle + ANGLE_180, 64*FRACUNIT);
@ -11746,13 +11745,12 @@ ML_NOCLIMB : Direction not controllable
case MT_AAZTREE_HELPER:
{
fixed_t top = mobj->z;
UINT8 numsegs = (mthing->extrainfo)+2;
UINT8 locnumsegs = (mthing->extrainfo)+2;
UINT8 numleaves = max(3, (abs(mthing->angle+1) % 6) + 3);
UINT8 i;
mobj_t *coconut;
// Spawn tree segments
for (i = 0; i < numsegs; i++)
for (i = 0; i < locnumsegs; i++)
{
P_SpawnMobj(mobj->x, mobj->y, top, MT_AAZTREE_SEG);
top += FixedMul(mobjinfo[MT_AAZTREE_SEG].height, mobj->scale);

View file

@ -2648,7 +2648,7 @@ boolean P_SetupLevel(boolean skipprecip)
// This is handled BEFORE sounds are stopped.
if (rendermode != render_none && encoremode && !prevencoremode)
{
tic_t starttime, endtime, nowtime;
tic_t locstarttime, endtime, nowtime;
S_StopMusic(); // er, about that...
@ -2666,8 +2666,8 @@ boolean P_SetupLevel(boolean skipprecip)
F_WipeEndScreen();
F_RunWipe(wipedefs[wipe_level_final], false);
starttime = nowtime = lastwipetic;
endtime = starttime + (3*TICRATE)/2;
locstarttime = nowtime = lastwipetic;
endtime = locstarttime + (3*TICRATE)/2;
// Hold on white for extra effect.
while (nowtime < endtime)

View file

@ -4196,7 +4196,6 @@ DoneSection2:
{
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
{
UINT8 i;
UINT8 nump = 0;
for (i = 0; i < MAXPLAYERS; i++)

View file

@ -50,8 +50,8 @@
#ifdef HAVE_LIBGME
#include "gme/gme.h"
#define GME_TREBLE 5.0
#define GME_BASS 1.0
#define GME_TREBLE 5.0f
#define GME_BASS 1.0f
#ifdef HAVE_ZLIB
#ifndef _MSC_VER