XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Thu May 25, 2017 2:24 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: The Surge .toc/.dat
PostPosted: Tue May 16, 2017 11:50 am 
Offline
advanced

Joined: Mon Feb 14, 2011 8:09 am
Posts: 76
Has thanked: 17 times
Have thanks: 33 times

Code:
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


You can make the ads go away by registering





Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Sir Kane and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group