mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
deleted isws.c, work was already done in wii_was.c, which has been fixed too
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@730 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
c9e9319cc1
commit
484ea33b02
@ -219,7 +219,6 @@ META_OBJS=meta/adx_header.o \
|
||||
meta/ps2_stm.o \
|
||||
meta/myspd.o \
|
||||
meta/his.o \
|
||||
meta/isws.o \
|
||||
meta/ps2_ast.o
|
||||
|
||||
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)
|
||||
|
@ -340,10 +340,6 @@
|
||||
RelativePath=".\meta\ish_isd.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\meta\isws.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\meta\ivaud.c"
|
||||
>
|
||||
|
@ -176,7 +176,6 @@ libmeta_la_SOURCES += stx.c
|
||||
libmeta_la_SOURCES += ps2_stm.c
|
||||
libmeta_la_SOURCES += myspd.c
|
||||
libmeta_la_SOURCES += his.c
|
||||
libmeta_la_SOURCES += isws.c
|
||||
libmeta_la_SOURCES += ps2_ast.c
|
||||
|
||||
EXTRA_DIST = meta.h
|
||||
|
@ -1,80 +0,0 @@
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
VGMSTREAM * init_vgmstream_isws(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[260];
|
||||
off_t start_offset;
|
||||
int loop_flag;
|
||||
int channel_count;
|
||||
int i, j;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("isws",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x69535753) /* iSWS */
|
||||
goto fail;
|
||||
|
||||
loop_flag = 0; // read_32bitBE(0x20,streamFile);
|
||||
channel_count = read_32bitBE(0x08,streamFile);
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* fill in the vital statistics */
|
||||
start_offset = (channel_count * 0x60) + 0x20;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitBE(0x28,streamFile);
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
vgmstream->num_samples = (read_32bitBE(0x20,streamFile));
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = 0;
|
||||
vgmstream->loop_end_sample = (read_32bitBE(0x20,streamFile));
|
||||
}
|
||||
|
||||
if (channel_count == 1) {
|
||||
vgmstream->layout_type = layout_none;
|
||||
} else if (channel_count > 1) {
|
||||
// vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = read_32bitBE(0x10,streamFile);
|
||||
}
|
||||
vgmstream->meta_type = meta_ISWS;
|
||||
|
||||
{
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
off_t coef_table[8] = {0x3C,0x9C,0xFC,0x15C,0x1BC,0x21C,0x27C,0x2DC};
|
||||
for (j=0;j<vgmstream->channels;j++) {
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[j].adpcm_coef[i] = read_16bitBE(coef_table[j]+i*2,streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* open the file for reading */
|
||||
{
|
||||
int i;
|
||||
STREAMFILE * file;
|
||||
file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!file) goto fail;
|
||||
for (i=0;i<channel_count;i++) {
|
||||
vgmstream->ch[i].streamfile = file;
|
||||
|
||||
vgmstream->ch[i].channel_start_offset=
|
||||
vgmstream->ch[i].offset=start_offset+
|
||||
vgmstream->interleave_block_size*i;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
@ -433,8 +433,6 @@ VGMSTREAM * init_vgmstream_myspd(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_his(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_isws(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_ast(STREAMFILE* streamFile);
|
||||
|
||||
#endif
|
||||
|
@ -1,20 +1,28 @@
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* WAS (from DiRT 2 (Wii)) */
|
||||
/* WAS / ISWS
|
||||
|
||||
found in: DiRT 2 (Wii)
|
||||
Formula 1 2009 (Wii)
|
||||
Sega Superstars Tennis (Wii)
|
||||
*/
|
||||
|
||||
VGMSTREAM * init_vgmstream_wii_was(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[260];
|
||||
off_t start_offset;
|
||||
int loop_flag;
|
||||
int channel_count;
|
||||
int i, j;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("was",filename_extension(filename))) goto fail;
|
||||
if (strcasecmp("was",filename_extension(filename)) &&
|
||||
(strcasecmp("isws",filename_extension(filename)))) goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x0,streamFile) != 0x69535753) /* iWAS */
|
||||
if (read_32bitBE(0x0,streamFile) != 0x69535753) /* iSWS */
|
||||
goto fail;
|
||||
|
||||
loop_flag = 0;
|
||||
@ -25,27 +33,31 @@ VGMSTREAM * init_vgmstream_wii_was(STREAMFILE *streamFile) {
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* fill in the vital statistics */
|
||||
start_offset = 0xE0;
|
||||
start_offset = (channel_count * 0x60) + 0x20;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitBE(0x28,streamFile);
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
vgmstream->num_samples = read_32bitBE(0x20,streamFile);
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = read_32bitBE(0x10,streamFile);
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->meta_type = meta_WII_WAS;
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
int i;
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(0x3C+i*2,streamFile);
|
||||
}
|
||||
if (vgmstream->channels) {
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[1].adpcm_coef[i] = read_16bitBE(0x9C+i*2,streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (channel_count == 1) {
|
||||
vgmstream->layout_type = layout_none;
|
||||
} else if (channel_count > 1) {
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = read_32bitBE(0x10,streamFile);
|
||||
}
|
||||
|
||||
vgmstream->meta_type = meta_WII_WAS;
|
||||
|
||||
{
|
||||
off_t coef_table[8] = {0x3C,0x9C,0xFC,0x15C,0x1BC,0x21C,0x27C,0x2DC};
|
||||
for (j=0;j<vgmstream->channels;j++) {
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[j].adpcm_coef[i] = read_16bitBE(coef_table[j]+i*2,streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* open the file for reading */
|
||||
{
|
||||
int i;
|
||||
@ -60,9 +72,10 @@ VGMSTREAM * init_vgmstream_wii_was(STREAMFILE *streamFile) {
|
||||
vgmstream->interleave_block_size*i;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
|
@ -237,7 +237,6 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
||||
init_vgmstream_ps2_stm,
|
||||
init_vgmstream_myspd,
|
||||
init_vgmstream_his,
|
||||
init_vgmstream_isws,
|
||||
init_vgmstream_ps2_ast,
|
||||
};
|
||||
|
||||
@ -2357,7 +2356,7 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
||||
snprintf(temp,TEMPSIZE,"Nintendo BNS header");
|
||||
break;
|
||||
case meta_WII_WAS:
|
||||
snprintf(temp,TEMPSIZE,"DiRT2 WAS header");
|
||||
snprintf(temp,TEMPSIZE,"WAS (iSWS) DSP header");
|
||||
break;
|
||||
case meta_XBOX_HLWAV:
|
||||
snprintf(temp,TEMPSIZE,"Half Life 2 bgm header");
|
||||
@ -2374,9 +2373,6 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
||||
case meta_HIS:
|
||||
snprintf(temp,TEMPSIZE,"Her Interactive Sound header");
|
||||
break;
|
||||
case meta_ISWS:
|
||||
snprintf(temp,TEMPSIZE,"SEGA Superstars Tennis iSWS header");
|
||||
break;
|
||||
case meta_PS2_AST:
|
||||
snprintf(temp,TEMPSIZE,"KOEI AST header");
|
||||
break;
|
||||
|
@ -425,7 +425,6 @@ typedef enum {
|
||||
meta_WII_WAS, /* DiRT 2 (WII) */
|
||||
meta_PONA, /* Policenauts (3DO + PSX) */
|
||||
meta_XBOX_HLWAV, /* Half Life 2 (XBOX) */
|
||||
meta_ISWS, /* SEGA Superstars Tennis (Wii) */
|
||||
meta_PS2_AST, /* Some KOEI game (PS2) */
|
||||
} meta_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user