Rearranged playptmod a bit and fixed some warnings

This commit is contained in:
Chris Moeller 2013-10-22 10:48:57 -07:00
parent 231112389d
commit 64149aa8c5

View file

@ -1062,7 +1062,7 @@ int playptmod_LoadMem(void *_p, const unsigned char *buf, unsigned long bufLengt
int lateVerSTKFlag;
int numSamples;
int tmp;
unsigned int tempOffset;
unsigned long tempOffset;
modnote_t *note;
MODULE_SAMPLE *s;
BUF *fmodule;
@ -1345,8 +1345,6 @@ int playptmod_LoadMem(void *_p, const unsigned char *buf, unsigned long bufLengt
{
s->reallength = s->length;
bufread(tempSample + j, 1, s->length - j, fmodule);
}
if (s->length > 8)
{
for (j = 0; j < (s->length - 8); ++j)
@ -1367,6 +1365,7 @@ int playptmod_LoadMem(void *_p, const unsigned char *buf, unsigned long bufLengt
++smpDat8;
}
}
}
sampleOffset += s->length;
p->source->head.totalSampleSize += s->length;
@ -1401,8 +1400,8 @@ int playptmod_LoadMem(void *_p, const unsigned char *buf, unsigned long bufLengt
if (s->reallength < s->length)
{
const signed char * compressionTable = tempSample + 5;
const unsigned char * adpcmData = tempSample + 5 + 16;
const signed char * compressionTable = (const signed char *) tempSample + 5;
const unsigned char * adpcmData = (const unsigned char *) tempSample + 5 + 16;
int delta = 0;
bufread(tempSample, 1, s->reallength, fmodule);
for ( j = 0; j < s->length; ++j )