mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Add VAGp .vig [MX vs. ATV Untamed (PS2)]
This commit is contained in:
parent
765af1994a
commit
cb646cfbde
@ -17,8 +17,8 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
||||
int channel_count = 0;
|
||||
int is_swag = 0;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
if ( !check_extensions(streamFile,"vag,swag,str") )
|
||||
/* check extension (.swag: Frantix PSP, .str: Ben10 Galactic Racing, .vig: MX vs. ATV Untamed PS2) */
|
||||
if ( !check_extensions(streamFile,"vag,swag,str,vig") )
|
||||
goto fail;
|
||||
|
||||
/* check VAG Header */
|
||||
@ -63,7 +63,11 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
||||
break;
|
||||
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 */
|
||||
loop_flag = 0;
|
||||
}
|
||||
@ -136,7 +140,14 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
||||
case 'p': // VAGp
|
||||
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 */
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->meta_type = meta_PS2_VAGs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user