Merge remote-tracking branch 'origin/lugstuff' into lugstuff
This commit is contained in:
commit
fdc651172f
9 files changed
+44
-13
No files matched your search
@@ -20,7 +20,10 @@ $(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
|
||||
CXXFLAGS+= -Wno-aggregate-return
|
||||
|
||||
# -W -Wno-unused
|
||||
WFLAGS:=-Wall -Wno-trigraphs -Wnull-dereference -Wzero-as-null-pointer-constant
|
||||
WFLAGS:=-Wall -Wno-trigraphs -Wnull-dereference
|
||||
ifdef GCC152
|
||||
WFLAGS+=-Wzero-as-null-pointer-constant
|
||||
endif
|
||||
ifndef GCC295
|
||||
#WFLAGS+=-Wno-packed
|
||||
endif
|
||||
|
||||
+8
-3
@@ -131,6 +131,8 @@ static UINT32 curl_origtotalfilesize;
|
||||
static char *curl_realname = NULL;
|
||||
fileneeded_t *curl_curfile = NULL;
|
||||
HTTP_login *curl_logins = NULL;
|
||||
|
||||
static void CURLGetFile(void);
|
||||
#endif
|
||||
|
||||
/** Fills a serverinfo packet with information about wad files loaded.
|
||||
@@ -1305,6 +1307,7 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||
if (!multi_handle)
|
||||
{
|
||||
cc = curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
if (cc < 0)
|
||||
{
|
||||
I_OutputMsg("libcurl: curl_global_init() returned %d\n", cc);
|
||||
@@ -1313,6 +1316,7 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||
{
|
||||
multi_handle = curl_multi_init();
|
||||
}
|
||||
|
||||
if (!multi_handle)
|
||||
{
|
||||
I_OutputMsg("libcurl: curl_multi_init() failed\n");
|
||||
@@ -1441,7 +1445,7 @@ void CURLAbortFile(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void CURLGetFile(void)
|
||||
static void CURLGetFile(void)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
I_lock_mutex(&downloadmutex);
|
||||
@@ -1483,7 +1487,8 @@ void CURLGetFile(void)
|
||||
e = m->easy_handle;
|
||||
easyres = m->data.result;
|
||||
|
||||
char *filename = Z_StrDup(curl_realname);
|
||||
char *filename = malloc(strlen(curl_realname)+1);
|
||||
strcpy(filename, curl_realname);
|
||||
nameonly(filename);
|
||||
|
||||
if (easyres != CURLE_OK)
|
||||
@@ -1521,7 +1526,7 @@ void CURLGetFile(void)
|
||||
}
|
||||
}
|
||||
|
||||
Z_Free(filename);
|
||||
free(filename);
|
||||
curl_curfile->file = NULL;
|
||||
filedownload.remaining--;
|
||||
mc = curl_multi_remove_handle(multi_handle, e);
|
||||
|
||||
@@ -119,7 +119,6 @@ size_t nameonlylength(const char *s);
|
||||
#ifdef HAVE_CURL
|
||||
void CURLPrepareFile(const char* url, int dfilenum);
|
||||
void CURLAbortFile(void);
|
||||
void CURLGetFile(void);
|
||||
HTTP_login * CURLGetLogin (const char *url, HTTP_login ***return_prev_next);
|
||||
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
||||
#endif
|
||||
|
||||
@@ -1077,7 +1077,7 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void quit_handler(int num)
|
||||
FUNCNORETURN static ATTRNORETURN void quit_handler(int num)
|
||||
{
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
|
||||
+7
-4
@@ -1339,16 +1339,19 @@ static menuitem_t OP_CamOptionsMenu[] =
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Field of View",&cv_fov, 30},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 1 Camera options...", &OP_Player1CamOptionsDef, 50},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 2 Camera options...", &OP_Player2CamOptionsDef, 60},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 3 Camera options...", &OP_Player3CamOptionsDef, 70},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 4 Camera options...", &OP_Player4CamOptionsDef, 80},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flipcam Mode", &cv_flipcammode, 40},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 1 Camera options...", &OP_Player1CamOptionsDef, 60},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 2 Camera options...", &OP_Player2CamOptionsDef, 70},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 3 Camera options...", &OP_Player3CamOptionsDef, 80},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 4 Camera options...", &OP_Player4CamOptionsDef, 90},
|
||||
};
|
||||
|
||||
static const char* OP_CamOptionsTooltips[] =
|
||||
{
|
||||
NULL,
|
||||
"Player field of view.",
|
||||
"Change flipcam mode.\nDisplayplayer - use currently viewed player option.\nLocal - use local flipcam toggle option.",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
+16
-1
@@ -3332,7 +3332,22 @@ void P_DestroyRobots(void)
|
||||
// the below is chasecam only, if you're curious. check out P_CalcPostImg in p_user.c for first person
|
||||
void P_CalcChasePostImg(player_t *player, camera_t *thiscam)
|
||||
{
|
||||
const boolean flipcam = (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP);
|
||||
boolean player_flipcam = false;
|
||||
|
||||
if (cv_flipcammode.value == 0)
|
||||
player_flipcam = player->pflags & PF_FLIPCAM;
|
||||
else
|
||||
{
|
||||
INT32 pnum = P_GetLocalPlayerNumForPlayer(player);
|
||||
|
||||
// Shouldn't happen but just in case
|
||||
if (pnum == -1)
|
||||
pnum = 0;
|
||||
|
||||
player_flipcam = cv_flipcam[pnum].value;
|
||||
}
|
||||
|
||||
const boolean flipcam = (player_flipcam && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP);
|
||||
UINT8 postimgtype = 0;
|
||||
|
||||
if (encoremode)
|
||||
|
||||
@@ -182,6 +182,9 @@ consvar_t cv_flipcam[MAXSPLITSCREENPLAYERS] = {
|
||||
{"flipcam4", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam4_OnChange, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
static CV_PossibleValue_t flipcammode_cons_t[] = {{0, "Displayplayer"}, {1, "Local"}, {0, NULL}};
|
||||
consvar_t cv_flipcammode = {"flipcammode", "Displayplayer", CV_SAVE, flipcammode_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_shadow = {"shadow", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_shadowoffs = {"offsetshadows", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_skybox = {"skybox", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -1535,6 +1538,8 @@ void R_RegisterEngineStuff(void)
|
||||
CV_RegisterVar(&cv_flipcam[i]);
|
||||
}
|
||||
|
||||
CV_RegisterVar(&cv_flipcammode);
|
||||
|
||||
// Enough for dedicated server
|
||||
if (dedicated)
|
||||
return;
|
||||
|
||||
@@ -205,6 +205,7 @@ extern consvar_t cv_showhud, cv_translucenthud, cv_uncappedhud;
|
||||
extern consvar_t cv_homremoval;
|
||||
extern consvar_t cv_chasecam[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_flipcam[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_flipcammode;
|
||||
extern consvar_t cv_shadow, cv_shadowoffs;
|
||||
extern consvar_t cv_ffloorclip, cv_spriteclip;
|
||||
extern consvar_t cv_softcyancut;
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ nongnu_strcasestr (const char *s, const char *q)
|
||||
up = strchr(s, uc);
|
||||
lp = strchr(s, lc);
|
||||
|
||||
if (up == NULL || lp == NULL)
|
||||
if (up == NULL && lp == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!lp || ( up && up < lp ))
|
||||
@@ -100,7 +100,7 @@ nongnu_strcasestr (const char *s, const char *q)
|
||||
if (trycmp(ppa, cpa, q, qn) == 0)
|
||||
return (*ppa);
|
||||
|
||||
if (up == NULL || lp == NULL)
|
||||
if (up == NULL && lp == NULL)
|
||||
break;
|
||||
|
||||
if (!(*ppa) || ( (*ppb) && (*ppb) < (*ppa) ))
|
||||
|
||||
Reference in new issue
Block a user