Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 10, 2024
1 parent e00aa6d commit 5772cf0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bool M_FileExists(const char *filename)
}

#if !defined(_WIN32) && !defined(__APPLE__)
bool file_exists_get_path(const char *basedir, const char *filename, char **retpath)
static bool file_exists_get_path(const char *basedir, const char *filename, char **retpath)
{
*retpath = M_StringJoin(basedir, DIR_SEPARATOR_S, filename, NULL);

Expand Down Expand Up @@ -540,7 +540,7 @@ char *M_StringReplaceFirst(char *haystack, const char *needle, const char *repla
}

#if !defined(strrstr)
char *strrstr(const char *haystack, const char *needle)
static char *strrstr(const char *haystack, const char *needle)
{
char *r = NULL;

Expand Down Expand Up @@ -668,7 +668,7 @@ void M_snprintf(char *buf, int buf_len, const char *s, ...)
}

#if !defined(strndup)
char *strndup(const char *s, size_t n)
static char *strndup(const char *s, size_t n)
{
const size_t len = strnlen(s, n);
char *new = malloc(len + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "md5.h"

#ifdef WORDS_BIGENDIAN
void byteswap(uint32_t *buf, unsigned int words)
static void byteswap(uint32_t *buf, unsigned int words)
{
byte *p = (byte *)buf;

Expand Down
11 changes: 4 additions & 7 deletions src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,6 @@ bool P_GiveAllCardsInMap(void)
return result;
}

void P_UpdatePowerupsStat(void)
{
viewplayer->itemspickedup_powerups++;
stat_itemspickedup_powerups = SafeAdd(stat_itemspickedup_powerups, 1);
}

//
// P_GivePower
//
Expand Down Expand Up @@ -752,7 +746,10 @@ bool P_GivePower(const int power, const bool stat)
}

if ((given = (viewplayer->powers[power] <= 0)) && stat)
P_UpdatePowerupsStat();
{
viewplayer->itemspickedup_powerups++;
stat_itemspickedup_powerups = SafeAdd(stat_itemspickedup_powerups, 1);
}

viewplayer->powers[power] = tics[power];
return given;
Expand Down
2 changes: 1 addition & 1 deletion src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void A_Recoil(const weapontype_t weapon)
//
// MBF21: P_SetPlayerSpritePtr
//
void P_SetPlayerSpritePtr(pspdef_t *psp, statenum_t stnum)
static void P_SetPlayerSpritePtr(pspdef_t *psp, statenum_t stnum)
{
do
{
Expand Down
1 change: 0 additions & 1 deletion src/r_skydefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,5 @@ skydefs_t *R_ParseSkyDefs(void)
}

cJSON_Delete(json);
id24compatible = true;
return out;
}

0 comments on commit 5772cf0

Please sign in to comment.