if(ti.quality < 0)
{
ti.target_bitrate = -1;
- ti.keyframe_data_target_bitrate = -1;
+ ti.keyframe_data_target_bitrate = (unsigned int)-1;
ti.quality = 63;
}
else
{
ti.target_bitrate = -1;
- ti.keyframe_data_target_bitrate = -1;
+ ti.keyframe_data_target_bitrate = (unsigned int)-1;
ti.quality = bound(0, ti.quality, 63);
}
}
ent->state_previous = ent->state_current;
ent->state_current = defaultstate;
ent->state_current.time = cl.time;
- ent->state_current.number = -1;
+ ent->state_current.number = (unsigned int)-1;
ent->state_current.active = true;
ent->state_current.modelindex = cl.stats[STAT_WEAPON];
ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
info->lightshadow = true;
info->lighttime = 9999;
info->stretchfactor = 1;
- info->staincolor[0] = -1;
- info->staincolor[1] = -1;
+ info->staincolor[0] = (unsigned int)-1;
+ info->staincolor[1] = (unsigned int)-1;
info->staintex[0] = -1;
info->staintex[1] = -1;
}
else if (!strcmp(argv[0], "stretchfactor")) {readfloat(info->stretchfactor);}
else if (!strcmp(argv[0], "staincolor")) {readints(info->staincolor, 2);}
else if (!strcmp(argv[0], "staintex")) {readints(info->staintex, 2);}
- else if (!strcmp(argv[0], "stainless")) {info->staintex[0] = -2; info->staincolor[0] = -1; info->staincolor[1] = -1;}
+ else if (!strcmp(argv[0], "stainless")) {info->staintex[0] = -2; info->staincolor[0] = (unsigned int)-1; info->staincolor[1] = (unsigned int)-1;}
else
Con_Printf("effectinfo.txt:%i: skipping unknown command %s\n", linenumber, argv[0]);
#undef checkparms
// NOTE: this relies on jmp_buf being the first thing in the png structure
// created by libpng! (this is correct for libpng 1.2.x)
#ifdef __cplusplus
-#ifdef MACOSX
+#if defined(MACOSX) || defined(WIN32)
if (setjmp((int *)png))
#else
if (setjmp((__jmp_buf_tag *)png))
#define _WIN32_WINNT 0x0501
#include <winsock2.h>
#include <ws2tcpip.h>
-#include <wspiapi.h>
+//#include <wspiapi.h>
#endif
#ifndef STANDALONETEST
SOCKLEN_T inetaddresslength;
address->addresstype = LHNETADDRESSTYPE_NONE;
inetaddresslength = sizeof(address->addr.in);
- value = recvfrom(lhnetsocket->inetsocket, content, maxcontentlength, 0, &address->addr.sock, &inetaddresslength);
+ value = recvfrom(lhnetsocket->inetsocket, (char *)content, maxcontentlength, 0, &address->addr.sock, &inetaddresslength);
if (value > 0)
{
address->addresstype = LHNETADDRESSTYPE_INET4;
SOCKLEN_T inetaddresslength;
address->addresstype = LHNETADDRESSTYPE_NONE;
inetaddresslength = sizeof(address->addr.in6);
- value = recvfrom(lhnetsocket->inetsocket, content, maxcontentlength, 0, &address->addr.sock, &inetaddresslength);
+ value = recvfrom(lhnetsocket->inetsocket, (char *)content, maxcontentlength, 0, &address->addr.sock, &inetaddresslength);
if (value > 0)
{
address->addresstype = LHNETADDRESSTYPE_INET6;
}
else if (lhnetsocket->address.addresstype == LHNETADDRESSTYPE_INET4)
{
- value = sendto(lhnetsocket->inetsocket, content, contentlength, 0, (struct sockaddr *)&address->addr.in, sizeof(struct sockaddr_in));
+ value = sendto(lhnetsocket->inetsocket, (char *)content, contentlength, 0, (struct sockaddr *)&address->addr.in, sizeof(struct sockaddr_in));
if (value == -1)
{
if (SOCKETERRNO == EWOULDBLOCK)
}
else if (lhnetsocket->address.addresstype == LHNETADDRESSTYPE_INET6)
{
- value = sendto(lhnetsocket->inetsocket, content, contentlength, 0, (struct sockaddr *)&address->addr.in6, sizeof(struct sockaddr_in6));
+ value = sendto(lhnetsocket->inetsocket, (char *)content, contentlength, 0, (struct sockaddr *)&address->addr.in6, sizeof(struct sockaddr_in6));
if (value == -1)
{
if (SOCKETERRNO == EWOULDBLOCK)
}
if(video_resolutions[i].conwidth > video_resolutions[i].width || video_resolutions[i].conheight > video_resolutions[i].height)
{
- double f1, f2;
+ int f1, f2;
f1 = video_resolutions[i].conwidth > video_resolutions[i].width;
f2 = video_resolutions[i].conheight > video_resolutions[i].height;
if(f1 > f2)
Con_Printf("loading model %s\n", mod->name);
mod->used = true;
- mod->crc = -1;
+ mod->crc = (unsigned int)-1;
mod->loaded = false;
VectorClear(mod->normalmins);
if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0)
{
- if ((cliptext = GlobalLock (hClipboardData)) != 0)
+ if ((cliptext = (char *)GlobalLock (hClipboardData)) != 0)
{
size_t allocsize;
allocsize = GlobalSize (hClipboardData) + 1;
- data = Z_Malloc (allocsize);
+ data = (char *)Z_Malloc (allocsize);
strlcpy (data, cliptext, allocsize);
GlobalUnlock (hClipboardData);
}