I have an archive where data is stored like nodes, for each compressed file in this archive, there is a node-header, saying what kind of data it is. I want to log these compressed files' filename depending on the node type. So a file with the type of "TEX0", would have the extension ".gtx" and so on.
Here's the script I made for the archive.
Code:
idstring "ANP 151 "
endian big
get FILES long
get NAMESZ long
for i = 0 < FILES
getdstring NODE 4
goto 12 SEEK_CUR
# this is where you do the node name parsing
getdstring NAME NAMESZ
get OFFSET longlong
get SIZE longlong
log NAME OFFSET SIZE
next i
Heres the archive too.
I don't know why I can't attach an archive, but I renamed it from ".anp" to ".txt", so I could upload it.