mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
Improved EA ABK support
This commit is contained in:
parent
15cc60e604
commit
c88dee0ebb
@ -198,7 +198,8 @@ VGMSTREAM * init_vgmstream_ea_abk_new(STREAMFILE *streamFile) {
|
||||
goto fail;
|
||||
|
||||
version = read_32bitBE(0x04, streamFile);
|
||||
if (version != 0x01010202)
|
||||
if (version != 0x01010100 &&
|
||||
version != 0x01010202)
|
||||
goto fail;
|
||||
|
||||
/* use table offset to check endianness */
|
||||
@ -221,6 +222,9 @@ VGMSTREAM * init_vgmstream_ea_abk_new(STREAMFILE *streamFile) {
|
||||
bnk_target_index = 0xFFFF;
|
||||
ast_offset = 0;
|
||||
|
||||
if (!bnk_offset || read_32bitBE(bnk_offset, streamFile) != 0x53313041) /* "S10A" */
|
||||
goto fail;
|
||||
|
||||
/* set up some common values */
|
||||
if (header_table_offset == 0x5C) {
|
||||
/* the usual variant */
|
||||
|
@ -199,6 +199,12 @@ VGMSTREAM * init_vgmstream_ea_abk(STREAMFILE *streamFile) {
|
||||
target_entry_offset = 0;
|
||||
total_sound_tables = 0;
|
||||
|
||||
/* check to avoid clashing with the newer ABK format */
|
||||
if (bnk_offset &&
|
||||
read_32bitBE(bnk_offset, streamFile) != EA_BNK_HEADER_LE &&
|
||||
read_32bitBE(bnk_offset, streamFile) != EA_BNK_HEADER_BE)
|
||||
goto fail;
|
||||
|
||||
for (i = 0; i < num_tables; i++) {
|
||||
num_entries = read_8bit(header_table_offset + 0x24, streamFile);
|
||||
base_offset = read_32bit(header_table_offset + 0x2C, streamFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user