Warning clean up
This commit is contained in:
parent
7039fff6ab
commit
247c3cb323
13 changed files with 25 additions and 48 deletions
|
|
@ -710,7 +710,7 @@ static char shiftxform[] =
|
|||
|
||||
INT32 CON_ShiftChar(INT32 ch)
|
||||
{
|
||||
if (I_UseNativeKeyboard() || ch >= sizeof(shiftxform))
|
||||
if (I_UseNativeKeyboard() || ch >= (INT32)sizeof(shiftxform))
|
||||
return ch;
|
||||
|
||||
// warning: shiftdown is NOT a boolean, it's 1 or 2 for lshift/rshift
|
||||
|
|
|
|||
|
|
@ -4449,8 +4449,8 @@ void CL_RemoveSplitscreenPlayer(UINT8 p)
|
|||
|
||||
static void GotOurIP(UINT32 address)
|
||||
{
|
||||
const unsigned char * p = (const unsigned char *)&address;
|
||||
#ifdef DEVELOP
|
||||
const unsigned char * p = (const unsigned char *)&address;
|
||||
CONS_Printf("Got IP of %u.%u.%u.%u\n", p[0], p[1], p[2], p[3]);
|
||||
#endif
|
||||
ourIP = address;
|
||||
|
|
@ -7215,6 +7215,7 @@ static void UpdatePingTable(void)
|
|||
}
|
||||
|
||||
// It's that time again! Send everyone a safe message to sign, so we can show off their signature and prove we're playing fair.
|
||||
#if 0
|
||||
static void SendChallenges(void)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -7375,6 +7376,7 @@ static void UpdateChallenges(void)
|
|||
HandleSigfail("Didn't receive client signatures.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void RenewHolePunch(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2164,7 +2164,7 @@ static void SendNameAndColor(UINT8 n)
|
|||
// If you're not in a netgame, merely update the skin, color, and name.
|
||||
if (!netgame)
|
||||
{
|
||||
INT32 foundskin, voxid;
|
||||
INT32 foundskin;
|
||||
|
||||
CleanupPlayerName(playernum, cv_playername[n].zstring);
|
||||
strcpy(player_names[playernum], cv_playername[n].zstring);
|
||||
|
|
|
|||
|
|
@ -101,34 +101,6 @@ INT32 flags; Bits = 3232 MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|M
|
|||
INT32 raisestate; Respawn frame = 32 S_NULL // raisestate
|
||||
}, */
|
||||
|
||||
#ifdef HWRENDER
|
||||
static INT32 searchvalue(const char *s)
|
||||
{
|
||||
while (s[0] != '=' && s[0])
|
||||
s++;
|
||||
if (s[0] == '=')
|
||||
return atoi(&s[1]);
|
||||
else
|
||||
{
|
||||
deh_warning("No value found");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static float searchfvalue(const char *s)
|
||||
{
|
||||
while (s[0] != '=' && s[0])
|
||||
s++;
|
||||
if (s[0] == '=')
|
||||
return (float)atof(&s[1]);
|
||||
else
|
||||
{
|
||||
deh_warning("No value found");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// These are for clearing all of various things
|
||||
void clear_emblems(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1298,6 +1298,8 @@ vector3_t G_GetCalibratedGyroOffset(INT32 p)
|
|||
|
||||
void G_UpdateGamepadAutoCalibration(INT32 p, vector3_t accel, vector3_t gyro, boolean allowautocalibration)
|
||||
{
|
||||
(void)gyro;
|
||||
|
||||
fixed_t trust = FV3_Distance(&localaccelcalibrationoffset[p], &accel);
|
||||
FV3_Load(
|
||||
&localaccelcalibrationoffset[p],
|
||||
|
|
@ -1569,4 +1571,4 @@ boolean G_GetGamepadCanUseTilt(INT32 p)
|
|||
|
||||
#undef GyroCalibrationTrust
|
||||
#undef GyroCalibrationStart
|
||||
#undef GyroCalibrationRollingAvgSamples
|
||||
#undef GyroCalibrationRollingAvgSamples
|
||||
|
|
|
|||
|
|
@ -294,7 +294,10 @@ void HWR_DrawAffinePatch(patch_t *gpatch, fixed_t x, fixed_t y, const affine_t *
|
|||
// i don't fucking know, i spent a day on this and got absolutely nowhere, but this guy knows:
|
||||
// https://nigeltao.github.io/blog/2021/inverting-3x2-affine-transformation-matrix.html
|
||||
float determinant = fa * fd - fb * fc;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wfloat-equal"
|
||||
if (determinant == 0.0f)
|
||||
#pragma GCC diagnostic pop
|
||||
return;
|
||||
float ba = fd / determinant;
|
||||
float bb = -fb / determinant;
|
||||
|
|
|
|||
|
|
@ -817,7 +817,7 @@ static void K_BubbleShieldCollideDrain(player_t *player, mobj_t *bubble, INT16 d
|
|||
player->bubbleblowup /= 2;
|
||||
}
|
||||
|
||||
boolean K_BubbleShieldReflectSpecialCase(mobj_t *t)
|
||||
boolean K_BubbleShieldReflectSpecialCase(const mobj_t *t)
|
||||
{
|
||||
if ((!t) || (P_MobjWasRemoved(t)))
|
||||
return false; // Object doesn't even exist
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void K_AttractionShieldAttack(mobj_t *actor, fixed_t size, boolean hipower);
|
|||
|
||||
boolean K_BubbleShieldReflect(mobj_t *t1, mobj_t *t2);
|
||||
boolean K_BubbleShieldCanReflect(mobj_t *t);
|
||||
boolean K_BubbleShieldReflectSpecialCase(mobj_t *t);
|
||||
boolean K_BubbleShieldReflectSpecialCase(const mobj_t *t);
|
||||
|
||||
boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2);
|
||||
boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2);
|
||||
|
|
|
|||
|
|
@ -5720,8 +5720,7 @@ static void K_drawKartFirstPerson(void)
|
|||
// doesn't need to ever support 4p
|
||||
static void K_drawInput(void)
|
||||
{
|
||||
static INT32 pn = 0;
|
||||
INT32 target = 0, splitflags = (V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_SLIDEIN);
|
||||
INT32 splitflags = (V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_SLIDEIN);
|
||||
INT32 x = (BASEVIDWIDTH - 32)*FRACUNIT, y = (BASEVIDHEIGHT - 24)*FRACUNIT;
|
||||
UINT8 *shadowcolormap = NULL;
|
||||
INT32 offs, col;
|
||||
|
|
|
|||
|
|
@ -2160,7 +2160,6 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
{
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
angle_t newangle;
|
||||
INT32 moloop;
|
||||
mobj_t *mo = NULL;
|
||||
mobj_t *prev = player->mo;
|
||||
|
|
@ -2233,7 +2232,6 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
case KITEM_ORBINAUT:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
angle_t newangle;
|
||||
INT32 moloop;
|
||||
mobj_t *mo = NULL;
|
||||
mobj_t *prev = player->mo;
|
||||
|
|
@ -2267,7 +2265,6 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
case KITEM_JAWZ:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
angle_t newangle;
|
||||
INT32 moloop;
|
||||
mobj_t *mo = NULL;
|
||||
mobj_t *prev = player->mo;
|
||||
|
|
@ -2404,7 +2401,7 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
{
|
||||
if (K_GetShieldFromPlayer(player) != KSHIELD_ATTRACTION)
|
||||
{
|
||||
mobj_t *shield = K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_ATTRACTIONSHIELD, 0, NULL);
|
||||
/*mobj_t *shield =*/ K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_ATTRACTIONSHIELD, 0, NULL);
|
||||
S_StartSound(player->mo, sfx_attrsg);
|
||||
}
|
||||
|
||||
|
|
@ -2530,7 +2527,7 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
{
|
||||
if (K_GetShieldFromPlayer(player) != KSHIELD_THUNDER)
|
||||
{
|
||||
mobj_t *shield = K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_THUNDERSHIELD, 0, NULL);
|
||||
/*mobj_t *shield =*/K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_THUNDERSHIELD, 0, NULL);
|
||||
S_StartSound(player->mo, sfx_s3k41);
|
||||
}
|
||||
|
||||
|
|
@ -2554,7 +2551,7 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
case KITEM_BUBBLESHIELD:
|
||||
if (K_GetShieldFromPlayer(player) != KSHIELD_BUBBLE)
|
||||
{
|
||||
mobj_t *shield = K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_BUBBLESHIELD, 0, NULL);
|
||||
/*mobj_t *shield =*/ K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_BUBBLESHIELD, 0, NULL);
|
||||
S_StartSound(player->mo, sfx_s3k3f);
|
||||
if (player->bubblehealth <= 0 || player->bubblehealth > MAXBUBBLEHEALTH)
|
||||
player->bubblehealth = MAXBUBBLEHEALTH;
|
||||
|
|
@ -2640,7 +2637,7 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
|||
player->itemamount--;
|
||||
player->flametimer = flametime;
|
||||
player->flamedash = 0;
|
||||
mobj_t *shield = K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_FLAMESHIELD, 0, NULL);
|
||||
/*mobj_t *shield =*/ K_SpawnEquippedItem(player, KITEMEQUIP_SHIELD, MT_FLAMESHIELD, 0, NULL);
|
||||
S_StartSound(player->mo, sfx_s3k3e);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -4865,8 +4865,8 @@ static void DrawReplayHutReplayInfo(void)
|
|||
V_DrawThinString(x, y+9, V_SNAPTOTOP|V_ALLOWLOWERCASE, va("(%d laps)", demolist[dir_on[menudepthleft]].numlaps));
|
||||
|
||||
const char *gametypename = gametypes[demolist[dir_on[menudepthleft]].gametype] ? gametypes[demolist[dir_on[menudepthleft]].gametype]->name : "Unknown";
|
||||
const char *gamespeed = kartspeed_cons_t[(demolist[dir_on[menudepthleft]].kartspeed & ~DF_ENCORE) + 1].strvalue;
|
||||
const char *gamemodestring = va("%s (%s speed)", gametypename, gamespeed);
|
||||
const char *displaygamespeed = kartspeed_cons_t[(demolist[dir_on[menudepthleft]].kartspeed & ~DF_ENCORE) + 1].strvalue;
|
||||
const char *gamemodestring = va("%s (%s speed)", gametypename, displaygamespeed);
|
||||
|
||||
V_DrawString(x, y+20, V_SNAPTOTOP|V_ALLOWLOWERCASE, gamemodestring);
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ extern "C"
|
|||
return false;
|
||||
}
|
||||
|
||||
fprintf(f, va("// BlanKart preferences file for local player %d.\n", snum + 1));
|
||||
fprintf(f, "%s", va("// BlanKart preferences file for local player %d.\n", snum + 1));
|
||||
fprintf(
|
||||
f,
|
||||
"// Due to the nature of the unordered map system, data here may be shuffled!\n");
|
||||
|
|
@ -398,7 +398,7 @@ extern "C"
|
|||
file_output.copy(voicepref_buffer, VOICEPREFBUFSIZE);
|
||||
voicepref_buffer[VOICEPREFBUFSIZE - 1] = 0;
|
||||
|
||||
fprintf(f, voicepref_buffer);
|
||||
fprintf(f, "%s",voicepref_buffer);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
|
@ -432,7 +432,7 @@ extern "C"
|
|||
INT32 strikes = 0;
|
||||
|
||||
std::vector<std::string> data_to_load[2];
|
||||
char name_buffer[2][VOICENAMESIZE] = {0};
|
||||
char name_buffer[2][VOICENAMESIZE] = {{0}};
|
||||
|
||||
for (snum = 0; snum < MAXSPLITSCREENPLAYERS; snum++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -982,6 +982,8 @@ void ST_AskToJoinEnvelope(void)
|
|||
|
||||
static fixed_t ST_CalculateFadeIn(player_t *player)
|
||||
{
|
||||
(void)player;
|
||||
|
||||
const tic_t length = TICRATE/4;
|
||||
|
||||
tic_t timer = lt_exitticker;
|
||||
|
|
|
|||
Loading…
Reference in a new issue