I've been working on a script to extract the DDS images from the thousands of .dat and .neo files that are extracted from the WRESTLER.DR and COSTUMES.DR files respectively from Showdown Legends of Wrestling for Xbox.
I have come up with this so far
Code: Select all
get IDSTRING long
goto 0x38
get OFFSET short
if OFFSET == 0
goto 0xBC
get FILES long
get OFFSET long
else
goto 0xA0
get FILES long
endif
goto OFFSET
for i = 0 < FILES
get WIDTH long
get HEIGHT long
get UNK1 long
get NSIZE long
getdstring UNK2 16
getdstring NAME 0x10
string NAME <= "."
string NAME += "dds"
get OFFSET1 long
savepos OFFSET2
goto OFFSET1
get UNK3 byte
get TYPE byte
goto OFFSET2
get UNK4 long
get SIZE long
get NULL1 long
callfunction addDDSheader
math SIZE += 0x80
log NAME 0 SIZE MEMORY_FILE
next i
startfunction addDDSheader
endian little
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0xC HEIGHT long
if TYPE == 0x0F
putVarChr MEMORY_FILE 0x57 0x35
else
putVarChr MEMORY_FILE 0x57 0x31
endif
endian little
append
log MEMORY_FILE OFFSET1 SIZE
append
endfunction
The second problem is that when using the script on the .neo file, I get this.
I've attached some sample files
Any help would be much appreciated.
Thanks in advance