Code: Select all
comtype lz4f
endian big
goto 0x5A
get DAT_NAME_SIZE short
getdstring DAT_NAME DAT_NAME_SIZE
string DAT_NAME += "_"
xmath ZERO_SIZE "4 - (DAT_NAME_SIZE % 4)"
if ZERO_SIZE < 4
getdstring DUMMY ZERO_SIZE
endif
get DATS byte
get FILES long
math DAT_INDEX = -1
for i = 0 < FILES
getdstring DUMMY 0x0E
get NAME_SIZE short
getdstring NAME NAME_SIZE
xmath ZERO_SIZE "4 - (NAME_SIZE % 4)"
if ZERO_SIZE < 4
getdstring DUMMY ZERO_SIZE
endif
get OFFSET long
if OFFSET == 0
math DAT_INDEX += 1
string NAME_INDEX p= "%01d" DAT_INDEX
set NEW_DAT_NAME string DAT_NAME
string NEW_DAT_NAME += NAME_INDEX
string NEW_DAT_NAME += ".dat"
open FDSE NEW_DAT_NAME 1
endif
get ZSIZE long
get SIZE long
getdstring DUMMY 0x0A
clog NAME OFFSET ZSIZE SIZE 1
next i