mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Merge pull request #10 from zeromus/master
fix compiling in vs2008 (missing adds in vcproj, C90 variable declarations)
This commit is contained in:
commit
bccf7f433e
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9,00"
|
||||||
@ -247,15 +247,19 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\meta\baf.c"
|
RelativePath=".\meta\baf.c"
|
||||||
>
|
>
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\meta\bcstm.c"
|
|
||||||
>
|
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\bfwav.c"
|
RelativePath=".\meta\bcstm.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\bfstm.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\bfwav.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\bgw.c"
|
RelativePath=".\meta\bgw.c"
|
||||||
>
|
>
|
||||||
@ -344,6 +348,10 @@
|
|||||||
RelativePath=".\meta\fsb5.c"
|
RelativePath=".\meta\fsb5.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\g1l.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\gca.c"
|
RelativePath=".\meta\gca.c"
|
||||||
>
|
>
|
||||||
@ -565,10 +573,10 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\meta\ogg_vorbis_file.c"
|
RelativePath=".\meta\ogg_vorbis_file.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\otm.c"
|
RelativePath=".\meta\otm.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\p3d.c"
|
RelativePath=".\meta\p3d.c"
|
||||||
|
@ -15,6 +15,8 @@ VGMSTREAM * init_vgmstream_bfstm(STREAMFILE *streamFile) {
|
|||||||
int loop_flag;
|
int loop_flag;
|
||||||
int ima = 0;
|
int ima = 0;
|
||||||
off_t start_offset;
|
off_t start_offset;
|
||||||
|
int founddata;
|
||||||
|
off_t tempoffset1;
|
||||||
|
|
||||||
/* check extension, case insensitive */
|
/* check extension, case insensitive */
|
||||||
streamFile->get_name(streamFile, filename, sizeof(filename));
|
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)
|
if ((uint32_t)read_32bitBE(4, streamFile) != 0xFEFF0040)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
int founddata = 0;
|
founddata = 0;
|
||||||
off_t tempoffset1 = 0x8;
|
tempoffset1 = 0x8;
|
||||||
|
|
||||||
while (!(founddata))
|
while (!(founddata))
|
||||||
{
|
{
|
||||||
|
@ -9,10 +9,8 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
|
|||||||
|
|
||||||
int ima = 0;
|
int ima = 0;
|
||||||
int nsmbu_flag = 0;
|
int nsmbu_flag = 0;
|
||||||
int32_t(*read_32bit)(off_t, STREAMFILE*) = NULL;
|
int32_t(*read_32bit)(off_t, STREAMFILE*) = read_32bitBE;
|
||||||
int16_t(*read_16bit)(off_t, STREAMFILE*) = NULL;
|
int16_t(*read_16bit)(off_t, STREAMFILE*) = read_16bitBE;
|
||||||
read_16bit = read_16bitBE;
|
|
||||||
read_32bit = read_32bitBE;
|
|
||||||
|
|
||||||
off_t data_offset;
|
off_t data_offset;
|
||||||
off_t head_offset;
|
off_t head_offset;
|
||||||
@ -96,10 +94,8 @@ VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
|
|||||||
|
|
||||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||||
off_t coef_offset;
|
off_t coef_offset;
|
||||||
int coef_spacing;
|
|
||||||
int i, j;
|
int i, j;
|
||||||
|
int coef_spacing = 0x2E;
|
||||||
coef_spacing = 0x2E;
|
|
||||||
|
|
||||||
off_t coeffheader = head_offset + 0x28;
|
off_t coeffheader = head_offset + 0x28;
|
||||||
int foundcoef = 0;
|
int foundcoef = 0;
|
||||||
|
@ -2593,6 +2593,8 @@ struct csmp_chunk {
|
|||||||
VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
|
VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
|
||||||
VGMSTREAM * vgmstream = NULL;
|
VGMSTREAM * vgmstream = NULL;
|
||||||
char filename[PATH_LIMIT];
|
char filename[PATH_LIMIT];
|
||||||
|
off_t current_offset;
|
||||||
|
int tries;
|
||||||
|
|
||||||
struct dsp_header header;
|
struct dsp_header header;
|
||||||
const off_t start_offset = 0x60;
|
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));
|
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||||
if (strcasecmp("csmp",filename_extension(filename))) goto fail;
|
if (strcasecmp("csmp",filename_extension(filename))) goto fail;
|
||||||
|
|
||||||
off_t current_offset = 0;
|
current_offset = 0;
|
||||||
|
|
||||||
csmp_magic = read_32bitBE(current_offset, streamFile);
|
csmp_magic = read_32bitBE(current_offset, streamFile);
|
||||||
if (csmp_magic != CSMP_MAGIC) goto fail;
|
if (csmp_magic != CSMP_MAGIC) goto fail;
|
||||||
@ -2616,13 +2618,14 @@ VGMSTREAM * init_vgmstream_ngc_dsp_csmp(STREAMFILE *streamFile) {
|
|||||||
|
|
||||||
current_offset += 4;
|
current_offset += 4;
|
||||||
|
|
||||||
int tries =0;
|
tries =0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
struct csmp_chunk chunk;
|
||||||
|
|
||||||
if (tries > 4)
|
if (tries > 4)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
struct csmp_chunk chunk;
|
|
||||||
chunk.id = read_32bitBE(current_offset, streamFile);
|
chunk.id = read_32bitBE(current_offset, streamFile);
|
||||||
chunk.length = read_32bitBE(current_offset + 4, streamFile);
|
chunk.length = read_32bitBE(current_offset + 4, streamFile);
|
||||||
current_offset += 8;
|
current_offset += 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user