mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
EA: small cleanups
This commit is contained in:
parent
f681a54462
commit
695b7c231b
@ -24,7 +24,7 @@ VGMSTREAM* init_vgmstream_ea_amb_eaac(STREAMFILE* sf) {
|
||||
return NULL;
|
||||
|
||||
read_u32 = guess_read_u32(0x00, sf);
|
||||
if (read_u32(0x00, sf) != 0x09) /* version? */
|
||||
if (read_u32(0x00, sf) != 0x09) /* version */
|
||||
return NULL;
|
||||
|
||||
abk_offset = 0x40;
|
||||
@ -43,6 +43,10 @@ VGMSTREAM* init_vgmstream_ea_amb_eaac(STREAMFILE* sf) {
|
||||
if (read_u32(0x0C, sf) != abk_size)
|
||||
goto fail;
|
||||
|
||||
/* in case stricter checks are needed: */
|
||||
//if (!is_id32be(abk_offset + abk_size, sf, "MOIR"))
|
||||
// goto fail;
|
||||
|
||||
sf_abk = open_wrap_streamfile(sf);
|
||||
sf_abk = open_clamp_streamfile(sf_abk, abk_offset, abk_size);
|
||||
if (!sf_abk) goto fail;
|
||||
|
@ -14,7 +14,7 @@ VGMSTREAM* init_vgmstream_ea_mpf_mus_eaac(STREAMFILE* sf) {
|
||||
return init_vgmstream_ea_mpf_mus_eaac_main(sf, NULL);
|
||||
}
|
||||
|
||||
/* .MSB/.MSX - EA Redwood Shores (MSB/MSX)+MUS [The Godfather (PS3/360), The Simpsons Game (PS3/360)] */
|
||||
/* .MSB/MSX - EA Redwood Shores (MSB/MSX)+MUS [The Godfather (PS3/360), The Simpsons Game (PS3/360)] */
|
||||
VGMSTREAM* init_vgmstream_ea_msb_mus_eaac(STREAMFILE* sf) {
|
||||
/* container with MPF, extra info, and a pre-defined MUS filename */
|
||||
VGMSTREAM* vgmstream = NULL;
|
||||
|
@ -16,7 +16,7 @@ VGMSTREAM* init_vgmstream_ea_abk_schl(STREAMFILE* sf) {
|
||||
return init_vgmstream_ea_abk_schl_main(sf);
|
||||
}
|
||||
|
||||
/* .AMB/AMX - EA Redwood Shores variant [007: From Russia with Love, The Godfather (PC/PS2/Wii)] */
|
||||
/* .AMB/AMX - EA Redwood Shores variant [007: From Russia with Love, The Godfather (PC/PS2/Xbox/Wii)] */
|
||||
VGMSTREAM* init_vgmstream_ea_amb_schl(STREAMFILE* sf) {
|
||||
/* container with .ABK ("ABKC") and .CSI ("MOIR") data */
|
||||
VGMSTREAM* vgmstream = NULL;
|
||||
|
@ -32,13 +32,13 @@ VGMSTREAM* init_vgmstream_ea_schl_fixed(STREAMFILE* sf) {
|
||||
|
||||
/* checks */
|
||||
if (!is_id32be(0x00,sf, "SCHl"))
|
||||
goto fail;
|
||||
return NULL;
|
||||
|
||||
/* .asf: original [NHK 97 (PC)]
|
||||
* .lasf: fake for plugins
|
||||
* .cnk: ps1 [NBA Live 97 (PS1)] */
|
||||
if (!check_extensions(sf,"asf,lasf,cnk"))
|
||||
goto fail;
|
||||
return NULL;
|
||||
|
||||
/* see ea_schl.c for more info about blocks */
|
||||
//TODO: handle SCCl? [NBA Live 97 (PS1)]
|
||||
|
@ -15,7 +15,7 @@ VGMSTREAM* init_vgmstream_ea_hdr_dat(STREAMFILE* sf) {
|
||||
|
||||
/* checks */
|
||||
if (!check_extensions(sf, "hdr"))
|
||||
goto fail;
|
||||
return NULL;
|
||||
|
||||
/* main header is machine endian but it's not important here */
|
||||
/* 0x00: ID */
|
||||
@ -30,11 +30,11 @@ VGMSTREAM* init_vgmstream_ea_hdr_dat(STREAMFILE* sf) {
|
||||
|
||||
/* no nice way to validate these so we do what we can */
|
||||
if (read_u16be(0x0a, sf) != 0)
|
||||
goto fail;
|
||||
return NULL;
|
||||
|
||||
/* first offset is always zero */
|
||||
if (read_u16be(0x0c, sf) != 0)
|
||||
goto fail;
|
||||
return NULL;
|
||||
|
||||
/* must be accompanied by DAT file with SCHl or VAG sounds */
|
||||
sf_dat = open_streamfile_by_ext(sf, "dat");
|
||||
|
@ -85,7 +85,7 @@ VGMSTREAM* init_vgmstream_ea_mpf_mus_schl(STREAMFILE* sf) {
|
||||
return init_vgmstream_ea_mpf_mus_schl_main(sf, NULL);
|
||||
}
|
||||
|
||||
/* .MSB/.MSX - EA Redwood Shores (MSB/MSX)+MUS [007: From Russia with Love, The Godfather (PC/PS2/Wii)] */
|
||||
/* .MSB/MSX - EA Redwood Shores (MSB/MSX)+MUS [007: From Russia with Love, The Godfather (PC/PS2/Xbox/Wii)] */
|
||||
VGMSTREAM* init_vgmstream_ea_msb_mus_schl(STREAMFILE* sf) {
|
||||
/* container with MPF, extra info, and a pre-defined MUS filename */
|
||||
VGMSTREAM* vgmstream = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user