dq->scalex = 0;
dq->scaley = 0;
p = (void *)(dq + 1);
- m = p;p += sizeof(drawqueuemesh_t);
+ m = p;(qbyte *)p += sizeof(drawqueuemesh_t);
m->numindices = mesh->numindices;
m->numvertices = mesh->numvertices;
m->texture = mesh->texture;
- m->indices = p;memcpy(m->indices , mesh->indices , m->numindices * sizeof(int ));p += m->numindices * sizeof(int );
- m->vertices = p;memcpy(m->vertices , mesh->vertices , m->numvertices * sizeof(float[3]));p += m->numvertices * sizeof(float[3]);
- m->texcoords = p;memcpy(m->texcoords, mesh->texcoords, m->numvertices * sizeof(float[2]));p += m->numvertices * sizeof(float[2]);
- m->colors = p;memcpy(m->colors , mesh->colors , m->numvertices * sizeof(float[4]));p += m->numvertices * sizeof(float[4]);
+ m->indices = p;memcpy(m->indices , mesh->indices , m->numindices * sizeof(int ));(qbyte *)p += m->numindices * sizeof(int );
+ m->vertices = p;memcpy(m->vertices , mesh->vertices , m->numvertices * sizeof(float[3]));(qbyte *)p += m->numvertices * sizeof(float[3]);
+ m->texcoords = p;memcpy(m->texcoords, mesh->texcoords, m->numvertices * sizeof(float[2]));(qbyte *)p += m->numvertices * sizeof(float[2]);
+ m->colors = p;memcpy(m->colors , mesh->colors , m->numvertices * sizeof(float[4]));(qbyte *)p += m->numvertices * sizeof(float[4]);
r_refdef.drawqueuesize += dq->size;
}
return (blocks->store >> blocks->count) & 1;
}
-unsigned int hz_bitstream_read_bits(hz_bitstream_readblocks_t *blocks, unsigned int size)
+unsigned int hz_bitstream_read_bits(hz_bitstream_readblocks_t *blocks, int size)
{
unsigned int num = 0;
// we can only handle about 24 bits at a time safely
FreeSound ();
}
-
+DWORD dsound_dwSize;
+DWORD dsound_dwSize2;
+DWORD *dsound_pbuf;
+DWORD *dsound_pbuf2;
void *S_LockBuffer(void)
{
int reps;
- DWORD dwSize,dwSize2;
- DWORD *pbuf;
- DWORD *pbuf2;
HRESULT hresult;
if (pDSBuf)
{
reps = 0;
- while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize, &pbuf2, &dwSize2, 0)) != DS_OK)
+ while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &dsound_pbuf, &dsound_dwSize, &dsound_pbuf2, &dsound_dwSize2, 0)) != DS_OK)
{
if (hresult != DSERR_BUFFERLOST)
{
return NULL;
}
}
+ return dsound_pbuf;
}
else
return shm->buffer;
}
-void S_UnlockBuffer(void)
+void S_UnlockBuffer()
{
if (pDSBuf)
- pDSBuf->lpVtbl->Unlock(pDSBuf, pbuf, dwSize, NULL, 0);
+ pDSBuf->lpVtbl->Unlock(pDSBuf, dsound_pbuf, dsound_dwSize, dsound_pbuf2, dsound_dwSize2);
}
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "wavefile.h"
wavefile_t *waveopen(char *filename, char **errorstring)
unsigned int waveread16stereo(wavefile_t *w, short *soundbuffer, unsigned int samples)
{
- int i;
- int length;
+ unsigned int i;
+ unsigned int length;
unsigned char *in;
short *out;
length = samples;