mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
Compile error+warning fixes for linux
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5109 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9689f7680e
commit
0fad8fe37d
6 changed files with 18 additions and 8 deletions
|
@ -830,6 +830,7 @@ void CL_PredictEntityMovement(entity_state_t *estate, float age)
|
||||||
{
|
{
|
||||||
VectorClear(startstate.velocity);
|
VectorClear(startstate.velocity);
|
||||||
startstate.onground = false;
|
startstate.onground = false;
|
||||||
|
startstate.jump_held = false;
|
||||||
CL_EntStateToPlayerState(&startstate, estate);
|
CL_EntStateToPlayerState(&startstate, estate);
|
||||||
CL_EntStateToPlayerCommand(&cmd, estate, age);
|
CL_EntStateToPlayerCommand(&cmd, estate, age);
|
||||||
|
|
||||||
|
|
|
@ -1673,7 +1673,6 @@ qboolean screenshotJPEG(char *filename, enum fs_relative fsroot, int compression
|
||||||
size_t ps = (fmt == TF_BGR24)?3:4;
|
size_t ps = (fmt == TF_BGR24)?3:4;
|
||||||
qbyte *in=screendata, *out=rgbdata=Hunk_TempAlloc(screenwidth*screenheight*3);
|
qbyte *in=screendata, *out=rgbdata=Hunk_TempAlloc(screenwidth*screenheight*3);
|
||||||
size_t y, x;
|
size_t y, x;
|
||||||
size_t sz = screenwidth*screenheight;
|
|
||||||
for (y = 0; y < screenheight; y++)
|
for (y = 0; y < screenheight; y++)
|
||||||
{
|
{
|
||||||
for (x = 0; x < screenwidth; x++)
|
for (x = 0; x < screenwidth; x++)
|
||||||
|
@ -1699,7 +1698,6 @@ qboolean screenshotJPEG(char *filename, enum fs_relative fsroot, int compression
|
||||||
size_t ps = (fmt == TF_RGB24)?3:4;
|
size_t ps = (fmt == TF_RGB24)?3:4;
|
||||||
qbyte *in=screendata, *out=rgbdata=Hunk_TempAlloc(screenwidth*screenheight*3);
|
qbyte *in=screendata, *out=rgbdata=Hunk_TempAlloc(screenwidth*screenheight*3);
|
||||||
size_t y, x;
|
size_t y, x;
|
||||||
size_t sz = screenwidth*screenheight;
|
|
||||||
for (y = 0; y < screenheight; y++)
|
for (y = 0; y < screenheight; y++)
|
||||||
{
|
{
|
||||||
for (x = 0; x < screenwidth; x++)
|
for (x = 0; x < screenwidth; x++)
|
||||||
|
|
|
@ -952,12 +952,14 @@ int main (int c, const char **v)
|
||||||
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
|
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
#ifdef SUBSERVERS
|
#ifdef SUBSERVERS
|
||||||
if (COM_CheckParm("-clusterslave"))
|
if (COM_CheckParm("-clusterslave"))
|
||||||
isDedicated = nostdout = isClusterSlave = true;
|
isDedicated = nostdout = isClusterSlave = true;
|
||||||
#endif
|
#endif
|
||||||
if (COM_CheckParm("-dedicated"))
|
if (COM_CheckParm("-dedicated"))
|
||||||
isDedicated = true;
|
isDedicated = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (COM_CheckParm("-nostdout"))
|
if (COM_CheckParm("-nostdout"))
|
||||||
nostdout = 1;
|
nostdout = 1;
|
||||||
|
|
|
@ -340,7 +340,9 @@ typedef struct
|
||||||
neterr_t(*cbpush)(void *cbctx, const qbyte *data, size_t datasize);
|
neterr_t(*cbpush)(void *cbctx, const qbyte *data, size_t datasize);
|
||||||
qbyte *readdata;
|
qbyte *readdata;
|
||||||
size_t readsize;
|
size_t readsize;
|
||||||
|
#ifdef HAVE_DTLS
|
||||||
gnutls_dtls_prestate_st prestate;
|
gnutls_dtls_prestate_st prestate;
|
||||||
|
#endif
|
||||||
// int mtu;
|
// int mtu;
|
||||||
} gnutlsfile_t;
|
} gnutlsfile_t;
|
||||||
|
|
||||||
|
@ -687,19 +689,23 @@ static ssize_t DTLS_Pull(gnutls_transport_ptr_t p, void *data, size_t size)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_DTLS
|
||||||
static int DTLS_Pull_Timeout(gnutls_transport_ptr_t p, unsigned int timeout)
|
static int DTLS_Pull_Timeout(gnutls_transport_ptr_t p, unsigned int timeout)
|
||||||
{ //gnutls (pointlessly) requires this function for dtls.
|
{ //gnutls (pointlessly) requires this function for dtls.
|
||||||
gnutlsfile_t *f = p;
|
gnutlsfile_t *f = p;
|
||||||
// Sys_Printf("DTLS_Pull_Timeout %i, %i\n", timeout, f->readsize);
|
// Sys_Printf("DTLS_Pull_Timeout %i, %i\n", timeout, f->readsize);
|
||||||
return f->readsize>0?1:0;
|
return f->readsize>0?1:0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ANON
|
#ifdef USE_ANON
|
||||||
static gnutls_anon_client_credentials_t anoncred[2];
|
static gnutls_anon_client_credentials_t anoncred[2];
|
||||||
#else
|
#else
|
||||||
static gnutls_certificate_credentials_t xcred[2];
|
static gnutls_certificate_credentials_t xcred[2];
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_DTLS
|
||||||
static gnutls_datum_t cookie_key;
|
static gnutls_datum_t cookie_key;
|
||||||
|
#endif
|
||||||
|
|
||||||
qboolean SSL_InitGlobal(qboolean isserver)
|
qboolean SSL_InitGlobal(qboolean isserver)
|
||||||
{
|
{
|
||||||
|
@ -714,8 +720,10 @@ qboolean SSL_InitGlobal(qboolean isserver)
|
||||||
initstatus[isserver] = true;
|
initstatus[isserver] = true;
|
||||||
qgnutls_global_init ();
|
qgnutls_global_init ();
|
||||||
|
|
||||||
|
#ifdef HAVE_DTLS
|
||||||
if (isserver)
|
if (isserver)
|
||||||
qgnutls_key_generate(&cookie_key, GNUTLS_COOKIE_KEY_SIZE);
|
qgnutls_key_generate(&cookie_key, GNUTLS_COOKIE_KEY_SIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_ANON
|
#ifdef USE_ANON
|
||||||
|
@ -736,9 +744,9 @@ qboolean SSL_InitGlobal(qboolean isserver)
|
||||||
char keyfile[MAX_OSPATH];
|
char keyfile[MAX_OSPATH];
|
||||||
char certfile[MAX_OSPATH];
|
char certfile[MAX_OSPATH];
|
||||||
*keyfile = *certfile = 0;
|
*keyfile = *certfile = 0;
|
||||||
if (FS_NativePath("key.pem", FS_ROOT, keyfile, sizeof(keyfile))
|
if (FS_NativePath("key.pem", FS_ROOT, keyfile, sizeof(keyfile)))
|
||||||
if (FS_NativePath("cert.pem", FS_ROOT, certfile, sizeof(certfile))
|
if (FS_NativePath("cert.pem", FS_ROOT, certfile, sizeof(certfile)))
|
||||||
ret = qgnutls_certificate_set_x509_key_file(xcred[isserver], certfile, keyfile, GNUTLS_X509_FMT_PEM);
|
ret = qgnutls_certificate_set_x509_key_file(xcred[isserver], certfile, keyfile, GNUTLS_X509_FMT_PEM);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("No certificate or key were found in %s and %s\n", certfile, keyfile);
|
Con_Printf("No certificate or key were found in %s and %s\n", certfile, keyfile);
|
||||||
|
@ -783,8 +791,10 @@ qboolean SSL_InitConnection(gnutlsfile_t *newf, qboolean isserver, qboolean data
|
||||||
qgnutls_transport_set_push_function(newf->session, datagram?DTLS_Push:SSL_Push);
|
qgnutls_transport_set_push_function(newf->session, datagram?DTLS_Push:SSL_Push);
|
||||||
//qgnutls_transport_set_vec_push_function(newf->session, SSL_PushV);
|
//qgnutls_transport_set_vec_push_function(newf->session, SSL_PushV);
|
||||||
qgnutls_transport_set_pull_function(newf->session, datagram?DTLS_Pull:SSL_Pull);
|
qgnutls_transport_set_pull_function(newf->session, datagram?DTLS_Pull:SSL_Pull);
|
||||||
|
#ifdef HAVE_DTLS
|
||||||
if (datagram)
|
if (datagram)
|
||||||
qgnutls_transport_set_pull_timeout_function(newf->session, DTLS_Pull_Timeout);
|
qgnutls_transport_set_pull_timeout_function(newf->session, DTLS_Pull_Timeout);
|
||||||
|
#endif
|
||||||
|
|
||||||
// if (isserver) //don't bother to auth any client certs
|
// if (isserver) //don't bother to auth any client certs
|
||||||
// qgnutls_certificate_server_set_request(newf->session, GNUTLS_CERT_IGNORE);
|
// qgnutls_certificate_server_set_request(newf->session, GNUTLS_CERT_IGNORE);
|
||||||
|
|
|
@ -9956,7 +9956,7 @@ void QCC_PR_ParseStatement (void)
|
||||||
{
|
{
|
||||||
//optres_compound_jumps++;
|
//optres_compound_jumps++;
|
||||||
QCC_FreeTemp(e);
|
QCC_FreeTemp(e);
|
||||||
if (!eval->_float != wasuntil)
|
if ((!eval->_float) != wasuntil)
|
||||||
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_GOTO], nullsref, nullsref, &patch1));
|
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_GOTO], nullsref, nullsref, &patch1));
|
||||||
else
|
else
|
||||||
patch1 = NULL;
|
patch1 = NULL;
|
||||||
|
|
|
@ -251,7 +251,7 @@ static qboolean VK_CreateSwapChain(void)
|
||||||
uint32_t i, curpri;
|
uint32_t i, curpri;
|
||||||
VkSwapchainKHR newvkswapchain;
|
VkSwapchainKHR newvkswapchain;
|
||||||
VkImage *images;
|
VkImage *images;
|
||||||
VkImage *memories;
|
VkDeviceMemory *memories;
|
||||||
VkImageView attachments[2];
|
VkImageView attachments[2];
|
||||||
VkFramebufferCreateInfo fb_info = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO};
|
VkFramebufferCreateInfo fb_info = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO};
|
||||||
|
|
||||||
|
@ -1977,7 +1977,6 @@ void VKVID_QueueGetRGBData (void (*gotrgbdata) (void *rgbdata, intptr_t bytest
|
||||||
vkscreencapture_t *capt;
|
vkscreencapture_t *capt;
|
||||||
|
|
||||||
VkBufferImageCopy icpy;
|
VkBufferImageCopy icpy;
|
||||||
VkImageSubresource subres = {0};
|
|
||||||
|
|
||||||
VkMemoryRequirements mem_reqs;
|
VkMemoryRequirements mem_reqs;
|
||||||
VkMemoryAllocateInfo memAllocInfo = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
|
VkMemoryAllocateInfo memAllocInfo = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
|
||||||
|
|
Loading…
Reference in a new issue