Add VAGp .vig [MX vs. ATV Untamed (PS2)]

This commit is contained in:
bnnm 2017-12-09 17:57:18 +01:00
parent 765af1994a
commit cb646cfbde

View File

@ -17,8 +17,8 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
int channel_count = 0; int channel_count = 0;
int is_swag = 0; int is_swag = 0;
/* check extension, case insensitive */ /* check extension (.swag: Frantix PSP, .str: Ben10 Galactic Racing, .vig: MX vs. ATV Untamed PS2) */
if ( !check_extensions(streamFile,"vag,swag,str") ) if ( !check_extensions(streamFile,"vag,swag,str,vig") )
goto fail; goto fail;
/* check VAG Header */ /* check VAG Header */
@ -63,7 +63,11 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
break; break;
case 'p': /* "VAGp" (extended) [most common, ex Ratchet & Clank] */ case 'p': /* "VAGp" (extended) [most common, ex Ratchet & Clank] */
if (read_32bitBE(0x6000,streamFile) == 0x56414770) { /* "VAGp" */ if (check_extensions(streamFile,"vig")) { /* MX vs. ATV Untamed PS2 */
channel_count = 2; /* normal interleave */
loop_flag = 0;
}
else if (read_32bitBE(0x6000,streamFile) == 0x56414770) { /* "VAGp" */
channel_count = 2; /* The Simpsons Wrestling PSX interleave */ channel_count = 2; /* The Simpsons Wrestling PSX interleave */
loop_flag = 0; loop_flag = 0;
} }
@ -136,7 +140,14 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
case 'p': // VAGp case 'p': // VAGp
interleave=0x10; interleave=0x10;
if (read_32bitBE(0x6000,streamFile) == 0x56414770) { /* "VAGp" */ if (check_extensions(streamFile,"vig")) { /* MX vs. ATV Untamed PS2 */
vgmstream->layout_type=layout_interleave;
vgmstream->meta_type=meta_PS2_VAGp;
vgmstream->num_samples = (datasize - 0x10*channel_count) / 16 * 28;
start_offset = 0x800;
}
else if (read_32bitBE(0x6000,streamFile) == 0x56414770) { /* interleaved "VAGp" */
interleave = 0x6000; /* The Simpsons Wrestling PSX interleave, includes header */ interleave = 0x6000; /* The Simpsons Wrestling PSX interleave, includes header */
vgmstream->layout_type = layout_interleave; vgmstream->layout_type = layout_interleave;
vgmstream->meta_type = meta_PS2_VAGs; vgmstream->meta_type = meta_PS2_VAGs;