Merge pull request #10 from zeromus/master

fix compiling in vs2008 (missing adds in vcproj, C90 variable declarations)
This commit is contained in:
Chris Moeller 2014-10-20 17:19:43 -07:00
commit bccf7f433e
4 changed files with 35 additions and 26 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
@ -247,15 +247,19 @@
<File
RelativePath=".\meta\baf.c"
>
</File>
<File
RelativePath=".\meta\bcstm.c"
>
</File>
<File
RelativePath=".\meta\bfwav.c"
>
</File>
<File
RelativePath=".\meta\bcstm.c"
>
</File>
<File
RelativePath=".\meta\bfstm.c"
>
</File>
<File
RelativePath=".\meta\bfwav.c"
>
</File>
<File
RelativePath=".\meta\bgw.c"
>
@ -344,6 +348,10 @@
RelativePath=".\meta\fsb5.c"
>
</File>
<File
RelativePath=".\meta\g1l.c"
>
</File>
<File
RelativePath=".\meta\gca.c"
>
@ -565,10 +573,10 @@
<File
RelativePath=".\meta\ogg_vorbis_file.c"
>
</File>
<File
RelativePath=".\meta\otm.c"
>
</File>
<File
RelativePath=".\meta\otm.c"
>
</File>
<File
RelativePath=".\meta\p3d.c"

View File

@ -15,6 +15,8 @@ VGMSTREAM * init_vgmstream_bfstm(STREAMFILE *streamFile) {
int loop_flag;
int ima = 0;
off_t start_offset;
int founddata;
off_t tempoffset1;
/* check extension, case insensitive */
streamFile->get_name(streamFile, filename, sizeof(filename));
@ -28,8 +30,8 @@ VGMSTREAM * init_vgmstream_bfstm(STREAMFILE *streamFile) {
if ((uint32_t)read_32bitBE(4, streamFile) != 0xFEFF0040)
goto fail;
int founddata = 0;
off_t tempoffset1 = 0x8;
founddata = 0;
tempoffset1 = 0x8;
while (!(founddata))
{

View File

@ -9,10 +9,8 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
int ima = 0;
int nsmbu_flag = 0;
int32_t(*read_32bit)(off_t, STREAMFILE*) = NULL;
int16_t(*read_16bit)(off_t, STREAMFILE*) = NULL;
read_16bit = read_16bitBE;
read_32bit = read_32bitBE;
int32_t(*read_32bit)(off_t, STREAMFILE*) = read_32bitBE;
int16_t(*read_16bit)(off_t, STREAMFILE*) = read_16bitBE;
off_t data_offset;
off_t head_offset;
@ -96,10 +94,8 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
if (vgmstream->coding_type == coding_NGC_DSP) {
off_t coef_offset;
int coef_spacing;
int i, j;
coef_spacing = 0x2E;
int coef_spacing = 0x2E;
off_t coeffheader = head_offset + 0x28;
int foundcoef = 0;

View File

@ -2593,6 +2593,8 @@ struct csmp_chunk {
VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
off_t current_offset;
int tries;
struct dsp_header header;
const off_t start_offset = 0x60;
@ -2604,7 +2606,7 @@ VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("csmp",filename_extension(filename))) goto fail;
off_t current_offset = 0;
current_offset = 0;
csmp_magic = read_32bitBE(current_offset, streamFile);
if (csmp_magic != CSMP_MAGIC) goto fail;
@ -2616,13 +2618,14 @@ VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
current_offset += 4;
int tries =0;
tries =0;
while (1)
{
struct csmp_chunk chunk;
if (tries > 4)
goto fail;
struct csmp_chunk chunk;
chunk.id = read_32bitBE(current_offset, streamFile);
chunk.length = read_32bitBE(current_offset + 4, streamFile);
current_offset += 8;