int master_vol; // 0-255 master volume
int leftvol; // 0-255 volume
int rightvol; // 0-255 volume
- int end; // end time in global paintsamples
- int lastptime; // last time this channel was painted
- int pos; // sample position in sfx
+ size_t end; // end time in global paintsamples
+ size_t lastptime; // last time this channel was painted
+ size_t pos; // sample position in sfx
int entnum; // to allow overriding a specific sound
int entchannel;
vec3_t origin; // origin of sound effect
// if the channel is paused
if (ch->flags & CHANNELFLAG_PAUSED)
{
- size_t pausedtime;
-
- pausedtime = end - paintedtime;
+ int pausedtime = end - paintedtime;
ch->lastptime += pausedtime;
ch->end += pausedtime;
continue;
if (sb->offset <= start && sb->offset + sb->length >= start + nbsamples)
return sb;
- newlength = sb->offset + sb->length - start;
+ newlength = (int)(sb->offset + sb->length) - start;
// If we need to skip some data before decompressing the rest, or if the stream has looped
if (newlength < 0 || sb->offset > start)
done += ret;
// Resample in the sfxbuffer
- newlength = ResampleSfx (resampling_buffer, (size_t)done / factor, &per_sfx->format, sb->data + sb->length * factor, sfx->name);
- sb->length += newlength;
+ newlength = ResampleSfx (resampling_buffer, (size_t)done / (size_t)factor, &per_sfx->format, sb->data + sb->length * factor, sfx->name);
+ sb->length += newlength;
return sb;
}
DWORD dummy;
extern HANDLE houtput;
if (cls.state == ca_dedicated)
- WriteFile(houtput, text, strlen (text), &dummy, NULL);
+ WriteFile(houtput, text, (DWORD) strlen(text), &dummy, NULL);
}
/*
hinput = GetStdHandle (STD_INPUT_HANDLE);
houtput = GetStdHandle (STD_OUTPUT_HANDLE);
+#ifdef WIN64
+#define atoi _atoi64
+#endif
// give QHOST a chance to hook into the console
if ((t = COM_CheckParm ("-HFILE")) > 0)
{
mempool_t *poolchain = NULL;
-void *_Mem_Alloc(mempool_t *pool, int size, const char *filename, int fileline)
+void *_Mem_Alloc(mempool_t *pool, size_t size, const char *filename, int fileline)
{
#if MEMCLUMPING
int i, j, k, needed, endbit, largest;
#define Mem_FreePool(pool) _Mem_FreePool(pool, __FILE__, __LINE__)
#define Mem_EmptyPool(pool) _Mem_EmptyPool(pool, __FILE__, __LINE__)
-void *_Mem_Alloc(mempool_t *pool, int size, const char *filename, int fileline);
+void *_Mem_Alloc(mempool_t *pool, size_t size, const char *filename, int fileline);
void _Mem_Free(void *data, const char *filename, int fileline);
mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const char *filename, int fileline);
void _Mem_FreePool(mempool_t **pool, const char *filename, int fileline);