mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Merge branch 'next' into stringop
This commit is contained in:
commit
1e61ab3472
11 changed files with 19 additions and 13 deletions
|
@ -245,6 +245,7 @@ target_compile_options(SRB2SDL2 PRIVATE
|
||||||
# This is a direct translation from versions.mk
|
# This is a direct translation from versions.mk
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:GNU>>:
|
$<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:GNU>>:
|
||||||
-Wall
|
-Wall
|
||||||
|
-Wextra
|
||||||
-Wno-trigraphs
|
-Wno-trigraphs
|
||||||
-W # Was controlled by RELAXWARNINGS
|
-W # Was controlled by RELAXWARNINGS
|
||||||
-Wfloat-equal
|
-Wfloat-equal
|
||||||
|
@ -325,7 +326,9 @@ target_compile_options(SRB2SDL2 PRIVATE
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:C>,$<OR:$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>>>:
|
$<$<AND:$<COMPILE_LANGUAGE:C>,$<OR:$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>>>:
|
||||||
-Wall
|
-Wall
|
||||||
-Wno-absolute-value
|
-Wno-absolute-value
|
||||||
|
-Wextra
|
||||||
-Wno-trigraphs
|
-Wno-trigraphs
|
||||||
|
-Wconditional-uninitialized
|
||||||
-Wno-error=non-literal-null-conversion
|
-Wno-error=non-literal-null-conversion
|
||||||
-Wno-error=constant-conversion
|
-Wno-error=constant-conversion
|
||||||
-Wno-error=unused-but-set-variable
|
-Wno-error=unused-but-set-variable
|
||||||
|
@ -342,6 +345,9 @@ target_compile_options(SRB2SDL2 PRIVATE
|
||||||
# C++, GNU, Clang and Apple Clang
|
# C++, GNU, Clang and Apple Clang
|
||||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<OR:$<C_COMPILER_ID:GNU>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>>>:
|
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<OR:$<C_COMPILER_ID:GNU>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>>>:
|
||||||
-Wall
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
-Wno-trigraphs
|
||||||
|
-Wconditional-uninitialized
|
||||||
>
|
>
|
||||||
|
|
||||||
# C++, MSVC
|
# C++, MSVC
|
||||||
|
|
|
@ -134,7 +134,7 @@ void luaV_gettable (lua_State *L, TValue *t, TValue *key, StkId val) {
|
||||||
void luaV_settable (lua_State *L, TValue *t, TValue *key, StkId val) {
|
void luaV_settable (lua_State *L, TValue *t, TValue *key, StkId val) {
|
||||||
int loop;
|
int loop;
|
||||||
for (loop = 0; loop < MAXTAGLOOP; loop++) {
|
for (loop = 0; loop < MAXTAGLOOP; loop++) {
|
||||||
TValue *tm;
|
TValue *tm = NULL;
|
||||||
if (ttistable(t)) { /* `t' is a table? */
|
if (ttistable(t)) { /* `t' is a table? */
|
||||||
Table *h = hvalue(t);
|
Table *h = hvalue(t);
|
||||||
TValue *oldval = luaH_set(L, h, key); /* do a primitive set */
|
TValue *oldval = luaH_set(L, h, key); /* do a primitive set */
|
||||||
|
|
|
@ -1650,7 +1650,7 @@ static void G_LoadDemoExtraFiles(UINT8 **pp, UINT16 this_demo_version)
|
||||||
UINT16 totalfiles;
|
UINT16 totalfiles;
|
||||||
char filename[MAX_WADPATH];
|
char filename[MAX_WADPATH];
|
||||||
UINT8 md5sum[16];
|
UINT8 md5sum[16];
|
||||||
filestatus_t ncs;
|
filestatus_t ncs = FS_NOTFOUND;
|
||||||
boolean toomany = false;
|
boolean toomany = false;
|
||||||
boolean alreadyloaded;
|
boolean alreadyloaded;
|
||||||
UINT16 i, j;
|
UINT16 i, j;
|
||||||
|
|
|
@ -5403,7 +5403,7 @@ void G_FreeMapSearch(mapsearchfreq_t *freq, INT32 freqc)
|
||||||
INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
|
INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
|
||||||
{
|
{
|
||||||
boolean usemapcode = false;
|
boolean usemapcode = false;
|
||||||
INT32 newmapnum;
|
INT32 newmapnum = -1;
|
||||||
size_t mapnamelen = strlen(mapname);
|
size_t mapnamelen = strlen(mapname);
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ FUNCPRINTF void GL_DBG_Printf(const char *format, ...)
|
||||||
// GL_MSG_Warning : Raises a warning.
|
// GL_MSG_Warning : Raises a warning.
|
||||||
// -----------------+
|
// -----------------+
|
||||||
|
|
||||||
static void GL_MSG_Warning(const char *format, ...)
|
FUNCPRINTF static void GL_MSG_Warning(const char *format, ...)
|
||||||
{
|
{
|
||||||
char str[4096] = "";
|
char str[4096] = "";
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
|
@ -203,7 +203,7 @@ static void GL_MSG_Warning(const char *format, ...)
|
||||||
// GL_MSG_Error : Raises an error.
|
// GL_MSG_Error : Raises an error.
|
||||||
// -----------------+
|
// -----------------+
|
||||||
|
|
||||||
static void GL_MSG_Error(const char *format, ...)
|
FUNCPRINTF static void GL_MSG_Error(const char *format, ...)
|
||||||
{
|
{
|
||||||
char str[4096] = "";
|
char str[4096] = "";
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
|
|
|
@ -940,7 +940,7 @@ void Command_Droprate(void)
|
||||||
static boolean ShouldDropPacket(void)
|
static boolean ShouldDropPacket(void)
|
||||||
{
|
{
|
||||||
return (packetdropquantity[netbuffer->packettype])
|
return (packetdropquantity[netbuffer->packettype])
|
||||||
|| (packetdroprate != 0 && rand() < (RAND_MAX * (packetdroprate / 100.f))) || packetdroprate == 100;
|
|| (packetdroprate != 0 && rand() < (((double)RAND_MAX) * (packetdroprate / 100.f))) || packetdroprate == 100;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ HMS_on_read (char *s, size_t _1, size_t n, void *userdata)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct HMS_buffer *
|
FUNCDEBUG static struct HMS_buffer *
|
||||||
HMS_connect (int proto, const char *format, ...)
|
HMS_connect (int proto, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
|
@ -11307,7 +11307,7 @@ void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
||||||
fixed_t backwards = -1*FRACUNIT;
|
fixed_t backwards = -1*FRACUNIT;
|
||||||
boolean doswim = (player->panim == PA_ABILITY && (player->mo->eflags & MFE_UNDERWATER));
|
boolean doswim = (player->panim == PA_ABILITY && (player->mo->eflags & MFE_UNDERWATER));
|
||||||
boolean doroll = (player->panim == PA_ROLL || (player->panim == PA_JUMP && !(player->charflags & SF_NOJUMPSPIN)) || doswim);
|
boolean doroll = (player->panim == PA_ROLL || (player->panim == PA_JUMP && !(player->charflags & SF_NOJUMPSPIN)) || doswim);
|
||||||
angle_t rollangle;
|
angle_t rollangle = 0;
|
||||||
boolean panimchange;
|
boolean panimchange;
|
||||||
INT32 ticnum = 0;
|
INT32 ticnum = 0;
|
||||||
statenum_t chosenstate;
|
statenum_t chosenstate;
|
||||||
|
@ -12089,7 +12089,7 @@ void P_PlayerThink(player_t *player)
|
||||||
// deez New User eXperiences.
|
// deez New User eXperiences.
|
||||||
{
|
{
|
||||||
angle_t oldang = player->drawangle, diff = 0;
|
angle_t oldang = player->drawangle, diff = 0;
|
||||||
UINT8 factor;
|
UINT8 factor = 0;
|
||||||
// Directionchar!
|
// Directionchar!
|
||||||
// Camera angle stuff.
|
// Camera angle stuff.
|
||||||
if (player->exiting // no control, no modification
|
if (player->exiting // no control, no modification
|
||||||
|
|
|
@ -556,7 +556,7 @@ static boolean ParseDecimal(tokenizer_t *sc, double *out)
|
||||||
return M_StringToDecimal(tkn, out);
|
return M_StringToDecimal(tkn, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct PaletteRemapParseResult *ThrowError(const char *format, ...)
|
FUNCPRINTF static struct PaletteRemapParseResult *ThrowError(const char *format, ...)
|
||||||
{
|
{
|
||||||
const size_t err_size = 512 * sizeof(char);
|
const size_t err_size = 512 * sizeof(char);
|
||||||
|
|
||||||
|
@ -792,7 +792,7 @@ static struct PaletteRemapParseResult *PaletteRemap_ParseTranslation(const char
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintError(const char *name, const char *format, ...)
|
FUNCDEBUG static void PrintError(const char *name, const char *format, ...)
|
||||||
{
|
{
|
||||||
char error[256];
|
char error[256];
|
||||||
|
|
||||||
|
|
|
@ -2857,7 +2857,7 @@ size_t I_GetRandomBytes(char *destination, size_t count)
|
||||||
{
|
{
|
||||||
#if defined (__unix__) || defined (UNIXCOMMON) || defined(__APPLE__)
|
#if defined (__unix__) || defined (UNIXCOMMON) || defined(__APPLE__)
|
||||||
FILE *rndsource;
|
FILE *rndsource;
|
||||||
size_t actual_bytes;
|
size_t actual_bytes = 0;
|
||||||
|
|
||||||
if (!(rndsource = fopen("/dev/urandom", "r")))
|
if (!(rndsource = fopen("/dev/urandom", "r")))
|
||||||
if (!(rndsource = fopen("/dev/random", "r")))
|
if (!(rndsource = fopen("/dev/random", "r")))
|
||||||
|
|
|
@ -815,7 +815,7 @@ static inline void ST_drawRings(void)
|
||||||
|
|
||||||
static void ST_drawLivesArea(void)
|
static void ST_drawLivesArea(void)
|
||||||
{
|
{
|
||||||
INT32 v_colmap = V_YELLOWMAP, livescount;
|
INT32 v_colmap = V_YELLOWMAP, livescount = -1;
|
||||||
boolean notgreyedout = false;
|
boolean notgreyedout = false;
|
||||||
|
|
||||||
if (!stplyr->skincolor)
|
if (!stplyr->skincolor)
|
||||||
|
|
Loading…
Reference in a new issue